qiu_signals.integer_axis
¶
Uniformly sampled axes of integer indices.
Classes:
-
IndexOrdering–Orderings of the integer indices of the samples of an axis.
-
IntegerAxis–A uniformly sampled axis of integer indices.
IndexOrdering
¶
Bases: ExtendedEnum
Orderings of the integer indices of the samples of an axis.
For an axis of N samples, the sample at array position k gets the index:
NATURAL:k, i.e.0, 1, ..., N-1.FFT: the ordering ofnumpy.fft.fftfreq, i.e. the non-negative indices0, 1, ..., ceil(N/2)-1followed by the negative ones-floor(N/2), ..., -1.CENTERED: theFFTordering afternumpy.fft.fftshift, i.e. the ascending indices-floor(N/2), ..., ceil(N/2)-1.
Attributes:
IntegerAxis
¶
IntegerAxis(size: int, ordering: IndexOrdering)
A uniformly sampled axis of integer indices.
The sample at array position k has the integer index index[k], given by the
ordering of the axis.
Parameters:
-
size(int) –Number of samples, at least 1.
-
ordering(IndexOrdering) –Ordering of the integer indices of the samples.
Raises:
-
ValueError–If the size is smaller than 1.
Attributes:
-
size(int) –Number of samples.
-
ordering(IndexOrdering) –Ordering of the integer indices of the samples.
-
index(NDArray[int_]) –Return the integer indices of the samples according to the ordering.
Source code in packages/qiu-signals/src/qiu_signals/integer_axis.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
ordering
instance-attribute
¶
ordering: IndexOrdering = IndexOrdering(ordering)
Ordering of the integer indices of the samples.