atomiq.components.electronics.rfsource ====================================== .. py:module:: atomiq.components.electronics.rfsource .. autoapi-nested-parse:: An RFSource has the properties `frequency`, `amplitude` and `phase` these can either be set or ramped linearly. Classes ------- .. autoapisummary:: atomiq.components.electronics.rfsource.RFSource atomiq.components.electronics.rfsource.RPCRFSource atomiq.components.electronics.rfsource.VoltageControlledRFSource Module Contents --------------- .. py:class:: 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) Bases: :py:obj:`atomiq.components.primitives.Component`, :py:obj:`atomiq.components.primitives.Parametrizable` Abstract class to represent an RF source. Typical examples of components inheriting this class could be a DDS, a standalone AOM driver, an AWG etc. :param default_frequency: Default frequency of the source. :param default_amplitude: Default amplitude of the source. :param default_phase: Default phase of the source. :param freq_limit: Tuple of the minimum and maximum allowed frequency. :param amp_limit: Tuple of the minimum and maximum allowed amplitude. :param 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`. :param default_ramp_steps: Number of constant value intervals a ramp is discretized into by default. .. py:attribute:: kernel_invariants .. py:attribute:: amplitude :value: 0.0 .. py:attribute:: frequency :value: 100000000.0 .. py:attribute:: phase :value: 0.0 .. py:attribute:: default_ramp_steps :value: 30 .. py:attribute:: blind :value: False .. py:method:: _prerun() 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. .. py:method:: _prerun_blind() .. py:method:: _set_frequency(frequency) :abstractmethod: .. py:method:: set_frequency(frequency) .. py:method:: get_frequency() .. py:method:: _set_amplitude(amplitude) :abstractmethod: .. py:method:: set_amplitude(amplitude) .. py:method:: get_amplitude() .. py:method:: _set_phase(phase) :abstractmethod: .. py:method:: set_phase(phase) .. py:method:: get_phase() .. py:method:: set(frequency = float('nan'), amplitude = float('nan'), phase = 0.0) Set the frequency and amplitude of the DDS channel Frequency/amplitude are set to the last known value if ``float("nan")`` is passed (default). :param frequency: Frequency in Hz (``nan`` to use previous value) :param amplitude: Amplitude (``nan`` to use previous value) :param phase: Phase in rad (default 0.0) .. py:method:: _ramp(duration, frequency_start, frequency_end, amplitude_start, amplitude_end, ramp_timestep = 0.0002) 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 .. py:method:: 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) Ramp frequency and amplitude over a given duration. Parameters default to ``-1`` or ``nan`` to indicate no change. If the start frequency/amplitude is set to ``nan``, the ramp starts from the last frequency/amplitude which was set. This method advances the timeline by ´duration´ :param duration: ramp duration [s] :param frequency_start: initial frequency [Hz] :param frequency_end: end frequency [Hz] :param amplitude_start: initial amplitude [0..1] :param amplitude_end: end amplitude [0..1] :param ramp_timesteps: time between steps in the ramp [s] :param ramp_steps: number of steps the whole ramp should have. This takes precedence over `ramp_timesteps` .. py:method:: _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) .. py:method:: 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) 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 :code:`prepapre_only = True` when the arb should be prepared and with :code:`run_prepared = True` when the prepared arb should be played. In both calls the other parameters have to be passed. :param samples_amp: List of amplitude samples. If this list is empty (default), the amplitude is not modified. :param samples_freq: List of frequency samples. If this list is empty (default), the frequency is not modified. :param samples_phase: List of phase samples. If this list is empty (default), the phase is not modified. :param duration: The time in which the whole sequence of samples should be played back [s]. :param repetitions: Number of times the sequence of all samples should be played. (default 1) :param prepare_only: Only write the sequence to RAM, don't play it. :param run_prepared: Play arb sequence previously prepared with :code:`prepare_only`. :param transform_amp: Function to transform amplitude samples, must take a single argument of type :type:`TFloat` and return a single :type:`TFloat`. :param transform_freq: Function to transform frequency samples (see :code:`transform_amp`). :param transform_phase: Function to transform phase samples (see :code:`transform_amp`). .. py:class:: RPCRFSource(rpc_rfsource, *args, **kwargs) Bases: :py:obj:`RFSource` Abstract class to represent an RF source. Typical examples of components inheriting this class could be a DDS, a standalone AOM driver, an AWG etc. :param default_frequency: Default frequency of the source. :param default_amplitude: Default amplitude of the source. :param default_phase: Default phase of the source. :param freq_limit: Tuple of the minimum and maximum allowed frequency. :param amp_limit: Tuple of the minimum and maximum allowed amplitude. :param 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`. :param default_ramp_steps: Number of constant value intervals a ramp is discretized into by default. .. py:attribute:: kernel_invariants .. py:attribute:: rfsource .. py:method:: _set_frequency(frequency) .. py:method:: _set_amplitude(amplitude) .. py:method:: _set_phase(phase) :abstractmethod: .. py:class:: VoltageControlledRFSource(freq_voltage_source = None, freq_calibration = None, amp_voltage_source = None, amp_calibration = None, *args, **kwargs) Bases: :py:obj:`RFSource` An 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. :param freq_voltage_source: Voltage source that controls the frequency of the rf source :param amp_voltage_source: Voltage source that controls amplitude of the rf source :param freq_calibration: Calibration U = f(freq) to give the control voltage U for a desired frequency in Hz :param amp_calibration: Calibration U = f(amp) to give the control voltage U for a desired amplitude in full scale [0..1] .. py:attribute:: kernel_invariants .. py:method:: _set_frequency(frequency) .. py:method:: ramp_frequency(duration, frequency_start, frequency_end, ramp_timestep = float('nan'), ramp_steps = -1) Ramp only the frequency of the RF source This function can possibly ramp the RF source faster than the generic :func:`ramp` method if the connected DAC can do fast ramps. :param duration: ramp duration [s] :param frequency_start: initial frequency [Hz] :param frequency_end: end frequency [Hz] :param ramp_timesteps: time between steps in the ramp [s] :param ramp_steps: number of steps the whole ramp should have. This takes precedence over `ramp_timesteps` .. py:method:: _set_amplitude(amplitude) .. py:method:: ramp_amplitude(duration, amplitude_start, amplitude_end, ramp_timestep = float('nan'), ramp_steps = -1) Ramp only the amplitude of the RF source This function can possibly ramp the RF source faster than the generic :func:`ramp` method if the connected DAC can do fast ramps. :param duration: ramp duration [s] :param amplitude_start: initial amplitude [0..1] :param amplitude_end: end amplitude [0..1] :param ramp_timesteps: time between steps in the ramp [s] :param ramp_steps: number of steps the whole ramp should have. This takes precedence over `ramp_timesteps` .. py:method:: _set_phase(phase)