openstb.simulator.system.signal
Classes:
| Name | Description |
|---|---|
HFMChirp |
Hyperbolic frequency modulated chirp. |
LFMChirp |
Linear frequency modulated chirp. |
HFMChirp
HFMChirp(f_start, f_stop, duration, rms_spl, rms_after_window=True, window=None)
Bases: Signal
Hyperbolic frequency modulated chirp.
For a start frequency \(f_a\), stop frequency \(f_b\) and chirp length \(\tau\), we can define a unitless parameter
In the passband, the HFM chirp is then given by
which has a hyperbolic instantaneous frequency \(f(t) = f_a / (1 + b f_a t)\). The inverse of this is the instantaneous period
which is linear, giving rise to the alternative name of linear period modulated (LPM) chirp.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
f_start
|
float
|
The start frequency of the chirp. |
required |
f_stop
|
float
|
The stop frequency of the chirp. |
required |
duration
|
float
|
The duration of the chirp in seconds. |
required |
rms_spl
|
float
|
The RMS sound pressure level (decibels relative to 1 micropascal) of the signal. |
required |
rms_after_window
|
bool
|
If True, scale the signal to the desired RMS SPL after applying the window. If False, scale before applying the window, meaning the windowed signal will have a lower RMS SPL. If no window is applied, this will be set to False. |
True
|
window
|
PluginOrSpec[SignalWindow] | None
|
Plugin specification for a signal window to apply to the samples of the signal. |
None
|
Source code in openstb/simulator/system/signal.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
LFMChirp
LFMChirp(f_start, f_stop, duration, rms_spl, rms_after_window=True, window=None)
Bases: Signal
Linear frequency modulated chirp.
For a start frequency \(f_a\), stop frequency \(f_b\) and chirp length \(\tau\), we can calculate the chirp rate \(K = (f_b - f_a) / \tau\). In the passband, the LFM chirp is then
which has a linear instantaneous frequency \(f(t) = f_a + Kt\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
f_start
|
float
|
The start frequency of the chirp. |
required |
f_stop
|
float
|
The stop frequency of the chirp. |
required |
duration
|
float
|
The duration of the chirp in seconds. |
required |
rms_spl
|
float
|
The RMS sound pressure level (decibels relative to 1 micropascal) of the signal. |
required |
rms_after_window
|
bool
|
If True, scale the signal to the desired RMS SPL after applying the window. If False, scale before applying the window, meaning the windowed signal will have a lower RMS SPL. If no window is applied, this parameter is ignored. |
True
|
window
|
PluginOrSpec[SignalWindow] | None
|
Plugin specification for a signal window to apply to the samples of the signal. |
None
|
Source code in openstb/simulator/system/signal.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |