cbadc.analog_signal.sinusoidal.Sinusoidal
- class cbadc.analog_signal.sinusoidal.Sinusoidal(amplitude: float, frequency: float, phase: float = 0.0, offset: float = 0.0)[source]
Bases:
_AnalogSignalAn analog continuous-time sinusoidal signal.
- Parameters
amplitude (float) – The amplitude of the sinusoidal.
frequency (float) – Frequency of the oscillation in [Hz].
phase (float, optional) – The phase, defaults to 0.
offset (float) – The offset value.
- amplitude
The amplitude.
- Type
float
- frequency
The frequency in [Hz].
- Type
float
- angularFrequency
The frequency in [radians/second].
- Type
float
- phase
The phase.
- Type
float
- offset
The offset
- Type
float, optional
See also
cbadc.analog_signal.AnalogSignalExample
>>> from cbadc.analog_signal import Sinusoidal >>> import numpy as np >>> u = Sinusoidal(1, 123, np.pi/2, 0) >>> print(u.evaluate(0)) 1.0
Methods
__init__(amplitude, frequency[, phase, offset])evaluate(t)Evaluate the signal at time \(t\).
symbolic()Returns as symbolic exression
tick()Tick the signal, i.e., update the internal state.
Attributes
- evaluate(t: float) float[source]
Evaluate the signal at time \(t\).
- Parameters
t (float) – the time instance for evaluation.
- Returns
The analog signal value
- Return type
- symbolic() sin[source]
Returns as symbolic exression
- Returns
a sinusodial function
- Return type
sympy.Symbol
- tick()
Tick the signal, i.e., update the internal state.