FrequencyPhasor§
- class typed_lisa_toolkit.types.FrequencyPhasor[AxisT: AnyAxis][source]§
Frequency-domain phasor representation.
Note
To construct a
FrequencyPhasor, use the factory functionfrequency_phasor().A phasor is a couple of amplitude and phase that represent a complex number. This class encapsulates a sequence of phasors at different frequencies, which can be used to represent a waveform. This representation is useful for interpolating waveforms generated on a sparse grid of frequencies to a dense grid of frequencies.
The input phases are expected to be smooth, without zigzags, so as the real and imaginary parts of the amplitudes. This is crucial for the interpolation to work properly.
Note
The so-called amplitude is itself complex number in general.
- classmethod make(*, axis: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType], amplitudes: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], phases: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]])§
Create a phasor from amplitudes and phases.
- create_like(entries: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]])§
Create a new instance with the same grid as the current one.
- get_embedded(embedding_grid: Grid1D, *, known_slices: tuple[slice, ...] | None = None) Self§
Return the phasor embedded in a new 1D grid.
- get_interpolated(axis_: AT, interpolator: Callable[[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]], Callable[[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]], Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]]]) FrequencyPhasor[AT][source]§
- get_interpolated(axis_: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], interpolator: Callable[[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]], Callable[[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]], Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]]]) FrequencyPhasor[Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], ModuleType]]
Get the phasors interpolated to the given frequencies.
- get_kernel() Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]§
Return the entries of the representation.
- get_subset(*, interval: tuple[float, float] | None = None, slice: slice | None = None, copy: bool = True) Self§
Return the subset as a new instance.
- to_frequency_series()[source]§
Convert to a
FrequencySeriesorUniformFrequencySeries.This method returns a
FrequencySeriesorUniformFrequencySeriesby applying the formula:\[X(f) = A(f) \cdot \exp(1j \cdot \phi(f))\]
- to_series()[source]§
Alias for
to_frequency_series().
- property amplitudes: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]§
The amplitudes of the phasors.
- property domain: Literal['frequency']§
The physical domain of the representation.
- property f_max: float§
The maximum frequency of the series.
- property f_min: float§
The minimum frequency of the series.
- property frequencies: AxisT§
The frequencies of the phasors.
- property kind: Literal['phasor']§
The semantic kind of the representation.
- property n_batches: int | None§
Return the number of batches.
- property n_channels: int | None§
Return the number of channels.
- property n_features: int | None§
Return the number of features.
- property n_harmonics: int | None§
Return the number of harmonics.