stix¶
The stix module provides the Stix class for quickly calculating the Stix parameters (and a few other things).
- class piran.stix.Stix(
- omega_p: Annotated[Quantity, Unit('rad / s')],
- omega_c: Annotated[Quantity, Unit('rad / s')],
Provides methods for calculating the Stix parameters R, L, P, D, and S. This also includes methods for calculating the derivative of the CPDR with respect to \(k\) and \(\omega\), as well as the jacobian \(J\left(\frac{k_\perp, k_\parallel}{\omega, X}\right)\).
The plasma and cyclotron frequencies are stored as instance attributes to avoid needing to provide them as arguments to every method.
Results of the Stix parameter calculations are also cached using functools.lru_cache for efficiency.
- Parameters:
- omega_pQuantity[u.rad / u.s]
Plasma frequency.
- omega_cQuantity[u.rad / u.s]
Cyclotron frequency.
Methods
D
(omega)Calculate the D parameter.
L
(omega)Calculate the L parameter.
P
(omega)Calculate the P parameter.
R
(omega)Calculate the R parameter.
S
(omega)Calculate the S parameter.
dD_dk
(omega, X, k)Calculate the value of the derivative of the CPDR with respect to the wavenumber \(k\).
dD_dw
(omega, X, k)Calculate the value of the derivative of the CPDR with respect to the wave frequency \(\omega\).
jacobian
(omega, X, k)Calculate the value of the Jacobian \(J\left(\frac{k_\perp, k_\parallel}{\omega, X}\right)\).
- D(
- omega: Annotated[Quantity, Unit('rad / s')],
Calculate the D parameter.
- Parameters:
- omegau.Quantity[u.rad / u.s]
The wave frequency, which should be a scalar quantity with units of radians per second.
- Returns:
- u.Quantity[u.dimensionless_unscaled]
The calculated dimensionless quantity D.
- L(
- omega: Annotated[Quantity, Unit('rad / s')],
Calculate the L parameter.
- Parameters:
- omegau.Quantity[u.rad / u.s]
The wave frequency, which should be a scalar quantity with units of radians per second.
- Returns:
- u.Quantity[u.dimensionless_unscaled]
The calculated dimensionless quantity L.
- Raises:
- ValueError
If the wave frequency omega is not a scalar.
- P(
- omega: Annotated[Quantity, Unit('rad / s')],
Calculate the P parameter.
- Parameters:
- omegau.Quantity[u.rad / u.s]
The wave frequency, which should be a scalar quantity with units of radians per second.
- Returns:
- u.Quantity[u.dimensionless_unscaled]
The calculated dimensionless quantity P.
- Raises:
- ValueError
If the wave frequency omega is not a scalar.
- R(
- omega: Annotated[Quantity, Unit('rad / s')],
Calculate the R parameter.
- Parameters:
- omegau.Quantity[u.rad / u.s]
The wave frequency, which should be a scalar quantity with units of radians per second.
- Returns:
- u.Quantity[u.dimensionless_unscaled]
The calculated dimensionless quantity R.
- Raises:
- ValueError
If the wave frequency omega is not a scalar.
- S(
- omega: Annotated[Quantity, Unit('rad / s')],
Calculate the S parameter.
- Parameters:
- omegau.Quantity[u.rad / u.s]
The wave frequency, which should be a scalar quantity with units of radians per second.
- Returns:
- u.Quantity[u.dimensionless_unscaled]
The calculated dimensionless quantity S.
- dD_dk(
- omega: Annotated[Quantity, Unit('rad / s')],
- X: Annotated[Quantity, Unit(dimensionless)],
- k: Annotated[Quantity, Unit('rad / m')],
Calculate the value of the derivative of the CPDR with respect to the wavenumber \(k\).
- Parameters:
- omegau.Quantity[u.rad / u.s]
Wave frequency.
- Xu.Quantity[u.dimensionless_unscaled]
Wave normal angles.
- ku.Quantity[u.rad / u.m]
Wavenumber.
- Returns:
- u.Quantity[u.m / u.rad]
The value of the derivative of the CPDR with respect to the wavenumber \(k\).
- dD_dw(
- omega: Annotated[Quantity, Unit('rad / s')],
- X: Annotated[Quantity, Unit(dimensionless)],
- k: Annotated[Quantity, Unit('rad / m')],
Calculate the value of the derivative of the CPDR with respect to the wave frequency \(\omega\).
- Parameters:
- omegau.Quantity[u.rad / u.s]
Wave frequency.
- Xu.Quantity[u.dimensionless_unscaled]
Wave normal angles.
- ku.Quantity[u.rad / u.m]
Wavenumber.
- Returns:
- u.Quantity[u.s / u.rad]
The value of the derivative of the CPDR with respect to the wave frequency \(\omega\).
- jacobian(
- omega: Annotated[Quantity, Unit('rad / s')],
- X: Annotated[Quantity, Unit(dimensionless)],
- k: Annotated[Quantity, Unit('rad / m')],
Calculate the value of the Jacobian \(J\left(\frac{k_\perp, k_\parallel}{\omega, X}\right)\).
- Parameters:
- omegau.Quantity[u.rad / u.s]
Wave frequency.
- Xu.Quantity[u.dimensionless_unscaled]
Wave normal angles.
- ku.Quantity[u.rad / u.m]
Wavenumber.
- Returns:
- u.Quantity[u.rad * u.s / u.m**2]
The calculated Jacobian value.