atomiq.components.sinara.suservo ================================ .. py:module:: atomiq.components.sinara.suservo Classes ------- .. autoapisummary:: atomiq.components.sinara.suservo.SUServo atomiq.components.sinara.suservo.SUServoChannel atomiq.components.sinara.suservo.SUServoADCChannel atomiq.components.sinara.suservo.SUServoModulatedLaser Module Contents --------------- .. py:class:: SUServo(suservo_device, start_loop = True, *args, **kwargs) Bases: :py:obj:`atomiq.components.primitives.Component` Representation for the SUServo gateware On init, the servo loop in the SUServo is stared automatically. If this is not wanted configure the :param:start_loop :param suservo_device: The artiq SUServo device from your device_db, e.g. @suservo0. :param start_loop: Sets if the servo loop should be started at the prerun stage. .. py:attribute:: kernel_invariants .. py:attribute:: suservo_device .. py:attribute:: servo_on :value: False .. py:attribute:: start_loop :value: True .. 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:: set_servomode(enabled) .. py:method:: get_adc_value(channel) .. py:method:: set_adc_gain(channel, gain = 0) .. py:class:: SUServoChannel(suservo, suservo_channel, default_attenuation=19.0, default_profile=0, servo_divider = 10.0, *args, **kwargs) Bases: :py:obj:`atomiq.components.electronics.rfsource.RFSource`, :py:obj:`atomiq.components.primitives.Switchable` A Urukul DDS channel in SUServo configuration as RF Source If not in servo mode, this can be used just like a normal :class:UrukulChannel :param suservo: The atomiq SUServo component this channel belongs to :param suservo_channel: The artiq SUServo channel from your device_db, e.g. @suservo0_ch2. :param default_profile: Which of the 32 profiles of the SUServo should be used? (default 0) :param servo_divider: Todo: Why do we need this? (default 10.0) .. py:attribute:: kernel_invariants .. py:attribute:: suservo .. py:attribute:: suservo_channel .. py:attribute:: profile :value: 0 .. py:attribute:: attenuation :value: 19.0 .. py:attribute:: servo_on :value: False .. py:attribute:: servo_divider :value: 10.0 .. py:attribute:: next_on .. py:attribute:: next_off .. 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:: set(frequency = float('nan'), amplitude = float('nan'), phase = 0.0, profile = -1) Set the frequency and amplitude of the DDS channel Frequency/amplitude are set to the last known value if ``nan`` is passed (default). :param frequency: Frequency in Hz (``nan`` to use previous value) :param amplitude: If servomode is off, this is the DDS amplitude (0..1). If servomode is on, this is the target voltage on the photodiode. (``nan`` to use previous value) :param phase: Phase in rad to be set (default 0.0) :param profile: DDS Profile (``-1`` to keep current profile) .. py:method:: set_att(attenuation) Set the hardware attenuation for this urukul channel via cpld. :param attenuation: channel attenuation (0. to 31.0 in 0.5 increments) [dB] .. py:method:: _set_frequency(frequency) .. py:method:: set_amplitude(amplitude) Set the amplitude of the DDS output :param amplitude: If servomode is off, this is the DDS amplitude (0..1). If servomode is on, this is the target voltage on the photodiode. .. py:method:: _set_amplitude(amplitude) .. py:method:: _set_phase(phase) .. py:method:: on() Turn on the RF output via the fast switch .. py:method:: off() Turn off the RF output via the fast switch .. py:method:: set_servomode(enabled) Switch servo mode of the SUServo on or off The servo loop in the SUServo gateware (running on the Kasli) can only be switched on globally for all channels. However, we can decide for each channel if the output of the servo loop should be given to the DDS. This function switches the the updating for this channel. :param enabled: Whether the servomode should be enabled .. py:method:: _ramp(duration, frequency_start, frequency_end, amplitude_start, amplitude_end, ramp_timestep = 0.0002) At some point, we want to replace this by code that uses the digital ramp generator (DRG) on the AD9910 because this allows for much faster ramps .. py:class:: SUServoADCChannel(suservo, default_gain = 0, *args, **kwargs) Bases: :py:obj:`atomiq.components.electronics.adc.ADCChannel` Analog Input of a Sampler in an SUServo configuration ATTENTION: When default_gain is !=1 is given, this might cause problems in closed loop mode. It seems SUServo internally uses gain=1. Maybe it can be set differntly but I don't see how. :param suservo: The SUServo component that this channel belongs to :param default_gain: The default gain in machine units (0: 1, ..., 3: 1000) to set for this channel on startup .. py:attribute:: kernel_invariants .. py:attribute:: suservo .. py:attribute:: gain :value: 0 .. 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:: set_gain(gain = 0) Set the gain for the ADC channel in SUServo configuration :param gain: Gain in machine units (0: 1, ..., 3: 1000) .. py:method:: measure(samples = 1, cached = False) .. py:class:: SUServoModulatedLaser(default_kp, default_ki = 0.0, default_ki_limit = 0.0, *args, **kwargs) Bases: :py:obj:`atomiq.components.laser.ContinuouslyStabilizedModulatedLaser` A Laser with intensity stabilization realized by the SUServo The SUServo realizes a PI servo controller in hardware with an update time inteval of 1.3us, leading to a maximum analog bandwith of >500kHz. To achieve this a Sampler (8 analog in) is bundled in the gateware with two Urukuls (2 x 4 DDS channels). With this class, the SUServo can be used in open loop as well as in closed loop mode. Use the :func:`stabilize()` function to switch between open and closed loop mode. When switching from closed to open loop, the last output power on the DDS channel will be hold. :param modulator: The modulator (most likely an AOM) that is driven by the SUServo. The Modulator given here must be of a class derived from :class:RFLightModulator and the rfsource of the modulator must be of the class :class:SUServoChannel. :param photodiode: The photodiode monitoring the laser. The photodiode must be of a class derived from :class:AnalogPhotodiode and the photodiode's :param:adc_channel must be of the class :class:SUServoADCChannel. :param default_kp: default proportional (P-) part for the SUServo loop. Values should be negative. :param default_ki: default integral (I-) part for the SUServo loop. Values should be negative. (default 0.0) :param default_ki_limit: default limit for I-part of the SUServo loop. 0.0 means unlimited. (default 0.0) .. py:attribute:: kernel_invariants .. py:attribute:: default_kp .. py:attribute:: default_ki :value: 0.0 .. py:attribute:: default_ki_limit :value: 0.0 .. py:attribute:: suservo_channel .. 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:: set_servo_parameter(adc_channel, kp, ki, ki_limit, delay = 0.0) Set servo loop parameters. :param kp: proportional (P-) part for the SUServo loop. Values should be negative. :param ki: integral (I-) part for the SUServo loop. Values should be negative. :param ki_limit: limit for I-part of the SUServo loop. 0.0 means unlimited. :param delay: delay between switching on the laser an the servo loop becoming active (default: 0.0) .. py:method:: _stabilize(enable) .. py:method:: _transform_power_dummy(power) .. py:method:: _transform_power_calibration(power) .. py:method:: _amplitude_from_power(power) .. py:method:: set_power(power) Set the output power of the laser If the SUServo is in open loop mode, this sets the amplitude of the DDS channel. If the SUServo is in closed loop mode, it sets the photodiode value the servo loop should target. If the photodiode is calibrated the `power` argument should be given in the calibrated units. :param power: the power the laser should be set/stabilized to. In open loop mode it takes the DDS amplitude (0..1). In closed loop mode it takes the target value on the photodiode for the servo loop. If the photodiode is calibrated the power should be given in the calibrated units (e.g. mW).