Signal¶
Signal
¶
- class guwlib.guw_objects.Signal(magnitude=1)¶
Base class for signals.
- Parameters:
magnitude (float) – Magnitude of the signal.
- Variables:
magnitude (float) – Magnitude of the signal.
Methods:
- get_value_at(t)¶
Returns the value of the signal at a specific time.
- Parameters:
t (float) – Time at which to evaluate the signal.
- Returns:
(float) Signal value at time t.
- get_duration()¶
Returns the duration for which the signal is non-zero.
- Returns:
(float) Signal duration.
Burst
¶
- class guwlib.guw_objects.Burst(center_frequency, n_cycles, magnitude=1, delta_t=0, window='hanning')¶
Bases:
Signal
Class representing a burst signal.
A burst consists of a concise number of cycles of a sinusoidal signal, multiplied by a window function.
- Parameters:
center_frequency (float) – Center frequency of the burst.
n_cycles (int) – Number of cycles in the burst.
magnitude (float) – Magnitude of the burst.
delta_t (float) – Time delay of the burst.
window (str) – Type of window function, either
rectangle
,hanning
,hamming
orblackmann
(default:hanning
).
- Variables:
center_frequency (float) – Center frequency of the burst.
n_cycles (int) – Number of cycles in the burst.
delta_t (float) – Time delay of the burst.
window (str) – Type of window function.
Figures:
delta_t
magnitude
n_cycles
window
center_frequency
4-cycle Burst signal with Hanning window, left: time domain, right: FFT
DiracImpulse
¶
- class guwlib.guw_objects.DiracImpulse(magnitude=1)¶
Bases:
Signal
Class representing a Dirac impulse signal.
The discrete dirac impulse is 1 *
magnitude
for exactly one sample att
= 0 and 0 elsewhere.- Parameters:
magnitude – Magnitude of the Dirac impulse.
Figures:
magnitude
Dirac impulse and its FFT (maximum frequency will depend on the sampling rate)