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) and coherence;

  • compression (linear-optics compressors);

  • beams (radial beams), modal (E and H of a general modal run), mixtures (populations and deposition), planes and plane_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_z planes.

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

axes

Rebuild the axes and the layout of a saved run from its grid record.

beams

Read a radial beam from its file: across it, on its axis and in its far field.

coherence

First-order coherence across an ensemble of noise realisations.

compression

Compress the pulse of a saved run with linear optics, and say how well.

fields

Read fields, spectra and spectral densities out of a saved run.

mixtures

Read a run's population record and reconstruct physical deposition from its planes.

modal

Physical E and H on a saved plane of a general modal run, and what they measure.

plane_file

Save a field plane to a file and load it back, to launch another run from it.

planes

Read one saved plane of a run: a coherent field plane (SEP 31), or a fluence map.

scans

Declare scan reductions evaluated inside workers, and read collected scans.

spectra

Spectral post-processing: instrument resolution and explicit bandpass windows.

time

Pulse metrics: energy, peak power, durations, arrival time and autocorrelations.