atomiq.components.sinara.sampler¶
Classes¶
Sinara Sampler 8 Channel ADC |
|
Single ADC Channel of a Sinara Sampler |
Module Contents¶
- class atomiq.components.sinara.sampler.Sampler(sampler_device, default_gain=[np.int32(0)] * 8, *args, **kwargs)[source]¶
Bases:
atomiq.components.electronics.adc.ADCSinara 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 (list[numpy.int32]) -- List with 8 entries setting the default gain for the 8 channels at startup. (default [0, .. , 0])
- kernel_invariants¶
- _sampler_device¶
- default_gain¶
- _prerun()[source]¶
Specify here what should be done for this component before the run starts. In contrast to the _build() method, the _prerun() routine is executed on the core device before the actual experiment starts.
- _measure(target_arr)[source]¶
Measure a single sample on all 8 channels at once.
This function advances the timeline by 175 us
- Parameters:
target_arr (TArray(TFloat))
- Return type:
TArray(TFloat)
- _shape_changing_arguments = ('num_chan',)¶
Names of the constructor arguments whose value (not only their type) changes the shape of the component, i.e. change the types and signatures of class members. The component factory gives objects of the same shape a shared class (and thus a shared compiler specialization). Arguments listed here are compared by value. Definitions along the inheritance hierarchy are merged.
- num_chan¶
- invalid_return¶
- _build()¶
Specify here what should be done for this component in the build phase
- measure(samples=np.int32(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 (numpy.int32) -- number of samples to take and average
channel (str)
- Return type:
TArray(TFloat)
- experiment¶
- identifier¶
- debug_output = False¶
- core¶
- _kernel_invariants¶
- _prepare_done = False¶
- _build_done = False¶
- _hooks_done = []¶
- children = []¶
- __in_build = True¶
- channels: list[str]¶
- measurement_channels()¶
- class atomiq.components.sinara.sampler.SamplerChannel(default_gain=np.int32(0), *args, **kwargs)[source]¶
Bases:
atomiq.components.electronics.adc.ADCChannelSingle ADC Channel of a Sinara Sampler
This class represents a single channel of a Sinara Sampler as an
ADCChannel.- Parameters:
default_gain (numpy.int32) -- Default gain to set for the Sampler channel at startup. (default 0)
- set_gain(gain)[source]¶
Set the gain for the Sampler Channel
- Parameters:
gain (numpy.int32) -- Gain in machine units (0: 1, ..., 3: 1000)
- kernel_invariants¶
- channel¶
- measure(samples=np.int32(1), cached=False, channel='')¶
- Parameters:
samples (numpy.int32)
cached (bool)
channel (str)
- Return type:
float
- experiment¶
- identifier¶
- debug_output = False¶
- core¶
- _kernel_invariants¶
- _prepare_done = False¶
- _build_done = False¶
- _hooks_done = []¶
- children = []¶
- __in_build = True¶
- channels: list[str]¶
- measurement_channels()¶