solprop.processing#
Post-processing of saved runs, in the optics convention and in SI units.
Every reader takes an solprop.output.store.Output – a memory handler or an
HDF5 file, through the same accessors – and nothing here touches a backend or applies a
window the call did not ask for. The package re-exports the public names of:
axes(axes and layout rebuilt from the grid record),fields(fields, spectra, densities, spectrograms),time(pulse metrics),spectra(instrument resolution and bandpass windows) andcoherence;compression(linear-optics compressors);beams(radial beams),modal(E and H of a general modal run),mixtures(populations and deposition),planesandplane_file(one plane, for a map or another run);scans(scan reductions and the scan reader).
The manual page is docs/guide/results/processing.md.
- solprop.processing.example_output(kind='envelope', *, n_modes=1, n_pol=1, n_z=5, with_stats=True, with_step_stats=False)#
Return a synthetic run: a Gaussian broadened by pure dispersion.
The group-velocity dispersion is chosen so that the pulse doubles its duration over the length, which makes every plot and every metric change visibly from plane to plane. Modes and polarisation components carry the same pulse at decreasing amplitude, so a modal sum differs from any single mode.
- Parameters:
- kind{‘envelope’, ‘field’}
Which spectral layout to build the run on.
- n_modesint
Number of propagated modes.
- n_polint
Number of polarisation components, 1 or 2.
- n_zint
Number of saved planes, spread evenly from 0 to the grid’s length.
- with_statsbool
Whether to record the default statistics at each plane.
- with_step_statsbool
Whether to record the same statistics between planes too, as a run with a periodic subset does, so that a reader of the channel has something to read.
- Returns:
- solprop.output.memory.MemoryOutput
An opened handler holding
n_zplanes.
Examples
>>> from solprop.processing import example_output >>> output = example_output(n_modes=2) >>> output.n_saved, output["field"].shape[1:3] (5, (2, 1))
Modules
Rebuild the axes and the layout of a saved run from its grid record. |
|
Read a radial beam from its file: across it, on its axis and in its far field. |
|
First-order coherence across an ensemble of noise realisations. |
|
Compress the pulse of a saved run with linear optics, and say how well. |
|
Read fields, spectra and spectral densities out of a saved run. |
|
Read a run's population record and reconstruct physical deposition from its planes. |
|
Physical E and H on a saved plane of a general modal run, and what they measure. |
|
Save a field plane to a file and load it back, to launch another run from it. |
|
Read one saved plane of a run: a coherent field plane (SEP 31), or a fluence map. |
|
Declare scan reductions evaluated inside workers, and read collected scans. |
|
Spectral post-processing: instrument resolution and explicit bandpass windows. |
|
Pulse metrics: energy, peak power, durations, arrival time and autocorrelations. |