SamplerΒΆ

Class Arguments

Argument

Type

Default Value

sampler_device

default_gain

TList(TInt32)

[0, 0, 0, 0, 0, 0, 0, 0]

Bold arguments are mandatory. For more documentation on the listed arguments refer to the class definition below. If parameters appear in this list but not in the class definition below, please recursively check the linked base classes for the definition of the parameter.

Inheritance Diagram

Inheritance diagram of atomiq.components.sinara.sampler.Sampler

Example Component Dictionary

   {
    "sampler_example": {
        "classname": "atomiq.components.sinara.sampler.Sampler",
        "arguments": {
            "sampler_device": "<mandatory parameter ()>",
            "default_gain": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ]
        }
    }
}

Class Description

class atomiq.components.sinara.sampler.Sampler(sampler_device, default_gain=[0, 0, 0, 0, 0, 0, 0, 0], *args, **kwargs)[source]

Bases: ADC

Sinara Sampler 8 Channel ADC

This class represents the Sinara Sampler with all its 8 channels. It allows to sample all channels at once and to read out the result.

Parameters:
  • sampler_device -- The ARTIQ device for the sampler from the device_db, e.g. @sampler0

  • default_gain (TList(TInt32)) -- List with 8 entries setting the default gain for the 8 channels at startup. (default [0, .. , 0])

A Sampler card with all 8 channels.

Parameters:
  • sampler_device -- ARTIQ sampler device from the device db

  • default_gain (TList(TInt32)) -- (list(int)) default gain (0: 1, ..., 3: 1000) for the 8 channels

measure(samples=1, channel='')

Measures all channels and returns the mean for a given number of subsequent samples.

This method advances the timeline by samples * sampling_time

Parameters:
  • samples (artiq.compiler.types.TMono('int', OrderedDict({'width': artiq.compiler.types.TValue(32)}))) -- number of samples to take and average

  • channel (artiq.compiler.types.TMono('str', OrderedDict()))

Return type:

artiq.compiler.types.TMono('array', OrderedDict({'elt': artiq.compiler.types.TMono('float', OrderedDict()), 'num_dims': artiq.compiler.types.TValue(1)}))