# sinusoid

The Boulder Opal Toolkits are currently in beta phase of development. Breaking changes may be introduced.

sinusoid(duration, amplitude, angular_frequency, phase=0.0)

Create a Signal object representing a sinusoidal oscillation.

Parameters:
• duration (float) – The duration of the oscillation.

• amplitude (float or complex) – The amplitude of the oscillation, $$A$$.

• angular_frequency (float) – The angular frequency of the oscillation, $$\omega$$.

• phase (float, optional) – The phase of the oscillation, $$\phi$$. Defaults to 0.

Returns:

The sinusoidal oscillation.

Return type:

Signal

signals.cosine_pulse()

Create a Signal object representing a cosine pulse.

signals.hann_series()

Create a Signal object representing a sum of Hann window functions.

signals.sinusoid_pwc()

Graph operation to create a Pwc representing a sinusoidal oscillation.

signals.sinusoid_stf()

Graph operation to create a Stf representing a sinusoidal oscillation.

Notes

The sinusoid is defined as

$\mathop{\mathrm{Sinusoid}}(t) = A \sin \left( \omega t + \phi \right) .$

Examples

Define a sinusoidal oscillation.

>>> signal = qctrl.signals.sinusoid(
...     duration=2.0,
...     amplitude=1.0,
...     angular_frequency=np.pi,
...     phase=np.pi/2.0,
... )
>>> signal.export_with_sampling_rate(sampling_rate=0.25)
array([ 0.92387953,  0.38268343, -0.38268343, -0.92387953, -0.92387953,
-0.38268343,  0.38268343,  0.92387953])