navigate.model.waveforms.square
- navigate.model.waveforms.square(sample_rate=100000, sweep_time=0.4, frequency=10, amplitude=1, offset=0, duty_cycle=50, phase=3.141592653589793)
Returns a numpy array with a square function. Used for creating analog laser drive voltage.
- Parameters:
sample_rate (Integer) – Unit - Hz
sweep_time (Float) – Unit - Seconds
frequency (Float) – Unit - Hz
amplitude (Float) – Unit - Volts
offset (Float) – Unit - Volts
duty_cycle (Float) – Unit - Percent
phase (Float) – Unit - Radians
- Returns:
waveform
- Return type:
np.array
Examples
>>> typical_laser = square(sample_rate, sweep_time, 10, 1, 0, 50, np.pi)