atomiq.components.sinara.sampler module¶
- 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
- kernel_invariants = {'_sampler_device', 'default_gain'}¶
- set_gain(channel, gain=0)[source]¶
- Parameters:
channel (artiq.language.types.TInt32)
gain (artiq.language.types.TInt32)
- 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 (TInt32) -- number of samples to take and average
channel (TStr)
- Return type:
TArray(TFloat)
- measurement_channels()¶
- class atomiq.components.sinara.sampler.SamplerChannel(default_gain=0, *args, **kwargs)[source]¶
Bases:
ADCChannel
Single ADC Channel of a Sinara Sampler
This class represents a single channel of a Sinara Sampler as an
ADCChannel
.- Parameters:
default_gain (TInt32) -- Default gain to set for the Sampler channel at startup. (default 0)
A single channel of a (possibly multichannel) ADC
- Parameters:
adc_device -- The ADC the channel belongs to
channel -- The number of the channel
default_gain (TInt32)
- set_gain(gain)[source]¶
Set the gain for the Sampler Channel
- Parameters:
gain (artiq.language.types.TInt32) -- Gain in machine units (0: 1, ..., 3: 1000)
- kernel_invariants = {'adc_device', 'channel'}¶
- measure(samples=1, cached=False, channel='')¶
- Parameters:
samples (artiq.language.types.TInt32)
cached (artiq.language.types.TBool)
channel (artiq.language.types.TStr)
- Return type:
artiq.language.types.TFloat
- measurement_channels()¶