Bit Reverse
Contains three implementations of a bit reverse copy algorithm for the FFT.
- Available Methods:
bit_reverse_lessefficient
bit_reverse_standard
bit_reverse
- Dependencies:
numpy
- audiergon.bit_reverse.bit_reverse(arr, convert_to_complex=False)[source]
Bit reversal permutation to make a more efficient FFT using np vectors.
Optimized using NumPy array indexing and vectorisation
- Parameters:
arr (list or numpy.ndarray) – The input signal or sequence to permute.
convert_to_complex (bool, optional) – If True, casts the result to complex numbers, defaults to False.
- Returns:
A vectorized NumPy array reordered via bit-reversal indices.
- Return type:
numpy.ndarray
- audiergon.bit_reverse.bit_reverse_lessefficient(arr)[source]
Bit reversal permutation on an array to make a more efficient FFT.
Doesn’t use bitwise operations or numpy vectorisation so it is less efficient.
- Parameters:
arr (list or numpy.ndarray) – The input signal or sequence to permute.
- Returns:
The bit-reversed permuted list.
- Return type:
list
- audiergon.bit_reverse.bit_reverse_standard(arr, convert_to_complex=False)[source]
Bit reversal permutation on an array to make a more efficient FFT.
Uses standard python lists and optimized bitwise operations.
- Parameters:
arr (list or numpy.ndarray) – The input signal or sequence to permute.
convert_to_complex (bool, optional) – If True, converts elements to complex numbers, defaults to False.
- Returns:
The bit-reversed permuted list.
- Return type:
list