solprop.backends.populations#

Map backend channel reductions onto the mixture’s ordered species axis.

Functions

axis_node(problem, axis)

Return the quadrature node on the axis, or None when there is none.

axis_populations(problem, field, z, axis)

Scan the field synthesised on the axis: one row, every channel (SEP 19).

axis_refusal(problem, names)

Return why this problem cannot give the requested on-axis statistics.

axis_statistics(problem, z, ...)

Reduce the axis row's channel data to the four on-axis statistics (SEP 19).

population_statistics(problem, z, ...)

Reduce channel data without removing non-ionising species from the result.

solprop.backends.populations.axis_node(problem, axis)[source]#

Return the quadrature node on the axis, or None when there is none.

A Gauss-Radau field-scale rule (SEP 19) has one: its synthesis row is the mode profile at r = 0, the on-axis synthesis itself, so its own node scan supplies the axis statistics without a further one.

Parameters:
problemKernelProblem

The translated problem.

axisnumpy.ndarray

The on-axis synthesis at the reference position, rows x and y.

Returns:
int or None

The node index.

solprop.backends.populations.axis_populations(problem, field, z, axis)[source]#

Scan the field synthesised on the axis: one row, every channel (SEP 19).

The one implementation every backend uses, on the host: the axis is one row per saved plane, against every node of every stage, so its scan costs nothing a backend would compile. The field is the same as the node fields’ – the same pad scale, taper and fine grid – with both Cartesian components of the mode profiles, as for peak_intensity; when the state carries the components itself, the profile’s magnitude on the axis is the scalar synthesis. The tables, preionisation and running-integral rule are the node scan’s.

Parameters:
problemKernelProblem

The translated problem.

fieldnumpy.ndarray

One batch member’s state, shape (n_modes, n_pol, n_omega).

zfloat

Plane position in m.

axisnumpy.ndarray

The mode set’s synthesis on the axis at z, taper included, rows x and y (StepDriver._on_axis_synthesis).

Returns:
tuple of numpy.ndarray

The final ionised fraction and the largest rate (cycle-averaged on an envelope grid) on the axis, one per channel.

solprop.backends.populations.axis_refusal(problem, names)[source]#

Return why this problem cannot give the requested on-axis statistics.

Parameters:
problemKernelProblem

The translated problem.

namesiterable of str

The requested statistic names.

Returns:
str or None

The refusal, naming the statistics and the route, or None.

solprop.backends.populations.axis_statistics(problem, z, channel_fractions, channel_peaks)[source]#

Reduce the axis row’s channel data to the four on-axis statistics (SEP 19).

Parameters:
problemKernelProblem

Species labels, density tables and channels.

zfloat

Plane position in m.

channel_fractionsnumpy.ndarray

Final ionised fraction on the axis per channel, shape (n_channels,).

channel_peaksnumpy.ndarray

Largest rate in s^-1 on the axis per channel; cycle-averaged on an envelope grid.

Returns:
dict

on_axis_electron_density and on_axis_peak_ionisation_rate, and their species forms in the mixture’s order, non-ionising species at zero and the total the sum of the species densities.

Raises:
BackendError

If the channel extents disagree or a value is outside its domain.

solprop.backends.populations.population_statistics(problem, z, channel_fractions, channel_peaks)[source]#

Reduce channel data without removing non-ionising species from the result.

Parameters:
problemKernelProblem

Species labels, density tables, potentials and transverse measure.

zfloat

Plane position in m.

channel_fractionsnumpy.ndarray

Final ionised fractions, shape (n_channels, n_nodes).

channel_peaksnumpy.ndarray

Largest rate in s^-1 at each channel and node; cycle-averaged on an envelope grid.

Returns:
dict

Species statistics and the two total plasma statistics.

Raises:
BackendError

If the channel extents disagree or a resolved modal transform has no weights.