wavefilter¶
- class piran.wavefilter.WaveFilter¶
An ABC for filtering solutions to the CPDR in/out depending on whether they correspond to a desired wave mode.
This provides a single method, filter, that is called from within the Cpdr class to determine whether an (X, omega, k) triplet belongs to the desired wave mode.
It is the responsibility of the user to subclass WaveFilter and implement the filter method themselves! The function signature should match the filter method exactly. An object of the subclass should then be passed to the Cpdr on creation in order for the filter method to be called within the Cpdr solution algorithm.
An example subclass is given with the WhistlerFilter class for identifying Whistler waves.
Methods
filter
(X, omega, k, plasma, stix)Given [resonant] solution(s) to the CPDR, filter solutions in/out depending on criteria defined within this function.
- abstractmethod filter(
- X: Annotated[Quantity, Unit(dimensionless)],
- omega: Annotated[Quantity, Unit('rad / s')],
- k: Annotated[Quantity, Unit('rad / m')],
- plasma: PlasmaPoint,
- stix: Stix,
Given [resonant] solution(s) to the CPDR, filter solutions in/out depending on criteria defined within this function.
X omega and k are expected to be 0d; each (X, omega, k) triplet is a [resonant] solution to the CPDR.
If using this within the Cpdr, there is no need for the user to supply the input parameters below (this is handled within the Cpdr methods already).
- Parameters:
- XQuantity[u.dimensionless_unscaled]
Wave normal angle. Size: 0d.
- omegaQuantity[u.rad / u.s]
Wave frequency. Size: 0d.
- kQuantity[u.rad / u.m]
Wavenumber. Size: 0d.
- plasmaPlasmaPoint
Plasma composition (e.g. particle plasma- and gyro-frequencies).
- stix: Stix
Methods for calculating Stix parameters.
- Returns:
- Boolean
True if (X, omega, k) satisfy the criteria defined within this function (i.e. fits the desired wave mode), or False otherwise.
- class piran.wavefilter.WhistlerFilter¶
Filter solutions to the CPDR to accept only Whistler mode waves.
For more info on the selection criteria used in this function, see: Introduction to Plasma Physics (Second Edition) by Gurnett & Bhattacharjee, Section 4.4.4, Figures 4.37 and 4.38.
Methods
filter
(X, omega, k, plasma, stix)Given [resonant] solution(s) to the CPDR, filter solutions in/out depending on criteria defined within this function.
- filter(
- X: Annotated[Quantity, Unit(dimensionless)],
- omega: Annotated[Quantity, Unit('rad / s')],
- k: Annotated[Quantity, Unit('rad / m')],
- plasma: PlasmaPoint,
- stix: Stix,
Given [resonant] solution(s) to the CPDR, filter solutions in/out depending on criteria defined within this function.
X omega and k are expected to be 0d; each (X, omega, k) triplet is a [resonant] solution to the CPDR.
If using this within the Cpdr, there is no need for the user to supply the input parameters below (this is handled within the Cpdr methods already).
- Parameters:
- XQuantity[u.dimensionless_unscaled]
Wave normal angle. Size: 0d.
- omegaQuantity[u.rad / u.s]
Wave frequency. Size: 0d.
- kQuantity[u.rad / u.m]
Wavenumber. Size: 0d.
- plasmaPlasmaPoint
Plasma composition (e.g. particle plasma- and gyro-frequencies).
- stix: Stix
Methods for calculating Stix parameters.
- Returns:
- Boolean
True if (X, omega, k) satisfy the criteria defined within this function (i.e. fits the desired wave mode), or False otherwise.