dcbias module

DC-bias waveform generation

class presto.dcbias.DcBiasWaveform(edges, polys)

Bases: object

A waveform that is output from the DC-bias ports.

Used as input to Hardware.setup_dcbias_waveform().

Examples

Output a sawtooth during a lockin measurement

>>> with Lockin(address=ADDRESS) as lck:
>>>    wave = DcBiasWaveform.sawtooth(-0.5, 0.5)
>>>    lck.hardware.setup_dcbias_waveform(DC_PORT, wave, DC_FREQ)
>>>
>>>    rf_freq, df = lck.tune(RF_FREQ, DF)
>>>    lck.set_df(df)
>>>
>>>    og = lck.add_output_group(RF_OUT_PORT, 1)
>>>    og.set_amplitudes(RF_AMP).set_frequencies(RF_FREQ)
>>>
>>>    ig = lck.add_input_group(RF_IN_PORT, 1)
>>>    ig.set_frequencies(rf_freq)
>>>
>>>    lck.apply_settings()
>>>    freqs, data_i, data_q = lck.get_pixels(NR_PIX)[RF_IN_PORT]
>>>
>>>    lck.hardware.stop_dcbias_waveform(0.0)
classmethod cos(amp)

Generate a cosine waveform on the DC-bias output.

Parameters:

amp (float) – amplitude (peak) value in volts

Return type:

DcBiasWaveform

classmethod piecewise_linear(x, y)

Generate a piece-wise linear waveform on the DC-bias output.

Parameters:
  • x (TypeAliasType) – time points at which output should have value y. See Notes section for restrictions.

  • y (TypeAliasType) – value at time x in volts. Must have same length as x.

Return type:

DcBiasWaveform

Notes

Time values in x are in units of the repetition period and must be between 0.0 and 1.0. The first value x[0] must be 0.0 and the last value x[-1] must be 1.0. Values in x must be sorted.

Raises:

ValueError

classmethod pulse(v1, v2, *, td=0.0, tr=0.0, tf=0.0, pw=None)

Generate a pulse waveform on the DC-bias output.

Parameters:
  • v1 (float) – initial value in volts

  • v2 (float) – pulsed value in volts

  • td (float) – delay time, default 0.0

  • tr (float) – rise time, default 0.0

  • tf (float) – fall time, default 0.0

  • pw (float | None) – pulse width, default to fill the period

Return type:

DcBiasWaveform

Note

All times are dimensionless, in unit of the repetition period.

Notes

A single pulse, without repetition count or phase offset, is described by the following table:

Time

Value

0.0

v1

td

v1

td + tr

v2

td + tr + pw

v2

td + tr + pw + tf

v1

1.0

v1

Rise and fall segments are described by a cubic polynomial with derivative zero at the extremes. The pulse segment is constant at v2. The initial delay segment and the final filling segment are constant at v1.

Raises:

ValueError

classmethod sawtooth(v1, v2)

Generate a sawtooth waveform on the DC-bias output.

Parameters:
  • v1 (float) – initial value in volts

  • v2 (float) – final value in volts

Return type:

DcBiasWaveform