Module quantum_inferno.styx_cwt
This module contains functions to construct quantized, standardized information packets using binary metrics. No-chirp/sweep (index_shift=0, variable removed), simplified for the base stockwell transform. Based on Garces (2023).
Functions
def amplitude_convert_norm_to_spect(scale_atom: Union[numpy.ndarray, float]) ‑> Tuple[Union[numpy.ndarray, float], Union[numpy.ndarray, float]]
-
:param scale_atom: atom/logon scale :return: amp_canonical, amp_unit_spectrum
def cwt_complex_any_scale_pow2(band_order_nth: float, sig_wf: numpy.ndarray, frequency_sample_rate_hz: float, cwt_type: str = 'fft', dictionary_type: str = 'norm') ‑> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]
-
Calculate CWT
:param band_order_nth: Nth order of constant Q bands :param sig_wf: array with input signal :param frequency_sample_rate_hz: sample rate in Hz :param cwt_type: one of "fft", or "morlet2". Default is "fft" :param dictionary_type: Canonical unit-norm ("norm") or unit spectrum ("spect"). Default is "norm" :return: frequency_cwt_hz, time_cwt_s, cwt
def wavelet_amplitude(scale_atom: Union[numpy.ndarray, float]) ‑> Tuple[Union[numpy.ndarray, float], Union[numpy.ndarray, float]]
-
:param scale_atom: atom/logon scale :return: amp_canonical, amp_unit_spectrum
def wavelet_centered_4cwt(band_order_nth: float, duration_points: int, scale_frequency_center_hz: Union[numpy.ndarray, float], frequency_sample_rate_hz: float, dictionary_type: str = 'norm') ‑> Tuple[numpy.ndarray, numpy.ndarray, Union[numpy.ndarray, float], Union[numpy.ndarray, float], Union[numpy.ndarray, float]]
-
Gabor atoms for CWT computation centered on the duration of signal
Options for dictionary_type: "norm" (Canonical unit-norm), "spect" (unit spectrum), or "unit" (unit modulus)
:param duration_points: number of points in the signal :param band_order_nth: Nth order of constant Q bands :param scale_frequency_center_hz: center frequency fc in Hz :param frequency_sample_rate_hz: sample rate is Hz :param dictionary_type: determines amplification value. Default "norm" :return: waveform_complex, time_shifted_s, scale, omega, amp
def wavelet_complex(band_order_nth: float, time_s: numpy.ndarray, offset_time_s: float, scale_frequency_center_hz: Union[numpy.ndarray, float], frequency_sample_rate_hz: float) ‑> Tuple[numpy.ndarray, numpy.ndarray, Union[numpy.ndarray, float], Union[numpy.ndarray, float], Union[numpy.ndarray, float], Union[numpy.ndarray, float], Union[numpy.ndarray, float]]
-
Quantized atom for specified band_order_Nth and arbitrary time duration. Returns a frequency x time dimension wavelet vector
:param band_order_nth: Nth order of constant Q bands :param time_s: time in seconds, duration should be greater than or equal to M/fc :param offset_time_s: offset time in seconds, should be between min and max of time_s :param scale_frequency_center_hz: center frequency fc in Hz :param frequency_sample_rate_hz: sample rate on Hz :return: waveform_complex, time_shifted_s, scale_angular_frequency, scale, omega, amp_canonical, amp_unit_spectrum
def wavelet_time(time_s: numpy.ndarray, offset_time_s: float, frequency_sample_rate_hz: float) ‑> numpy.ndarray
-
:param time_s: array with time :param offset_time_s: offset time in seconds :param frequency_sample_rate_hz: sample rate in Hz :return: numpy array with scaled time-shifted time
def wavelet_variance_theory(amp: float, time_s: numpy.ndarray, scale: float, omega: float) ‑> Tuple[float, float]
-
Theoretical variance of a Gabor wavelet, with real and imaginary components
:param amp: wavelet amplitude :param time_s: time support vector :param scale: wavelet scale :param omega: angular frequency :return: nominal wavelet real and imaginary variance