solprop.processing.beams#
Read a radial beam from its file: across it, on its axis and in its far field.
A spatial file’s columns are field samples, so the modal readers refuse it. These read
what those columns mean, each from the file’s own record of the plane measure, with the
measures of solprop.spatial: the same local pairing of E and G as the
run’s statistics. The far field is the plane’s angular spectrum: the transverse
wavevector is conserved through a window into vacuum, so sin(theta) = c k_r / omega
is the angle outside the medium, and a column beyond it has left no light there.
Module Attributes
The angles a far field is read onto. |
Functions
|
Return one plane's far field: its energy per solid angle and per unit of |
|
Return the fluence across the beam at every plane that kept its field. |
|
Return one plane's axial flux on the beam's axis against time. |
|
Return the on-axis spectral fluence density of every plane that kept its field. |
|
Return the spectrogram of the field on the beam's axis. |
|
Return one plane's axial flux across the beam and in time. |
|
Return one plane's spectral fluence density across the beam. |
- solprop.processing.beams.FAR_FIELD_ANGLES = 256#
The angles a far field is read onto.
- solprop.processing.beams.far_field(output, axis='wavelength', *, plane=None, z=None, angles=256)[source]#
Return one plane’s far field: its energy per solid angle and per unit of
x.Conical emission reads as a ring in this map. Light at each frequency is placed by its transverse wavevector,
sin(theta) = c k_r / omega, the angle outside the medium, and the angles reach what the grid resolves at the highest frequency that holds light.- Parameters:
- outputsolprop.output.schema.Output
The run’s output.
- axis{‘f’, ‘omega’, ‘wavelength’}, optional
The spectral abscissa.
- planeint or None, optional
The plane, negative from the end; the last when neither it nor
zis given.- zfloat or None, optional
Its position, m: the nearest saved plane.
- anglesint, optional
How many angles to read onto, evenly spaced from the axis.
- Returns:
- thetanumpy.ndarray
The angles, rad.
- xnumpy.ndarray
The abscissa, ascending.
- valuesnumpy.ndarray
The energy in J/sr per unit of
x, shape(n_theta, n_x).
- solprop.processing.beams.fluence_along(output)[source]#
Return the fluence across the beam at every plane that kept its field.
- Parameters:
- outputsolprop.output.schema.Output
The run’s output.
- Returns:
- znumpy.ndarray
The planes’ positions, m.
- rnumpy.ndarray
The radial nodes, m.
- valuesnumpy.ndarray
The signed fluence in J/m^2, shape
(n_planes, n_r).
- solprop.processing.beams.on_axis_power(output, *, plane=None, z=None, oversampling=1)[source]#
Return one plane’s axial flux on the beam’s axis against time.
- Parameters:
- outputsolprop.output.schema.Output
The run’s output.
- planeint or None, optional
The plane, negative from the end; the last when neither it nor
zis given.- zfloat or None, optional
Its position, m: the nearest saved plane.
- oversamplingint, optional
Factor by which to resample the time axis by zero-padding the spectrum, at least 1, as
get_power()does.
- Returns:
- tnumpy.ndarray
The times, s:
time_axis()of the run’s grid.- valuesnumpy.ndarray
The flux in W/m^2.
- solprop.processing.beams.on_axis_spectra(output, axis='wavelength')[source]#
Return the on-axis spectral fluence density of every plane that kept its field.
- Parameters:
- outputsolprop.output.schema.Output
The run’s output.
- axis{‘f’, ‘omega’, ‘wavelength’}, optional
The spectral abscissa.
- Returns:
- xnumpy.ndarray
The abscissa, ascending.
- valuesnumpy.ndarray
The density in J/m^2 per unit of
x, shape(n_planes, n_x), one row per plane that kept its field.
- solprop.processing.beams.on_axis_spectrogram(output, axis='wavelength', *, plane=None, z=None, time_range=None, gate_fwhm=None, positions=256)[source]#
Return the spectrogram of the field on the beam’s axis.
One point of a beam has one field, so this is well defined where a spectrogram of a spatial file’s columns is not. Two polarisations are refused, as two fields.
- Parameters:
- outputsolprop.output.schema.Output
The run’s output.
- axis{‘f’, ‘omega’, ‘wavelength’}, optional
The spectral abscissa.
- planeint or None, optional
The plane, negative from the end; the last when neither it nor
zis given.- zfloat or None, optional
Its position, m: the nearest saved plane.
- time_rangetuple of float or None, optional
The time range the gate positions cover, s; the whole window by default.
- gate_fwhmfloat or None, optional
Width of the gate, s; a twentieth of the time range by default.
- positionsint, optional
How many gate positions to place across the time range.
- Returns:
- tnumpy.ndarray
The gate positions within the time range, s.
- xnumpy.ndarray
The abscissa, ascending.
- valuesnumpy.ndarray
The map, shape
(n_x, n_slices), arbitrary units per unit ofx.
- Raises:
- solprop.exceptions.ProcessingError
If the beam has two polarisations, or as
field_spectrogram()does.
- solprop.processing.beams.radial_intensity(output, *, plane=None, z=None)[source]#
Return one plane’s axial flux across the beam and in time.
- Parameters:
- outputsolprop.output.schema.Output
The run’s output.
- planeint or None, optional
The plane, negative from the end; the last when neither it nor
zis given.- zfloat or None, optional
Its position, m: the nearest saved plane.
- Returns:
- rnumpy.ndarray
The radial nodes, m.
- tnumpy.ndarray
The times, s.
- valuesnumpy.ndarray
The signed flux in W/m^2, shape
(n_r, n_t).
- solprop.processing.beams.radial_spectrum(output, axis='wavelength', *, plane=None, z=None)[source]#
Return one plane’s spectral fluence density across the beam.
- Parameters:
- outputsolprop.output.schema.Output
The run’s output.
- axis{‘f’, ‘omega’, ‘wavelength’}, optional
The spectral abscissa.
- planeint or None, optional
The plane, negative from the end; the last when neither it nor
zis given.- zfloat or None, optional
Its position, m: the nearest saved plane.
- Returns:
- rnumpy.ndarray
The radial nodes, m.
- xnumpy.ndarray
The abscissa, ascending.
- valuesnumpy.ndarray
The density in J/m^2 per unit of
x, shape(n_r, n_x); signed, assolprop.spatial.node_spectrum()says.