pnps.flux#

How this package measures energy: the axial flux of the medium.

A spectrometer records the energy per unit frequency that crosses its aperture, the time-integrated Poynting flux. In the scalar forward model a plane-wave component (k_perp, omega) of the spectral state carries the axial flux

S_z = (eps_0 c / 2) eta |E|^2, with eta = c Re k_z / omega,

the dimensionless axial admittance of the medium: n cos(theta) in a lossless one, and zero on a column that does not propagate. This is solprop’s measure (its SEP 34): every energy, spectrum and absorbed power this package reports weights |E|^2 by eta, and so does every statistic solprop forms.

The measure fixes both ends of a run:

  • the launch. Config.energy is the energy of the beam in air before the mask. Air’s admittance is cos(theta_air). Each component then crosses into the slab keeping its flux (an ideal face: no Fresnel reflection), so its field is multiplied by launch_factor(), sqrt(eta_air / eta);

  • the observables. The windowed, on-axis and full spectra, the energy and the absorbed powers all carry eta.

Functions

air_admittance(kperp2, omega)

Return the axial admittance of air, cos(theta_air).

axial_admittance(k2, kperp2, omega)

Return the dimensionless axial admittance c k_z / omega of the medium.

launch_factor(k2, kperp2, omega)

Return the factor that carries an air field into the slab at constant flux.

pnps.flux.air_admittance(kperp2, omega)[source]#

Return the axial admittance of air, cos(theta_air).

Air is taken as vacuum. A component whose transverse wavevector exceeds omega / c does not propagate in air and gets zero, as do non-positive frequencies.

Parameters:
kperp2numpy.ndarray

k_x^2 + k_y^2, rad^2/m^2.

omeganumpy.ndarray or float

Absolute angular frequency, rad/s. The arrays broadcast together.

Returns:
numpy.ndarray

c Re k_z / omega in vacuum, of the broadcast shape.

Examples

>>> import numpy as np
>>> from scipy.constants import c
>>> kperp2 = np.array([0.0, 0.75, 2.0]) * (2.0 / c) ** 2
>>> air_admittance(kperp2, 2.0).round(12).tolist()
[1.0, 0.5, 0.0]
pnps.flux.axial_admittance(k2, kperp2, omega)[source]#

Return the dimensionless axial admittance c k_z / omega of the medium.

k_z is the principal root of k^2 - k_perp^2. The admittance is zero where the column does not propagate (Re(k^2) - k_perp^2 <= 0) and at non-positive frequencies: such a bin is not a forward power port. Its real part eta weights |E|^2 in every measured energy; the imaginary part, non-zero only in an absorbing medium, enters the on-axis spectrum’s magnetic closure.

Parameters:
k2numpy.ndarray

The material wavenumber squared (n omega / c)^2, rad^2/m^2, complex.

kperp2numpy.ndarray

k_x^2 + k_y^2, rad^2/m^2.

omeganumpy.ndarray or float

Absolute angular frequency, rad/s. The three arrays broadcast together.

Returns:
numpy.ndarray

The complex admittance, of the broadcast shape.

Examples

>>> import numpy as np
>>> from scipy.constants import c
>>> omega = np.array([c, c, -c])
>>> axial_admittance(1.5**2 * (omega / c) ** 2 + 0j, np.array([0.0, 4.0, 0.0]),
...                  omega).real.round(12).tolist()
[1.5, 0.0, 0.0]
pnps.flux.launch_factor(k2, kperp2, omega)[source]#

Return the factor that carries an air field into the slab at constant flux.

sqrt(eta_air / eta): a component of the air field, multiplied by it, carries the same axial flux in the medium as it did in air (an ideal entrance face). Zero where either medium does not carry the component.

Parameters:
k2numpy.ndarray

The slab’s material wavenumber squared, rad^2/m^2, complex.

kperp2numpy.ndarray

k_x^2 + k_y^2, rad^2/m^2.

omeganumpy.ndarray

Absolute angular frequency, rad/s. The arrays broadcast together.

Returns:
numpy.ndarray

The real, non-negative factor, of the broadcast shape.

Examples

>>> import numpy as np
>>> from scipy.constants import c
>>> factor = launch_factor(np.array([2.25 + 0j]), np.array([0.0]), np.array([c]))
>>> factor.round(12).tolist()
[0.816496580928]