3.4.2.1. qupulse.hardware.dacs.alazar

class qupulse.hardware.dacs.alazar.AlazarCard(card, config=None)[source]

Bases: qupulse.hardware.dacs.dac_base.DAC

arm_program(program_name)[source]
Return type

None

property buffer_strategy: qupulse.hardware.dacs.alazar.BufferStrategy
Return type

BufferStrategy

property card: Any
Return type

Any

clear()[source]

Clears all registered programs.

Caution: This affects all programs and waveforms on the AWG, not only those uploaded using qupulse!

Return type

None

property config
property current_config
delete_program(program_name)[source]
Return type

None

property mask_prototypes: Dict[str, Tuple[int, str]]
Return type

Dict[str, Tuple[int, str]]

measure_program(channels)[source]

Get all measurements at once and write them in a dictionary.

Return type

Dict[str, ndarray]

property record_size_factor: int

The total record size of each measurement gets extended to be a multiple of this. None means that the minimal value supported by the card is taken.

Return type

int

register_mask_for_channel(mask_id, hw_channel, mask_type='auto')[source]
Parameters
  • mask_id (str) – Identifier of the measurement windows

  • hw_channel (int) – Associated hardware channel (0, 1, 2, 3)

  • mask_type – Either ‘auto’ or ‘periodical

Return type

None

register_measurement_windows(program_name, windows)[source]
Return type

None

register_operations(program_name, operations)[source]
Return type

None

set_measurement_mask(program_name, mask_name, begins, lengths)[source]

returns length of windows in samples

Return type

Tuple[ndarray, ndarray]

class qupulse.hardware.dacs.alazar.AlazarProgram[source]

Bases: object

property auto_rearm_count: int

This is passed to AlazarCard.startAcquisition. The card will (re-)arm automatically for this many times.

Return type

int

clear_masks()[source]
iter(mask_maker)[source]
masks(mask_maker)[source]
Return type

List[Mask]

property sample_factor: Optional[qupulse.utils.types.TimeType]
Return type

Optional[TimeType]

set_measurement_mask(mask_name, sample_factor, begins, lengths)[source]

Raise error if sample factor has changed

Return type

Tuple[ndarray, ndarray]

property total_length: int
Return type

int

class qupulse.hardware.dacs.alazar.AvoidSingleBufferAcquisition(wrapped_strategy)[source]

Bases: qupulse.hardware.dacs.alazar.BufferStrategy

calculate_acquisition_properties(masks, buffer_length_divisor)[source]
Parameters
  • windows – Measurement windows in samples

  • buffer_length_divisor (int) – Necessary divisor of the buffer length

Return type

Tuple[int, int]

Returns

A tuple (buffer_length, total_acquisition_length)

class qupulse.hardware.dacs.alazar.BufferStrategy[source]

Bases: object

This class defines the strategy how the buffer size is chosen. Buffers might impact the signal due to hardware imperfections. The aim of this class is to allow the user to work around that.

abstract calculate_acquisition_properties(masks, buffer_length_divisor)[source]
Parameters
  • windows – Measurement windows in samples

  • buffer_length_divisor (int) – Necessary divisor of the buffer length

Return type

Tuple[int, int]

Returns

A tuple (buffer_length, total_acquisition_length)

static minimum_total_length(masks)[source]
Return type

int

class qupulse.hardware.dacs.alazar.ForceBufferSize(target_size)[source]

Bases: qupulse.hardware.dacs.alazar.BufferStrategy

Parameters

aimed_size – Try to use that length

__init__(target_size)[source]
Parameters

aimed_size – Try to use that length

calculate_acquisition_properties(masks, buffer_length_divisor)[source]
Parameters
  • windows – Measurement windows in samples

  • buffer_length_divisor (int) – Necessary divisor of the buffer length

Return type

Tuple[int, int]

Returns

A tuple (buffer_length, total_acquisition_length)

class qupulse.hardware.dacs.alazar.OneBufferPerWindow[source]

Bases: qupulse.hardware.dacs.alazar.BufferStrategy

Choose the greatest common divisor of all window periods (diff(begin)) as buffer size. Aim is to only have an integer number of buffers in a measurement window.

calculate_acquisition_properties(masks, buffer_length_divisor)[source]
Parameters
  • windows – Measurement windows in samples

  • buffer_length_divisor (int) – Necessary divisor of the buffer length

Return type

Tuple[int, int]

Returns

A tuple (buffer_length, total_acquisition_length)

qupulse.hardware.dacs.alazar.gcd_set(data)[source]