solprop.processing.mixtures#

Read population inventories and reconstruct physical deposition from saved planes.

Functions

absorbed_spectral_energy(output, *[, species])

Return species-resolved linear absorption per metre and angular frequency.

get_power_weight(output)

Return the modal power weight Re n_eff at every saved plane.

node_fluence(output)

Reconstruct the pulse fluence at every transverse quadrature node.

species_ionisation(output)

Return final ionised fractions at every saved plane and transverse node.

species_ionisation_energy(output)

Return ionisation energy stored in the final inventory, per propagation length.

solprop.processing.mixtures.absorbed_spectral_energy(output, *, species=None)[source]#

Return species-resolved linear absorption per metre and angular frequency.

Multiply each mode’s saved spectral energy density by its first-order material attenuation rho_s omega Im(gamma_s)/c and sum over modes. Spatial runs use their physical spectral quadrature. The active band is returned in ascending angular frequency. Wall leakage, plasma work and nonlinear absorption are not assigned to species by this definition. A numeric total-loss control scales the attribution; a callable replacement has no species attribution and is refused.

Parameters:
outputOutput

Opened mixture output with reconstruction data.

speciesstr or None, optional

One component label, or None for all labels in mixture order. A selected component retains a species axis of length one.

Returns:
omeganumpy.ndarray

Angular frequency in rad/s, shape (n_omega,).

absorbednumpy.ndarray

Energy loss density in J/(m rad/s), shape (n_z, n_species, n_omega).

Raises:
ProcessingError

If the label, saved-plane data or species attribution is unavailable.

solprop.processing.mixtures.get_power_weight(output)[source]#

Return the modal power weight Re n_eff at every saved plane.

The weight that relates the saved true-power amplitude b to the internal vacuum-normalised amplitude a of docs/guide/results/power-and-intensity.md: b = sqrt(w) a, with w = Re n_eff(omega, z) and w = 1 on the GNLSE route. Divide a saved plane by its sqrt(w) before applying a vacuum-normalised synthesis matrix or an ionisation rate. The run record holds the weight factored – a few frequency-resolved terms and one small basis row per plane – and the product rebuilt here is bit for bit the translation’s own evaluation at that plane.

Parameters:
outputsolprop.output.schema.Output

Opened modal output whose record carries the power-weight factors.

Returns:
numpy.ndarray

Dimensionless positive weights, shape (n_z, n_modes, n_pol, n_omega), in saved-plane order.

Raises:
ProcessingError

If the run recorded no power weight – an output of schema 5 or older, or a radial, Cartesian or free-space run, which propagates a physical field and has no modal weight – or if its saved planes are not recorded positions.

solprop.processing.mixtures.node_fluence(output)[source]#

Reconstruct the pulse fluence at every transverse quadrature node.

Apply the saved synthesis matrix and taper to the electric and magnetic-field equivalents, then integrate analytic Poynting flux in J/m^2. A spatial run’s magnetic field is the closure of the medium at each plane (SEP 34). The temporal sum uses the grid’s fine spacing and the complete saved band, with no added window. A mode-averaged run has one effective node and returns energy divided by A_eff. Radial and Cartesian runs reconstruct the physical electric field before the sum.

Parameters:
outputOutput

Opened mixture output with physical reconstruction data.

Returns:
numpy.ndarray

Fluence in J/m^2, shape (n_z, n_nodes), in the statistics’ node order.

Raises:
ProcessingError

If physical reconstruction data or recorded save positions are absent.

solprop.processing.mixtures.species_ionisation(output)[source]#

Return final ionised fractions at every saved plane and transverse node.

Component order is the metadata’s medium.labels order, including components without a plasma channel. Fractions include the initial ionised inventory; subtract the declared initial fraction to obtain newly ionised fractions.

Parameters:
outputOutput

Opened memory or file output with the species_ionisation statistic.

Returns:
numpy.ndarray

Dimensionless final fractions in [0, 1], shape (n_z, n_species, n_nodes).

Raises:
ProcessingError

If the run did not record this statistic.

solprop.processing.mixtures.species_ionisation_energy(output)[source]#

Return ionisation energy stored in the final inventory, per propagation length.

The recorded definition is I_p,s sum_node w_node rho_s f_s in J/m, with transverse weights in m^2. It includes preionised particles. Pulse work instead uses f_s - f0_s; this inventory is not a longitudinally integrated energy.

Parameters:
outputOutput

Opened memory or file output with the species_ionisation_energy statistic.

Returns:
numpy.ndarray

J/m at each plane, shape (n_z, n_species), in mixture order.

Raises:
ProcessingError

If the run did not record this statistic.