atomiq.components.electronics.rfsource¶
An RFSource has the properties frequency, amplitude and phase these can either be set or ramped linearly.
Classes¶
Abstract class to represent an RF source. Typical examples of components inheriting this class |
|
Abstract class to represent an RF source. Typical examples of components inheriting this class |
|
An RF source controlled by an analog voltage |
Module Contents¶
- class atomiq.components.electronics.rfsource.RFSource(default_frequency=100000000.0, default_amplitude=0.0, default_phase=0.0, freq_limit=(0.0, float('inf')), amp_limit=(0.0, 1.0), blind=False, default_ramp_steps=30, *args, **kwargs)[source]¶
Bases:
atomiq.components.primitives.Component,atomiq.components.primitives.ParametrizableAbstract class to represent an RF source. Typical examples of components inheriting this class could be a DDS, a standalone AOM driver, an AWG etc.
- Parameters:
default_frequency (artiq.language.types.TFloat) -- Default frequency of the source.
default_amplitude (artiq.language.types.TFloat) -- Default amplitude of the source.
default_phase (artiq.language.types.TFloat) -- Default phase of the source.
freq_limit (tuple) -- Tuple of the minimum and maximum allowed frequency.
amp_limit (tuple) -- Tuple of the minimum and maximum allowed amplitude.
blind (artiq.language.types.TBool) -- Wether the source is set to its default values in each prerun phase. If True, the source is unchanged during prerun, as for example necessary to generate a continuous laser lock signal. Defaults to False.
default_ramp_steps (artiq.language.types.TInt32) -- Number of constant value intervals a ramp is discretized into by default.
- kernel_invariants¶
- amplitude = 0.0¶
- frequency = 100000000.0¶
- phase = 0.0¶
- default_ramp_steps = 30¶
- blind = False¶
- _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.
- set(frequency=float('nan'), amplitude=float('nan'), phase=0.0)[source]¶
Set the frequency and amplitude of the DDS channel
Frequency/amplitude are set to the last known value if
float("nan")is passed (default).- Parameters:
frequency (artiq.language.types.TFloat) -- Frequency in Hz (
nanto use previous value)amplitude (artiq.language.types.TFloat) -- Amplitude (
nanto use previous value)phase (artiq.language.types.TFloat) -- Phase in rad (default 0.0)
- _ramp(duration, frequency_start, frequency_end, amplitude_start, amplitude_end, ramp_timestep=0.0002)[source]¶
This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from RFSource
- Parameters:
duration (artiq.language.types.TFloat)
frequency_start (artiq.language.types.TFloat)
frequency_end (artiq.language.types.TFloat)
amplitude_start (artiq.language.types.TFloat)
amplitude_end (artiq.language.types.TFloat)
ramp_timestep (artiq.language.types.TFloat)
- ramp(duration, frequency_start=float('nan'), frequency_end=float('nan'), amplitude_start=float('nan'), amplitude_end=float('nan'), ramp_timestep=float('nan'), ramp_steps=-1)[source]¶
Ramp frequency and amplitude over a given duration. Parameters default to
-1ornanto indicate no change. If the start frequency/amplitude is set tonan, the ramp starts from the last frequency/amplitude which was set. This method advances the timeline by ´duration´- Parameters:
duration (artiq.language.types.TFloat) -- ramp duration [s]
frequency_start (artiq.language.types.TFloat) -- initial frequency [Hz]
frequency_end (artiq.language.types.TFloat) -- end frequency [Hz]
amplitude_start (artiq.language.types.TFloat) -- initial amplitude [0..1]
amplitude_end (artiq.language.types.TFloat) -- end amplitude [0..1]
ramp_timesteps -- time between steps in the ramp [s]
ramp_steps (artiq.language.types.TInt32) -- number of steps the whole ramp should have. This takes precedence over ramp_timesteps
ramp_timestep (artiq.language.types.TFloat)
- _arb(duration, samples_amp, samples_freq, samples_phase, repetitions=1, prepare_only=False, run_prepared=False, transform_amp=identity_float, transform_freq=identity_float, transform_phase=identity_float)[source]¶
- Parameters:
duration (artiq.language.types.TFloat)
samples_amp (TList(TFloat))
samples_freq (TList(TFloat))
samples_phase (TList(TFloat))
repetitions (artiq.language.types.TInt32)
prepare_only (artiq.language.types.TBool)
run_prepared (artiq.language.types.TBool)
- arb(duration, samples_amp=[], samples_freq=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=identity_float, transform_freq=identity_float, transform_phase=identity_float)[source]¶
Play Arbitrary Samples from a List
This method allows to set the output amplitude, frequency an phase according to the values specified in respective lists. The whole sequence is played in the specified duration. The pattern store in the sample list can also be repeated.
Tip
We supports a scheme to prepare the arb function before it is actually used. If that is needed, run this function with
prepapre_only = Truewhen the arb should be prepared and withrun_prepared = Truewhen the prepared arb should be played. In both calls the other parameters have to be passed.- Parameters:
samples_amp (TList(TFloat)) -- List of amplitude samples. If this list is empty (default), the amplitude is not modified.
samples_freq (TList(TFloat)) -- List of frequency samples. If this list is empty (default), the frequency is not modified.
samples_phase (TList(TFloat)) -- List of phase samples. If this list is empty (default), the phase is not modified.
duration (artiq.language.types.TFloat) -- The time in which the whole sequence of samples should be played back [s].
repetitions (artiq.language.types.TInt32) -- Number of times the sequence of all samples should be played. (default 1)
prepare_only (artiq.language.types.TBool) -- Only write the sequence to RAM, don't play it.
run_prepared (artiq.language.types.TBool) -- Play arb sequence previously prepared with
prepare_only.transform_amp -- Function to transform amplitude samples, must take a single argument of type
TFloatand return a singleTFloat.transform_freq -- Function to transform frequency samples (see
transform_amp).transform_phase -- Function to transform phase samples (see
transform_amp).
- class atomiq.components.electronics.rfsource.RPCRFSource(rpc_rfsource, *args, **kwargs)[source]¶
Bases:
RFSourceAbstract class to represent an RF source. Typical examples of components inheriting this class could be a DDS, a standalone AOM driver, an AWG etc.
- Parameters:
default_frequency -- Default frequency of the source.
default_amplitude -- Default amplitude of the source.
default_phase -- Default phase of the source.
freq_limit -- Tuple of the minimum and maximum allowed frequency.
amp_limit -- Tuple of the minimum and maximum allowed amplitude.
blind -- Wether the source is set to its default values in each prerun phase. If True, the source is unchanged during prerun, as for example necessary to generate a continuous laser lock signal. Defaults to False.
default_ramp_steps -- Number of constant value intervals a ramp is discretized into by default.
rpc_rfsource (Component)
- kernel_invariants¶
- rfsource¶
- class atomiq.components.electronics.rfsource.VoltageControlledRFSource(freq_voltage_source=None, freq_calibration=None, amp_voltage_source=None, amp_calibration=None, *args, **kwargs)[source]¶
Bases:
RFSourceAn RF source controlled by an analog voltage
A frequent use case for this class are AOM drivers whose frequency and amplitude can be controlled via analog voltages.
- Parameters:
freq_voltage_source (VoltageSource) -- Voltage source that controls the frequency of the rf source
amp_voltage_source (VoltageSource) -- Voltage source that controls amplitude of the rf source
freq_calibration (Calibration) -- Calibration U = f(freq) to give the control voltage U for a desired frequency in Hz
amp_calibration (Calibration) -- Calibration U = f(amp) to give the control voltage U for a desired amplitude in full scale [0..1]
- kernel_invariants¶
- ramp_frequency(duration, frequency_start, frequency_end, ramp_timestep=float('nan'), ramp_steps=-1)[source]¶
Ramp only the frequency of the RF source
This function can possibly ramp the RF source faster than the generic
ramp()method if the connected DAC can do fast ramps.- Parameters:
duration (artiq.language.types.TFloat) -- ramp duration [s]
frequency_start (artiq.language.types.TFloat) -- initial frequency [Hz]
frequency_end (artiq.language.types.TFloat) -- end frequency [Hz]
ramp_timesteps -- time between steps in the ramp [s]
ramp_steps (artiq.language.types.TInt32) -- number of steps the whole ramp should have. This takes precedence over ramp_timesteps
ramp_timestep (artiq.language.types.TFloat)
- ramp_amplitude(duration, amplitude_start, amplitude_end, ramp_timestep=float('nan'), ramp_steps=-1)[source]¶
Ramp only the amplitude of the RF source
This function can possibly ramp the RF source faster than the generic
ramp()method if the connected DAC can do fast ramps.- Parameters:
duration (artiq.language.types.TFloat) -- ramp duration [s]
amplitude_start (artiq.language.types.TFloat) -- initial amplitude [0..1]
amplitude_end (artiq.language.types.TFloat) -- end amplitude [0..1]
ramp_timesteps -- time between steps in the ramp [s]
ramp_steps (artiq.language.types.TInt32) -- number of steps the whole ramp should have. This takes precedence over ramp_timesteps
ramp_timestep (artiq.language.types.TFloat)