Changelog#
Unreleased#
[0.4.0] - 2026-11-29#
Changed (breaking)#
A run or scan started on 0.3.0 that records a far-field aperture or a gas has another configuration hash under 0.4.0, so it is not resumed (ADR-066): finish it with solprop 0.3.x. A recorded
ApertureSetnow carries itsfield(SEP 53), and the CoolProp 8.1 floor changes every gas equation-of-state and transport record, whose digest names CoolProp’s version. Files written by 0.3.0 still read: the output schema is unchanged at 3.
Added#
Far-field aperture statistics can reduce the nonlinear part of the field and integrate their holes exactly (SEP 53, #938).
ApertureSet(field="nonlinear")makesaperture_spectrumandaperture_on_axis_spectrumreduce the state less the launch field carried by the run’s linear flow.profile="exact"integrates a circular hole over the grid’s interpolant of each integrand to rounding, through the newsolprop.spatial.exact_disc_weights, onnumpy_refand the native backend, CPU and device. That is the physical integral where the grid resolves the integrand, which the manual says how to check. An exact hole that reaches a transverse Nyquist limit on an active bin is refused.
Changed#
solprop now requires CoolProp 8.1 or later, through which optmat evaluates the gases (#943). It changes nitrogen: its viscosity follows Huber, Perkins and Lemmon (2024) and its thermal conductivity Sotiriadou et al. (2025), replacing Lemmon and Jacobsen (2004), so the dilute-gas viscosity near room temperature is 0.24 % lower (the new correlation’s stated uncertainty there is 0.2 %); and its reducing density is the published constant, which moves densities by about 1e-8. A steady-flow fill of nitrogen, its Reynolds number and its throughput change by the same fraction.
Fixed#
Fixed a runtime type-check failure when comparing step-index fibre modes with NumPy scalar refractive indices.
StepIndexMode.same_guide()now returns a Python boolean for these inputs (#945).Fixed the Windows x64 native wheel build, which the CI image’s MSVC STL refused for a Clang older than 22: the job now installs a pinned, checksummed LLVM 22.1.8 (#940).
[0.3.0] - 2026-11-18#
solprop 0.3.0 runs every native simulation in a compiled session of its own and fits the
native backend to the machine it runs on, lets the desktop front end run simulations and
scans on other machines, and makes the Python interfaces consistent, at the cost of many
breaks. It computes in double precision only, has two backends, native and numpy_ref,
and writes output schema 3. Every break is listed first, under “Changed (breaking)”, with
how to migrate (ADR-058).
Highlights:
Output schema 3: a file or scan written by 0.2.0 is refused wherever it is opened, read or resumed, and the refusal names the release that wrote it: read, resume or continue it with solprop 0.2.x. Every run’s configuration hash changes too, so no run started on 0.2.0 continues on 0.3.0.
One rule for saved planes, and consistent interfaces (SEP 51): every route records both ends of its run,
n_save=NgivesNevenly spaced planes andsave_planes=[...]lists positions (save_planes=80is refused with “passn_save=80”). A gas fill needs its pressure wherever a gas is named,loss=becomesloss_scale=andalpha=,from_freeandprop_freetake aRadialGridin place offrom_radialandprop_radial, the pulses takephases=andm=, and aSimulation’s inputs are read-only, changed throughwith_inputorwith_mixture.The front end on other machines: the desktop front end runs every simulation and scan as a process of its own that outlives the window, on this computer or over SSH on a workstation, a Slurm cluster or a rented machine. A Runs window lists every run on every machine, and a machine can be set up with solprop from the window (Running on other machines).
Machine calibration (SEP 46):
solprop calibratemeasures how the native backend should thread and plan its transforms on this machine, and every later run applies the profile and records it. The first native CPU run with no profile for its machine, build and allocation calibrates itself first, in about 30 s (SOLPROP_CALIBRATION=usenever measures,offignores profiles), and FFTW plans are kept, so each transform shape is measured once per machine and build.Faster native runs (SEP 45, SEP 47): the native backend steps every run it admits in a compiled session, Runge–Kutta, resumed and dense-output runs and the transverse edge included, with no Python step loop, on CPU and GPU builds alike. Idle OpenMP threads spin briefly instead of sleeping (benchmark windows took about 0.8 of their time), and on Apple silicon the thread budget is the fastest cores, smaller passes thread and SLEEF’s vector maths is the default.
TDSE on the native backend (SEP 49): the TDSE response runs on the native CPU build, and
backend="auto"selectsnativefor it as for every other run. Its atomic provider runs in a worker process of its own, so Ctrl-C or a stop flag stops a TDSE run during an atomic call, and solprop no longer pins a Pyroraptor revision.More correct results: the zero-dispersion search (
modes.base.zdw, thezdwstatistic and the design tools) no longer reads a gas resonance or the fine structure of a narrow feature as a zero, and takesnear=to choose among several;refractive_index_minus_onekeeps its precision in a dilute gas;FieldGrid.from_limitsrefusesffacbelow 2.2, where the Nyquist bin kept field; andVincettiModeuses the effective-radius coefficient Rosa, Melli and Vincetti print, 20 rather than 10, which moves an antiresonant fibre’s dispersion slightly (results with the old coefficient need solprop 0.2).Retired: single and mixed precision (the
precisionkeyword is gone), the experimentalmlxbackend, theBatchscan executor (useLocalorPool), the comparison Adams variants (ComparisonMultistep) and the CF4 coupled-flow sections. The backend and translation layers, unstable within 0.x, now build a backend for one problem and its run request (SEP 52).
Changed (breaking)#
Output and resume#
Output files are written in output schema 3. A file’s march snapshot (
/march_snapshot) stores itsstateas(n_modes, n_pol, n_omega)and its enginerowsas(n_slots, n_modes, n_pol, n_omega), without the leading axis of one they kept before, and the plane-reference record (RunMetadata.reference) has nobasisentry: a plane’s basis is derived when it is read. Saved fields, statistics and the rest of the run record are laid out as before. A file or scan written by 0.2.0 (output schema 2) is refused wherever it is opened, read or resumed, and the refusal names the file and the release that wrote it: read, resume or continue it with solprop 0.2.x, and a 0.1.0 file (schema 1) with solprop 0.1.x. Every run’s configuration hash also differs from 0.2.0’s, since the run record names its record types by module (solprop.output.records.GridRecord) and holds the keywords renamed in this release, so a run or scan started on 0.2.0 is finished on 0.2.x.solprop.output.schemais split into five modules:solprop.output.serialisation(serialise,ArrayDigest,StatedInput,recorded_input),solprop.output.provenance(BackendRecord,GitProvenance,package_versions),solprop.output.records(GridRecord,ModeRecord,StepperRecord,SavedPlane,RunOutcomeand the other record types),solprop.output.metadata(RunMetadata,SCHEMA_VERSION,resolve_metadata_write) andsolprop.output.store(Output,PlaneStore,FieldRetentionand the other save protocols). Import these names fromsolprop.output, which still exports the public ones, or from their new module.A run no longer computes or records its planes’ basis identities before its first step (#874): a guide that varies along z paid a mode evaluation at every saved plane, about 0.3 s for 201 planes of a gas-filled capillary with a pressure gradient. A plane’s basis is derived when it is read (
PlaneBasis.of_run; the record change is output schema 3’s), an ordinary mode set’s from its modes at the plane’s own position, which come fromfield_plane(..., source=simulation)or from the recipe the output records. A plane of a run from a script read withoutsource=has no basis identity (PlaneBasis.identitymay now beNone), andsame_basisrefuses to copy it or apply a declaredBasisChangeto it, namingsource=as the remedy.Recipe.from_outputalso takes an opened output.A modal basis identity (
solprop.coupling.modal_basis_identity) is formed by roundingaeffandneffto 40 significant bits with exact binary arithmetic and hashing their bytes: it costs about a third of what it did and is the same on every platform. Identities therefore differ from those 0.2.0 computed.solprop.output.resumeis renamedsolprop.output.read_resume_state(also insolprop.output.hdf5), andsolprop.solno longer exportsresume: the name read a file’s resumable state into aResumeStateand continued nothing, whichresume=Trueon a run orsolprop resumedoes. Replacefrom solprop.output import resumeorfrom solprop.sol import resume, andresume(path), withread_resume_state; the old name is gone.solprop.driver.run.open_run_recordis removed in favour ofsolprop.driver.run.open_run, which opens an output with the same record and also returns its checkpoint interface.MemoryOutputnow returns read-only views of its buffers (run["field"],run["z"],run["stats/<name>"], the step history and statistics,noise_phase,plane_field): a write through one raisesValueErrorinstead of silently changing the stored run. Take.copy()of an array to change it.The
Outputprotocol now includesplane_field(index, convention="optics"), whichsolprop.processinguses to read one saved plane: a handler of your own implements it (returning shape(n_modes, n_pol, n_omega)) besidefields.CallbackOutputrefuses it by name.processing.axes.layoutreads the shape from the store without reading the field, and counts every saved plane.A refused argument to
SnapshotController(interval_seconds,max_snapshots) or toTDSEArchive(path,outputs) raises the newsolprop.exceptions.OutputRequestError, aSolpropErrorand aValueError, as a refusedprogressorresumeraises aDriverError. They raisedOutputError(aRuntimeError) and bareTypeErrororValueErrorbefore. CatchOutputRequestErrororValueErrorin place ofOutputErrororTypeErroraround these constructors;OutputErrorstill reports a file that cannot be written or read.
Routes and Simulation#
Every route now follows one rule for the saved planes and the end of a run (SEP 51). A run marches from
initial_zto its length,lengthorgrid.length, and always records both ends.n_save=NgivesNevenly spaced observations over that interval, both ends included, andsave_planes=[...]lists positions inside it.SimulationSettingsgainsn_save, itssave_planesbecomes optional (given neither, a run records 201), and a recipe’s object-route[build.settings]takesn_savetoo. Migration:save_planes=80is refused with “passn_save=80” in Python and “writen_save = 80” in a recipe, where 0.2.0 read a recipe’ssave_planes = 80as one plane at 80 m (#533);save_planes=0.25must be[0.25];n_saveandsave_planestogether,n_savebelow 2, and positions before the entrance or beyond the end are refused. Positions short of the length no longer end the run: it continues to the length and records it, so indices counted from the end (field_planes=[-1, …]) may name other planes, and a short window of a longer setup is now a shorter grid, withboundary_lengthpinned to keep the absorber. On the keyword routeslengthmay beNonebesidegrid=, which then supplies it, as inprop_capillary(radius, None, "Ar", grid=grid, ...); it is still passed, sogasstays required. Given besidegrid=, the two must agree, and a call with neither is refused; a recipe may leavelengthout beside a grid.n_savebeside an interior launch counts over[initial_z, length].Simulation.from_radialandprop_radialare removed:Simulation.from_freeandprop_freetake aRadialGridas well as aFreeGridorLineGrid, and choose the radial or the Cartesian transform from it, with the same keywords and the same defaults as before for each grid. Replacefrom_radial(...)withfrom_free(...)andprop_radial(...)withprop_free(...); recipes keep theradialroute.Simulation’sgrid,modes,responses,initial,initial_z,noise,noise_resolution,profiles,configuration,spatial_grid,medium,frame,general,guide,wall,taper_couplingandmaterialsare now read-only properties, andprofilesandconfigurationreturn copies. Assigning one used to leave the run built from the old value while the record described the new one (sim.initial = pulseran the old pulse); it now raisesAttributeError. Derive a run with a new input, noise or launch position withwith_input(...), one with a new fill withwith_mixture(...), and build a newSimulationfor anything else.prop_free,prop_planar,Simulation.from_freeandSimulation.from_planartake the defaults the keyword routes take.SimulationSettings.dz_maxanddz_initare optional: leftNone, a simulation takes half itsgrid.lengthand a ten-thousandth of it, the first refined by the start-up rule, asprop_gnlse,prop_capillaryandprop_waveguidedo. Settings whosestatsisNonenow record the route’s default statistics on the free-space and planar routes (default_spec("radial")on a radial grid,default_spec("free")otherwise, with a mixture’s per-species statistics), as every modal route already did, rather than none; passStatsSpec(names=())to record none. The manual no longer says thatrtol,atol,dz_initanddz_maxare keywords of everyprop_*function: the free-space and planar ones take them in their settings.The
polarisationkeyword ofprop_capillary,prop_waveguide,Simulation.from_capillaryandSimulation.from_waveguide, and of their recipes, is removed: it was refused whatever its value, because these routes are scalar. Declare the polarisation in the modes (a rectangular or slab guide’s own partners, each a row of its own). Passing it now raisesTypeError, and a recipe holding it is refused as an unknown keyword.Simulation.from_waveguideandprop_waveguideno longer takeobservable_rtolandobservable_atol, which accepted onlyNoneand refused every number. Drop them from calls: a general modal run’s observables are bounded by the solver’s ownrtolandatol.PIControlleris final: defining a subclass raisesStepperError(ADR-077). Both backends implement its decisions and its norm (scale,accepts,propose,rejection_factor,start_factor,equivalent_norm) themselves, so a subclass that overrode one would step differently on each (0.2.0 stepped such a run on native with solprop’s Python march and aHostMarchWarning). Set the controller’s fields instead.Removed
solprop.stepper.multistep.ComparisonMultistep, the benchmark-only Adams variants SEP 13 compared and did not select (PECE, explicit Adams–Bashforth, the matched predictor–corrector pairs and their Hermite dense interpolant), with the reference’s general Adams path that stepped them,milne_factor,defect_integral, theCorrectorandInterpolanttypes,Multistep.correctorandMultistep.corrector_nodes(ADR-077). UseMultistep();Multistep(order=q, variable_order=False, formulation="interaction")is the one-order-higher PEC variant the comparison family also named.StepperSettingsandPropagatorModemoved fromsolprop.translate.problemtosolprop.stepper.settings, the run-specification layer the run request’s stepper section belongs to: import them from there, orStepperSettingsfromsolprop.stepper.solprop.translateno longer re-exportsStepperSettings.solprop.driver.scaffold.propagate_fixed_rk4’sn_savenow means what it means on everySimulationroute: the number of evenly spaced saved planes over[0, z_end], both ends included, at least 2 (default 2).n_stepsmust be a multiple ofn_save - 1. A call that passedn_save=4now passesn_save=5for the same planes (#856).solprop.driver.simulationnow holds theSimulationclass alone; the rest moved into modules by concern. ImportSimulationSettingsanddefault_collarfromsolprop.driver.settings(orSimulationSettingsfromsolprop.driver),SimulationRunnerandcheck_derived_problemfromsolprop.driver.runner,metadata_forfromsolprop.driver.metadata,default_field_rangefromsolprop.driver.inputsanddefault_radial_orderfromsolprop.driver.routes.hollow.
Modes and media#
A gas fill no longer takes a pressure it was not given: the same omitted argument meant 0 bar on the modes and 1 bar on the routes and
SpatialMedium. Wherever a gas is named, its pressure must now be passed, in bar, or the call is refused with “a gas fill needs its pressure” namingpressure: on the hollow modes, theModeCollectionfactories,SpatialMediumand the capillary and waveguide routes (for a built-in gas,"air"or a mapping of fractions). Where no gas is named nothing changes: a mode without a gas is evacuated,SpatialMedium()is vacuum, and aMixturecarries its own pressure. To migrate, add the pressure the call used to take by default:MarcatiliMode(125e-6, "He", 0.0)for a mode or mode set (or drop the gas, which is what 0 bar meant), andprop_capillary(r, L, "He", 1.0)orSpatialMedium("Ar", 1.0)for a route or a medium. A recipe’s route no longer resolves an omittedpressureto one bar.One loss vocabulary for every mode.
loss=is removed, with theLossSpecalias, from the hollow modes (MarcatiliMode,RectMode,SlabMode,VincettiMode, the tabulated hollow modes), theModeCollectionfactories,prop_capillaryandSimulation.from_capillary,capillary_paramsandcapillary_design, and recipes.loss_scalemultiplies a hollow mode’s own loss (default1.0;0.0is lossless) andalphareplaces it by an absolute power attenuation in 1/m, a number or a callablealpha(omega); givingalphabeside aloss_scaleother than one is refused.StepIndexModeandSpecifiedMode(and itsfrom_taylor,from_taylor_pathandfrom_table), whoseloss=was already an absolute attenuation, take it asalpha=. Migrateloss=Falsetoloss_scale=0.0,loss=0.5toloss_scale=0.5, a callableloss=ftoalpha=f, droploss=True, and writeloss_scale = 0.0in a recipe forloss = false.SpecifiedMode.alpha(omega, z)is nowSpecifiedMode.attenuation(omega, z)andloss_pathisalpha_path, becausealphais the declared field.The
ModeCollectionfactories share one layout: the geometry, thengasandpressure(as on the modes: no gas is an evacuated guide, and a gas needs its pressure), then keyword-only options, withtemperature=None(room temperature, or the mixture’s own) andmixture=on all of them.he1mandvincettitakecount=by keyword (default one),slabtakesorders=by keyword (default(1,)) after the fill, andmarcatilitakeskinds=,n=andm=by keyword: writeModeCollection.slab(63.5e-6, "Ar", 1.0, orders=(1, 3, 5))forModeCollection.slab(63.5e-6, (1, 3, 5), "Ar", 1.0)andModeCollection.he1m(125e-6, "He", 0.8, count=4)forModeCollection.he1m(125e-6, "He", 0.8, 4).The gas-property functions take one argument order,
(gas, pressure, temperature), with the pressure in bar namedpressureand the temperature defaulting to 293.15 K in every function;ReferenceState, where a source states its own state, and theEquationOfStateprotocol keep it required.density,ideal_gas_density, the equations of state’sdensity,ReferenceState,gasflow.mass_flowandgasflow.knudsen_numberrenamepressure_bartopressure(writeReferenceState(pressure=1.0, temperature=273.15)).physdata.transport.sound_speed(gas, temperature, pressure_bar=None)becomessound_speed(gas, pressure=None, temperature=293.15): replacesound_speed(gas, T)withsound_speed(gas, temperature=T)andsound_speed(gas, T, p)withsound_speed(gas, p, T).viscosity,heat_capacity_ratioandmean_free_pathnow default the temperature to 293.15 K.The steady-flow and pressure-profile functions name their pressures without the unit, as
physdatadoes; the pressures stay in bar.gasflow.throughputandPressureGradient.two_pointrenamestart_barandend_bartostart_pressureandend_pressure,gasflow.choked_pressurerenameshigh_bartohigh_pressure,gasflow.steady_fillrenamespressures_bartopressures(asPressureGradient.from_stagesalready spells it),StageFlowrenames its fieldsstart_barandend_bartostart_pressureandend_pressure, andFlowReportrenameschoked_start_barandchoked_end_bartochoked_start_pressureandchoked_end_pressure. A recipe’sPressureGradient.two_pointtable takes the new keys. Positional calls are unchanged; rename the keywords, recipe keys and attributes.solprop requires optmat 0.10.0 or later. Its first real-gas density loads CoolProp in about 0.07 s instead of 0.46 s; no density, index or other recommended value changes, but every equation of state’s identity does (optmat’s
EVALUATION_VERSION2), which a run with a gas fill records.MaterialSelectionno longer has anenergy_lossfield, andsolprop.physdata.selection.ENERGY_LOSS_POLICIESis gone: its one value,"peak-weighted", was validated and recorded but never read, since each optmat rate applies its own convention, which itsionisationentry in the material manifest still records. Dropenergy_loss=fromMaterialSelection(...)and from a recipe’sMaterialSelectiontable; the run is unchanged. A run’s material manifest no longer carries apolicies.energy_lossentry.is_air, which says whether a gas name means air (Gas.Air, or"air"in any case), moved fromsolprop.driver.mixturestosolprop.physdata.gasesbesideas_gasandis_molecule, and is exported fromsolprop.physdata. Import it asfrom solprop.physdata import is_air.The tube-lattice geometry helpers take every argument after the first by keyword, so two lengths can no longer be swapped silently:
tube_gap(core_radius, *, tube_radius, n_tubes),core_radius_from_gap(tube_radius, *, n_tubes, gap),tube_radius_from_gap(core_radius, *, n_tubes, gap),TubeLattice.from_gap(core_radius, *, gap, n_tubes, wall_thickness)andTubeLattice.from_inner_diameter_ratio(core_radius, *, wall_thickness, inner_diameter_ratio, n_tubes). Name the arguments, for exampleTubeLattice.from_inner_diameter_ratio(20e-6, wall_thickness=300e-9, inner_diameter_ratio=0.6, n_tubes=6).Removed the CF4 coupled-flow sections (ADR-077):
CoherentWall’smethod,growth_limitandfallbackkeywords,solprop.translate.coupled.cf4_flow,cf4_defect,cf4_growth_bound,CF4_NODES,CF4_WEIGHTSandCF4_GROWTH_LIMIT, the"cf4"section method, and theflow.cf4entry of a coherent wall’s run record. They ran onnumpy_refalone; a recipe that gives one is refused as an unknown key. A varying coherent wall is integrated by the frozen-residual split, as by default; to shorten its advisory step, divide the sections (CoherentWall(sections=...)) or cap the step.A moving guide’s z sampling is described once (#875):
ModalPathnow lives insolprop.modes.path(still importable fromsolprop.modes.guide), andModalPathTableholds that record aspathbeside itstablesinstead of its ownz_edges,degree,z_errorandgram_departure(readtable.path.z_edgesand so on).sample_modal_pathtakesrtol=andsections=to search a degree, orpath=aModalPathalready qualified to rebuild its snapshots, in place ofz_edges,degree=andmeasured=. Sampled positions and tables are unchanged.The provider-table sampling of a general modal guide moved from
solprop.translate.modal_tablesto the newsolprop.modes.tables(sample_modal_table,sample_provider_table,DenseModalTable,align_modal_sample,channel_areaand the rest), and a moving guide’s path sampling fromsolprop.translate.modal_pathto the newsolprop.modes.path(path_rule,path_sections,sample_modal_path,ModalPathTable);solprop.translate.modal_tableskeeps the run’s execution maps (ModalTransformTables,modal_transform_tables,project_transverse_field). Import the moved names from their new modules.StepIndexProviderand itsMATERIAL_AGREEMENT_RTOLmoved fromsolprop.modes.guideto the new public modulesolprop.modes.stepindex_vector(formerly the privatesolprop.modes._stepindex_vector), andradial_node_rulemoved fromsolprop.modes.guidetosolprop.modes.vector, besideModalNodeRule.from solprop.modes import StepIndexProvideris unchanged; replacefrom solprop.modes.guide import StepIndexProviderwithfrom solprop.modes.stepindex_vector import StepIndexProvider, andfrom solprop.modes.guide import radial_node_rulewithfrom solprop.modes.vector import radial_node_rule.The coherent wall moved out of
solprop.modes.capillaryinto its own module,solprop.modes.wall:CoherentWall,WallImpedance,WallLimits,WallOperator,WallFamily,VectorWallOperator,wall_operator,vector_wall_operator,wall_connection,taper_connection,taper_coupling_block,worst_wall_limitsandwall_square_root_metric.from solprop.modes import CoherentWall(and the other namessolprop.modesalready exported) is unchanged; replacefrom solprop.modes.capillary import CoherentWallwithfrom solprop.modes.wall import CoherentWall, and likewise for the others.
Pulses, grids and boundaries#
The pulse builders now spell their parameters as the drivers do. The Taylor spectral phase of
GaussianPulse,SechPulse,CustomPulse,DataPulseandTimeDataPulse(and ofDataPulse.from_spectral_density) isphases=, the nameprop_gnlse,prop_capillaryandprop_waveguideuse, rather thanphase=; and the super-Gaussian order ofSpatialPulseandPlanarPulseism=, as onGaussianPulse, rather thanorder=. The meaning is unchanged. A recipe’s pulse tables takephasesandm. Migration: renamephase=tophases=on the pulses andorder=tom=on the beams.FieldGrid.from_limitsrefusesffacbelow 2.2, andTimeGrid.validaterefuses a field grid whose spectral collar is not exactly zero at the zero-frequency or Nyquist bin. With2 <= ffac < 2.2the coarse Nyquist bin lay inside the collar and kept field, which broke the energy identities offourier.oversample,fourier.spectral_densityandspatial.node_spectrum. Passffac >= 2.2(the default, 6, is unchanged).EnvelopeGridstill acceptsffac >= 2.The transverse edge’s
unwatchedstatus is gone, every backend reading the edge:TransverseStatusno longer lists it andTransverseEdge.launchno longer takesreads=; dropreads=from a call. The boundary monitor’sunwatchedstretches, left by an execution run withboundary_check=None, are unchanged.Removed
solprop.boundaries.split_step_factor,apply_split_stepandapply_band_mask, which no backend ran: theabsorber_scheme="split_step"path is the backends’ own. To reproduce them, multiply a time-domain field bynumpy.exp(-0.5 * temporal_rate * step)and mask a spectrum withnumpy.where(band_mask, spectrum, 0.0).
Processing, statistics and plots#
One plane-selection rule across
solprop.processing: every function takesplane=None, z=None, and naming a plane both by index and by position raisesProcessingErroreverywhere (it raisedOutputErrorin the field and time accessors, and the beam readers letzwin silently). With neither, a function returning one plane (get_spectrogram, the readers ofprocessing.beams, the reconstructions ofprocessing.modal, the compressors,apply_transfer,fluence_map,field_plane) reads the last plane, and a reader of every plane returns them all. The rule is stated in the processing guide.The plots take their default ranges from the run instead of fixed windows that clipped picosecond fibre pulses and mid-infrared spectra: with no
spec_range,prop_2d,spec_1dandspectrogramshow the band the grid was declared over (plotting.propagation.default_spec_range), and with notime_range,prop_2d,time_1dandspectrogramshow where the drawn light is (plotting.propagation.default_time_range: 0.05 % to 99.95 % of each trace’s energy, widened by a quarter on each side).prop_2ddefaults toaxis="wavelength"like every other plot.spec_1d(log_min=1e-6)is nowdb_min=-60.0, in dB below the peak, as onprop_2d(spectrogramnames its floordb_mintoo, at -40 dB by default).DEFAULT_WAVELENGTH_RANGE,DEFAULT_SLICE_WAVELENGTH_RANGEandDEFAULT_TIME_RANGEare removed.The array form of the compressors (
grid=,spectrum=ofcompress_taylor,compress_material,compress_mirrors,compress_gratings,compress_prisms,transform_limitandoptimise_cep) now takes the spectrum in the optics convention, the oneoutput["field"]andplane_fieldreturn, socompress_taylor(grid=grid, spectrum=run.plane_field(-1))finds whatcompress_taylor(run)finds. A spectrum from a pulse’sbuild(grid)is internal: passfourier.spectrum_to_optics(spectrum, kind=grid.kind).solprop.processing.compression.apply_transfertakes the output first, like every other processing function:apply_transfer(output, transfer)replacesapply_transfer(transfer, output).The compressors and
apply_transferrefuse amodes=selection the run does not have, or an empty one, withModeError, as every other processing reader does, instead ofProcessingError: catchModeError(orValueError, which both subclass) around them.The reconstruction accessors of
solprop.processing.modal(electric_field,magnetic_field,reconstructed_flux,instantaneous_flux,coordinate_intensity,plane_nodes) rebuild the run’s reference tables from the requiredguide=and no longer taketablespositionally:electric_field(run, guide=guide). Passtables=(from the newsolprop.processing.modal.reference_tables(run, guide=guide)) to reuse one rebuild across many calls; a script no longer needssolprop.translate.general.general_modal_route. They read the last plane by default (plane=-1) instead of requiringplane=orz=. The tables alone are rebuilt by the newsolprop.translate.general.reference_tables.A malformed
StatsSpec(an unknown, repeated or reserved name, a bad window or region, a periodic subset that is not a subset or names a statistic no backend evaluates between planes, a period below 1, a missing far-field table) orstats.ApertureSet, an unknown profile or weighting passed tostats.check_aperture_choices, and a spec that does not fit a line grid (an aperture centred offy = 0, a half-plane bounded in y or an ellipse, or a spectral region whosekappa_yinterval excludes zero) now raiseProcessingError, aValueError, instead ofOutputError, aRuntimeError: they are argument errors. CatchProcessingError(orValueError) whereOutputErrorwas caught, around building a spec or its apertures and around a line run’s statistics tables.StatDefinition.implementedis removed: every statistic insolprop.stats.CATALOGUEis implemented, and the reserved-name refusal it served had no entries. EachStatDefinitionnow also says how a statistic is formed and treated (evaluate,metric,weight,profile,plasma,general,advice), and the name sets such asMETRIC_WEIGHTED_STATISTICSandGENERAL_MODAL_ACCESSORSare derived from those fields, with unchanged members.
Scans#
The
Batchscan executor is removed, with the batch machinery behind it on both backends (SEP 52): on the native backend it costsizetimes the memory ofLocalfor no gain in speed. A script that importsBatchnow fails at import: useLocal()to run the points one after another on one reused backend, orPool()to run them in parallel worker processes;QueueandSlurmspread them over controllers and cluster jobs. Every executor still replays a fixed schedule. Also removed:solprop.driver.batch,solprop.backends.batch,solprop.backends.registry.select_batch,solprop.backends.BatchBackend,Backend.max_batch,StatsSpec.same_tables, the reference’sNumpyBatchBackendandsolprop_native.batch(NativeBatchBackend).run_scanno longer takesstale_age: aLocalorPoolscan holds its file’s lock for its whole session, so arunningpoint it finds is always taken up again, and the keyword never reachedQueueorSlurm. Remove it from calls; a durable queue’s lease isQueue(stale_age=...), and nowSlurm(stale_age=...)for the queue its tasks share.python -m solprop.scan --stale-agenow reaches the tasks of--submitand--emit-slurm, and is refused without--queue,--chunkor a Slurm mode, where it did nothing.solprop.processing.scans.open, which shadowed the builtinopen, is renamedopen_scan, the namesolprop.solalready gave it:from solprop.processing.scans import open_scan.
Backends and native#
solprop has exactly two backends,
nativeandnumpy_ref, with no tiers and no plugin backends (ADR-077).solprop.backends.registry.BACKENDS,BackendEntry,REMOVED_BACKENDSandFAR_FIELD_BACKENDSare removed;BACKEND_NAMESlists the two. A backend name that is neither,numba_cpuincluded, now raisesBackendErrornaming both wherever it is requested, whereselectraisedValueErrorfor an unknown one; passbackend="native","numpy_ref"or"auto".Single and mixed precision are retired: solprop computes in IEEE 754 binary64 only (ADR-077). The
precisionkeyword ofSimulationSettings, theSimulation.from_*constructors and theprop_*functions, and a recipe’sprecisionkey, are gone (a recipe that gives it is refused as an unknown key); so aresolprop.translate.precision, the reference’s binary32 path (NumpySingleBackend), the run summary’s precision row, theprecisionfield ofsolprop_native.BuildInfo, the guide’s single-precision page and gallery example, and every internalprecisionargument and field. The kernel’srun_optionsreply lists the installed backends underbackends, in place ofdoubleandsingle. To migrate, dropprecision=from calls and theprecisionkey from recipes.The experimental
mlxbackend for Apple GPUs is retired (SEP 47 §6.6):backend="mlx", in a call or a recipe, raisesBackendErrorand never runs on another backend. Thesolprop[mlx]extra, the front end’s MLX choice and themetalentry of the kernel’s run options are gone; the front end shows a recipe’s unavailable backend as it is named. With MLX’s transform costs gone, thetransformskeyword ofFieldGrid.from_limitsandEnvelopeGrid.from_limits(a recipe grid that gives it is refused as an unknown key), thelibraryargument ofsolprop.grid.fft_cost,solprop.grid.TransformLibraryandTRANSFORM_LIBRARIES,solprop.backends.registry.metal_availableandSINGLE_ONLY, and themlx_*andsingle_precision_rowssizes ofsolprop.backends.memoryare removed.A backend (
solprop.backends, unstable within 0.x under ADR-058) is built for one problem and request and runs it in a session of its own; 0.2.0’s direct stepping interface and Python step loop are gone (SEP 47).Simulation.run,SimulationRunner, scans and theprop_*functions do all of this themselves, with unchanged interfaces.solprop.backends.registry.select(name, problem, request, ...)and the backend constructors take the run’s request after the problem, check the pair before they allocate and expose it asBackend.request; execution choices such as the node budget arrive assolprop.backends.session.ExecutionOptions(options=). A run starts withbackend.prepare(problem, request).start(start), orsolprop.backends.sessions.start_session, from asolprop.backends.session.Start(Start.entrance(problem)for a fresh run), which also carries a resumed run’s call ledgers and Adams history;solprop.driver.run.run_problemtakes a requiredstart=in place ofstart_plane=, and a caller no longer callsset_initialfirst. TheBackendprotocol loses its stepping members (set_initial,propagate_to,observe,march_snapshot,restore_marchand the rest;available_device_memoryis the module functionsolprop_native.available_device_memory()), andtimed_step()is replaced byBackend.timing_probe(start), whosetrial(z, dz)takes one trial step that commits nothing and whosefield()reads that trial’s end state. Removed with the loop:solprop.backends.driver,solprop.backends.multistep(CallLedgeris nowsolprop.backends.ledger.CallLedger),solprop.backends.multistep_general,solprop.backends.low_storage.LowStorageMarch(the NumPy reference’s own marches are insolprop.backends.numpy_ref.marches),solprop.backends.numpy_ref.admissionandsolprop.backends.exponential.refuse_formulation(its one Adams refusal isrefuse_adams), withCOUPLED_SECTIONSandEXPONENTIAL_REPRESENTATIONSof that module, the reference backend’shelpersattribute,solprop.backends.registry.statistics_refusal,NativeBackend.far_field_statisticsandsolprop_native’s*_FIELDStuples.reachedandreplay_toleranceare now insolprop.stepper.schedule, and the general route’s node chunk insolprop.backends.node_chunk(general_node_chunk).The problem descriptor between translation and the backends (
solprop.translate, unstable within 0.x under ADR-058) describes one trajectory and leaves the run’s policy to a separate request (SEP 47, SEP 52).Simulation,SimulationSettingsand theprop_*functions take the same arguments as before.solprop.translate.problem.KernelProblemis renamedPropagationProblem, with no alias. Its arrays carry no leading batch axis (the problem’sshape,initial.field0andinitial.noise0, the operator’s value tables,StageTerms.phi,Observation.fieldandnoise_phase, the periodic rows ofStepStats,ResponseBudgetError.field,RunEstimate.shapeand the fields thatBoundaryMonitor.powerandSplitCrossing.occupancytake), so code that indexed[0]drops the index;Initial.batch_params,Flags.single_batch,assemble(batch_params=...)andplane_from_observation(member=...)are removed. The route-specific fieldstransform,flux,transverse,tdseandcurrent_numeratormove into a closed union,problem.route, from the new modulesolprop.translate.routes(aModalRoute, aGeneralRouteor aSpatialRoute);problem.transformstill reads the route’s transform, andtdse_of,flux_ofandtransverse_ofread a route’s own leaves. The problem no longer hasstepperorstats_spec: the run’s policy travels in the immutablesolprop.translate.run_request.RunRequest, whichSimulation.run_request()returns, andassemblereturns aTranslation(problem, request)pair (problem, request = assemble(...)).PropagationProblem.validate()checks the problem alone, the newsolprop.translate.problem.validate_run(problem, request)adds the checks that read the run’s policy, andvalidate_launch,metadata_for,field_retention,check_snapshot_request,run_summaryandcheck_derived_problemtake the request. A hand-built problem whose route, polarisation count, vector Raman terms or TDSE statistics a backend refused withBackendErroris now refused withTranslationError(solprop.translate.admission.check_general_route). Moved:node_kerr_tensor,node_kerr_formandnode_delayed_mapsfromsolprop.backends.numpy_reftosolprop.translate.general,QUADRATURE_ALARMtosolprop.translate.modal,MARCH_SNAPSHOT_AUTO_BYTESfromsolprop.driver.runtosolprop.translate.run_request, andMAX_N_POLtosolprop.nonlinear.responses.MAX_N_POLalone;CompiledResponsesno longer takesresponse_order.The node chunk is the backend’s execution choice, planned when the backend is prepared, not part of the translated problem (SEP 47, #361):
Transform.node_chunkis gone, andassemble,multimode_transform,free_transform,planar_transformandradial_transformno longer takenode_budget(free_transformno longer takes the time grid, norradial_transformn_pol).SimulationSettings.node_budgetkeeps its meaning and its chunks, may change after translation, stays outside the resume key and reaches the backend throughExecutionOptions(node_budget=...)(select(..., options=...)or the backend’soptions=); an explicit budget is authoritative.from_capillary,from_waveguide,prop_capillaryandprop_waveguidenow defaultnode_budgettoNone, the backend’s choice (the same 64 MiB on a CPU build), and the general-guide refusal ofnode_budgetnow refuses any value other thanNone. The default budgets and the rule are insolprop.backends.node_chunk(DEFAULT_NODE_BUDGET,DEFAULT_SPATIAL_NODE_BUDGET,plan_node_chunk).
Errors, logging and imports#
DriverErroris now aValueErrorrather than aRuntimeError, asGridError,PulseErrorandNoiseErrorare: nearly every one is a refused argument, soexcept ValueErrornow catches a badn_saveas it catches a bad grid. Code that caught aDriverErroras aRuntimeErrorshould catchDriverError(orSolpropError).Simulation.runand theprop_*functions refuse aresumethat is notFalse,Trueor"interpolated"with aDriverErrornamingresume, rather than a bareValueError. The few failures of a scan’s environment rather than of its request – a refused memory query, a failed Slurm submission or queue lease refresh, a scan point interrupted in its worker – raise the newExecutorError, aRuntimeError.The refusals of a non-positive or non-finite number and of an unknown keyword now read the same across the design tools, pulses, gas flow, antiresonant tubes, the TDSE specifications and the processing and plotting functions:
<name> must be finite and positive, got <value>and<name> must be 'a', 'b' or 'c', got <value>. A numeric string given where those functions expect a number is now refused rather than parsed.solprop.loghas two reporter protocols instead of six.ProgressReporternow declares all six calls (summary,started,step,plane,finished,interrupted), each with a no-op default that a subclass inherits, andScanReporterdeclarespoint_reporter(defaultNone).InterruptibleReporter,SummarisingReporter,PlaneObserverandWatchingScanReporterare removed: anisinstancetest against them becomes one againstProgressReporterorScanReporter, andobserve_planestays an optional method that a reporter may define. A reporter that subclassesNullReporterorNullScanReporterneeds no change. One written from scratch to the four basic calls must now also definesummaryandinterrupted, or subclassNullReporter(orProgressReporter) to inherit them; a run refuses it with aDriverErrorbefore it starts. Likewise a scan reporter must definepoint_reporteror subclassNullScanReporter(orScanReporter).The packages re-export only what a user calls.
solprop.modeskeeps the modes, guides, collections, materials and the mode protocol, and now also exports the derived quantities ofsolprop.modes.base(beta,beta1,beta2,beta3,alpha,zdw,aeff,loss_length,db_per_m,transmission); its numerical machinery (the wall families and limits, connections, quadrature rules,GasFillMixin, tolerances) is imported from its submodule, for examplefrom solprop.modes.wall import worst_wall_limits.solprop.outputno longer re-exportsPlaneStore,PlaneLayout,CheckpointOutput,RetainingOutput,TerminalCheckpoint,StatedInput,serialise,resolve_metadata_write,package_versionsor the layout and convention constants;solprop.driverno longer re-exportsmetadata_fororplane_from_observation(import the latter fromsolprop.driver.run), and neither it norsolprop.driver.runre-exportsLogReporterorProgressReporter: import the reporters fromsolprop.log.solprop.nonlinearexportsOptmatRate.
Front end and command line#
solprop exportno longer takes the required--pythonflag:solprop export recipe.tomlprints the Python script, and--form pythonnames that form explicitly. Drop--pythonfrom scripts that call it.In the desktop front end, every sheet’s Saved planes row offers Evenly spaced (
n_save) and Explicit positions (save_planes), and typing into one form removes the other in the same undoable edit. A setup opens on the form it holds; the object sheets no longer turn a count into a list of positions, nor rewrite the positions when the length changes. An object-sheet count of 80 planes, which left out the entrance, isn_save = 81.
Added#
Simulation.run_request()returns the run request translation built beside the problem, translating once, asSimulation.translate()does for the problem (#619).The desktop front end runs every simulation and scan as a process of its own, which outlives the window and is followed from its record, and runs them on other machines over SSH too: a workstation, a Slurm cluster or a rented machine, picked on the Runs on line. Each run keeps its record in its folder there, so it survives a closed window or a dropped network and is found again on reconnecting; a Runs window lists every run on every machine, a results file is analysed on its machine, and a machine can be set up with solprop from the window. See Running on other machines.
Added
solprop.output.capability.quantities,Quantity,QuantityKindandcompression_refusal: what a stored record’s derived quantities are on its basis, and why the compressors refuse a basis.solprop.capabilities.QuantityandQuantityKindare the same objects, re-exported.Added
solprop.output.serialisation.deserialise, the partial inverse ofserialisethat the record types use: it rebuilds an inlined array record and returns any other JSON value unchanged.plotting.spectrogram,time_1dandspec_1dtakeplane=, a saved plane’s index (negative from the end; a sequence of them for the slices), as the processing readers do; giving bothplaneandzraisesProcessingError.Added
solprop.log.ResumeChoice, the typeresume=takes onSimulation.runand theprop_*routes, so their signatures andhelp()showresume: bool | Literal['interpolated']under a public name.solprop scan --help(andpython -m solprop.scan --help) now explains every option, with its unit and default.solprop calibratefits the native backend to the machine it runs on (SEP 46; Calibrating solprop to your machine): in about 30 s (--quick), two minutes, or seven minutes (--thorough), it measures how the native backend should thread and plan its transforms here, and keeps a setting only where it reliably beats the built-in value. The profile is kept per user in the platform’s cache directory (SOLPROP_CACHE_DIRmoves it;SOLPROP_CALIBRATION_PATHadds shared read-only directories, such as a cluster’s per node type), keyed by machine, build and allocation, and every later run applies it and records the settings it applied in its metadata (calibration). The first native run with no profile for its machine, build and allocation calibrates quickly by itself after aCalibrationNotice, and a scan calibrates its workers’ allocation first;SOLPROP_CALIBRATION=usenever measures andoffignores profiles. Without a profile (withSOLPROP_CALIBRATION=useoroff, or on a device build), a run uses the built-in table keyed by operating system, whichBuildInfo’s threshold fields report.Simulation.calibrate()andsolprop calibrate --reciperefine the settings for one simulation, reused by every run and scan point of the same execution, and--show,--export,--importand--clearmanage profiles.solprop.solexportsStatsSpec, which a session passes tostats=.
Changed#
A coupled flow refused by its conditioning guard (the taper coupling of a lossy multimode capillary at the default
dz_max, for one) now names the largestdz_maxit admits, read exactly from itsexp(dz_max spread)bound, instead of leaving the step to be found by trial (#159).VincettiMode’s effective core radius uses the coefficient Rosa, Melli and Vincetti (2021) print in their Eq. 10,3 + 20 wavelength / core_radius, instead of 10, so its index, dispersion and fitted area change while the API and the loss do not. For the tutorial fibre (15 µm core, six 9 µm tubes with 180 nm walls) at 800 nmbeta_2moves from -479 to -471 fs²/m, and filled with argon its zero-dispersion wavelength moves 1.7 to 3.7 nm longer between 5 and 30 bar. The coefficient is not a parameter: results with the old value of 10 need solprop 0.2 (#160).The native backend’s CPU transforms are faster on many threads (#598; ADR-075): a batch of transforms now threads by its shape, about one thread per row and the whole team only for many rows, instead of by its element count, and a multi-mode stage transforms its forward rows (projection, absorber, plasma currents) as one batch, as on a GPU (
SOLPROP_NATIVE_FORWARD_PACK=0turns that off). The tracking cases ran 0.98 of their time on geometric mean on 18–36 cores of an Intel Xeon Gold 6240 and 16 of an AMD EPYC 7763, the few-mode capillaries and the one-dimensional free-space beam 0.80–0.95.On a Mac whose chip has cores of more than one kind, the thread budget is now the cores of the fastest kind (
hw.perflevel0.physicalcpu, 6 on an Apple M5 Max rather than all 18), unlessSOLPROP_THREADSis set: every thread of a parallel pass waits for the slowest, and five of six benchmark cases ran 1.17 to 1.49 times faster on the 6 top-tier cores (#333, ADR-070). SetSOLPROP_THREADSto use every core; the run’sthread_budget_sourcerecords"top-tier cores".Python processes solprop starts (a run from the window, directly or as a Slurm job, the window’s kernel, and
Poolworkers) takeOPENBLAS_THREAD_TIMEOUT=20unless it is set, as does the batch script of a Slurm scan (solprop.driver.executors.Slurm) for its controller, so NumPy’s and SciPy’s OpenBLAS pools no longer spin on every CPU for a moment as they load: importing the driver used 13.8 CPU seconds on a 72-CPU Linux machine, and now 0.75 (#383). The performance guide says how to set it for your own scripts.A finished file run is readable through the handler it returned:
prop_*(..., output="run.h5")andSimulation.runhand back a closedHDF5Outputwhose reads (run["field"],fields(),plane_field(), processing functions and plots) open the file read-only for the one read and close it again, so no handle is held between reads. A suspended writer still refuses, and the refusal now says why. Once another run has written or continued a file at that path, the handler’s read is refused, naming the file, andopen_filereads what the file now holds.The README, the package metadata, the desktop front end’s Help and the native backend’s error messages now link the manual of the newest release (
/en/stable/) rather than the development version (/en/latest/), and the installation page’s advice for a platform without a native wheel now allows for the yanked 0.1.0.The transverse edge’s read spacing has a growing backstop:
min(B, 4g/v_q), withBstarting atL/16and doubling at each read whose reach has not grown by a tenth since it started, up toL/4. A free-space run whose spectrum holds far from its edge no longer takes extra steps for its reads. On the suite’slinecase the edge costs 2.9 % of the run where it cost 12.8 %, with 13 reads where it took 23 (#396). A planar run also no longer evaluates its slab modes again at each run to set up the edge.The native backend now keeps the FFTW plans its runs measure by default, so each transform shape is measured once per machine and build instead of on every run. Plans are kept per transform in
wisdom.jsonin the calibration store’s directory for the machine and build, and a calibration profile’s own plans take precedence.SOLPROP_FFTW_WISDOMnow only moves this file.SOLPROP_CALIBRATION=offkeeps no default file, andsolprop calibrate --clearremoves the plans. Plans kept by earlier releases are not read; their files can be deleted. The store is keyed by the machine fingerprint, which tells Apple silicon models apart (#136).The front end’s service layer (its kernel process, run workers, live reductions and their messages) moved from
solprop_gui.serviceinto solprop assolprop.service, so a machine that only runs simulations for the desktop front end needs solprop alone, without Qt. It is front-end support, not part of the user interface, and may change without notice.The progress refusals of
solprop.log(set_default_progress,default_reporterandBarReporter’speriod) raise aDriverErrorinstead of a bareValueError(DriverErroris now aValueError, soexcept ValueErrorstill catches them); andconfigure_logging(file=...)writes the log file as UTF-8 whatever the locale.The native backend’s idle OpenMP threads now spin briefly within native work instead of sleeping at once:
GOMP_SPINCOUNT=10000on GNU’s runtime and, on LLVM’s (macOS and Windows), a 1 ms block time inside native calls only. Waking sleeping threads cost 16 to 72 µs for each of a step’s many short parallel regions; benchmark windows ran in about 0.8 of the time on an Apple M5 Max, two Intel Xeon Gold 6240 and a shared AMD EPYC 7763 node, and in 0.87 of it on an AMD EPYC 9B45 under Windows (ADR-071). Teams wider than a chip’s fastest cores keep sleeping at once. SetOMP_WAIT_POLICY=passiveto restore the previous behaviour.The native backend evaluates and finishes its statistics natively from a plan lowered once (SEP 47 section 6.4), so the default statistics of a modal, general modal, radial or free-space run no longer return to Python, and a general modal plane’s statistics no longer copy the field to the host. A profile statistic (
density,pressure,core_radius) reads a table of its path, andzdwa table of each mode’s zero-dispersion wavelength along z made once before the run; their measured errors, at most 1e-13 of a profile’s magnitude and 1e-6 of a wavelength, are recorded in the run’s execution record understatistics_tables. A modal power weight that varies in z is summed in another order, a rounding-level change. The native backend recordszdwasnanwhere the band holds no zero, asnumpy_refdoes, instead of raising, and refuses by name the metric statistics of a general modal basis whose metric varies inside one of its intervals. On every backend, a statistic the problem does not carry is refused by name before the run starts instead of at the first saved plane: a modal statistic such asomega0on a spatial run, a spatial statistic such asbeam_radiusorabsorbed_poweron a modal run (wherenumpy_refused to return the peak ionisation rate asabsorbed_power), the plasma integration diagnostics without a field-grid plasma column, and the electron density or peak ionisation rate without a plasma response.The gas-flow functions (
physdata.transport.viscosity,molar_mass,sound_speedand thegasflowcalculations) validate a composition by the ruleMixture.fillapplies: its fractions must sum to one within the rounding of its entries (two ulps per entry) rather than within 1e-12, so a flow and a fill accept the same compositions. The refusal messages are the fill’s.ModeCollection.orthonormalityandsolprop.modes.collection.orthonormality, and so the orthonormality check on a mode set given to a waveguide simulation, integrate the whole overlap matrix in one adaptive pass instead of pair by pair: 24 capillary HE1m modes in two polarisations take seconds instead of minutes, and agree with the pairwiseoverlapto its accuracy (#879).Project and tooling: the benchmark harness gains performance-history rows for 0.2.0 (
benchmarks/history/, on the same nine hardware sets as 0.1.0) and--countersontrackandab, one separately reported run per worker with the native backend’s structural counters (returns to Python by cause, native calls, attempts, planes, statistics rows, edge reads and host copies). History rows record the OpenMP wait policy and are compared only within one native build profile, andtrack --append-historyrefuses a native build stamped+dirtywithout--allow-dirty(#138).A scan’s workers ask for passive waiting instead of setting
OMP_WAIT_POLICY=passivethemselves, so that a user’s ownOMP_WAIT_POLICY,GOMP_SPINCOUNTorKMP_BLOCKTIMEnow reaches them, and so does a machine calibration’s row for the workers’ allocation (SEP 46); without either they wait as before. Their recordedopenmp_wait_policyreadspassive.Snapshots now work with interpolated planes (
interpolate_planes=True), which they refused before: a requested snapshot is taken at the end of the step that crossed the plane being saved, once every plane that step crossed has been saved, or at the next accepted endpoint, so its running checkpoint is a state the march passed through, whichresume=Truecontinues withoutresume="interpolated", saving each later plane once. A step plane owed by a step that crossed an interpolated plane and ended on the next one is no longer saved twice at that position (SEP 47).A kept plane’s field is exported once, straight into its stored form, with the same stored bits (#346, SEP 47).
MemoryOutputhands the run the block row the plane will occupy, so the field is written once, where it is kept, with no host volume of its own;HDF5Outputis handed one new array, which h5py writes into the plane’s chunk without a copy. On a 108 MiB Cartesian plane the native backend’s saved plane no longer allocates a field into memory and one fewer into a file, and a modal plane onnativemakes two field-sized arrays where it made three. For a custom store,PlaneStoregainstakes_exports,field_destinationandsave_exported, withsolprop.output.records.StoredFieldbeside them; a store subclass that overridessaveis still given every plane, with its field, through it.On a GPU build (CUDA or HIP) of the native backend, runs take the compiled session of a CPU build, with its coverage and its refusals (SEP 47), and device builds also refuse the Adams carrier frame by name. On an NVIDIA A40 (CUDA) the session takes the same steps, statistics and fields as the backend’s previous march on the same device (dense Runge–Kutta planes and the transverse edge’s ramp sums within rounding bounds); device builds are not yet qualified on either vendor. A saved plane’s field crosses from the device once, into its destination, with no extra host copy.
The native backend runs every run it admits in its own compiled session, with no Python step loop (SEP 45, SEP 47). Beside the Adams march it already had, it now steps the adaptive Runge–Kutta loop of
RungeKutta()and the low-storage replay (LowStorageRungeKutta) natively, and the session also runs resumed runs, the noise models, dense output (interpolate_planes), the temporal boundary monitor, a free-space run’s transverse edge, the Adams carrier frame on an operator stored as a z table (#255), and coupled flows wider than 16 channels or with bins off their eigenbasis route, which 0.2.0 stepped with solprop’s Python march; such a flow’s step whose exponent would need more than 30 squarings is refused by name. A run’s backend metadata says which loop stepped it (adams_march,rk_march). Some results move at the rounding level, because the Runge–Kutta error norm, the split collar’s crossing limit and the transverse edge’s safety-ramp shares are summed in another order: in a near-tie a split-scheme run’s collar bucket can move one place, and an edge warning or stop may differ fromnumpy_ref’s for a share within a rounding bound of its threshold.A progress reporter now hears a run’s attempted steps in batches, as the run’s session delivers them: once per save plane, and at least every 256 attempts or 0.1 s in between. It no longer hears each step as it is taken (SEP 47 section 5.3). Each attempt is still reported once and in order. As a result, a stop flag that a reporter sets lands up to one batch later, at most 256 attempts or 0.1 s, on every backend, the NumPy reference included. A flag set from outside the run is still polled between batches, as before.
Each execution record now states what a restart keeps and restores, under
outcome.execution["restart"]: whether a plane’s or checkpoint’s method history wasretained,omittedor isnot_applicable, with a reason (explicit_policy,automatic_policy,automatic_size_limit,snapshot_required,unavailable_history,output_cannot_store,write_failed,incompatible_representation,unsupported_method,no_method_history), and in a resumed execution what itrestored,reset(a Runge–Kutta resume’s proposal and norm memory, an Adams history set aside) or foundnot_applicable(low-storage), and that the boundary monitor was reconstructed from its persisted records. A resume now warns once (SolpropWarning) when an Adams history it expected was omitted by the automatic 256 MiB limit, was not exportable, or cannot be read back (including a write cut short);resume_history=Falseis recorded without a warning (SEP 47).Snapshots no longer require
step_planes=1: a requested snapshot is taken at the next accepted endpoint, and where no plane is saved there the run writes a running checkpoint, in the existing terminal-checkpoint record with a matchingrunningoutcome, from which the snapshot andresume=Truecontinue. The attempts and periodic rows since the last plane stay with that plane, once, and a later saved plane supersedes the checkpoint. A low-storage step abandoned in flight now falls back to the latest running checkpoint, or to the checkpoint the run resumed from, rather than to the last saved plane (SEP 47).On a CUDA or HIP build, a run with no
node_budgetand no node chunk now plans its node chunk within a quarter of the accelerator’s free memory, through the same rule and response admissions as the host’s plan, and never takes fewer nodes than the host plan at the route’s default budget (#361). Most spatial runs on a data-centre GPU then evaluate their responses in one chunk, which took 0.74-0.92 of the default’s time on an AMD Instinct MI300X, at the cost of space-domain buffers for every node at once (about 5 GB more on a 128 x 128 Cartesian filament). The run recordsnode_chunk_rule = "device"in its backend metadata. CPU builds are unchanged.On macOS arm64 the native backend’s CPU kernels now take SLEEF’s 1-ulp AdvSIMD vector
exp,logandsincosby default (SOLPROP_NATIVE_VECTOR_MATH=AUTO), as x86-64 builds do: on an Apple M5 Max the comb-to-continuum case ran 0.84 of its time at one thread, and the tracking cases 0.93 on geometric mean, with none slower beyond its spread (ADR-072, #339). Linux aarch64 keeps the system libm, where SLEEF measured level (1.00 on a Neoverse V2).Smaller speed-ups, each with the same results. Building a graded-index guide evaluates its material once per mode solve rather than once per finite element (the
grin_nonlinearbuild and translation from 24 s to 16 s on one core), and a large free-space launch forms each distinct column’s admittance once, in threads (a 384-node Kerr beam’s launch from 12.6 s to 7.1 s). A run’s fixed host cost is smaller: the first statistics no longer importscipy.signal(0.7 s), opening a run’s output no longer digests its configuration a second time, and package versions are read once per process (#347). Host passes too small to thread no longer read the CPU topology first (#556). On the native backend, free space’s separable stage propagators go through its vector maths (line0.89 of its time at one thread; #338); radial transverse-edge reads synthesise their rows in one matrix product (radial filaments down to 0.75 of their one-thread windows on an Apple M5 Max); single-mode problems use Apple’s Accelerate as they use OpenBLAS; and on Arm hosts the plasma column’s band filter sums its taps in one pass (the plasma cases 1-6 % faster on an Apple M5 Max, #560).On Apple silicon, where the native backend’s idle threads spin within native calls on the top-tier cores, it threads smaller passes: every size threshold is divided by 16, since a parallel region there costs about a microsecond and the cluster shares its L2 cache. On an Apple M5 Max at six threads the Raman GNLSE ran 0.70 of its time and the comb-to-continuum 0.91, none slower (ADR-073). Other platforms keep the previous thresholds, which measured faster there.
The TDSE response runs on the native backend’s CPU build, and
backend="auto"now selects native for a TDSE run as for every other;backend="numpy_ref"still runs it, and a native GPU build refuses it by name (SEP 49).solprop no longer pins a Pyroraptor revision: a TDSE run uses whatever provider is installed (by default its latest
main, until Pyroraptor has a release), and records the revision, build and execution space the provider reports; the provider’s protocol version and its execution space againstTDSEExecution.deviceare still checked (SEP 49).The TDSE response’s atomic provider now runs in a worker process of its own, never in solprop’s process, for presets, bases, consistency checks and runs alike; Ctrl-C, SIGTERM and a run’s stop flag now stop a TDSE run during an atomic call, the call charged and the last accepted step checkpointed (SEP 49).
The default search window of
modes.base.zdwandstats.zdw(stats.DEFAULT_ZDW_RANGE) now starts at 150 nm instead of 100 nm, above the noble gases’ vacuum-ultraviolet lines and fused silica’s absorption edge, where a lossless solve takes silica as transparent and finds zeros with no meaning; passwavelength_limitsto search below it.
Removed#
Removed the Roots button from a pinned value’s editor in the desktop front end, which did nothing when pressed; the editor still takes the lowest or the highest root in the search range.
Removed the hidden
--workflowoption ofsolprop-gui, which did nothing: the command now refuses it as an unknown argument.solprop.exceptions.HostMarchWarningis removed: the native backend steps every run it admits in its own session and refuses the rest by name, so no configuration issued it. Delete any import of it, or warning filter that names it, such asignore::solprop.exceptions.HostMarchWarning.Building solprop-native from source: removed the
SOLPROP_NATIVE_GEMM_PROVIDERoption (every build uses the hybrid provider,build_info().gemm_provideris always"HYBRID"), thecuda-custom,cuda-nativeandcuda-tplpresets,SOLPROP_NATIVE_BUILD_BENCHMARKSand its GEMM microbenchmark,SOLPROP_NATIVE_ENABLE_THREADS(the Kokkos Threads host space; CPU builds run OpenMP) and IntelLLVM (icpx) support (Linux CPU builds take GCC 14 or newer, or Clang 14 or newer). A CPU build no longer needs a single-precision FFTW, and the wheels no longer carry one.The native backend’s private host-march switches are retired as production modes (SEP 47 §6.3): the environment variable
SOLPROP_ADAMS_MARCHis no longer read, andNativeBackendno longer takes anadams_marchkeyword. They selected solprop’s Python march on the native engine for A/B comparisons; every native run now steps in the native session. A problem whose operator or prefactor representation the native stage tables cannot read, which no built-in configuration produces, is now refused by name when the backend is built instead of being stepped with stage rows formed on the host.
Fixed#
Recorded the position of a
resume="interpolated"continuation in theinterpolated_resumesannotation before its first step, so a session that stops or fails later still names where it restarted; before, only a session that finished was recorded (#152).Fixed the
numpy_refdefinition ofon_axis_spectrum,aperture_on_axis_spectrumandspatial.node_spectrumat a field grid’s zero-frequency and Nyquist bins: they now weigh those bins as the analytic signal does, a quarter of an interior bin, as the native backend already did, so both backends agree there and the sum timesd_omegais exactly the fluence (#155).modes.base.zdwnow searches the sampled sign ofbeta_2and keeps a sign change as a zero only where the analytic group delay has a resolved extremum andbeta_2keeps each sign for 1.5 % in frequency on either side; a change that is not a zero blocks the search only where the group delay is not finite or not continuous (a gas line), and the fine structure of a narrow feature, such as fused silica’s OH absorption bands near 1.38 and 2.7 µm, is passed over. So a gas resonance’s poles are no longer read as zeros, a window whose ends agree in sign no longer hides the zeros inside it, and the answer no longer depends on the window: a standard telecom fibre reports its 1.3 µm zero from a 1550 nm reference on any window that holds it. Several zeros in the window raiseModeErrornaming them, where an arbitrary one was returned orNoZeroDispersionErrorraised; the newnear=reference wavelength picks the nearest zero that no line separates from it.stats.zdwtakesnear=too, and thezdwrun statistic and the recipe’s mode preview pass the grid’s reference wavelength, so a krypton capillary whose band reaches its 120 nm lines records and previews its 770.5 nm zero instead ofnan(#157, #527).A hand-built fill of the dispersion-only
Airentry, such asMixture.fill({"Air": 1.0}, 1.0), is now steered toMixture.air: its refusals of Kerr (carrier or dispersive), plasma (which called it a custom species) and an explicit Raman selection all nameMixture.airfor air with Kerr, plasma and Raman channels, and anenvelope=Truecapillary run withkerr=False, which runs linear, logs that once at INFO (#164).Dropped optmat’s internal tracker ids, references users cannot look up, from every optmat text solprop passes on: its range and absorption warnings (
MaterialRangeWarning), the status reason of each material record (MaterialRecord.status_reason, and so the run’s material manifest andsolprop.capabilities.species) and theMaterialStatusWarningbuilt from it, which also no longer doubles the reason’s full stop. The rest of each text is unchanged (#166).A
LocalorPoolscan that ends with an exception (an interrupt, a refused worker admission, a point that conflicts with the file) gives back the points it had claimed, and a rerun computes any point an earlier scan leftrunning, rather than skipping it for ten minutes and reporting it as running (#168).The Adams page no longer says that a linear run beside a frozen-residual coupled flow is accurate only to its
dz_maxwhateverrtol(#252): that run’s error followsrtol. What was measured was a launch far belowatol / rtol, which the error norm holds toatoland not tortol, under any integrator; the solver page now says so.A
Simulationnow copies itsconfiguration=when it is built, andwith_inputthe caller’sconfiguration=keys: dictionaries, lists, tuples and sets are rebuilt and arrays become read-only copies, so changing them before the run no longer changes the recorded configuration or its hash.PiecewiseLinear,PressureGradient,FromCallable(its declared positions) andSeriesOfPathkeep read-only copies of the arrays and series they are given, so changing a profile’s table after passing it to a simulation no longer changes the run or its record.SimulationSettingskeepscomponentsas a tuple copied from the sequence given (#471).The run summary of a native free-space run no longer says its transverse edge is unwatched: every backend reads the edge, so the summary no longer decides by the backend’s name (#599).
Preserved the original error and retained a retry owner when acquiring host BLAS limits and rolling them back both fail. The next acquisition retries the rollback before applying new limits, so a failed request no longer leaves a BLAS pool at its width indefinitely (#697).
SimulationSettingsnow refuses aresume_historythat is notTrue,FalseorNone. A recipe’s[execution]table that wroteresume_history = "none"built a run, and a Python export, that kept the Adams history always, the opposite of what it said; omit the key for the automatic choice (#703).A
SimulationRunner, and the backend a scan keeps between points, is no longer reused for settings that name another backend or node budget: a scan point builds a backend of its own, and a directrunner.runafter such a change raises aDriverErrorbefore it reads the input (#705).The desktop front end no longer builds a class’s sheet twice when the kernel answers its route’s description twice, once for the description fetched ahead and once for the one asked as the setup opened; the second build replaced every widget on the sheet for nothing (#791).
Fixed a segmentation fault of the native backend on a CUDA build for compute capability 8.6 (
AMPERE86, such as an NVIDIA A40): every radial run crashed in its first step, envelope or field, with or without a collar or statistics, with every stepper. The device GEMM’s kernel is now a named functor; as an extended host-device lambda instantiated alike in several source files, a Release build called a null copy function. Other device targets and the other routes were not affected (#815).An Adams run (
Multistep, the default of the capillary interfaces) no longer silently ignoresSimulationSettings(interval_cap=...): the Adams march caps its steps byMultistep(interval_cap=...), a different explicitinterval_capis now refused by name, and the run’s stepper record and resume key carry the cap the march applied. A coupled-flow Adams run used to recordinterval_cap=Truewithout being capped; it now recordsFalse.Fixed the Adams march dropping the attempt row of a rejected trial whose reduced proposal fell below
dz_min: the completed trial is now recorded, on both the NumPy reference and the native backend, before the floor’sConvergenceErroris raised; the proposal, accepted state and call ledger are unchanged (#651).The TDSE response’s per-configuration memos and the envelope plasma’s cycle integrals, which kept one entry for every configuration or field range met, now keep the sixteen most recent, so a long scan or front-end session no longer grows its memory with them.
solprop.capabilities.outputnow states a spatial file’s field in the run’s stored unit (V m radially, V/m on a Cartesian or line grid, sqrt(W/m) per y frequency on a planar one) instead of sqrt(W), and no longer states a modal power, energy or spectral density for it, whose readers refuse a spatial file (#425).scalar_paraxialcoupling into a capillary reports the omitted leaky-field physics for the field actually coupled, as the change of power launched into each mode. The recorded capillary envelope was measured only on Gaussian beams and equal-amplitude three-mode exits, so it understated the discrepancy for structured fields about tenfold: at delta = 2.5e-3 (a 75 µm capillary at 800 nm) a structured beam or a capillary exit of a few modes with arbitrary amplitudes changes the launched power by 1e-2 to 2e-2, against the 1.5e-3 the record allowed. The new envelope, evaluated against Marcatili’s leaky HE1m field, is reported with scopefield. Its mode range now bounds the highest HE1m radial order present, up to 24, rather than the channel count, so two polarisations of four modes are no longer counted as eight and a set such as HE1,25 to HE1,33 is refused rather than counted as nine.The
processing.scans.field_at_planereduction reads its own plane withOutput.plane_field, so it evaluates on a run saved withfields="planes"whose chosen plane kept its field, rather than raisingOutputError.The desktop front end no longer keeps every publication figure it exports in memory: the analysis process closes each figure once written, so a long session neither grows nor warns of more than twenty open figures.
The desktop front end no longer shows a GNLSE fibre’s results with a Noise and coherence page that could never be opened: no run is a seeded ensemble the page could read.
The desktop front end’s Home lists the workspace’s runs on a thread, so a large or network-mounted workspace no longer blocks the window at each refresh; it lists the runs that have a results file.
The desktop front end now says at the foot of its window when solprop’s kernel fails to give the examples, the list of gases, the run options, a class’s example or a sheet’s curve, where Home or the sheet was left empty without a word.
The hollow modes (
MarcatiliMode,VincettiMode, the tabulated, rectangular and slab modes) now refuse analphacallable that returns a non-finite or negative attenuation, or one of the wrong shape, withModeError, asStepIndexModedoes, instead of carrying NaN intoneffor reading a negative value as gain; every family evaluatesalphathrough one helper.A
GasFlowWarningabout a capillary or hollow-core fill raised through a recipe, a scan or the service now names the caller’s line, as one raised by a directSimulation.from_waveguidecall already did, instead of a line inside solprop.solprop.physdata.ideal_gas_density, anddensityandpressurewithideal=True, now refuse a NaN or infinite pressure, number density or temperature with aMaterialError, as the real-gas path already did, rather than returning NaN or infinity.MemoryOutput.to_filenow writes the recipe a run was built from, so a recipe run kept in memory and written to a file can be resumed (solprop resume), read back withRecipe.from_output, and give its saved planes their basis identity, as the file anHDF5Outputwrites does.The boundary monitor’s record counts each committed step once: a step left unchecked and then checked at its saved plane is no longer counted among both the checked (
steps) and the skipped steps, so the two add up to the committed steps. Under interpolated planes, a plane that no check read since the previous one, as a later plane inside one step, records its collar and guard occupancies as unmeasured (None) rather than the previous collar reading and empty guards (#133).Fixed a native Adams trial whose source evaluation failed leaving its prediction in the state, so that the failed run’s terminal checkpoint and march snapshot held the prediction instead of the last accepted step (#129).
A native backend whose construction fails after its native workspace is built, by a refusal, an error or an interrupt, now closes the workspace before raising, rather than leaving it, and on a GPU build its device memory, to the garbage collector.
A CPU build of solprop-native with
SOLPROP_NATIVE_ENABLE_OPENMP=OFFis now refused when CMake configures it, with a message naming the options to set; it used to build and then be refused at every backend construction.Selecting the native backend with a malformed process-start setting, such as a non-numeric
SOLPROP_THREADS, now raises aBackendErrorcarrying the setting’s message instead of a bareValueErrororRuntimeErrorfrom the package import, andsolprop.backends.available()is documented as listing the installed backends.A process started from one that imported the native backend no longer reports the inherited
OMP_PROC_BIND=falseas the user’s choice: its run metadata’sopenmp_proc_bindisfalse, as in the parent, rather thanenvironment: OMP_PROC_BIND=false. The import marks the setting withSOLPROP_NATIVE_PROC_BIND.Setting
OMP_PLACESwithoutOMP_PROC_BINDno longer caps every solprop thread pool and scan at the one core GNU OpenMP binds the main thread to: the thread budget now treatsOMP_PLACESalone as binding on, as libgomp does, and still believes a narrowing whenOMP_PROC_BIND=false(#172).OptmatRateraisesMaterialError, naming the species and the field, when optmat returns a NaN ionisation rate, instead of replacing it silently with the model’s maximum rate; an infinite rate is still clipped to the maximum.An output file whose recorded execution status (
meta/outcome) another build of the same output schema wrote now reads, as its run record does: an entry this build lacks is dropped and an absent one takes its default. A status that cannot be read is refused with anOutputErrornaming the file, where it used to raise a bareTypeError, and opening the file no longer leaves its handle open when it is refused.The boundaries guide reads a band’s absorbed energy from saved planes with an exact interval formula in place of the trapezoid, which overcounted a strongly absorbed band’s loss by up to twice; the medium’s own absorption is now its own share (#573).
A
Poolscan point whose worker is interrupted, by Ctrl-C (which a terminal sends to every worker) or SIGTERM, is now a stopped point, given back so that a rerun computes it, instead of being committed asfailedwith aKeyboardInterrupttraceback.Fixed a recipe pinning the capillary’s
pressurebeside a temperature path failing with aTypeErrorinside the solver:solprop.recipe.pins.solve_pinnow refuses it with aRecipeErroron the pin, since a pinned pressure needs one temperature.GaussianPulsenow refuses a super-Gaussian ordermthat is not an integer of at least 1, asSpatialPulsedoes;PulseSumandSpatialPulserefuse a beam given as a temporal pulse with aPulseErrorat construction instead of aTypeErrorat build time; andPlanarPulse’s printed form and the planar-grid refusal of aSpatialPulsename thewaistkeyword, not awaist_ythat does not exist.A native run on a Python thread other than the one that imported
solprop_native, such as a front end’s worker thread, now keeps to the thread budget: each native call sets that thread’s OpenMP default width to the runtime’s and restores it afterwards, so FFTW’s threaded loops and an OpenMP OpenBLAS no longer take every CPU between narrower teams. Issue #130’s reproduction ran 9 to 19 times slower on such a thread on two Intel Xeon Gold 6240, and 1.45 times slower on an Apple M5 Max, where it now matches the main thread (#130).A Queue scan whose point owner exits while its process start is being read no longer fails with an unhandled
OSError; the owner is treated as unidentified until the next check (#760).A recipe scan run on
QueueorSlurmnow records its recipe in the collected scan file, as onLocalandPool, soRecipe.from_outputreopens it with its setup.The on-axis plasma statistics on a Gauss-Radau field-scale rule read the whole axis row on a one-component transform (#663): when the modes have an axis field in a component the transform does not carry, as a rotated mode on
components=("x",)does, the rule’s axis node no longer stands in for the axis row, so the statistic keeps that component (itshypotwith y on a field grid, the polarisation ellipse on an envelope grid) at the cost of one row scan.A real-gas speed of sound (
physdata.transport.sound_speedwith a pressure) checks only the equation of state it comes from: it no longer warns that a gas’s transport model is provisional (methane’s), nor refuses a temperature inside the equation of state’s range but outside the transport properties’ range.refractive_index_minus_oneno longer loses precision at low pressure. It formedn - 1from1 + chi1, the cancellation it exists to avoid, so its relative error grew as the gas thinned: about 1e-12 for helium at 1 bar and up to 3e-7 at 1e-6 bar. It now forms it fromchi1itself, which scales with the density to rounding.Fixed
coupling.regrid(..., crop_band=True)between two grids that share a lattice but not an active band (an explicitdt=, or limit pairs with the same short-wavelength end): it now removes the light outside the target’s band, as itsRegridReportsays, instead of copying it and leavingcoupleto refuse the plane.Fixed
solprop.output.resumabilityreporting that a writer still holds a file when the writer lock could not be taken for another reason and the file’s path contained the words “another writer”; it now tells a held lock by its error type, not its message.Simulation.run(..., resume=True)no longer replaces the simulation’s own noise realisation with the one drawn from the resumed file’s recorded seed. The redraw now belongs to the resumed run alone, so a later freshrunof the same simulation is no longer silently the resumed file’s realisation; the resumed run itself is unchanged.Keyword routes built on two threads at once no longer leave the process’s warning filters changed: each route’s capture of the material warnings it names a keyword for now waits for another thread’s to end, where two overlapping captures restored each other’s filters and left every later warning recorded instead of shown.
Poolscans now size their workers from the tightest control-group memory limit on the process’s own path (version 1 and 2), not the root group’s, so a scan under a systemd slice or other cgroup manager without Slurm variables is no longer admitted against the whole machine. An unreadable or malformed limit file, and a malformedSOLPROP_SCAN_CPU_OFFSETorSOLPROP_SCAN_CPU_COUNT, now raiseDriverErrornaming the file or variable instead of a bareOSErrororValueError(#170).solprop scanreports a refused or failed scan as onesolprop:line and exits with status 2, as the other commands do, instead of printing a traceback and exiting with 1.Printing a
Scan, or showing it as a notebook cell’s result, no longer raises for a string, object or empty axis.Rerunning a
LocalorPoolscan with every point already done no longer grows the scan file by rebuilding its consolidatedlayouts: they are rebuilt only when a point has been committed since they were last built, including by an earlier run that stopped before consolidating. Such a rerun now adds only itsexecutionsrow (#169).The front end’s analysis kernel keeps its own two-thread budget when the window is started with
SOLPROP_THREADSset (the window’s value still goes to its runs), and draws the figures it exports with matplotlib’s file-only Agg backend rather than the platform’s interactive one.absorption_by_speciesof a gas-filled mode raisesModeErrorfor a single gas whosesusceptibility=law is absorbing, instead of reporting zero absorption while the law’s loss is inneff; declaring the gas as a component of aMixtureattributes it.A snapshot interval shorter than 60 s is honoured (#600): the 60 s retry back-off now follows only a failed or deferred snapshot attempt, where every successful publication used to impose it too.
The desktop front end’s spectrogram reports the gate solprop used: with no gate given it showed a twentieth of the time range asked for, not of that range within the time window, so a range wider than the window showed a wider gate than the map’s. The default gate is now given by
solprop.processing.fields.default_gate_fwhm.coupling.ScalarModeBasis.from_modesadmits several radial orders of one step-index fibre (HE11 with HE12, as LP01 and LP02), which it refused as modes of different fibres because each channel bounds its cladding at its own radius.A
ModeCollectionof step-index channels of one fibre, whose outer radii differ, now integratesorthonormality()and its mode matrices over the widest channel’s disc instead of refusing the set it accepted, and channels built withStepIndexMode.from_numerical_aperturefor one fibre are recognised as one guide; the newStepIndexMode.same_guidesays whether two channels share a guide.modes.collection.overlapis now the pair’s entry oforthonormality, integrated to the same 1e-12 and refusing non-convergence withModeError, where it useddblquadat its default 1.5e-8 tolerance and only warned. It integrates the normalised product, so a supplied set of high-order capillary modes (from about 16 HE1m of a 75 µm capillary), whose normalisation integral is small, is no longer wrongly refused as not orthonormal.A run stopped by its own
stop=flag now raises a failure to close its output, backend or TDSE archive, instead of returning as a clean stop with the error lost.The printed form of
TabulatedModeandTabulatedHollowModenow says what their loss is (loss=model,loss=none, …) and names the fill as the other hollow modes do (Ar 1 bar,evacuated), andIndexTable’s printed form calls its interpolation ruleloss_interpolation=rather thanloss=.The TDSE provider’s worker process no longer receives the running script’s own directory on its import path, so a module there named like a standard-library one (a script’s
random.py, say) is not imported in the worker in its place.Building a simulation no longer makes the caller’s arrays read-only or keeps them by reference. Affected inputs: an absorber’s rate arrays, the arrays passed to the translation layer’s tables,
TabulatedDispersion’somegaandbeta, the backends’ step histories, statistic rows and observations, and thesave_planes, knots and dispersion coefficients that the stepper and simulation settings,PathVariation,TaylorDispersion,InterpolatedDispersionandModalSamplingused to keep as views. An array a caller passes in is copied once. Arrays that solprop builds itself, such as translation tables, grid axes and masks, memoised ionisation rate tables and a backend’s exported state, are frozen in place and passed on without a further copy (#759).VincettiModenow compares by identity, like every other mode, instead of by value: its hash no longer changes when the mode logs its one-time gain warning, so a mode kept in a set or used as a dictionary key is found again afterwards.The
reprof a mixture-filledVincettiModenames the mixture’s gases and pressure (He+Ar 2 bar), as the other mode families do, instead of the bare wordmixture.The temporal collar’s walk-off integral, read by
warn_walkoffand byabsorber(grid, walkoff=...), is now the rectangle sum over the periodic time axis, which is exact for the taper, rather than a trapezoid that left out one sample; a collar sized for a drift now removes exactly the statedexp(-2Γ)of its power, and the warning fires at the exact threshold (#490).The walk-off
SolpropWarningofsolprop.boundaries.warn_walkoff, raised when a capillary or hollow-core run builds its absorber, now names the caller’s line instead of a line in solprop’s own route code.Fixed the execution record of a run on Windows storing
Nonefor the host’smemory_bytesand the run’speak_rss_bytes: they now hold the installed physical memory and the process’s peak working set, read as the scan executors already did.
[0.2.0] - 2026-11-07#
solprop 0.2.0 adds a desktop front end, describes every run as a recipe that can be checked, saved and rerun, and retires the numba backend in favour of the native one, which is now required. Every break is listed first, under “Changed (breaking)”, with how to migrate (ADR-058).
Highlights:
solprop-gui, a desktop front end, experimental in this release and published as a third distribution at solprop’s own version (
pip install "solprop[gui]"): it sets up, runs, scans and reads simulations without a script.Recipes, the command line and design solvers (SEP 41): a TOML recipe for every route, the
solpropcommand, pins that set a radius or a pressure from a zero-dispersion wavelength, a dispersive-wave wavelength or a soliton order, chosen launch modes, displaced and tilted beams, and parameter metadata for front ends.The native backend is required (SEP 43):
numba_cpuand the numba and pyFFTW dependencies are gone,pip install solpropinstallssolprop-native, and new wheels cover Windows on Arm and x86-64 processors without AVX2.Exact resume: a file continues only under an identical configuration hash, as in 0.1.0, a refusal names the fields that differ (ADR-066), and
solprop resumecontinues a run from its file alone.Output schema 2: every field of a recorded dataclass is recorded, a
DataPulsekeeps its phase, large record arrays are stored beside the record’s JSON, and a file no longer grows with the square of its planes. Read a 0.1.0 file with 0.1.0.Transverse absorbing boundaries (SEP 40): every free-space run carries a safety ramp by default, a designed real-space collar on request, and a boundary monitor that warns or stops when light reaches the edge; that edge is now read where the state lives (SEP 44), so a device run copies no state to check it.
MLX performance: compiled stages run a trial 1.5 to 2.6 times faster on an Apple GPU, single precision admits the Adams integrator, and single-precision grids are sized for MLX’s transforms.
Changed (breaking)#
The native backend replaces numba#
The
numba_cpubackend, and thenumbaandpyfftwdependencies, are removed (SEP 43, ADR-064).backend="numba_cpu"raisesBackendError, namingnativeandnumpy_ref. A file written by 0.1.0 is refused by its output schema, as every file of another schema is: read it withsolprop==0.1.0, which is also the rollback. To migrate, passbackend="native"(or leavebackend="auto"), ornumpy_reffor the reference.The settings that only
numba_cpuread are gone:SOLPROP_NUMBA_THREADS,SOLPROP_NUMBA_REGIME,SOLPROP_FFTW_THREADS,SOLPROP_TRANSVERSE_FFTW_THREADS,SOLPROP_PASS_TIMERS,NUMBA_DISABLE_JITandNUMBA_NUM_THREADS. Drop them from job scripts; they now do nothing.SOLPROP_THREADS,SOLPROP_NATIVE_THREADS,SOLPROP_FFTW_PLAN,SOLPROP_FFTW_WISDOMandSOLPROP_BLAS_THREADSstay.solprop-nativeis a required dependency, with no extra:pip install solpropinstalls it, and solprop is supported where it installs (SEP 43). On any other platform, including Intel macOS, ppc64le, musl and macOS before 14, the installer reports that no matching distribution exists; the installation page explains that and how to report a platform. Thenativeextra is gone: installsolprop, notsolprop[native].backend="auto"has no fallback: it isnative, and refuses with no native package or on a processor below the floor, such as Arm below Neoverse N1. A TDSE response still resolves tonumpy_refand single precision tomlx.numpy_refstays selectable by name, as the numerical reference and for the features only it runs. Whereautorefuses, passbackend="numpy_ref"explicitly.KERNEL_SCHEMA_VERSIONandKernelProblem.schema_versionare gone, and with them the kernel schema number, andsolprop_native.BuildInfo.schema_versionis nowsource_digest, the SHA-256 of the C++ sources andCMakeLists.txtthe extension was compiled from: a native run’s record names it inbackend.settingsin place of the number. Neither enters a configuration hash or a resume check.solprop_native.check_build()takes no problem, and in an editable checkout refuses an extension built from other sources thannative/, naminguv sync --reinstall-package solprop-native(ADR-068). To migrate, readbuild_info().source_digestwhere code readschema_version, callcheck_build()with no argument, and dropsolprop.translate.KERNEL_SCHEMA_VERSIONfrom imports and checks: solprop-native is pinned at solprop’s own version, which is now the whole contract.solprop no longer checks a run’s memory against a budget before allocating (ADR-065).
memory_budget=,SOLPROP_MEMORY_BUDGET,estimate_memory,estimate_guide_memory,solprop.driver.memory,MemoryBudgetErrorandMemoryBudgetWarningare gone. A run that doesn’t fit now fails withMemoryError, or is killed by the kernel or a scheduler. Scan workers and TDSE’smemory_limitare still bounded; going over that limit raisesDriverError, and it now covers atomic storage alone. Dropmemory_budget=from calls andSOLPROP_MEMORY_BUDGETfrom job scripts; bound memory with the scheduler instead, and readSimulation.estimate()for an estimate.
Output files and resume#
The output schema is 2: a
DataPulserecords itsspectral_phase(below), and every field of a recorded dataclass is recorded, at its default too. This release refuses a file written by 0.1.0, and every configuration hash moves, so a 0.1.0 run cannot be resumed; read such a file with 0.1.0. Code that reads a file with h5py meets these changes of layout:/meta/arrays/<name>: a run record’s numeric arrays of more than 4096 elements, which/meta/jsonnow references (below);/record_arrays/: the same arrays in a scan file, shared between points;/meta/outcome: a Multistep call ledger’s predictor orders as[order, count]pairs (below);absorbed_power: 5 columns, where it had 4 (below);a top-level
recipegroup in a run built from a recipe.
Read files through
solprop.outputandsolprop.processingwhere possible; they handle each of these.resumetakesFalse,Trueor"interpolated", and any other value is aValueError: a mistyped word used to read asTrue. A resume continues only on an exact configuration hash, as in 0.1.0, and a refusal now names the fields that changed (ADR-066). A changed tolerance or integrator, an optmat release, a commit that adds or moves a recorded number, and another kind of machine are all refused; a long job has to stay on one CPU family to resume, since the record holds numbers computed on the machine that built it. An appendingHDF5Outputholds the file’s own record as itsmetadataafter a resume, not the one offered. To migrate, pass one of the three values; to continue under changed settings, launch a new segment from a saved plane or write a new file.An output file no longer grows with the square of its planes.
HDF5Outputrewrites/meta/outcomein place instead of deleting and recreating it at every plane, a saved plane builds and validates its run record once instead of nine times, and the step driver keeps only the error norms its controller reads, not one per accepted step: a Multistep run saved step by step (step_planes=1) costs 19.5 kB a plane at 707 planes and 19.3 kB at 3479, where it cost 23.8 kB and 31.5 kB. To get there a Multistep run’s call ledger (logical_callsandexecution.response_callsin the run’s outcome,/meta/outcomein an HDF5 file) records its predictor orders run-length encoded, as[order, count]pairs, where 0.1.0 wrote one integer per accepted step. Code that read that list should expand the pairs, or read the record throughCallLedger.from_record, which gives the orders step by step (#80).absorbed_powerhas a fifth channel,custom, the power acustom_absorberrate removes, and itsspectralchannel is now the collar alone, so a frequency-selective loss reads apart from the numerical collar. The statistic’s shape goes from(4,)to(5,); the first four channels keep their positions and their sum stays-dE/dz.Absorber.user_rateholds the user’s share ofspectral_rate, which stays the total, so the operator does not move (#231). Code that readabsorbed_power[..., spectral]as all the spectral loss under acustom_absorbershould add the newcustomcolumn (index 4).
Free-space transverse boundaries#
A free-space run’s transverse boundary is a
SpatialAbsorber(SEP 40), given asSimulationSettings.spatial_absorberor thespatial_absorberkeyword ofprop_radial,prop_free,prop_planarand theirSimulation.from_*builders. By default every radial, Cartesian, line and planar run carries a designed safety ramp on its outer 10 % of transverse wavenumbers, folded exactly into the operator, radial and planar included;spatial_absorber=Falseremoves it. A real-space collar is designed on request, in the grid’s room outside its requested size, from a protected band (kappa,angle, or the launch) and its width, not from the run length, and is refused by name where it cannot meet its budget.TransverseCollar,transverse_collar_rate,SimulationSettings.transverse_absorberandAbsorber.spatialare removed, andAbsorber.collar_lengthno longer sets a real-space rate. To migrate, droptransverse_absorber=for the default ramp, or passspatial_absorber=SpatialAbsorber(kappa=...)(orangle=...) with a gridcollar_fractionthat leaves it room.Every spatial grid takes
collar_fractionin place ofwindow_factor, default 0, and puts the room it asks for outside the requested size on every geometry (SEP 40).RadialGrid’sradiusis now the requested aperture, the Dirichlet boundary is atouter_radius = radius * (1 + collar_fraction), andn_rcounts every sample; the transform, the nodes and the effective area use the outer radius. Fractions of 1 and more are allowed.FreeGrid(rx, nx, ry, ny)andLineGridlose their inert 10 % margin, so their spacing at the same sample count changes; givecollar_fraction=0.1for the old grid.RadialGrid(R, n_r)keeps its wall and spacing. To keep a radial wall atRwith a collar, giveradius=R / (1 + c)andcollar_fraction=c.A free-space run whose light reaches its transverse boundary now warns or stops, where it used to log and carry on (SEP 40). The boundary monitor reads the outer 5 % of the grid on every backend. It warns above 1e-6 of the launch energy and stops at 1e-4, naming a size and a sample count to try, and
BoundaryCheck.transverse_budgetsets those levels apart from the time window’s. The safety ramp’s removal is judged at the same levels. Its monitor record reports atransverse_status, withramp_removedandspatial_removed. Reads are at mostmin(L/16, 4g/v)apart, a ceiling on the step, so a low-source run takes a few more steps. A launch with more than 1e-4 of its energy in the ramp’s band is refused. A run that now stops was losing light at its edge: enlarge the grid as the message says, request a real-space collar, or settransverse_budgetdeliberately.
Names, keywords and models#
Names and keywords with two meanings or two spellings are settled, with no aliases;
docs/dev/conventions.mdsection 7 gives the rule for each. Rename the calls as listed:prop_2d,time_1dandspectrogramtaketime_range, nottrange, which stays the scalar window length onprop_*.DEFAULT_TRANGEisDEFAULT_TIME_RANGE.stats.zdwandmodes.base.zdwtakewavelength_limits, notwavelength_range, as doeswavelength_to_axis.wavelength_rangeis now only the attribute that says where a data model is valid.bandpassandPassbandtakespec_range, notlimits, as the plots and accessors do;Passband.limitsisPassband.spec_range. A call passing the pair by position is unaffected.band_coherencetakesdb_min, notfloor_db.plotting.energyandplotting.statsareplot_energyandplot_stats, the names they already had insolprop.sol.backends.protocol.StepHistoryisBackendHistory. Itszis each attempt’s end andoutput.schema.StepHistory’s is its start, so the two no longer share a name.RUN_SUMMARY_ANNOTATIONmoves fromdriver.summarytooutput.schema, beside the other annotation names. The stored name is still"run_summary".
DataPulse.from_timeis replaced by the classTimeDataPulse: writeTimeDataPulse(t=t, field=field, energy=energy). It holds the time record and has noomega,spectrumorspectral_phase. The method kept the spectrum at the record’s own bin spacing and splined its magnitude and phase, which cannot follow the fringes of pulses far apart: pulses at 100 and 600 fs in a record of 800 fs, of relative amplitude −0.9, came out 85 % wrong with no warning. The class evaluates the record’s transform exactly at the grid’s frequencies, 3e-12 from the direct sum on that case, less its mean: a baseline is an offset of the instrument, not part of the field.get_spectrumhas nonoise_floorkeyword. Its annotation admitted"subtract", which it always refused: an amplitude has no part that is the floor’s power, so onlyget_spectral_densitysubtracts it. Dropnoise_floor="keep", the default, from a call that passes it; the result is unchanged. A call that still passes it raisesTypeError(#96).solprop.optics.Materialrefuses atemperaturefor a glass or a mixture withMaterialError, where 0.1.0 ignored it: drop the argument there. ThetemperatureofMaterial,ModeCollection.slabandModeCollection.vincettinow defaults toNone, which a built-in gas reads as room temperature (solprop.constants.ROOM_TEMPERATURE, 293.15 K) as before; given amixture=,slabandvincettinow take the mixture’s own temperature, where 0.1.0 refused the mixture beside its room-temperature default (#158).Mixture.fill,Mixture.airandMixture.with_fillrefusefloor=beside a constant pressure or a suppliedZProfile, andwith_fillrefuses it without a newpressure=, with aMaterialError; the simulation constructors andprop_capillary/prop_waveguiderefusepressure_floor=in the same cases. 0.1.0 accepted the floor there and ignored it. Drop the keyword where the pressure is constant or a profile; it applies only to end pressures or a stage table (#165).An envelope run’s frame beside a third harmonic now follows one rule,
solprop.translate.responses.declares_harmonic_carrier, which translation checks against the compiled harmonic carrier (#77). Two things change for users. First, an explicitFrame(omega0, subtract_beta0=True)beside aKerrResponseorDispersiveKerrResponsewiththg=Trueon an envelope grid is now refused with aTranslationError, where it was accepted and drove the harmonic with a spurious phase mismatch: drop the explicitframe=to take the co-moving frame, which keepsbeta_0there, or passFrame(omega0, subtract_beta0=False). Second, a Raman response’sthg(theRamanResponsedefault isTrue), which an envelope grid ignores, no longer keepsbeta_0besideKerrResponse(thg=False)when no frame is given: such a run, built from explicit responses or on a spatial route, now removesbeta_0, so its stored envelope’s carrier phase differs from before while intensities and spectral densities agree to the stepper’s accuracy, and its run record now states the frame its operator used. The keyword interfaces, which set the Raman flag fromthg, are unaffected.mode_average=Truebesidetdse=is refused by name when the simulation is built. It used to build, then fail at translation with a message that did not name it; such a run never ran, so drop one of the two.
Added#
The desktop front end#
The desktop front end,
solprop-gui, experimental in this release: its window, its workflow and its files may change without notice before 1.0. It is a third distribution, built fromgui/in this repository at solprop’s own version; install it withpip install "solprop[gui]"and start it withsolprop-gui. It sets up, runs and reads simulations without a script, and has a chapter of its own in the user guide:Home offers a problem class for each common geometry (capillary, antiresonant fibre, radial filament, Cartesian and line beams, GNLSE, step-index and graded-index fibres), each starting from a few chosen examples, and a waveguide designer that needs no pulse; a recipe or results file of another route opens on a form built from solprop’s parameter metadata;
each class has one setup sheet, checked as it is edited, with the numbers solprop computes for it and a preview plot; a number such as the soliton order can be typed as a target, which writes the recipe’s
[pins];runs go in separate processes with live views, stop and resume, or in a service process that keeps them going when the window closes;
results are read on pages of the class, all at one plane, with plot tools (zoom, readouts, widths at half maximum, peaks) and publication figures drawn by
solprop.plotting;scans run a setup over a grid of its parameters, record bands, spectra and pulses, and open any point as a setup;
every setup saves as a recipe or shows as a Python script.
Recipes and the command line#
Recipes (SEP 41):
solprop.recipe.Recipereads a TOML description of a run, with quantities in their units ("125 um","1.2 bar"), checks it (check(), each issue at its parameter path), builds and runs it, saves it and exports it as the Python script it stands for (to_python()). Example recipes ship with the package (Recipe.examples()). Errors and warnings that concern a value carry itsparameter; writing TOML takes thetomli-wdependency. A run built from a recipe records it in a top-levelrecipegroup of its output, as written and as resolved (the recipe that rebuilds the run). See recipes and the command line.Recipes on every route. The
gnlseandcapillaryrecipes came first;radial,freeandplanarrecipes write the grids, medium, responses, beam and settings as tables of registered types (RadialGrid,FreeGrid,LineGrid,PlanarGrid,SpatialMedium,KerrResponsewithgamma3,EnvelopePlasmaResponse,PlasmaResponse,OptmatRate,SpatialPulse,PlanarPulse,SimulationSettings,PIController,default_spec,SpatialAbsorber), the absorber undersettings;Recipe.preview_input()gives a free-space beam’s power, energy and fluence at the launch plane, andRecipe.modes()the planar route’s slab channels. A GNLSE recipe can hold a step-index fibre:StepIndexMode, withglassor an index for its core and cladding, is itsfibre, andgamma = "none"spells theNonethat derives the coefficient fromn2and the fibre’s area (#472). A waveguide recipe can hold a graded-index fibre:ModalGuide.on_gridbuilds a guide from a provider with its knots and node rule taken from the time grid, andGradedIndexProvider,PowerLawPermittivity,IndexMaterialandMaterialKerrare registered (#473).The
solpropcommand (alsopython -m solprop) runs, checks and exports recipes, and forwardssolprop scan.Simulation.run(stop=...)takes a flag that stops the run, writes its state and returns, andsolprop runstops cleanly on Ctrl-C.solprop resumeandsolprop.recipe.resume_filecontinue a run from its file alone, andsolprop.output.resumabilitysays whether a file can continue, from where and with whichresume=, whether it can rebuild itself, and, on request, whether the rebuilt run’s hash matches.Scans from recipes: a recipe’s
[scan]table givesRecipe.scan(), ready forrun_scan.run_scan(stop=)takes the same flag as a run: Local and Pool stop the point in flight, Pool through a message on the worker pipe, Batch between groups; a stopped point is not committed and a rerun computes it; Queue and Slurm refuse it.run_scan(progress=)accepts asolprop.log.ScanReporter(and aWatchingScanReporterfor each point’s run, relayed from Pool workers).Design solvers for any guide (SEP 41):
solprop.tools.solve_parameterfinds every value of a guide or fill parameter (a radius, a pressure, a core size, a wall thickness) that meets a target,ZDW,RDWorSolitonOrder, discarding sign changes through a wall resonance, and returns them asDesignRootswith the attainable range when there is none.tools.radius_zdwinvertszdwin the radius;tools.soliton_peak_powerandtools.pulse_energygive the pulse for a soliton order. A recipe’s[pins]table sets a value from such a target (Recipe.resolve(),Recipe.pin_roots()), solved at each build and each scan point and recorded with the run.solprop.grid.suggestproposeswavelength_limitsandtrangefrom the input pulses, as a starting point.Previews before a run:
Recipe.modes()andRecipe.preview_input()show the mode set and the launched pulse.Recipe.modes()gives each mode’sbeta,beta2, effective index, group delay (beta1), third-order dispersion (beta3), nonlinear coefficient (gamma), loss, effective area and zero-dispersion wavelength over the band; the newsolprop.modes.base.beta3differences the analyticbeta1twice. It also gives each mode’s phase matching to a soliton at the pump in the launch mode: thephase_mismatchof a dispersive wave in that mode over the band and its phase-matched wavelengthsrdw(intermodal for every mode but the first), with the soliton’s nonlinear wavenumber where the recipe’s pulse and fill give one. The mode set says which (pump,nonlinear). The GNLSE route has a mode preview too: its one specified mode, phase-matched with the recipe’sgamma.Parameter metadata for front ends:
solprop.recipe.parametersgives each route keyword’s forms, units, display unit, default rule and manual section, andsolprop.recipe.metadata.parameterstakes a registered type’s name ("GaussianPulse","PressureGradient.two_point","RadialGrid"and the rest) and gives its keywords the same metadata: forms with units and ranges, a level, a one-line summary, a display unit, a manual anchor and the signature’s default.solprop.recipe.metadata.per_unit_width(route, values)says when a recipe’s pulse energy and peak power are per metre of y (a waveguide recipe of slab modes), and the waveguide route’s energy and peak-power summaries say so, so a front end shows J/m and W/m there.Capabilities:
solprop.capabilities.routelists a route’s keywords, their values and the rules that couple them, each refusal naming its rule (SolpropError.rule);solprop.capabilities.specieswhat a gas admits: its ionisation models with their status, its Raman response, and its data ranges; andsolprop.capabilities.outputwhat a results file can give: its basis, which quantities are physical fluxes, which planes keep fields, which operations its readers refuse and why.Simulation.estimate()estimates a run’s memory, its output size and the cost of one right-hand-side evaluation; it is an estimate only, and nothing is admitted or refused on it.Simulation.output_bytes()is its part that times nothing: the size of a run’s output without constructing a backend, for a front end to show as the setup changes.
Example recipes and tutorials#
Every route now has a recipe a front end can start from, each mirroring a tutorial built
with the plain prop_* interface:
Recipe.example("hollow_rectangular"): an argon-filled hollow silica channel in its lowest x-polarised mode, on the waveguide route.Recipe.example("radial_kerr"): a collimated beam in argon under the Kerr effect on a Hankel grid.Recipe.example("filament"): a filament in argon with plasma, with a tutorial that reads one.Recipe.example("line_beam"): a line beam on aLineGridunder the Kerr effect (#476).Recipe.example("crossing_beams"): two beams crossing in argon whose interference fringes the Kerr effect focuses, from which the desktop front end’s Cartesian class starts; a one-beam Cartesian recipe still opens, on a one-beam sheet.Recipe.example("step_index_fibre"), the strand of the step-index tutorial (#472), andRecipe.example("graded_index_fibre"), with a new tutorial (#473).Recipe.example("fibre_supercontinuum"): the canonical photonic-crystal-fibre supercontinuum of Dudley, Genty and Coen (Rev. Mod. Phys. 78, 1135 (2006), Fig. 3), also in the supercontinuum gallery, which the desktop front end lists for its GNLSE class.The Cartesian and planar tutorials and the planar compressor ship as examples.
Pulses and launches#
solprop.pulses.load_spectrumreads a measured spectrum from a text file (frequency or wavelength, power density, and an optional phase) into aDataPulse. A wrapped phase column is unwrapped only where the power is above a noise floor, a phase in the FFT sign convention of a Luna.jl file is read withphase_convention="fft", and a wrapped column sampled too coarsely to unwrap is warned on (SEP 41).prop_capillary,prop_waveguideand theirSimulationconstructors takelaunch=, which puts each pulse into chosen modes with a share and an optional phase:launch={"HE1,1": 0.9, "HE1,2": {"share": 0.1, "phase": 1.57}}, or a list with one mapping per pulse ofpulses=. Modes are named aschannel=names them; the shares are energy fractions, and on a guide that declares a change of basis a coordinate split scaled to the pulse’s energy under the flux metric. The run records the launch asconfiguration["modal_launch"], which a resume compares; a run without one records nothing (SEP 41).SpatialPulsetakesdisplacement=(d_x, d_y)andtilt=(theta_x, theta_y), ascoupling.Alignmentdefines them, applied at the launch plane on a Cartesian grid with the energy set after them; a tilt the grid’s band, window or time window cannot carry is refused, and so is either on a radial grid, a y component on a line grid, aPlanarPulseand a guide’s incident beam. A record without them reads as an unmoved beam (SEP 41).pulses.SpatialPulseSumlaunches several beams together on the free-space routes, the sum of itsSpatialPulsemembers’ fields, each built and scaled as it would be alone: two beams crossing at an angle, a pump beside a probe. Recipes hold it (type = "SpatialPulseSum",beams = [...]), so a crossing-beam run is a recipe.Simulation.with_inputandSimulationRunner.runtakeinput_identity=, a string the run record holds with the array’s dtype and shape (solprop.output.StatedInput) in place of the SHA-256 of an array input’s bytes. Without it, every hash is unchanged. The identity is not checked: two different arrays stated alike have one configuration hash, so a wrong identity passes a resume and a scan’s cache. A derived run no longer digests its parent’s input to check itsconfiguration=keys either (#449).
Routes and interfaces#
prop_waveguideandSimulation.from_waveguidetakeinterpolate_planesandstep_planes, andprop_capillary,prop_waveguideand their constructors takepolarisation_taper, asprop_gnlsedoes;step_planesdefaults toNoneon every interface that takes it, which onprop_gnlsebehaves as its0did. The guide lists the deliberate differences between the routes’ keywords (SEP 41).Simulation.from_radial,from_freeandfrom_planartakeabsorberandabsorber_scheme, asprop_radial,prop_freeandprop_planarand the modalfrom_*do.One table of the route defaults,
solprop.driver.defaults.ROUTE_DEFAULTS, with the functions that resolve each default (default_rtol,default_integrator,default_controller,default_scheme,resolve_noise); the run record’s newdefaultsentry (DefaultsResolution), the start-of-run summary and the settings’ display say which of the integrator,rtoland the collar scheme took the route’s default, and the summary names a Multistep carrier frame (#87).precision="single"now admits the Adams integrator,Multistep()in its exponential formulation, onnumpy_refand onmlx, where its history stays on the GPU and each trial’s flow, moments and compensation are formed there in double-float arithmetic. Binary32 Adams agrees with binary64 Adams to the method’s own truncation on eight survival cases (the guide’s single-precision page has the record), and on the capillaries it is closer to the binary64 result than binary32 Runge–Kutta is. A single-precision Adams history now resumes in binary32. A single-precision run now takes each interface’s own default integrator, as a binary64 one does:Multistep()onprop_capillary,prop_radialandprop_planar, where it wasRungeKutta(). (#342)SOLPROP_REQUIRE_DEVICE(cuda,hiporany) makes a run refuse before allocating anything unless it would execute on a native device build that sees a device, so a job doesn’t fall onto a CPU wheel that a new release installed over its source build.solprop.backendsexportsthread_budgetandThreadBudget: how many threads a process may run at once, and the limit that sets it, for a front end to show.
Output, observers and handlers#
A reporter that implements
observe_plane(solprop.log.PlaneObserver) is shown each saved plane as a lazy view, whose spectrum, field, power and spectral density come from the processing functions, fetched from a device only on request; a failing observer is detached and the run completes. On a spatial run,PlaneView.stored()returns the plane’s stored spectrum (what thesolprop.spatialfunctionals take with the run’sSpatialFlux) andPlaneView.field_plane()the plane asprocessing.field_planereads it, whosespectral_energyis the beam’s energy per bin.solprop.output.RetainingOutput, the documented protocol for a handler of your own that takes field-free planes: its one method,retain(retention, field_shape), is called once per run, afteropenand before anysave, with the rule resolved against the run’s planes. A run that keeps fewer than every field used to look the method up without declaring it anywhere (#450).solprop.output.CallbackOutput, an output handler built from a callable: it gives each saved plane to the callable and keeps nothing, so a reducing scan onSimulationRunneris a few lines and costs no volume beyond the plane’s own.check_cache,resumeandresumabilitynow refuse any output handler by name (#499).processing.save_field_planeandprocessing.load_field_planekeep aFieldPlanein an HDF5 file with its own schema version, so a saved plane can launch another run later. A recipe can’t yet name one as its launch (#456).
Free-space readers and apertures#
Readers of a radial beam from its file, in
solprop.processing:on_axis_spectra,radial_spectrum,far_field,on_axis_powerandon_axis_spectrogram.solprop.tools.beam_paramsgives a Gaussian beam’s Rayleigh range, critical power, power ratio and Marburger collapse distance, andbeam_through_lensthe waist a lens makes.processing.spatial_grid_ofreturns a saved spatial run’s transverse grid from its record, andprocessing.fluence_maplays one saved plane’s fluence out on its axes, in any bulk medium and for a file written by a script.node_fluencenow also reads radial and Cartesian runs without a gas mixture. A hybrid planar file is refused by name (#455).solprop.spatial.spatial_energy_spectrum(spectrum, flux)splits the energy thatspatial_energymeasures into frequency bins, in J (J/m on a line), on radial, Cartesian, line and planar planes, and the bins sum to the total. It is not the densitybeam_spectrum. The coupling elements used it privately, and their reports do not change. On a spatial file, the spectral readers’ refusal now names it on every route, planar included (#184).solprop.spatial.spatial_power,spatial_intensityandon_axis_trace, andsolprop.processing.on_axis_power, takeoversampling=, resampling the time axis by zero-padding the spectrum asget_powerdoes, so a beam’s pulse is drawn smoothly and its peak found between samples.solprop.processing.time_axis(grid, oversampling)returns the times they lie on.An
ApertureSetrow may be an ellipse, a rectangle or a half-plane (shapes,extents), with its own edge profile (profiles), so a far-field statistic can express an instrument’s mask: a knife edge at a fixed position in a far-field plane, whose wavevector moves with frequency, no longer needs the field on the host. A half-plane is half-open and tiles the columns with its complement. Line grids take half-planes bounded in x and rectangles, and the offlineAperturetakes the same shapes. Unset, the new fields leave every existing result as it was (#446, part of #186).absorber(grid, walkoff=...)sizes the temporal collar from a group-delay drift over the grid’s own length, counted over both edges, aswarn_walkoffchecks, and leaves the spectral rate alone (#226). The boundaries guide now also says thatboundary_Ngives a slice its own strength and thatboundary_length=parent.reference_lengthkeeps the parent’s, and gives a recipe for a spectral walk-off absorber throughcustom_absorber, for runs whose walk-off can be predicted, with its geometry, its strength, its limits and a per-band loss check (#226).The Cartesian chapter gives a reading of the risk of transverse aliasing, the beam’s energy outside
|k| <= k_max / 2fromregion_spectrumandbeam_spectrum, tested throughFreeGridruns, and states what the proxy leaves out (#216).
Plotting#
Cross-section drawings in the library (SEP 41):
solprop.plotting.geometry.outlinegives the outline of a capillary, antiresonant, step-index, graded-index, rectangular or planar guide, or of a radial, Cartesian, line or planar grid, as shapes in metres;draw(ax, guide, palette=...)paints it in Matplotlib, andthumbnail(route, representation, size)makes a small figure of a route for a front end’s picker. Colours come from an explicitPalette(LIGHT,DARK). The user guide’s cross-section figures draw their outlines from it.solprop.processing.get_spectrogramreturns a plane’s spectrogram as data (gate positions, spectral axis and map, per unit of the axis asked for, with abandpass=window), the mapplotting.spectrogramdraws, so a front end can draw it interactively.solprop.solexportswavelength_to_axis, which the plots’ documentation sends the reader to.
Distribution and benchmarks#
solprop-nativewheels for Windows on Arm (win-arm64), and an x86-64-v2 build beside the x86-64-v3 one in the Linux and Windows x86-64 wheels, chosen at import, so processors without AVX2 now run the native backend. The v2 build runs about 20 to 25 % longer by geometric mean.SOLPROP_NATIVE_CPU_VARIANT=x86-64-v2asks for it.solprop-nativewheels use CPython’s stable ABI, so one wheel serves Python 3.14 and later. solprop itself is not yet supported on 3.15 (#319).A published-install check after each PyPI release, on every wheel platform: fresh CPython 3.14 environments resolve
solpropwith pip and verify its version, dependencies and default backend. The same check can be run by hand for a named release, with an optional run of its tagged README example and retained logs.The installation page now explains how to install a development version from CI’s wheels with no compiler, and
poe fetch-wheelnow finds CI’s Windows on Arm wheel.The first performance-history rows (
benchmarks/history/), recorded at 0.1.0 on six CPU and three GPU hardware sets, with numba runs beside the native ones on three of them;docs/dev/benchmarking.mdlists how each is run. The history takes any backend: each row names it, and rows compare only within one backend; a run the history recorded no longer makes the next run in that checkout dirty. The benchmark harness names an AMD GPU from its PCI IDs where ROCm reports only “AMD Radeon Graphics”.
Changed#
MLX and single precision#
The
mlxbackend compiles each stage on the GPU withmx.compile, so a stage’s element-wise passes run as a few fused kernels and its graph is not rebuilt in Python, and forms a stage’s propagator and its inverse in one kernel. A trial takes 1.5 to 2.6 times less time on the capillary, radial and Cartesian routes, measured on an Apple M5 Max, and the results are bitwise unchanged.SOLPROP_MLX_FUSED=0evaluates operation by operation. (#343)The
mlxbackend’s Runge–Kutta march now reuses the last stage of an accepted DOPRI5 step as the first stage of the next, asnativedoes, so a step takes six evaluations of the nonlinear source instead of seven where the temporal collar is applied in the stages. The results are bitwise the same. (#343)On
mlx, the transverse edge is read on the GPU where no collar is requested, rather than by copying the whole state to the host at every read, and a Cartesian run’s operator is built in one pass and no longer forms an unused prefactor. On an Apple M5 Max the 384 x 384 x 750 Kerr beam takes 0.82 ofnative’s time, the 192 x 192 one 0.40. (#343)On
mlx, a saved plane’s field-grid plasma statistics (the ionised fractions and peak rates at every node) are now evaluated on the GPU with the propagation’s own rate, scan and population kernels, as the envelope grid’s already were, rather than on the host in binary64 from every node’s field. On a 128 x 128 Cartesian argon filament the statistics of a plane took about 3 s and now take under 0.1 s; the values agree with the reference to about 1e-6 of their largest. (#343)A single-precision
prop_capillary,prop_gnlseorprop_waveguiderun onmlx(orbackend="auto") now builds its grid for MLX’s transforms: past 4096 samples a power of two, which MLX’s GPU transforms run six to twelve times faster than the 2-3-5-smooth sizes FFTW prefers. The helium RDW capillary’s grid is 16384 fine samples instead of 10240, and a trial took a quarter of the time.FieldGrid.from_limitsandEnvelopeGrid.from_limitstaketransforms="mlx"for a grid of one’s own, andfft_costtakes the library. Binary64 runs and single-precision runs onnumpy_refare unchanged. (#85)A single-precision free-space run (
prop_free, Cartesian and line) now takes free space’s binary64 default tolerance,rtol=1e-4, instead of1e-5: binary32 at1e-4was measured as close to a tight binary64 reference as binary64 at1e-4on a radial filament, a radial beam with its transverse collar and a Cartesian filament. The Cartesian filament takes 48 steps instead of 61. (#85)
GPU and native performance#
A
Localscan on a CUDA or HIP build keeps its backend between points that differ only in their input, asSimulation.with_inputbuilds them, so such a scan no longer allocates and plans a device’s backend for each point. A point’s stored results and record are unchanged to rounding.A lockstep
Batchscan no longer moves a member’s field to the host at a plane the scan doesn’t read:BatchBackend.observe_memberstakesfield=, asobservedoes, and a scan asks for what a lone point of the same scan keeps. On an NVIDIA H200Batch(8)spent 22 % of a plane interval observing at 8 steps a plane, and on an AMD Instinct MI325X 13 to 16 %.A device run’s
on_axis_*plasma statistics no longer copy the state to the host at each save plane: only the axis row’s spectrum crosses, and the host scans it as before (#359).StepDrivergains the_axis_row_populationshook, and_axis_statisticstakesNonefor a backend that reads the row itself.A device’s low-storage step costs less beyond its transforms. On a CUDA or HIP build, a free-space envelope’s split-step temporal collar transforms every row of the state at once, in place, rather than a node chunk at a time, whatever
node_budgetsays, and holds no coarse buffers; a flow’s lossless bin takes no exponential; and a device’s first input crosses to the scratch through tiles. At 768 x 768 x 600 a step’s collar takes 14 kernels and 10 transforms where it took 119 and 220. On an NVIDIA A40 the step fell from 2.66 s to about 2.56 s, and on an AMD Instinct MI300X a point takes 1.6 % less time. Results are unchanged to rounding (#361).On a CUDA or HIP build, a Kerr-only free-space envelope’s stage holds its transverse scratch in the state’s order, so its rank-3 transform keeps frequency contiguous and its input and fold no longer cross layouts. A step on an NVIDIA H200 takes 204 ms at 768 x 768 x 600 where it took 225 ms, and 36 ms at 384 x 384 x 600 where it took 51 ms, with 1.3 GiB less memory there. On an AMD Instinct MI325X it takes 199 ms where it took 211 at 768 x 768 x 600, and 52 ms where it took 57 at 384 x 384 x 600. Results are unchanged to rounding.
On a CUDA or HIP build, a free-space run’s transforms of the transverse scratch share one work area instead of holding one each. At 768 x 768 x 600 a run holds about 16 GiB less, 22.6 GiB against 38.5 GiB on an NVIDIA A40, and 23.4 GiB on an AMD Instinct MI300X. Results are unchanged.
On a GPU build, a large state now crosses to and from the host through a ring of pinned chunks into huge-page memory, rather than taking its page faults one thread at a time inside the driver’s copy. In a bare copy of a 5.27 GiB state that scheme reached 33 GiB/s against 1.8 GiB/s on an NVIDIA H200, and 50 GiB/s against 7.9 GiB/s on an AMD Instinct MI325X. A state under 256 MiB takes no ring, and the ring is listed in
memory_ledgerashost_crossing_ring. A saved plane’s finiteness check and its conversion to the stored convention now run on the process’s threads, andMemoryOutputconverts straight into its own block rather than copying. Stored fields are unchanged to the bit.On the native backend,
beam_radiusandfwhm_rno longer take a time transform on a Cartesian, line or planar grid, and on a Cartesian plane they reduce where the field lives: only a few moments and one value per ring reach the host, not a copy of the fluence at every node.on_axis_intensityon a Cartesian or line grid now reads the far-field pass’s on-axis sums instead of walking every column per bin. They agree withnumpy_refto rounding. A fluence negative by a little more than its rounding budget may now be read as rounding, because the budget’s scale is a bound on the reference’s, which it reaches when the closure is proportional to the field.solprop.spatialgainsFluenceRings,fluence_ringsandring_fluence_widths, the parts ofcartesian_fluence_widthsthat a backend shares.A low-storage run no longer holds a state volume at its last field-free plane, so
memory_ledger()andestimate()are one volume smaller, 5.27 GiB at 768² × 600. A step abandoned in flight after such a plane recordsfailedwith no terminal checkpoint and says plainly when the file cannot be resumed; a stop between steps checkpoints as ever (ADR-067, #345, #500).Building a large free-space launch is faster, with every bit of the launch as it was: its passes over the beam’s elements run in threads, its admittance is formed once, and the transverse residual no longer takes a Python
Fractionper node. Digesting an array not held in its own order no longer builds a whole volume, so a broadcast input costs a few megabytes. (#493, #347)
Records, defaults and interfaces#
A run record’s numeric arrays of more than 4096 elements are now hashed by their bytes and stored beside its JSON:
/meta/jsonholds a reference, and/meta/arrays/<name>the array, or/record_arrays/<name>in a scan, named by its digest, dtype and shape, shared between points. The text of a 512² Cartesian run’s record falls from about 23 MB to under 1 MB, and the first configuration hash from seconds to milliseconds, with every array still readable.RunMetadata.from_jsontakes the arrays asarrays=, andRunMetadata.record_arraysreturns them. A noise realisation moves too (#309).The output schema is bumped at most once between releases, not for each change that moves it (ADR-063).
A run asking for the
zdwstatistic is no longer stopped when its band holds no zero-dispersion point: the plane recordsnanwith a warning. A directstats.zdwcall still raises, nowNoZeroDispersionError, aModeError.capillary_params,soliton_paramsand the other design tools that report a zero-dispersion wavelength find the zero nearest the pump by refining the sign changes outwards from it with array samples, not all of them, and no longer raiseValueErrorwhen the search meets a gas resonance (xenon in a 14 um capillary at 15 bar). The array refinement makes them about 2.5 times faster, and on an antiresonant fibre, whose resonances give dozens of changes, the search from the pump takes about 0.17 s where it took about 3 s; the answer is the same. Zeros clear of the gas resonances are unchanged within 1e-8; a sign change reported beside a resonance, which only a pump in the vacuum ultraviolet selects, can move within the search’s 3.6e13 rad/s sample interval.solprop.recipeloads its names on first use (PEP 562), assolpropitself does, sosolprop.recipe.quantity,paths,documentanderrorsimport without the driver, the backends, h5py or SciPy: about 40 ms rather than half a second, for a front end that parses quantities in a process that never runs a simulation.solprop.backends.protocol.Backendnow declares what the run layer asks of a backend, which it used to look up by name:set_stop,attach_monitor,in_flight,march_snapshot,march_snapshot_nbytes,march_export_refusal,restore_march,edge_memory,timed_step,closedandreads_transverse_edge.StepDriverdefines all of them, so a backend built on it changes nothing.solprop.plottingdraws its maps (prop_2dandspectrogram) rasterized, so a figure saved as PDF or SVG keeps its axes and text as vectors and stays small.The
antiresonant_fibreexample and the antiresonant tutorial’s propagation show resonant dispersive-wave emission: 1 µJ, 30 fs at 800 nm through 20 cm of fibre in 5 bar of argon, field resolved over 150–1600 nm with photoionisation and 201 saved planes, in place of 2 µJ over 5 cm at 1 bar on an envelope grid. They now record the default statistics, not energy alone.
Project, documentation and tooling#
The package classifier is now Development Status 4 - Beta. The interfaces may still change between minor releases.
The README,
CITATION.cffand the citing page name solprop’s Zenodo DOI, 10.5281/zenodo.23854248, which covers every release.Planned work has moved to GitHub issues, labelled by type, priority and area: the roadmap now lists only SEPs (ADR-062). Issue templates and
CONTRIBUTING.mdsay what an issue or a pull request should hold and what to check before opening one.Notable changes are recorded in separate release-note fragments and collected into one rolling draft release PR after merges. Implementation PRs no longer edit the shared changelog, avoiding conflicts between unrelated changes. Release tags and publication remain manual.
A plain
uv syncin a checkout now compiles the native backend, anduv sync --extra nativeis gone. Python and documentation contributors with no compiler can useuv run --no-project tools/setup_light.py, andpoe fetch-wheelinstalls the wheel CI built, refusing one that doesn’t fit the tree.Continuous integration now compiles the CUDA and HIP targets on a change to
native/, with no device, so a change that breaks a GPU build is found before it merges. A build from source no longer stops on a compiler’s warning:SOLPROP_NATIVE_WARNINGS_AS_ERRORSnow followsBUILD_TESTING, so it stays on for the presets and is off forpipanduvbuilds, while continuous integration keeps it on for its wheels. (#151)Corrected the mixtures guide on spatial fluence and on who refuses a z table, three worked examples’ prose, how
ReferenceState.temperaturereads where a source declares none, and what the antiresonant guide claims for the dispersion width’s fit to the finite-element solutions.
Fixed#
Noise, scans and resume#
A scan derived from one cached simulation, the scans guide’s own recipe, now gives every point its own noise seed.
with_input(noise="keep")andwith_mixturekeep the ability to draw unseeded noise again, and the draw replaces only the initial noise of the shared translation. Before, such points shared the base’s draw, depended on the worker underPool, could not be rerun in a new process and failed underbase_seed. Resuming a derived, unseeded run now takes the file’s seed, as a constructor’s does, instead of being refused.One object returned by a scan builder for every point no longer collapses a noise ensemble under
Batch, where every member ran on the last point’s noise while the file recorded each point’s own seed. The draw now goes on a copy, and the builder’s object is left as it is. A file written by such a scan holds the wrong noise for its recorded seeds and a rerun does not detect it: run those points again.Resuming a file that holds only its launch plane, from an
input-noise run stopped before its first saved plane, no longer adds the noise draw to the stored field a second time, which had doubled the noise amplitude for the rest of the run on every backend.set_initialtakesresume=Truefor a stored field.A scan file whose points’ run records declare another output schema, a 0.1.0 scan among them, is refused by name, in the words a run file is refused with, when it is read (
ScanOutput,read_point) or resumed or collected (run_scan, a queue’s collector). Before, only the scan container’s own version was checked, and that stayed 1, so such a scan was read as if its layout were this release’s.A recipe with a
[scan]no longer drops the[execution]keysrun_scandoes not take:resume_historynow reaches each point’s settings, as the scan file’s recorded recipe says it does.stop=now stops a nativeMultistep()run during its march instead of at its next save plane: within a native call’s bound, 256 attempts or 0.1 s, and the attempt in flight. With one plane the flag was ignored and the run finished ascomplete.solprop runandsolprop resume, whose first SIGTERM or Ctrl-C reaches a run through that flag, stop the same way; they used to report a stop that the file showed had not happened (#519). A signal that comes too late to stop the run now exits with status zero and says the file is complete (#521).On Windows on Arm,
Poolscans no longer fail or hang in NumPy’s linear solves. Workers now limit BLAS throughthreadpoolctlinstead of thread variables, which crash or hang NumPy’s OpenBLAS on that platform at small widths, andimport solpropwarns if such a value is set.
Boundaries and the monitor#
Under
absorber_scheme="split_step", the default on the spatial routes, the boundary monitor judges the time window’s guards on the power each step’s split finds, halfway through its factor, instead of the state it leaves, whose guards it had damped by aboute^-10: a pulse walking out of the window is now stopped where the in-stage scheme stops it (#127). Each reading reports that power’s energy and its guards’ and collar’s energies (solprop.monitor.BoundaryEnergies.found) and the state’s energy per walk-off bucket (BoundaryEnergies.occupancy). Steps are also held to the split collar’s crossing limit, half the collar’s width over the walk-off of the fastest light holding more than1e-6of the energy, so that no step carries light through the collar and round the window undamped (issues #149 and #440). It is read from the launch at translation, which holdsdz_maxand refuses a longer fixed schedule, and again from the state at every check, which caps the steps after it and stops a fixed schedule it falls below. See absorbing boundaries.Under input noise, the boundary monitor subtracts at most one floor from the collar’s removal: the floor is put in once at the launch and cannot lose more. It subtracted the floor’s rate over the whole run, about 37 floors under the default collar, so a removal of a few 1e-3 read as zero, with no warning, and the split scheme’s subtraction grew with the number of steps (#126).
A resumed run’s monitor record continues from the latest execution that kept one: a second hard kill before the monitor started, or an execution with
boundary_check=None, no longer restarts the totals, and the stretch run unwatched is listed underunwatched. The signed removal is kept and restored, so a stop and resume reads as the whole run; the quiet collar’s state is restored; and a resume on a held row no longer counts the resumed state in the next row’s guard maxima (#128).BoundaryCheck(quiet_collar=True)no longer records the collar as left out on the Cartesian, line and planar routes, whose stages keep it, or caps their steps for nothing (#94).A scan point keeps its closing boundary-monitor record, without the per-plane rows, under every executor (
read_point(...)["boundary_monitor"]); a batched point no longer stores the launch’s zeros; and aBoundaryWarningraised as an error fails its own batched point alone, as underLocal(#132).The default boundary check no longer brings a native run’s state to the host. The transverse edge, a requested collar included, is read where the state lives and only numbers cross, so a field-free run on a device copies no state at all, and on the CPU a free-space Kerr beam’s check costs less. A resumed run with a requested collar now restores its current, baselines and peaks, so it no longer judges against zero. (SEP 44, #385, #512)
The default boundary check no longer does work that nothing uses. A saved plane the step that reached it already read takes no second read, which on a device was a copy of the whole state. A fixed schedule’s reads of the transverse edge now follow its next step rather than
dz_init, which read one step late with a shortdz_init, past the spacing the reads promise, and at every step with a long one. The split collar’s occupancy reduces per column, without an atomic per element, which took most of a monitor reading on a GPU.energyandpeak_intensityno longer sum on one GPU thread, an Adams run over the snapshot limit takes no snapshot to learn its size, and a runner’s points share the walk-off table rather than upload it each.A boundary monitor built for another grid is now refused by name on every backend, instead of a bare
ValueErroronnativeand an accident inmatmulonnumpy_ref. A direct call tonative’sstatsnow checks every route for names the route doesn’t define, and refuses a general flux statistic under a weight other than one rather than ignoring the weight.warn_walkoffsuggested aboundary_Ncounted from the default strength when it was given aboundary_length; it now counts from the length in force. The guide and the docstring ofno_absorberno longer say that an explicit absorber switches on a free-space run’s real-space collar or that the collar reads the reference length (#226).Documented the limits of
FixedSchedule.from_history. Every collar refusal a replayed history can reach (the temporal collar’s stable step, and a requested spatial collar’s stable step and its fixed-schedule crossing and damping bounds) now prints its limit rounded down and names the remedy:dz_maxat or under the printed limit in the discovery run, run with the replay’s integrator where the limit is a stability limit, or, for the temporal collar alone,absorber_scheme="split_step"in both runs. The docstring and the fixed schedules guide state these limits and the interpolated-plane and non-abutting-history ones, relatefrom_historytodiscover, and replace the claim that aMultistepreplay makes its adaptive run’s truncation errors: compare two replays of one schedule instead, and for a comparison of the arithmetic alone replay with fixed orders (RungeKutta()orMultistep(variable_order=False)), since a variable-order replay’s order choice can turn on rounding (#82).
Copies and memory#
A
Simulationbuilt from an array input now copies the array at construction, so changing it before the run no longer changes the run, its construction-time checks or its recorded configuration (#434).Simulation.initialis a read-only view of that copy as the caller gave it, so an input of another dtype is recorded unchanged and older files resume. On free-space and spatial routes the translated problem holds the same copy; on a modal route it holds the converted launch beside it, two states. Anumpy.broadcast_toinput copies only the block it repeats.A translated problem no longer holds a full copy of a broadcast initial field (#5): a
numpy.broadcast_toplaceholder, of any numeric dtype, costs only the block it repeats. Every other initial field, noise realisation and batch parameter is now copied, so changing the caller’s array after translation can no longer change the problem, and the caller’s array is no longer made read-only; before, a contiguous complex128 field and a noise realisation were shared with the caller.The native backend no longer keeps the last host state it loaded alive after
set_initial: a temporary, such as an input noise sum, a resumed plane or a delay scan’s input, was one host field volume held until the next load, outsidememory_ledger(). A resident Adams march no longer keeps a host copy of the state for the backend’s life either; solprop’s host engine, which reads one, lists it asadams_host_state(#435).A
SimulationRunnerno longer holds an input through its march. An array recorded by its digest is read in place rather than copied, and neither it, the launch converted from it nor the derived simulation outlives the load, so a delay scan that forms each input in the call holds it only until the backend has it (#447).A run hands its output each plane without copying the field.
SavedPlanecopied an observation’s field, and again when the driver added the plane’s statistics, so a handler that only reduces a plane paid two field-sized copies and a peak of two volumes per plane.plane.fieldis read-only and nothing changes it afterwards, so a handler can still keep it; aSavedPlaneconstructed by hand copies, as before (#448).A run of a guide that is the same along its length (a fixed fibre, a uniform fill) records its mode basis once instead of once for each saved plane, so a step-index fibre with 201 saved planes now starts at once rather than after about 95 s.
A run into
MemoryOutput, the default handler, no longer computes the configuration hash for a debug message that is switched off, which took seconds on a large grid.Guide and incident-plane construction, kernel translation and coupling now limit NumPy’s and SciPy’s controllable BLAS pools to one thread, or
SOLPROP_BLAS_THREADSwithin the process budget, and restore their previous limits afterwards. This prevents the thousands of small graded-index eigensolves from occupying every CPU before a backend starts. Vendor thread defaults are overridden only during construction; the native backend’s own BLAS keeps its fitted width.
Pulses, modes and design tools#
A tilted
SpatialPulsetravels towards +x (+y) for a positivetilt, as documented and ascoupling.Alignmenttilts a beam; it went the other way. Scripts that compensated by negating the tilt must remove the minus sign.DataPulse.from_spectral_densityinterpolates the phase it is given. It used to wrap the phase into the complex spectrum and unwrap it again, which cannot follow a change of more than pi between samples, so a strongly chirped pulse was built wrongly with no warning: 20 000 fs² of group-delay dispersion on a 0.4 nm axis at 800 nm came out 13.5 % away from the converged spectrum, on a 1.6 nm axis 100 %. ADataPulsegiven a complexspectrumstill unwraps it, and its docstring states that limit.A measured field in time puts a pulse where it sat in the record (
TimeDataPulse, above).DataPulse.from_timeunwrapped the phase, and a pulse more than half the record’s length fromt = 0changed its phase by more than pi per bin, so it was moved by one record length with no warning: at 500 fs in a record from 0 to 800 fs it came out at −300 fs.StepIndexModebuilds fibres up to V = 20000 and refuses larger ones with a message that says so; it refused most fibres above V of about 26, a 100 µm core of numerical aperture 0.22 at 1030 nm among them, because its root scan lost close pairs of HE and EH roots, and from a cladding argument of about 700 the unscaled modified Bessel functions underflowed. It also refused every EH family from an azimuthal order of about 40, where J_n underflowed at small u. The lost roots are now bracketed by each family’s own factor of the characteristic product; the scan runs from the family’s first cutoff to the one above the requested radial order, so a low-order mode costs the same at any V; and the modified Bessel ratios and exterior fields use the exponentially scaled functions, with a recurrence where those overflow at large order. Effective indices below V = 26 move by at most one rounding (#148).tools.lambda_rdw_allskips a sign change of the phase mismatch through a resonance of the guide, where the mismatch has a pole or is not a number, instead of raising a bareValueErrorfrom SciPy on an antiresonant fibre’s default search window (#538).A
soliton_orderpin on a GNLSE recipe reads the recipe’sgammaorn2, where it failed with a bareAttributeErrorlooking for the mode’s gas fill.A recipe without a required keyword now raises
RecipeError, naming the keyword in itsparameter, frombuild,resolve,modes,preview_input,pin_rootsandrun, where the route’s constructor raised a bareTypeError(#454).The
step_index_fibreexample and its tutorial run 5 cm on a 2 ps window with the boundary monitor on, saving 201 planes; over 15 cm on 1 ps its Raman-shifted solitons left the window unnoticed and the run lost 71 % of its energy (#544). Therdw,spm_compressorandgraded_index_fibreexamples and their gallery scripts save 201 planes, for smoother plots along z.
Readers and plots#
On a radial, Cartesian, line or planar output, the processing readers that read each transverse column as a modal amplitude in sqrt(W) now refuse the file by name with an
OutputErrorthat names the spatial functional to use, instead of returning wrong numbers silently (a 3 nJ launch read back as 4.8e-15 J). They areenergy,peak_power,get_power,get_spectral_density,fwhm_t,fwhm_f,time_bandwidth,arrival_time,field_autocorrelation,intensity_autocorrelationandcoherence_time, the plotsprop_2d,time_1d,spec_1dandplot_energy, and a plane observer’spowerandspectral_density. Usesolprop.spatial.spatial_energy,spatial_powerand their neighbours on a saved plane, or the run’sstats/energy, which is unchanged;get_spectrum,get_fieldandget_phasestill return the stored columns.solprop.capabilities.outputgainsrefused_readers, which states these refusals with the readers’ own text, while it still admits a spatial file’senergystatistic. Modal files read as before (#147, #406).get_spectrogram, and soplotting.spectrogram, no longer alias on a narrow envelope grid. The real field is now oversampled until it resolves the carrier: an 800 nm pulse on a 600 nm to 1100 nm band used to appear near 2.9 µm.Bad input to the processing and plotting helpers is refused by name, with its units, instead of failing late or silently.
Passbandrefuses other than two limits, or a width that is not positive, when built; it raisedIndexErroron use, or kept two of three limits.wavelength_to_axisrefuses a wavelength limit that is not positive on a frequency axis, where zero raisedZeroDivisionError.spectral_bandsandband_coherencerefusen_bandsbelow one, and a band with nothing to average staysnanwithout aRuntimeWarning.spectrogramrefuses aspec_rangethat misses the data, asget_spectral_densitydoes, instead of drawing an empty view (#96).A gallery page re-run on its own keeps its
MaterialRangeWarning: the docs build’s import ofsolprop.solsilenced it for every script after.
Backends, single precision and platforms#
An adaptive
RungeKutta()run onmlxis no longer held to short steps by binary32’s exponent range: a trial whose collar or loss would overflow the interaction picture’s inverse propagator (|Re dPhi|past 88.7) is combined in the lab frame by forward flows instead, where it was rejected and shrunk before. A radial Kerr beam whose first trial reaches 459 now takes its millimetre in one step, as binary64 does, against 14 steps and 2 rejections. Runs within the range are unchanged. (#343)A single-precision run with the low-storage march or the exponential Adams method is no longer refused when a step’s damping exceeds binary32’s exponent range: those methods apply forward flows only, which underflow harmlessly in a damped bin, so only growth is limited. The Cartesian Kerr beams’ replayed 0.5 µm steps, refused before on their spectral collar, now run in binary32 and agree with binary64 to 2e-7. The check uses the operator’s rate bounds on the free-space and radial routes instead of forming the operator over the grid (seconds at 384 x 384 x 750). (#343)
Fixed the reference’s single-precision path leaving binary32 on two paths that it then narrowed without a check: the split-step collar now keeps a complex64 state in binary32, as the correction
a + F(F^-1(a)(f - 1))thatmlxuses (binary64 runs are unchanged), and a fixed-schedule batch of single-precisionnumpy_refmembers now steps each member through its own binary32 trial instead of the binary64 batch arithmetic, and a lockstep batch refuses members of mixed precisions. The finished state is now refused by name if it is not complex64 (#79).Simulation.estimate()no longer crashes the process on the native backend underLowStorageRungeKutta(), and on every backend it now times that march’s own step, so its time per step is the low-storage march’s (#492). A trial step on a native low-storage state now raises a named error instead of faulting.The native backend now refuses an unknown
SOLPROP_FFTW_PLANvalue, which it had read asmeasure, and a problem whoseresponse_orderomits a response it holds, which it had run anyway. An emptySOLPROP_FFTW_PLANnow counts as unset (#460).A native run under Runge-Kutta or Adams now records the
propagator_modeit used,recompute, whentabulatewas asked for; it had recordedtabulate, which that march can’t do. The run’s configuration still keeps what was asked (#464).On an AMD device, the far-field pass decided about 3 % of the columns exactly at a hard aperture’s edge differently from
numpy_ref, because the compiler fused products and sums the pass meant to round separately. The radius is now rounded as on every other build.The native backend’s HIP build compiles again under its default warnings-as-errors: ROCm’s Clang refused a thread-local variable that only an OpenMP build uses (0.1.0 needed
-DSOLPROP_NATIVE_WARNINGS_AS_ERRORS=OFF).With
/proc/cpuinfounreadable, native chose its x86-64-v3 build, so a lower processor could reach an illegal instruction (#443). It now asks NumPy, and refuses before loading if neither answers. The Windows on Arm wheel gains a processor check too, for the Armv8.2-A OpenBLAS it links.The versions of solprop, solprop-native and solprop-gui now come from
v*tags only, so another tag on a commit can no longer set them. Building any of them now needs setuptools-scm 9, and solprop-native requires NumPy 2.5, as solprop does (#92).poetasks now run in the environmentpoewas started in, souv run --no-sync poe fetch-wheelno longer tries to build the native backend first, anduv run --no-sync poe testno longer replaces a fetched wheel with a local build. The contributor guide now gives the command that works with no compiler.Building the native backend records why the macOS refusal after pyFFTW stays and what would lift it, and no longer says that importing solprop first avoids it: importing solprop does not load the backend (#315).
Correct the 0.1.0 limitation statement about
mlx: its custom Metal kernels already run in continuous integration’s macOS default lane. That lane now requires Metal, so losing the device fails the job rather than silently skipping the kernel tests. MLX coverage, runtime type checks and an explicit CPU-device pass remain absent.
[0.1.0] - 2026-10-31#
The first public release of solprop and of its compiled backend, solprop-native,
which is released at the same version. Releases are 0.x for now: a minor release may
break the API, the output schema or the resume key, and lists every such break under
“Changed (breaking)” (ADR-058).
Added#
Propagation equations. The unidirectional pulse propagation equation (UPPE) and the generalised nonlinear Schrödinger equation (GNLSE), for the real electric field or a complex envelope, in waveguides and in free space.
Waveguides.
Gas-filled hollow capillaries, with resolved modes (the default) or mode-averaged (
mode_average=Trueonprop_capillaryandprop_waveguide). Tapers, pressure gradients and gas flow are supported, as is a coherent wall that couples the modes.Antiresonant hollow-core fibres (the Vincetti model).
Step-index, graded-index, rectangular and planar guides.
Modes tabulated from arrays or from external mode solvers.
A general modal route for any guide that supplies its own electric and magnetic mode fields, including guides that change along their length.
Free space. Radial, Cartesian and line grids with the exact (non-paraxial) diffraction operator; planar guides can be resolved across their width. Launches, shot noise, energies, fluences and intensities measure the medium’s axial Poynting flux at the plane, so a requested energy is the physical energy there (SEP 34). Far-field and aperture statistics.
Media and responses.
Gases, gas mixtures, glasses and metals from the optmat material library.
Kerr and third-harmonic nonlinearity, including a dispersive electronic response.
Photoionisation with atomic and molecular rate models, and plasma on field and envelope grids.
Rotational and vibrational Raman responses, scalar and vector.
Quantum shot noise, on by default (SEP 37): one photon per mode with a random phase, added to the input field (
noise="input") and recorded with its seed. A resumed run draws the same realisation again, and a scan draws each point’s from a seed of its own.noise=Noneswitches it off andnoise="modified"keeps the realisation apart from the field. The Cartesian, line and hybrid planar grids, slab mode sets, the TDSE response and single precision carry none by default and record why. Spectral densities can subtract the one-photon floor (noise_floor="subtract").An optional helium TDSE atomic response for research. Its native backend is not yet publicly available.
Integrators and their defaults.
Two adaptive integrators: a low-call exponential Adams method (
Multistep()) and an embedded interaction-picture Runge–Kutta pair (RungeKutta()), with a low-storage Runge–Kutta variant and fixed schedules. The linear propagation is integrated exactly.Each interface has its own default integrator and tolerances, chosen by measurement:
RungeKutta()forprop_gnlse(rtol1e-7),prop_waveguide(1e-5) andprop_free(1e-4);Multistep()forprop_capillary(1e-6),prop_radialandprop_planar(1e-5). The choosing-a-stepper page tabulates them and says when to choose another.Multistep(carrier_frame="scalar"), an opt-in carrier frame for the Adams history that is the fastest method measured on dense, multimode, Raman-active runs such as a comb-to-continuum capillary (SEP 35).Backends agree with each other to bounded, rounding-level differences.
Time-window boundaries (SEP 21). Every interface absorbs at the edges of the time window and of the spectrum. The temporal collar lies outside the requested window: the grid widens to
trange / (1 - 2 collar_fraction)(collar_fraction0.1), so the whole request is flat, and transform sizes default tofft_size="auto", the cheapest 2-3-5-smooth size up to the next power of two.absorber=Falseswitches the soft collars off and keeps the same grid. A boundary monitor, on by default (boundary_check=on everyprop_*function andSimulation.from_*constructor), warns (BoundaryWarning) and then stops the run (BoundaryError) when light above the shot-noise floor reaches the window’s edge, and records the energy the collar removed.Coupling simulations (SEP 31).
solprop.couplinghands a field from one simulation to the next. AFieldPlaneholds a coherent field at one plane with its reference and provenance;couplemaps it into another simulation’sInputPortunder a declaredCouplingModeland returns an energy report;transportcarries a free-space plane through lenses, apertures, masks, mirrors, interfaces and spectral filters;Outcouplesynthesises a guide’s exit field. An incident beam launches into a general modal guide with the share of its energy that the guide captures. Each step is admitted against an error budget and refuses what it cannot certify.Backends.
numpy_ref, the NumPy reference, against which every other backend is tested within derived error bounds, andnumba_cpu, compiled with Numba. The backends come in tiers: new features land onnumpy_refandnative;numba_cpuis mature and takes a new feature only where its design says so;mlxis experimental.The optional native backend, the solprop-native distribution: C++20 kernels on Kokkos for multi-core CPUs (OpenMP) and for NVIDIA and AMD GPUs (CUDA, HIP).
pip install "solprop[native]"installs a precompiled CPU wheel on macOS on Apple silicon, Linux on x86-64 and aarch64, and Windows on x86-64.backend="auto"selects it when installed, except on a processor below the wheel’s CPU baseline, where it usesnumba_cpuand warns once (SEP 29). On the native backend the exponential Adams march runs in compiled code, many steps per call (SEP 39).One thread budget per process, which every pool of both CPU backends stays within: the smallest of the CPU affinity mask, the physical cores that hold it, the control group’s CPU quota and
SOLPROP_THREADS(ADR-052).Single precision (SEP 33):
precision="single"holds the state, the transforms and the responses in binary32, with the controller in binary64.numpy_refruns it as the reference, and themlxbackend (pip install "solprop[mlx]") on the Apple GPU. A survival record states which problems keep their accuracy.
Running and recording.
HDF5 output with periodic snapshots and provenance, and resuming an interrupted run, which continues the Adams history.
A summary at the start of every run of what it is about to compute (the code, the machine, the backend, the grid, the medium, the responses, the noise, the integrator, the absorber and the output), and at its end the wall time, CPU time and peak memory. Each execution records its machine and what it spent in the file.
Statistics along the propagation.
Parameter scans on process pools and Slurm clusters.
Analysis and tools.
Processing and plotting. Spectral ranges and band-pass windows are given in the units of any spectral axis (
spec_range,Passband).Ensemble coherence by spectral band, and replay of a run’s accepted steps (
FixedSchedule.from_history), to compare two precisions or backends on one discretisation.Soliton and dispersive-wave design tools.
Pulse compressors: Taylor phase, chirped mirrors, materials, gratings and prisms.
An interactive session through
import solprop.sol as sol.
Performance tracking for developers (SEP 38):
python -m benchmarks tracktimes about a dozen representative workloads, with each interface’s defaults, at one thread and at the production width, and records them by hardware;python -m benchmarks abcompares two builds.Documentation. An introduction with executable lessons, a user guide, a long-form primer on the physics and numerics, focused tutorials and worked examples, the API reference, and a developer’s guide with the design records (SEPs and ADRs).
Changed (breaking)#
Nothing was released before 0.1.0. For scripts and files from a development checkout:
Output files of development versions are not read. The output schema restarts at 1 (
solprop.output.SCHEMA_VERSION); keep the development install that wrote such a file to read it. The kernel contract’s version isKERNEL_SCHEMA_VERSION, separate from it.Defaults changed late in development, so a development script’s results change: shot noise is on; each interface takes its own integrator and tolerances; the temporal collar lies outside the requested window, which widens the grid (
collar_placement="inside"rebuilds the former geometry); transform sizes arefft_size="auto"; and the boundary monitor is on.Renamed or removed.
prop_gnlse,prop_capillary,prop_waveguideand theirSimulation.from_*constructors takewavelengthandshape, notlambda0andpulseshape, andresponses_fortakeswavelength, as the pulses and the design tools already did. The plots’wavelength_rangeisspec_range, in the units of their axis, andsolprop.plotting.style.spectral_limitsis gone (wavelength_to_axisconverts a wavelength range);bandpasstakeslimits, notwavelength_limits;poynting_spectrumis gone (beam_spectrumis the axial-flux spectrum); thesame_basisfunction is gone (usecouple); andsolprop.driverno longer exportspropagate_fixed_rk4, the tests’ fixed-step oracle.Multistep()refuses thePIControllersettings it does not read.
Known limitations#
The
mlxbackend is experimental. Its Metal kernels are tested by hand on a Metal device, not in continuous integration, and its coverage is not measured there. The single-precision survival record is the reference implementation’s (onmlxfor two cases). On the defaultfft_size="auto"grids MLX’s GPU transform runs four to eight times slower than on powers of two, so a run can be slower than binary64native: build single-precision grids withfft_size="pow2". The guide’s speed table predates the current grids and is marked so.Free space has no accurate transverse absorber. By default a radial grid’s edge is a hard wall and a Cartesian or line grid wraps around; the optional real-space collar (an absorber given to a spatial run,
Absorber.spatial) removes only part of the light that reaches it, at a large cost in steps, and the boundary monitor watches the time window only. Size the transverse window so that the light stays clear of its edge. SEP 40 (a draft) rebuilds these boundaries.A run is resumed by the release that wrote it. A run’s configuration hash covers every recorded field, so a release that adds one changes every hash, and within 0.x the output schema may change too: finish a run with the release that started it.
GPU builds are made from source. The wheels are for CPUs; CUDA and HIP builds of solprop-native are built from the repository (building the native backend).
CPython 3.14 only. solprop-native, pyFFTW and h5py have no wheels for 3.15 yet.
macOS: import solprop before pyFFTW. pyFFTW’s macOS wheel starts its own OpenMP runtime, so the native backend refuses to load in a process that imported pyFFTW first; solprop itself imports them in the working order.