command module¶
cryo_card¶
smurf_atca_monitor¶
Defines the SmurfAtcaMonitorMixin class.
- class pysmurf.client.command.smurf_atca_monitor.SmurfAtcaMonitorMixin(log=None, server_addr='localhost', server_port=9000, atca_port=9100, atca_monitor=False, offline=False, pub_root=None, script_id=None, **kwargs)[source]¶
Mixin providing interface with the atca_monitor server.
This Mixin provides the pysmurf interface to the atca_monitor registers. The atca_monitor server is a Rogue application which uses IPMI to monitor information from the ATCA system [1]. The atca_monitor server must be running or all queries will timeout and return None.
References
- get_amc_sn(bay, slot_number=None, shelf_manager=None, use_shell=False, **kwargs)[source]¶
Returns the SMuRF AMC base board serial number.
The AMC serial number is the combination of its ‘Product Version’ and ‘Product Asset Tag’ from its FRU data. An example (the production AMCs built for Simons Observatory) is ‘Product Version’=C03 and ‘Product Asset Tag’=A01-11’, which combine to make the full AMC serial number C03-A01-11.
C03 refers to the hardware revision of the AMC base board. The A## refers to the specific AMC baseboard loading. The two most common SMuRF AMC base board loadings are A01 and A02 corresponding to low band (4-6 GHz) and high band (6-8 GHz) AMCs. The final number in the full serial number is the unique id assigned to each AMC base board which shares the same hardware revision and loading.
By default, will try to get the serial number by querying the ATCA monitor EPICS server. If you’re not running the ATCA monitor, you can still get the AMC serial number more slowly via the shell by providing use_shell=True.
Typical SMuRF AMC assemblies are composed of two connected boards, an AMC base board and an AMC RF daughter board. The serial number of an AMC RF daughter card in an AMC assembly cannot be obtained remotely; you must either know which card your AMC was assembled with (or you can ask SLAC which maintains a database with this information) or it should be labeled on the frontpanel of your AMC assembly.
- Parameters:
bay (int) – Which AMC bay (0 or 1).
slot_number (int or None, optional, default None) – The crate slot number of the carrier that the AMC is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.use_shell (bool, optional, default False) – If False, polls the ATCA monitor EPICs server ; if True, runs slower shell command to poll this attribute. This will be slower but provides an alternative if user is not running the ATCA monitor as part of their workflow, or if the ATCA monitor is down.
shelf_manager (str or None, optional, default None) – Only used if use_shell=True. If None, defaults to the
SmurfControlclass attributeshelf_manager. For typical systems the default name of the shelf manager is ‘shm-smrf-sp01’.**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
AMC serial number for the requested bay e.g. ‘C03-A01-01’. If None, either the EPICS query timed out or the atca_monitor server isn’t running, or if running with use_shell=True, the shell command failed. Also returns None if there’s no AMC in the requested bay if use_shell=True or if use_shell=True and the shell command used to poll the AMC FRU fails.
- Return type:
str or None
- get_board_temp_amc(bay, slot_number=None, **kwargs)[source]¶
Returns the AMC board temperature.
- Parameters:
bay (int) – Which AMC bay (0 or 1).
slot_number (int or None, optional, default None) – The crate slot number that the AMC is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
AMC board temperature in Celsius. If None, either the EPICS query timed out or the atca_monitor server isn’t running.
- Return type:
float or None
- get_board_temp_fpga(slot_number=None, **kwargs)[source]¶
Returns the AMC carrier board temperature.
- Parameters:
slot_number (int or None, optional, default None) – The crate slot number that the AMC carrier is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
AMC carrier board temperature in Celsius. If None, either the EPICS query timed out or the atca_monitor server isn’t running.
- Return type:
float or None
- get_board_temp_rtm(slot_number=None, **kwargs)[source]¶
Returns the RTM board temperature.
- Parameters:
slot_number (int or None, optional, default None) – The crate slot number that the RTM is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
RTM board temperature in Celsius. If None, either the EPICS query timed out or the atca_monitor server isn’t running.
- Return type:
float or None
- get_carrier_sn(slot_number=None, shelf_manager=None, use_shell=False, **kwargs)[source]¶
Returns the SMuRF carrier serial number.
The carrier serial number is the combination of its ‘Product Version’ and ‘Product Asset Tag’ from its FRU data. An example (the production carriers built for Simons Observatory) is ‘Product Version’=C03 and ‘Product Asset Tag’=A04-50’, which combine to make the full AMC serial number C03-A04-50.
C03 refers to the hardware revision of the carrier board. The A## refers to the specific carrier board loading. The final number in the full serial number is the unique id assigned to each carrier board which shares the same hardware revision and loading.
By default, will try to get the serial number by querying the ATCA monitor EPICS server. If you’re not running the ATCA monitor, can still get the carrier serial number more slowly via the shell by providing use_shell=True.
- Parameters:
slot_number (int or None, optional, default None) – The crate slot number that the carrier is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.use_shell (bool, optional, default False) – If False, polls the ATCA monitor EPICs server ; if True, runs slower shell command to poll this attribute. This will be slower but provides an alternative if user is not running the ATCA monitor as part of their workflow, or if the ATCA monitor is down.
shelf_manager (str or None, optional, default None) – Only used if use_shell=True. If None, defaults to the
SmurfControlclass attributeshelf_manager. For typical systems the default name of the shelf manager is ‘shm-smrf-sp01’.**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Carrier serial number e.g. ‘C03-A04-50’. If None, either the EPICS query timed out or the atca_monitor server isn’t running, or if running with use_shell=True, the shell command failed. Also returns None if there’s no carrier in the requested slot if use_shell=True or if use_shell=True and the shell command used to poll the carrier FRU fails.
- Return type:
str or None
- get_junction_temp_fpga(slot_number=None, **kwargs)[source]¶
Returns FPGA junction temperature.
FPGA die temperature - probably from a sensor on the FPGA. If you are looking at this, you probably should be looking at
get_fpga_temp()instead, which we think is more reliable.- Parameters:
slot_number (int or None, optional, default None) – The crate slot number that the FPGA carrier is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
FPGA junction temperature in Celsius. If None, either the EPICS query timed out or the atca_monitor server isn’t running.
- Return type:
float or None
- get_rtm_sn(slot_number=None, shelf_manager=None, use_shell=False, **kwargs)[source]¶
Returns the SMuRF carrier serial number.
The RTM serial number is the combination of its ‘Product Version’ and ‘Product Asset Tag’ from its FRU data. An example (the production RTM built for Simons Observatory) is ‘Product Version’=C01 and ‘Product Asset Tag’=A01-02’, which combine to make the full RTM serial number C01-A01-02.
C01 refers to the hardware revision of the RTM board. The A## refers to the specific RTM board loading. The final number in the full serial number is the unique id assigned to each RTM board which shares the same hardware revision and loading.
By default, will try to get the serial number by querying the ATCA monitor EPICS server. If you’re not running the ATCA monitor, can still get the RTM serial number more slowly via the shell by providing use_shell=True.
- Parameters:
slot_number (int or None, optional, default None) – The crate slot number that the RTM is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.use_shell (bool, optional, default False) – If False, polls the ATCA monitor EPICs server ; if True, runs slower shell command to poll this attribute. This will be slower but provides an alternative if user is not running the ATCA monitor as part of their workflow, or if the ATCA monitor is down.
shelf_manager (str or None, optional, default None) – Only used if use_shell=True. If None, defaults to the
SmurfControlclass attributeshelf_manager. For typical systems the default name of the shelf manager is ‘shm-smrf-sp01’.**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
RTM serial number e.g. ‘C01-A01-02’. If None, either the EPICS query timed out or the atca_monitor server isn’t running, or if running with use_shell=True, the shell command failed. Also returns None if there’s no RTM in the requested slot if use_shell=True or if use_shell=True and the shell command used to poll the RTM FRU fails.
- Return type:
str or None
smurf_cmd¶
- pysmurf.client.command.smurf_cmd.acq_n_frames(S, n_frames)[source]¶
Sends the amount of data requested by the user in units of n_frames.
- Parameters:
S (SmurfControl) – The SmurfControl object used to issue commands
n_frames (int) – The number of frames to keep data streaming on.
- pysmurf.client.command.smurf_cmd.cfg_filename = '/usr/local/src/pysmurf/cfg_files/stanford/experiment_fp31_cc03-02_lbOnlyBay0.cfg'¶
A function that mimics mce_cmd. This allows the user to run specific pysmurf commands from the command line.
- pysmurf.client.command.smurf_cmd.get_port(S, slot)[source]¶
Get the port number for streaming
- Parameters:
S (SmurfControl) – The SmurfControl object used to issue commands
slot (int) – The number of SMuRF slot
- Returns:
port – The port number associated with slot to stream data.
- Return type:
- pysmurf.client.command.smurf_cmd.make_runfile(output_dir, row_len=60, num_rows=60, data_rate=60, num_rows_reported=60)[source]¶
Make the runfile
- pysmurf.client.command.smurf_cmd.set_port(S, slot, port)[source]¶
Define a port/slot pair.
- Parameters:
S (SmurfControl) – The SmurfControl object used to issue commands
slot (int) – The number of SMuRF slot
- pysmurf.client.command.smurf_cmd.start_acq(S)[source]¶
Start an acquisition
- Parameters:
S (SmurfControl) – The SmurfControl object used to issue commands
- pysmurf.client.command.smurf_cmd.stop_acq(S)[source]¶
Stop the acquisition
- Parameters:
S (SmurfControl) – The SmurfControl object used to issue commands
smurf_command¶
- class pysmurf.client.command.smurf_command.SmurfCommandMixin(log=None, server_addr='localhost', server_port=9000, atca_port=9100, atca_monitor=False, offline=False, pub_root=None, script_id=None, **kwargs)[source]¶
- band_to_bay(b)[source]¶
Returns the bay index for the band. Assumes LB is plugged into bay 0, corresponding to bands [0,1,2,3] and that HB is plugged into bay 1, corresponding to bands [4,5,6,7].
- Parameters:
b (int) – Band number.
- clear_unwrapping_and_averages(**kwargs)[source]¶
Resets phase unwrapping and averaging for all channels.
Toggles bit 0 of userConfig[0] high then low, which signals the downstream processor to clear its unwrapping accumulators and averaging state across all bands. Uses a SyncGroup to confirm each transition completes before proceeding.
- Parameters:
**kwargs – Arbitrary keyword arguments.
See also
set_unwrapper_reset()Per-band unwrapper reset.
set_filter_reset()Per-band filter reset.
- close_data_file(**kwargs)[source]¶
Closes the SmurfProcessor output data file.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
open_data_file()Open the file.
- cpld_toggle(**kwargs)[source]¶
Resets the RTM CPLD.
Alias for
reset_rtm().- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to
reset_rtm().
- flux_ramp_off(**kwargs)[source]¶
Disables flux ramp output.
Wrapper for
set_cfg_reg_ena_bit()with value 0.- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to
set_cfg_reg_ena_bit().
See also
flux_ramp_on()Enable flux ramp output.
set_cfg_reg_ena_bit()Direct control.
- flux_ramp_on(**kwargs)[source]¶
Enables flux ramp output.
Wrapper for
set_cfg_reg_ena_bit()with value 1.- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to
set_cfg_reg_ena_bit().
See also
flux_ramp_off()Disable flux ramp output.
set_cfg_reg_ena_bit()Direct control.
- get_50k_amp_drain_current()[source]¶
Deprecated. Use
get_amp_drain_current()instead.
- get_50k_amp_gate_voltage()[source]¶
Deprecated. Use
get_amp_gate_voltage()instead.
- get_amp_drain_current(amp)[source]¶
Measures the drain current for a cryogenic RF amplifier.
Reads a current-sense voltage from the cryostat card PIC ADC, then converts to milliamps using the configured op-amp gain and sense resistor. Because the current is sensed before the LDO, there is a small offset (typically < 1 mA) which is subtracted using the Id_offset parameter in the cfg file (hemt_Id_offset, 50k_Id_offset, or per-amp drain_offset).
- Parameters:
amp (str) – Amplifier name. One of ‘hemt’, ‘50k’ (C02 revision cryostat card) or ‘hemt1’, ‘hemt2’, ‘50k1’, ‘50k2’ (C04/C05 revision cryostat card).
- Returns:
Measured drain current in milliamps.
- Return type:
See also
get_amp_drain_current_dict()Measure all amplifiers.
- get_amp_drain_current_dict()[source]¶
Measures drain current for all cryogenic RF amplifiers.
Returns two entries on C02 revision cryostat cards (‘hemt’, ‘50k’) or four on C04/C05 revision cryostat cards (‘hemt1’, ‘hemt2’, ‘50k1’, ‘50k2’).
- Returns:
Amplifier name to drain current in milliamps.
- Return type:
See also
get_amp_drain_current()Single-amplifier measurement.
- get_amp_drain_enable(amp)[source]¶
Gets whether the drain power supply is enabled for a cryogenic RF amplifier.
Reads the cryocard power-supply enable register and checks whether the bit(s) for the specified amplifier are set.
- Parameters:
amp (str) – Amplifier name. One of ‘hemt’, ‘50k’ (C02 revision cryostat card) or ‘hemt1’, ‘hemt2’, ‘50k1’, ‘50k2’ (C04/C05 revision cryostat card).
- Returns:
True if the drain power supply is enabled.
- Return type:
See also
set_amp_drain_enable()Enable or disable.
set_amp_drain_voltage()Preferred interface (C04/C05).
- get_amp_drain_voltage(amp)[source]¶
C04 only.
- Parameters:
amp (str) – Choose ‘50k’ or ‘hemt’ for the C00, C01, C02, and ‘50k1’, ‘50k2’, ‘hemt1’, ‘hemt2’ for the C04.
- get_amp_gate_voltage(amp)[source]¶
Gets the gate voltage for a cryogenic RF amplifier.
Reads the raw DAC value from the RTM and converts to volts using the
bit_to_Vcalibration factor from the pysmurf config file (e.g.config['amplifier']['bit_to_V_hemt']). The conversion is: volts = bit_to_volt * dac_bits. The RTM DAC output is routed through a voltage divider on the cryocard before reaching the amplifier gate.- Parameters:
amp (str) – Which amplifier. Use ‘50k’ and ‘hemt’ for C02 cryocards, or ‘50k1’, ‘50k2’, ‘hemt1’, ‘hemt2’ for C04/C05 cryocards.
- Returns:
volts – Gate voltage in volts.
- Return type:
See also
set_amp_gate_voltage()Sets the gate voltage.
get_amplifier_biases()Gets all amplifier states.
- get_amplifier_bias()[source]¶
Deprecated. Use
get_amplifier_biases()instead.
- get_amplifier_biases()[source]¶
Returns bias state for all cryogenic RF amplifiers.
On C02 revision cryostat cards, returns gate voltages, drain currents, and drain enable states for ‘hemt’ and ‘50k’. On C04/C05 revision cryostat cards, also returns drain voltages for ‘hemt1’, ‘hemt2’, ‘50k1’, ‘50k2’.
- Returns:
Keys are ‘{amp}_{param}’ strings, e.g. ‘hemt_gate_volt’, ‘hemt_drain_current’, ‘hemt_enable’, and on C04/C05 also ‘hemt1_drain_volt’.
- Return type:
- get_amplitude_scale_array(band, **kwargs)[source]¶
Gets the tone amplitude for all channels in a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of tone amplitudes, one per channel. 4-bit unsigned (0-15) per element.
- Return type:
array
See also
set_amplitude_scale_array()Sets all channel amplitudes.
get_amplitude_scale_channel()Gets one channel.
- get_amplitude_scale_channel(band, channel, **kwargs)[source]¶
Gets the tone amplitude for a single channel.
- Parameters:
- Returns:
val – Tone amplitude. 4-bit unsigned (0-15). 0 means no tone. Each increment is 3 dB.
- Return type:
See also
set_amplitude_scale_channel()Sets this channel’s amplitude.
get_amplitude_scale_array()Gets all channels at once.
- get_analysis_scale(band, **kwargs)[source]¶
Gets the analysis filter bank output scaling.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Scale factor. 2-bit unsigned (0-3). Each increment is a factor of 2. Nominal is 1.
- Return type:
See also
set_analysis_scale()Sets the analysis scale.
- get_band_center_mhz(band, **kwargs)[source]¶
Gets the band center frequency in MHz.
Returns the absolute RF frequency of the band center. This is a software-only variable (not read from hardware).
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Band center frequency in MHz.
- Return type:
See also
set_band_center_mhz()Sets the band center frequency.
get_tone_frequency_offset_mhz()Gets subband offsets.
- get_band_delay_us(band, **kwargs)[source]¶
Gets the total band delay compensation in microseconds.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Delay in microseconds.
- Return type:
See also
set_band_delay_us()Sets the value.
estimate_phase_delay()Measures and sets the delay.
- get_bay_sel_stream(**kwargs)[source]¶
Get the current bay selection for I/Q data streaming.
This function returns the current bay selection for I/Q data streaming. When the modeStream register (set with
set_mode_stream()routine) is set to 1 (I/Q streaming mode), this parameter determines which bay’s I/Q data is streamed.If the returned value is 0, the I/Q data from bay 0 is being streamed, and if it is 1, the I/Q data from bay 1 is being streamed.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – The current bay selection for I/Q data streaming, either 0 or 1.
- Return type:
See also
set_bay_sel_stream()Set the bay selection for I/Q data streaming.
get_mode_stream()Get the current data streaming mode.
set_mode_stream()Set the data streaming mode.
- get_build_dsp_g(**kwargs)[source]¶
Gets the firmware band bitmask.
BUILD_DSP_G encodes which bands the firmware was built for. Each bit corresponds to one band (Base[n]). For example, 0xFF means bands 0–7 are present, 0xF means bands 0–3.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Bitmask of available bands in this firmware build.
- Return type:
- get_center_frequency_array(band, **kwargs)[source]¶
Gets the tone center frequency for all channels in a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of center frequencies in MHz, one per channel.
- Return type:
array
See also
set_center_frequency_array()Sets all center frequencies.
get_center_frequency_mhz_channel()Gets one channel.
- get_center_frequency_mhz_channel(band, channel, **kwargs)[source]¶
Gets the tone center frequency for a single channel.
- Parameters:
- Returns:
val – Center frequency in MHz.
- Return type:
See also
set_center_frequency_mhz_channel()Sets this channel’s frequency.
get_center_frequency_array()Gets all channels at once.
- get_cfg_reg_ena_bit(**kwargs)[source]¶
Gets the flux ramp enable state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if flux ramp is enabled, 0 if disabled.
- Return type:
See also
set_cfg_reg_ena_bit()Sets the flux ramp enable.
- get_channel_frequency_mhz(band=None, **kwargs)[source]¶
Returns the channel frequency in MHz. The channel frequency is the rate at which channels are processed.
- Parameters:
band (int or None, optional, default None) – Which band. If None, assumes all bands have the same channel frequency, and pulls the channel frequency from the first band in the list of bands specified in the experiment.cfg.
- Returns:
The rate at which channels in this band are processed.
- Return type:
- get_channel_mask(**kwargs)[source]¶
Gets the smuf processor channel mask.
- Returns:
mask – The channel mask.
- Return type:
- get_configuring_in_progress(**kwargs)[source]¶
Whether or not configuration process in progress.
Set to True when the rogue setDefaults command is called (usually by a call to
set_defaults_pv()), and then set to False when the rogue setDefaults method exits.- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Boolean flag indicating whether or not the configuration process is in progress. Returns True if the configuration process is in progress, otherwise returns False. If the underlying PV can not be read, this function returns None.
- Return type:
bool or None
See also
set_defaults_pv()Loads the default configuration.
get_system_configured()Returns final state of configuration process.
- get_counter_select(band, **kwargs)[source]¶
Get the value of the counterSelect register for a given band.
If this register is enabled, the value of I and Q will be substituted with the flux ramp frame counter. This makes it possible to see what frame the data belongs to, which is useful for debugging timing issues in the system.
WARNING: If the counter-substituted IQ streams are allowed to go through phase estimation and downstream filtering, they will be hard to interpret. You can disable those steps with the following code:
# disable downstream filtering S.set_filter_disable(True) S.set_downsample_factor(1) S._caput(S.smurf_processor + "Unwrapper:Disable",1) # select IQ streaming mode # bypasses CORDIC, send I and Q over both bays # in this case we select bands corresponding to bay 0 S._caput(f'{S.app_core}baySelStream', 0, write_log=True) S._caput(f'{S.app_core}modeStream', 1, write_log=True)
- get_cpld_reset(**kwargs)[source]¶
Gets the RTM CPLD reset state.
When asserted (1), holds the RTM CPLD in reset — all CPLD logic is inactive, the flux ramp counter is zeroed, and SPI communication with the CPLD is halted.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if CPLD is held in reset, 0 if released.
- Return type:
See also
set_cpld_reset()Sets the reset state.
cpld_toggle()Pulses the reset.
- get_crossbar_output_config(index, **kwargs)[source]¶
Gets the timing crossbar output configuration.
- Parameters:
index (int) – Which output (0-3).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Which input source (0-3) is routed to this output.
- Return type:
See also
set_crossbar_output_config()Sets this value (includes full input/output mapping).
- get_cryo_card_ac_dc_mode()[source]¶
Get the operation mode, AC or DC, based on the readback of the relays.
- Returns:
mode – String describing the operation mode. If the relays readback don’t match, then the string ‘ERROR’ is returned.
- Return type:
- get_cryo_card_cycle_count(enable_poll=False, disable_poll=False)[source]¶
No description
- Returns:
cycle_count – The cycle count.
- Return type:
- get_cryo_card_ps_en()[source]¶
Read the cryo card power supply enable signals
- Returns:
enables – 2-bit number with status of the power supplies enables
Bit 0 for HEMT supply Bit 1 for 50K supply Bit == 1 means enabled Bit == 0 means disabled
therefore: 0 = all off 1 = 50K on, HEMT off 2 = HEMT on, 50K off 3 = both on
- Return type:
- get_cryo_card_relays(enable_poll=False, disable_poll=False)[source]¶
No description
- Returns:
relays – The cryo card relays value.
- Return type:
hex
- get_cryo_card_temp(enable_poll=False, disable_poll=False)[source]¶
Get the self-reported temperature of the cryocard. This value is typically around 20 Celcius. Anything higher than 30 would indicate a problem. Anything below 0 C indicates the board is not connected.
- Returns:
temp – Temperature of the cryostat card in Celsius.
- Return type:
- get_dac_axil_addr(reg, **kwargs)[source]¶
Low-level function. Used internally by the bipolar TES-bias path; users should not normally need to call this directly.
Gets the DacAxilAddr[#] registers.
- get_dac_enable(bay, dac, **kwargs)[source]¶
Low-level function. The RF DAC enable is configured automatically during
setup(); users should not normally need to call this directly.Gets enable status of DAC
- get_dac_reset(bay, dac, **kwargs)[source]¶
Low-level function. The DAC reset line is exercised by
SmurfControl.setup(); users should not normally need to call this directly.Reads the physical reset DAC register. Will be either 0 or 1.
- get_data_buffer_size(bay, **kwargs)[source]¶
Gets the DaqMux data buffer size.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Buffer size in 32-bit words.
- Return type:
See also
set_data_buffer_size()Sets this value.
take_debug_data()Triggers a data capture using this buffer.
- get_data_out_mux(bay, b, **kwargs)[source]¶
Gets the JESD transmit output data source for a lane.
- Parameters:
- Returns:
val – Output source (0-3).
- Return type:
See also
set_data_out_mux()Sets the selection.
- get_dbg_enable(bay, **kwargs)[source]¶
Whether or not write access is enabled for DBG registers.
If disabled (=False), user cannot write to any of the DBG registers.
- get_debounce_width(**kwargs)[source]¶
Gets the external trigger debounce width.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Debounce count (16-bit unsigned).
- Return type:
See also
set_debounce_width()Sets the debounce width.
- get_debug_select(bay, **kwargs)[source]¶
Gets the band selected for debug data routing.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Which band within the bay (0-3).
- Return type:
See also
set_debug_select()Sets the selection.
- get_debug_timing_override(bay, ch, **kwargs)[source]¶
Get the value of the debug timing override register for a given bay and channel.
If this register is enabled, the value of Counter0 will be substituted for one of the data channels (e.g. I/Q or f/df). This is useful for debugging timing issues in the system, as it allows you to see the value of Counter0 in the data stream.
Counter0 increments at 480kHz and is reset by the PPS signal to the timing system.
- get_decimation(band, **kwargs)[source]¶
Gets the debug data decimation factor.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Decimation factor (15-bit unsigned, minimum 1).
- Return type:
See also
set_decimation()Sets this value.
- get_digitizer_frequency_mhz(band=None, **kwargs)[source]¶
Returns the digitizer frequency in MHz.
- Parameters:
band (int or None, optional, default None) – Which band. If None, assumes all bands have the same channel frequency, and pulls the channel frequency from the first band in the list of bands specified in the experiment.cfg.
- Returns:
The digitizer frequency for this band in MHz.
- Return type:
- get_downsample_external_bitmask()[source]¶
Get the downsampler external bitmask. This bitmask is only used when get_downsample_mode is external. For example, 0 means never trigger, 1 means trigger on the first bit, 2 will trigger on the second bit, 4 will trigger on the third bit. By bit, we mean when the bit flips in one direction, because the bit will flip back on the next incoming data stream.
Ref. https://confluence.slac.stanford.edu/display/SMuRF/SMuRF+Processor
- get_downsample_factor(**kwargs)[source]¶
Get the smurf processor down-sampling factor. This is only used when the downsampling mode is internal. When the downsampling mode is internal, the server will receive frames, place them through SmurfProcessor.cpp, but it will not release any data to be saved until it has counted up to this factor.
- Returns:
The down-sampling factor.
- Return type:
- get_downsample_mode()[source]¶
Gets the SmurfProcessor downsampler trigger mode.
- Returns:
‘internal’ or ‘external’.
- Return type:
See also
set_downsample_mode()Sets the mode.
- get_dsp_enable(band, **kwargs)[source]¶
Gets the baseband DSP processing enable state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if enabled, 0 if disabled.
- Return type:
See also
set_dsp_enable()Sets the DSP enable state.
- get_enable(**kwargs)[source]¶
No description
- Returns:
The status of the global poll bit AMCc.enable. If False, pyrogue is not currently polling the server. PVs will not be updating.
- Return type:
- get_enable_ramp_trigger(**kwargs)[source]¶
Gets the flux ramp trigger pulse enable state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if trigger pulses are enabled, 0 if disabled.
- Return type:
See also
set_enable_ramp_trigger()Sets the enable state.
- get_eta_mag_array(band, **kwargs)[source]¶
Gets the eta magnitude for all channels in a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of eta magnitudes (real, positive), one per channel.
- Return type:
array
See also
set_eta_mag_array()Sets the eta magnitudes.
get_eta_phase_array()Gets the eta phases.
- get_eta_mag_scaled_channel(band, channel, **kwargs)[source]¶
Gets the eta magnitude for a single channel.
Per-channel accessor for the same data as
get_eta_mag_array().- Parameters:
- Returns:
val – Eta magnitude (real, positive).
- Return type:
See also
set_eta_mag_scaled_channel()Sets this channel’s eta magnitude.
get_eta_mag_array()Gets all channels at once.
- get_eta_phase_array(band, **kwargs)[source]¶
Gets the eta phase for all channels in a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of eta phases in radians, one per channel.
- Return type:
array
See also
set_eta_phase_array()Sets the eta phases.
get_eta_mag_array()Gets the eta magnitudes.
- get_eta_phase_degree_channel(band, channel, **kwargs)[source]¶
Gets the eta phase for a single channel in degrees.
- Parameters:
- Returns:
val – Eta phase in degrees (-180 to 180).
- Return type:
See also
set_eta_phase_degree_channel()Sets this channel’s eta phase.
get_eta_phase_array()Gets all channels (in radians).
- get_eta_scan_amplitude(band, **kwargs)[source]¶
Gets the tone amplitude used during eta scan or find-freq.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Tone amplitude for scanned channels (0–15, exactly 3 dB per step).
- Return type:
See also
set_eta_scan_amplitude()Sets this value.
- get_eta_scan_averages(band, **kwargs)[source]¶
Gets the number of frequency error averages for serial eta scan.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Number of frequency error samples averaged at each point.
- Return type:
See also
set_eta_scan_averages()Sets this value.
- get_eta_scan_channel(band, **kwargs)[source]¶
Gets the channel for the single-channel eta scan.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Channel number selected for the single-channel eta scan.
- Return type:
See also
set_eta_scan_channel()Sets this value.
- get_eta_scan_del_f(band, **kwargs)[source]¶
Gets offset frequency for serial eta scan estimation.
The rogue serial eta scan routine (run using
run_serial_eta_scan()) estimates the eta parameter for each tone with nonzero amplitude in the provided band by sampling the frequency error at the tone frequency +/- this offset frequency. Units are Hz.- Parameters:
band (int) – Which band.
- Returns:
val – Offset frequency in Hz about each resonator’s central frequency at which to sample the frequency error in order to estimate the eta parameters of each resonator in the rogue serial eta scan routine.
- Return type:
See also
run_serial_eta_scan()Runs rogue serial eta scan, which uses this parameter.
set_eta_scan_del_f()Sets the value of this parameter in rogue.
- get_eta_scan_freq(band, **kwargs)[source]¶
Gets the frequency array for find-freq or single-channel eta scan.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Array of scan frequencies in MHz previously set by
set_eta_scan_freq().- Return type:
See also
set_eta_scan_freq()Sets this array.
- get_eta_scan_in_progress(band, **kwargs)[source]¶
Gets whether an eta scan or gradient descent is running.
Returns the status flag indicating if a serial eta scan or serial gradient descent is in progress for the specified band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if a scan is in progress, 0 if idle.
- Return type:
See also
run_serial_eta_scan()Runs the serial eta scan.
run_serial_gradient_descent()Runs the gradient descent.
- get_eta_scan_results_imag(band, count, **kwargs)[source]¶
Gets the imaginary component of the eta scan.
Returns frequency error measured during the second sweep of the most recent
set_run_eta_scan()orset_run_serial_find_freq(). Treated as Q when constructing the complex response asI + 1j*Q.For serial find-freq, the array is flattened from shape (n_channels, n_scan_points) — reshape using the same dimensions passed to
set_eta_scan_freq().- Parameters:
- Returns:
Frequency error array of length count.
- Return type:
See also
get_eta_scan_results_real()Real (I) component.
set_run_serial_find_freq()Multi-channel scan that populates this.
set_run_eta_scan()Single-channel scan that populates this.
- get_eta_scan_results_real(band, count, **kwargs)[source]¶
Gets the real component of the eta scan.
Returns frequency error measured during the first sweep of the most recent
set_run_eta_scan()orset_run_serial_find_freq(). Treated as I when constructing the complex response asI + 1j*Q.For serial find-freq, the array is flattened from shape (n_channels, n_scan_points) — reshape using the same dimensions passed to
set_eta_scan_freq().- Parameters:
- Returns:
Frequency error array of length count.
- Return type:
See also
get_eta_scan_results_imag()Imaginary (Q) component.
set_run_serial_find_freq()Multi-channel scan that populates this.
set_run_eta_scan()Single-channel scan that populates this.
- get_evr_channel_reg_count(chan, **kwargs)[source]¶
Gets the EVR trigger channel event count.
Returns the number of timing events received on the specified channel. Useful for verifying that timing events are being received.
- Parameters:
chan (int) – Which trigger channel.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Number of events received.
- Return type:
See also
set_evr_trigger_dest_type()Sets the trigger destination type.
- get_evr_channel_reg_enable(chan, **kwargs)[source]¶
Get trigger channel enable.
The triggering firmware is broken into two parts: (1) the event selection logic “Channel”, and (2) the trigger pulse generation “Trigger”. Trigger pulse generation has several required inputs including which “Channel” to listen to. This “Enable” register controls whether or not the event selection logic for the requested channel is on.
- Parameters:
chan (int) – Which trigger event selection logic channel to enable or disable.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
1 if trigger channel is enabled, 0 if disabled.
- Return type:
See also
set_evr_channel_reg_enable()Get trigger channel enable.
- get_evr_trigger_dest_type(chan, **kwargs)[source]¶
Get trigger channel destination type.
The triggering firmware is broken into two parts: (1) the event selection logic “Channel”, and (2) the trigger pulse generation “Trigger”. Trigger pulse generation has several required inputs including which “Channel” to listen to. The channel destination type, or DestType, is an optional logic selection (logical AND of) on the presence of a beam where this logic is also used for LCLS-2 on the accelerator. For SMuRF we always use destination 0 (=”All” if you’re looking at the SMuRF Rogue gui) which tells the trigger channel logic to ignore all beam logic (a better name for “All” would be “DontCare”.
- Parameters:
chan (int) – Which trigger event selection logic channel’s destination type to get.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Channel destination type of the requested channel. Although valid options are 0, 1, 2, and 3, SMuRF should always use 0 corresponding to “All” in the Rogue gui which instructs the channel to ignore any selection on the presence of beam for LCLS-2.
- Return type:
See also
set_evr_trigger_dest_type()Set trigger channel destination type.
- get_fast_slow_rst_value(**kwargs)[source]¶
Gets the flux ramp counter reset value.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Reset value (32-bit unsigned).
- Return type:
See also
set_fast_slow_rst_value()Sets the reset value.
- get_fast_slow_step_size(**kwargs)[source]¶
Gets the flux ramp step size.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Step size (32-bit unsigned).
- Return type:
See also
set_fast_slow_step_size()Sets the step size.
- get_feedback_enable(band, **kwargs)[source]¶
Gets the global feedback enable for a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if global feedback is enabled, 0 if disabled.
- Return type:
See also
set_feedback_enable()Sets the global feedback enable.
- get_feedback_enable_array(band, **kwargs)[source]¶
Gets the per-channel feedback enable for all channels in a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of feedback enable values, one per channel. 1 if enabled, 0 if disabled.
- Return type:
int array
See also
set_feedback_enable_array()Sets all per-channel enables.
get_feedback_enable()Gets the global feedback enable.
- get_feedback_enable_channel(band, channel, **kwargs)[source]¶
Gets the feedback enable for a single channel.
- Parameters:
- Returns:
val – 1 if enabled, 0 if disabled.
- Return type:
See also
set_feedback_enable_channel()Sets this channel’s enable.
get_feedback_enable_array()Gets all channels at once.
- get_feedback_end(band, **kwargs)[source]¶
Gets the sample count at which feedback stops.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – End sample count. Units are ticks of the channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz) from the beginning of each flux ramp cycle.- Return type:
See also
set_feedback_end()Sets the feedback end count.
get_feedback_start()Gets the start of the feedback window.
- get_feedback_gain(band, **kwargs)[source]¶
Gets the integral gain of the tracking feedback loop.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Feedback gain. 16-bit unsigned integer (0-65535). val/4096 gives the effective gain multiplier.
- Return type:
See also
set_feedback_gain()Sets the feedback gain.
- get_feedback_limit(band, **kwargs)[source]¶
Gets the maximum feedback excursion for tone tracking.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Maximum allowed feedback excursion. 16-bit unsigned integer (0-65535). val/65536 gives the fraction of the full 2.4 MHz subband.
- Return type:
See also
set_feedback_limit()Sets the feedback limit.
- get_feedback_polarity(band, **kwargs)[source]¶
Gets the global feedback polarity for a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 0 or 1. The current feedback polarity.
- Return type:
See also
set_feedback_polarity()Sets the feedback polarity.
- get_feedback_start(band, **kwargs)[source]¶
Gets the sample count at which feedback starts.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Start sample count. Units are ticks of the channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz) from the beginning of each flux ramp cycle.- Return type:
See also
set_feedback_start()Sets the feedback start count.
get_feedback_end()Gets the end of the feedback window.
- get_filter_a(**kwargs)[source]¶
Gets the smurf processor filter A coefficients.
- Returns:
coef – The filter A coefficients.
- Return type:
- get_filter_alpha(band, **kwargs)[source]¶
Gets the IIR low-pass filter coefficient for debug data.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Filter coefficient. 16-bit unsigned integer (0-65535). val/65536 gives the effective alpha.
- Return type:
See also
set_filter_alpha()Sets the filter coefficient.
get_debug_data_filter_cutoff()Gets the cutoff frequency in Hz.
- get_filter_b(**kwargs)[source]¶
Get the smurf processor filter B coefficients.
- Returns:
coef – The filter B coefficients.
- Return type:
- get_filter_disable(**kwargs)[source]¶
If Disable is set to True, then the downsampling filter is off.
- Returns:
The status of the Disable bit.
- Return type:
- get_filter_gain(**kwargs)[source]¶
Get the smurf processor filter gain.
- Returns:
The filter gain.
- Return type:
- get_filter_order(**kwargs)[source]¶
Get the smurf processor filter order.
- Parameters:
int – The filter order.
- get_flux_ramp_dac(**kwargs)[source]¶
Gets the raw flux ramp DAC value.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Raw DAC value. 16-bit unsigned (0-65535).
- Return type:
See also
set_flux_ramp_dac()Sets the DAC value.
get_mode_control()Gets the current DAC mode.
- get_flux_ramp_freq(**kwargs)[source]¶
Returns flux ramp reset rate in kHz.
Returns the current flux ramp reset rate. In units of kHz.
The flux ramp reset rate is determined by polling the trigger repetition rate (the RampMaxCnt register in RtmCryoDet). RampMaxCnt is a 32-bit counter where each count represents a 307.2 MHz tick.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Currently programmed flux ramp reset rate, in kHz.
- Return type:
See also
set_flux_ramp_freqSets the flux ramp reset rate.
get_ramp_max_cntGets the flux ramp trigger repetition rate.
- get_fpga_build_stamp(**kwargs)[source]¶
Get the FPGA build stamp.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
The FPGA build stamp.
- Return type:
- get_fpga_git_hash(**kwargs)[source]¶
Get the full FPGA firmware SHA-1 git hash.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
The full git SHA-1 hash of the FPGA firmware.
- Return type:
- get_fpga_git_hash_short(**kwargs)[source]¶
Get the short FPGA firmware SHA-1 git hash.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
The short git SHA-1 hash of the FPGA firmware.
- Return type:
- get_fpga_temp(**kwargs)[source]¶
Gets the temperature of the UltraScale+ FPGA. Returns float32, the temperature in degrees Celsius.
- Returns:
val – The UltraScale+ FPGA temperature in degrees Celsius.
- Return type:
- get_fpga_vccaux(**kwargs)[source]¶
No description
- Returns:
val – The UltraScale+ FPGA VccAux in Volts.
- Return type:
- get_fpga_vccbram(**kwargs)[source]¶
No description
- Returns:
val – The UltraScale+ FPGA VccBram in Volts.
- Return type:
- get_fpga_vccint(**kwargs)[source]¶
No description
- Returns:
val – The UltraScale+ FPGA VccInt in Volts.
- Return type:
- get_fpga_version(**kwargs)[source]¶
No description
- Returns:
version – The FPGA version.
- Return type:
- get_frame_count(**kwargs)[source]¶
Gets the frame count going into the SmurfProcessor. This must be incrementing if you are attempting to stream data.
- Returns:
The frame count number
- Return type:
- get_frame_loss_cnt(**kwargs)[source]¶
Gets the count of frames lost before reaching the SmurfProcessor.
A SmurfProcessor diagnostic counter. Increments by the number of missing frames each time a gap in frame sequence numbers is detected (i.e. frames generated by the FPGA but never received by the SmurfProcessor).
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Number of lost frames since last reset.
- Return type:
See also
get_frame_out_order_count()Frames received out of order.
- get_frame_out_order_count(**kwargs)[source]¶
Gets the count of frames received out of order.
A SmurfProcessor diagnostic counter. Increments each time a received frame has a lower sequence number than the previous frame. Such frames are discarded. A nonzero value may indicate network or data transport issues.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Number of out-of-order frames received.
- Return type:
- get_frame_size(**kwargs)[source]¶
Gets the size of the frame going into the smurf processor.
- Returns:
The size of the data frame into the smurf processor.
- Return type:
- get_frequency_error_array(band, **kwargs)[source]¶
Gets the frequency error for all channels in a band.
Returns the measured detuning of each tone from its resonance after eta rotation. This is the input to the tracking loop filter. Read-only from firmware BRAM.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of frequency errors, one per channel.
- Return type:
array
See also
get_loop_filter_output_array()Gets the integrated feedback.
get_frequency_error_mhz()Gets a single channel’s error in MHz.
- get_frequency_error_mhz(band, channel, **kwargs)[source]¶
Gets the frequency error for a single channel in MHz.
Returns the measured detuning of the specified tone from its resonance after eta rotation, converted to MHz by the PyRogue linked variable.
- Parameters:
- Returns:
val – Frequency error in MHz.
- Return type:
See also
get_frequency_error_array()Gets all channels’ errors (raw).
- get_fru_info(board, bay=None, slot_number=None, shelf_manager=None)[source]¶
Returns FRU information for SMuRF board.
Wrapper for dumping the FRU information for SMuRF boards using shell commands.
- Parameters:
board (str) – Which board to return FRU informationf for. Valid options include ‘amc’, ‘carrier’, or ‘rtm’. If ‘amc’, must also provide the bay argument.
bay (int, optional, default None) – Which bay to return the AMC FRU information for. Used only if board=’amc’.
slot_number (int or None, optional, default None) – The crate slot number that the AMC is installed into. If None, defaults to the
SmurfControlclass attributeslot_number.shelf_manager (str or None, optional, default None) – Shelf manager ip address. If None, defaults to the
SmurfControlclass attributeshelf_manager. For typical systems the default name of the shelf manager is ‘shm-smrf-sp01’.
- Returns:
fru_info_dict – Dictionary of requested FRU information. Returns None if board not a valid option, board not present in slot, slot not present in shelf, or if no AMC is up in the requested bay.
- Return type:
- get_gradient_descent_averages(band, **kwargs)[source]¶
Gets the number of averages for gradient estimation.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Number of measurements averaged per gradient sample.
- Return type:
See also
set_gradient_descent_averages()Sets the value.
- get_gradient_descent_beta(band, **kwargs)[source]¶
Gets the decay rate for serial gradient descent.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Decay rate (0.0 to 1.0).
- Return type:
See also
set_gradient_descent_beta()Sets the value.
- get_gradient_descent_converge_hz(band, **kwargs)[source]¶
Gets the convergence threshold for serial gradient descent.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Convergence threshold in Hz.
- Return type:
See also
set_gradient_descent_converge_hz()Sets the value.
- get_gradient_descent_gain(band, **kwargs)[source]¶
Gets the gain (learning rate) for serial gradient descent.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Gain multiplier.
- Return type:
See also
set_gradient_descent_gain()Sets the value.
- get_gradient_descent_max_iters(band, **kwargs)[source]¶
Gets the maximum iterations for serial gradient descent.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Maximum number of iterations per channel.
- Return type:
See also
set_gradient_descent_max_iters()Sets the value.
- get_gradient_descent_momentum(band, **kwargs)[source]¶
Gets the optimizer mode for serial gradient descent.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 for momentum mode, 0 for adaptive mode.
- Return type:
See also
set_gradient_descent_momentum()Sets the value.
- get_gradient_descent_step_hz(band, **kwargs)[source]¶
Gets the offset frequency for gradient estimation.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Offset frequency in Hz.
- Return type:
See also
set_gradient_descent_step_hz()Sets the value.
- get_hemt_bias()[source]¶
Deprecated. Use
get_amp_gate_voltage()instead.
- get_hemt_drain_current()[source]¶
Deprecated. Use
get_amp_drain_current()instead.
- get_high_cycle(val, **kwargs)[source]¶
Gets the RTM clock high cycle duration.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
High cycle duration in jesdClk ticks (zero inclusive). jesdClk =
get_digitizer_frequency_mhz()/ 2 (default 307.2 MHz).- Return type:
See also
set_high_cycle()Sets this value.
- get_input_mux_sel(bay, lane, **kwargs)[source]¶
Gets the data source selection for a DaqMux buffer lane.
- Parameters:
- Returns:
val – Input source selection (0-25).
- Return type:
See also
set_input_mux_sel()Sets the selection.
- get_iq_stream_enable(band, **kwargs)[source]¶
Gets the demodulated I/Q debug output enable state.
When enabled, the debug path outputs the demodulated flux ramp I/Q from the LMS harmonic estimator instead of frequency (F) and frequency error (dF).
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 0 if outputting F/dF, 1 if outputting demodulated I/Q.
- Return type:
See also
set_iq_stream_enable()Sets this mode.
- get_iq_swap_in(band, **kwargs)[source]¶
Gets the I/Q swap state on the analysis filter bank input.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
0 for normal, 1 for swapped.
- Return type:
See also
set_iq_swap_in()Sets this value.
- get_iq_swap_out(band, **kwargs)[source]¶
Gets the I/Q swap state on the synthesis filter bank output.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if swapped, 0 if normal.
- Return type:
See also
set_iq_swap_out()Sets the swap state.
- get_jesd_rx_data_valid(bay, **kwargs)[source]¶
Gets the JESD receive data valid status for a bay.
Returns a bitmask indicating which receive lanes have valid data. Used to verify the JESD link is up and synchronized. Should match the enable mask (0x3F3) when the link is healthy.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Data valid bitmask, one bit per lane.
- Return type:
See also
get_jesd_rx_enable()Gets the lane enable mask.
get_jesd_rx_status_valid_cnt()Gets per-lane valid count.
- get_jesd_rx_enable(bay, **kwargs)[source]¶
Gets the JESD receive lane enable mask for a bay.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Lane enable bitmask. Default is 0x3F3.
- Return type:
See also
set_jesd_rx_enable()Sets the enable mask.
- get_jesd_rx_status_valid_cnt(bay, num, **kwargs)[source]¶
Gets the JESD receive synchronization count for a lane.
Counts the number of times the specified lane has synchronized (rising edges of data valid). On a stable system (synced once at startup) this should not be incrementing. Any count incrementing after startup indicates link instability. There are 10 lanes per bay (indexed 0-9), but only 8 are in use (matching the Rx enable mask 0x3F3).
- Parameters:
- Returns:
val – Number of synchronizations for this lane.
- Return type:
See also
get_jesd_rx_data_valid()Checks if receive data is valid.
- get_jesd_status(**kwargs)[source]¶
Gets the status of the Rogue AppTop.JesdHealth method.
Returns the status of a call to the AppTop.JesdHealth method. States are:
“Unlocked” : The AppTop.JesdHealth command has been run and has reported that the JESD were unlocked (that’s bad!).
“Locked” : The AppTop.JesdHealth command has been run and has reported that the JESD were locked (that’s good!).
“Checking” : The AppTop.JesdHealth command is in progress.
“Not found” : The Rogue ZIP file currently in use does not contain the AppTop.JesdHealth method.
None : The SmurfApplication:JesdStatus register is not implemented in pysmurf core code versions <4.1.0.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to all _caget calls.
- Returns:
status – The status of the Rogue AppTop.JesdHealth method. Returns None for pysmurf core code versions <4.1.0 where the SmurfApplication:JesdStatus register is not implemented.
- Return type:
str or None
See also
set_check_jesd()Gets the status of the Rogue AppTop.JesdHealth method.
- get_jesd_tx_data_valid(bay, **kwargs)[source]¶
Gets the JESD transmit data valid status for a bay.
Returns a bitmask indicating which transmit lanes have valid data. Should match the enable mask (0x3CF) when the link is healthy.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Data valid bitmask, one bit per lane.
- Return type:
See also
get_jesd_tx_enable()Gets the lane enable mask.
get_jesd_tx_status_valid_cnt()Gets per-lane valid count.
- get_jesd_tx_enable(bay, **kwargs)[source]¶
Gets the JESD transmit lane enable mask for a bay.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Lane enable bitmask. Default is 0x3CF.
- Return type:
See also
set_jesd_tx_enable()Sets the enable mask.
- get_jesd_tx_status_valid_cnt(bay, num, **kwargs)[source]¶
Gets the JESD transmit synchronization count for a lane.
Counts the number of times the specified lane has synchronized. On a stable system (synced once at startup) this should not be incrementing. There are 10 lanes per bay (indexed 0-9), but only 8 are in use (matching the Tx enable mask 0x3CF).
- Parameters:
- Returns:
val – Number of synchronizations for this lane.
- Return type:
See also
get_jesd_tx_data_valid()Checks if transmit data is valid.
- get_lmk_enable(bay, **kwargs)[source]¶
Set the LMK:Enable bit.
- Parameters:
bay (int) – 0 or 1.
**kwargs – Arbitrary keyword arguments. Passed directly to the epics.caget call.
- get_lmk_reg(bay, reg, **kwargs)[source]¶
Gets a register from the LMK clock distribution chip.
Low-level access to individual registers of the LMK jitter cleaner on the specified AMC bay. The LMK generates and distributes clocks and JESD204B SYSREF signals to the ADC and DAC chips on the ADC/DAC card.
- Parameters:
- Returns:
Register value.
- Return type:
See also
set_lmk_reg()Write a register.
- get_lms_delay(band, **kwargs)[source]¶
Gets the LMS loop delay compensation.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Delay in channel processing rate ticks (see
get_channel_frequency_mhz(), default 2.4 MHz). 6-bit unsigned (0-63).- Return type:
See also
set_lms_delay()Sets the LMS delay.
estimate_phase_delay()Measures and sets the system latency.
- get_lms_enable1(band, **kwargs)[source]¶
Gets the 1st harmonic tracking enable state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if enabled, 0 if disabled.
- Return type:
See also
set_lms_enable1()Sets the 1st harmonic tracking enable.
- get_lms_enable2(band, **kwargs)[source]¶
Gets the 2nd harmonic tracking enable state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if enabled, 0 if disabled.
- Return type:
See also
set_lms_enable2()Sets the 2nd harmonic tracking enable.
- get_lms_enable3(band, **kwargs)[source]¶
Gets the 3rd harmonic tracking enable state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if enabled, 0 if disabled.
- Return type:
See also
set_lms_enable3()Sets the 3rd harmonic tracking enable.
- get_lms_freq(band, **kwargs)[source]¶
Gets the LMS tracking frequency in raw firmware units.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – LMS frequency as a fraction of the channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz). 24-bit unsigned. To convert to Hz: val * get_channel_frequency_mhz() * 1e6 / 2^24.- Return type:
See also
set_lms_freq()Sets the raw LMS frequency.
get_lms_freq_hz()Gets the LMS frequency in Hz.
- get_lms_freq_hz(band, **kwargs)[source]¶
Gets the LMS tracking frequency in Hz.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – LMS frequency in Hz.
- Return type:
See also
set_lms_freq_hz()Sets the LMS frequency in Hz.
get_lms_freq()Gets the LMS frequency in raw units.
- get_lms_gain(band, **kwargs)[source]¶
Gets the LMS tracking loop gain.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – LMS gain exponent. 3-bit unsigned (0-7). Effective gain is 2^val.
- Return type:
See also
set_lms_gain()Sets the LMS gain.
- get_loop_filter_output_array(band, **kwargs)[source]¶
Gets the loop filter output for all channels in a band.
Returns the accumulated frequency correction for each channel. This is the integrated feedback that is added to each tone’s center frequency during tracking. Read-only from firmware BRAM.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of loop filter outputs, one per channel.
- Return type:
array
See also
set_feedback_gain()Sets the gain that drives this output.
set_feedback_limit()Limits this output’s excursion.
get_frequency_error_array()Gets the frequency error input.
- get_low_cycle(val, **kwargs)[source]¶
Gets the RTM clock low cycle duration.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Low cycle duration in jesdClk ticks (zero inclusive). jesdClk =
get_digitizer_frequency_mhz()/ 2 (default 307.2 MHz).- Return type:
See also
set_low_cycle()Sets this value.
- get_max_file_size(**kwargs)[source]¶
Get maximum file size for streamed data.
If nonzero, when streaming data to disk, will split data over files of this size, in bytes. Files have the usual name but with an incrementing integer appended at the end, e.g. .dat.1, .dat.2, etc..
- Returns:
Maximum file size for streamed data in bytes. Returns zero if there’s no limit in place.
- Return type:
See also
set_max_file_size()Get maximum file size for streamed data.
- get_mode_control(**kwargs)[source]¶
Gets the RTM DAC output mode.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 0 for normal operation, 1 for test/load mode.
- Return type:
See also
set_mode_control()Sets the DAC output mode.
- get_mode_stream(**kwargs)[source]¶
Get the current data streaming mode.
This function returns the current mode for data streaming. If the mode is 0, the demodulated flux ramp phase is being streamed for each channel. If the mode is 1, the raw RF I and Q values are being streamed for each channel.
See the docstring for
set_mode_stream()for more details.- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – The current mode for data streaming, either 0 (default mode) or 1 (I/Q streaming mode).
- Return type:
See also
set_mode_stream()Set the data streaming mode.
get_lms_gain()Gets the current value of the lmsGain register.
set_lms_gain()Sets the value of the lmsGain register.
read_stream_data()Loads data taken with the take_stream_data function.
take_stream_data()Takes streaming data for a given amount of time.
set_bay_sel_stream()Set the bay selection for I/Q data streaming.
get_bay_sel_stream()Get the current bay selection for I/Q data streaming.
- get_noise_select(band, **kwargs)[source]¶
Gets the random noise output state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if noise output is enabled, 0 for normal tone output.
- Return type:
See also
set_noise_select()Sets the noise select state.
- get_number_processed_channels(band=None, **kwargs)[source]¶
Returns the number of processed channels in a band.
- Parameters:
band (int or None, optional, default None) – Which band. If None, assumes all bands have the same number of channels, and pulls the number of channels from the first band in the list of bands specified in the experiment.cfg.
- Returns:
n_processed_channels – The number of processed channels in the band.
- Return type:
- get_number_sub_bands(band=None, **kwargs)[source]¶
Returns the number of subbands in a band. To do - possibly hide this function.
- Parameters:
band (int or None, optional, default None) – Which band. If None, assumes all bands have the same number of sub bands, and pulls the number of sub bands from the first band in the list of bands specified in the experiment.cfg.
- Returns:
The number of subbands in the band.
- Return type:
- get_payload_size(**kwargs)[source]¶
The payload size defines the number of available channels to write to disk/stream. Payload size must be larger than the number of channels going into the channel mapper
- Returns:
The number of channels written to disk. This is independent of the number of active channels.
- Return type:
- get_postdata_emulator_amplitude(**kwargs)[source]¶
Gets the post-data emulator signal amplitude.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Signal amplitude.
- Return type:
See also
set_postdata_emulator_amplitude()Sets the value.
- get_postdata_emulator_enable(**kwargs)[source]¶
Gets the post-data emulator enable state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if enabled, 0 if disabled.
- Return type:
See also
set_postdata_emulator_enable()Sets the enable state.
- get_postdata_emulator_offset(**kwargs)[source]¶
Gets the post-data emulator signal offset.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Signal DC offset.
- Return type:
See also
set_postdata_emulator_offset()Sets the value.
- get_postdata_emulator_period(**kwargs)[source]¶
No description
- Returns:
period – Number of frames that make up a period.
- Return type:
- get_postdata_emulator_type(**kwargs)[source]¶
Gets the postdata emulator type.
- Returns:
type – 0 - Zeros, 1 - ChannelNumber, 2 - Random, 3 - Square, 4 - Sawtooth, 5 - Triangle, 6 - Sine, 7 - DropFrame
- Return type:
- get_predata_emulator_amplitude(**kwargs)[source]¶
Gets the pre-data emulator signal amplitude.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Signal amplitude.
- Return type:
See also
set_predata_emulator_amplitude()Sets the value.
- get_predata_emulator_disable(**kwargs)[source]¶
Gets the predata emulator disable status.
- Returns:
type
- Return type:
- get_predata_emulator_enable(**kwargs)[source]¶
Gets the SmurfProcessor pre-data emulator enable state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
1 if enabled, 0 if disabled.
- Return type:
See also
set_predata_emulator_enable()Sets the enable state.
- get_predata_emulator_offset(**kwargs)[source]¶
Gets the pre-data emulator signal offset.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Signal DC offset.
- Return type:
See also
set_predata_emulator_offset()Sets the value.
- get_predata_emulator_period(**kwargs)[source]¶
Expressed as the number of incoming frames. It must be greater that 2. This period will be expressed in term of the period of the received frames, which in turn is related to the flux ramp period.
- Returns:
period – Number of frames that make up a period
- Return type:
- get_predata_emulator_type(**kwargs)[source]¶
Gets the predata emulator type.
- Returns:
type – 0 - Zeros, 1 - ChannelNumber, 2 - Random, 3 - Square, 4 - Sawtooth, 5 - Triangle, 6 - Sine, 7 - DropFrame
- Return type:
- get_pulse_width(**kwargs)[source]¶
Gets the flux ramp pulse width on the RTM.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Pulse width in jesdClk ticks (default 307.2 MHz).
- Return type:
See also
set_pulse_width()Sets this value.
- get_pysmurf_directory(**kwargs)[source]¶
Returns path to the pysmurf python files.
Path to the files from which the pysmurf module was loaded. Alias for pysmurf__file__.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Path to pysmurf files.
- Return type:
- get_pysmurf_version(**kwargs)[source]¶
Returns the pysmurf version.
Alias for pysmurf.__version__.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
pysmurf version.
- Return type:
- get_ramp_max_cnt(**kwargs)[source]¶
Gets the internal flux ramp maximum count.
The ramp reset rate is
get_digitizer_frequency_mhz()/ 2 / (RampMaxCnt + 1) MHz. Only meaningful when using internal triggering (RampStartMode = 0).- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Maximum count (32-bit unsigned).
- Return type:
See also
set_ramp_max_cnt()Sets this value.
- get_ramp_rate(**kwargs)[source]¶
Gets the flux ramp reset rate from the timing system in kHz.
Reads the timing system trigger rate selector and converts to the corresponding reset rate. Only meaningful when using the timing system as the ramp trigger source (RampStartMode = 1).
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Flux ramp reset rate in kHz.
- Return type:
float or None
See also
set_ramp_rate()Sets the reset rate.
set_ramp_start_mode()Select trigger source.
- get_ramp_slope(**kwargs)[source]¶
Gets the flux ramp slope polarity.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 0 for positive slope, 1 for negative slope.
- Return type:
See also
set_ramp_slope()Sets the slope polarity.
- get_ramp_start_mode(**kwargs)[source]¶
Gets the flux ramp trigger source.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
0 for internal, 1 for timing system, 2 for external.
- Return type:
See also
set_ramp_start_mode()Sets this value.
- get_readout_channel_select(band, **kwargs)[source]¶
Gets the channel selected for single-channel debug mode.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
channel – The currently selected channel.
- Return type:
See also
set_readout_channel_select()Sets the selected channel.
- get_readout_delay(**kwargs)[source]¶
Get the value of a programmable delay between the startRamp pulse and when the readout FSM is triggered.
The delay step is based on the AXI-Lite clock and its frequency is 156.25MHz (1/6.4ns)
https://github.com/slaclab/cryo-det/blob/main/firmware/common/shared/rtl/CryoStream.vhd#L36 https://github.com/slaclab/cryo-det/blob/main/firmware/common/DspCoreLib/CryoDetCmbHcd/rtl/DspCoreWrapper.vhd#L234 https://github.com/slaclab/cryo-det/blob/main/firmware/common/DspCoreLib/CryoDetCmbHcd/rtl/DspCoreWrapper.vhd#L44 https://github.com/slaclab/cryo-det/blob/main/firmware/common/MicrowaveMuxApp/AppCore/hdl/AppCore.vhd#L317 https://github.com/slaclab/cryo-det/blob/main/firmware/common/MicrowaveMuxApp/AppCore/hdl/AppCore.vhd#L222
- get_ref_phase_delay(band, **kwargs)[source]¶
Gets the coarse reference phase delay.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Coarse delay in channel processing rate ticks.
- Return type:
See also
set_ref_phase_delay()Sets the value.
get_band_delay_us()Gets the total delay in microseconds.
- get_ref_phase_delay_fine(band, **kwargs)[source]¶
Gets the fine reference phase delay.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Fine delay in JESD clock ticks (
get_digitizer_frequency_mhz()/ 2, default 307.2 MHz).- Return type:
See also
set_ref_phase_delay_fine()Sets the value.
get_band_delay_us()Gets the total delay in microseconds.
- get_regulator_iout(**kwargs)[source]¶
No description
- Returns:
value – Regulator current in amperes.
- Return type:
- get_regulator_temp1(**kwargs)[source]¶
No description
- Returns:
value – Regulator PT temperature in C.
- Return type:
- get_regulator_temp2(**kwargs)[source]¶
No description
- Returns:
value – A regulator CTRL temperature in C.
- Return type:
- get_rf_enable(band, **kwargs)[source]¶
Gets the RF DAC output enable state for a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
0 for disabled (output zeros), 1 for enabled.
- Return type:
See also
set_rf_enable()Sets this value.
- get_rf_iq_stream_enable(band, **kwargs)[source]¶
Gets the raw RF I/Q debug output enable state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
0 for disabled, 1 for raw RF I/Q output enabled.
- Return type:
See also
set_rf_iq_stream_enable()Sets this value.
- get_rogue_version(**kwargs)[source]¶
Get rogue version
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
The rogue version
- Return type:
- get_rtm_arb_waveform_busy(**kwargs)[source]¶
Gets whether the RTM arbitrary waveform generator is active.
Returns 1 if the LUT controller state machine is not idle (waveform is being output). Goes low when playback completes or when Continuous is set to 0.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
1 if busy (outputting waveform), 0 if idle.
- Return type:
- get_rtm_arb_waveform_continuous(**kwargs)[source]¶
Gets the RTM arbitrary waveform continuous mode flag.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
1 if continuous (repeating), 0 if single-shot.
- Return type:
See also
set_rtm_arb_waveform_continuous()Sets this value.
- get_rtm_arb_waveform_enable(**kwargs)[source]¶
Gets the enable for generation of arbitrary waveforms on the RTM slow DACs.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Bitmask: 0x0 = disabled, 0x1 = Addr[0], 0x2 = Addr[1], 0x3 = both.
- Return type:
See also
set_rtm_arb_waveform_enable()Sets this value.
trigger_rtm_arb_waveform()Start waveform playback.
- get_rtm_arb_waveform_lut_table(reg, **kwargs)[source]¶
Gets the waveform LUT table contents.
- Parameters:
reg (int) – Which LUT table (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
LUT contents, up to 2048 entries of 20-bit signed values.
- Return type:
array-like
- get_rtm_arb_waveform_max_addr(**kwargs)[source]¶
Gets the last LUT address played by the RTM arbitrary waveform generator.
The slow RTM DACs play entries [0, MaxAddr] from the LUT tables before stopping (single-shot) or repeating (continuous mode).
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
MaxAddr (11-bit, range [0, 2048)).
- Return type:
See also
set_rtm_arb_waveform_max_addr()Sets this value.
trigger_rtm_arb_waveform()Start waveform playback.
set_rtm_arb_waveform_continuous()Single-shot vs repeating.
- get_rtm_arb_waveform_timer_size(**kwargs)[source]¶
Gets the RTM arbitrary waveform sample interval.
Time between DAC updates is TimerSize × 6.4 ns.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Timer size (24-bit unsigned). Multiply by 6.4 ns for the sample interval.
- Return type:
See also
set_rtm_arb_waveform_timer_size()Sets this value.
- get_rtm_arb_waveform_trig_cnt(**kwargs)[source]¶
Gets the RTM arbitrary waveform trigger count.
Number of accepted software triggers since boot or the last counter reset.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Trigger count (16-bit).
- Return type:
- get_rtm_slow_dac_data(dac, **kwargs)[source]¶
Gets the value in the data register for the requested DAC, which sets the output voltage of the DAC.
- get_rtm_slow_dac_data_array(**kwargs)[source]¶
Gets the value in the data register, in DAC units, for all 32 DACs. The value in these registers set the output voltages of the DACs.
- Returns:
array – Size (32,) array of DAC values, in DAC units. The value of these registers set the output voltages of the DACs.
- Return type:
int array
- get_rtm_slow_dac_enable(dac, **kwargs)[source]¶
Returns the DacCtrlReg for this DAC, which specifies the AD5790 analog output configuration for the requested DAC number. Should be set to 0x2 in normal operation.
- get_rtm_slow_dac_enable_array(**kwargs)[source]¶
Returns the current DacCtrlReg setting for all of the DACs at once (a 32 element integer array). DacCtrlReg configures the AD5790 analog outputs. If set to 0x2, then the DAC is configured for normal operation, which only needs to be done once for each DAC in a boot session. Reading the values as an array should be much faster than reading them for each DAC individually using the get_rtm_slow_dac_enable function (single versus multiple transactions).
- Returns:
val – An array containing the DacCtrlReg settings for all of the slow RTM DACs.
- Return type:
int array
- get_rtm_slow_dac_volt(dac, **kwargs)[source]¶
Gets the current output voltage for the requested DAC.
- get_rtm_slow_dac_volt_array(**kwargs)[source]¶
Returns the output voltage for all 32 DACs at once, in volts. Reading the values as an array should be much faster than reading them for each DAC individually using the get_rtm_slow_dac_volt function (single versus multiple transactions).
- Returns:
volt_array – Size (32,) array of DAC values in volts.
- Return type:
float array
- get_single_channel_readout(band, **kwargs)[source]¶
Gets the filtered/decimated single-channel debug readout state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if single-channel mode is enabled, 0 for multichannel.
- Return type:
See also
set_single_channel_readout()Sets this mode.
- get_single_channel_readout_opt2(band, **kwargs)[source]¶
Gets the non-decimated single-channel debug readout state.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if full-rate single-channel mode is enabled, 0 if disabled.
- Return type:
See also
set_single_channel_readout_opt2()Sets this mode.
- get_slot_number(**kwargs)[source]¶
Gets the slot number of the crate that the carrier is installed into.
- Returns:
val – The slot number of the crate that the carrier is installed into.
- Return type:
- get_smurf_processor_num_channels(**kwargs)[source]¶
This is the number of channels that smurf_processor (the thing that does the downsampling, filtering, etc and then swrites to disk/streams data to the DAQ) thinks are on.
This value is read only.
- get_smurf_startup_args(**kwargs)[source]¶
Returns pysmurf server startup arguments.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
pysmurf server startup arguments.
- Return type:
- get_smurf_startup_script(**kwargs)[source]¶
Returns path to the pysmurf server startup script.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Path to pysmurf server startup script.
- Return type:
- get_stream_data_source_enable(**kwargs)[source]¶
Gets the data stream source enable state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if streaming is enabled, 0 if disabled.
- Return type:
See also
set_stream_data_source_enable()Sets the enable state.
- get_stream_data_source_period(**kwargs)[source]¶
Gets the StreamDataSource emulator frame period.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Period in microseconds.
- Return type:
See also
set_stream_data_source_period()Sets this value.
- get_stream_enable(**kwargs)[source]¶
Gets the streaming data output enable state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – 1 if streaming is enabled, 0 if disabled.
- Return type:
See also
set_stream_enable()Sets the enable state.
- get_streamdatawriter_close(**kwargs)[source]¶
Gets the stream data file writer close state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Current state.
- Return type:
See also
set_streamdatawriter_close()Closes the writer.
- get_streamdatawriter_datafile(as_str=True, **kwargs)[source]¶
Gets output path for the StreamDataWriter.
This is what is used for take_debug_data.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
The full path for the output.
- Return type:
- get_streamdatawriter_open(**kwargs)[source]¶
Gets the stream data file writer open state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Current state.
- Return type:
See also
set_streamdatawriter_open()Opens the writer.
- get_streaming_datafile(**kwargs)[source]¶
Gets the datafile that streaming data is written to.
- Returns:
datafile – The name of the datafile.
- Return type:
str or length 300 int array
- get_streaming_file_open(**kwargs)[source]¶
Gets the streaming file status. 1 is streaming, 0 is not.
- Returns:
val – The streaming status.
- Return type:
- get_synthesis_scale(band, **kwargs)[source]¶
Gets the synthesis filter bank output scaling.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Scale factor. 2-bit unsigned (0-3). Each increment is a factor of 2. Nominal is 2.
- Return type:
See also
set_synthesis_scale()Sets the synthesis scale.
- get_system_configured(**kwargs)[source]¶
Returns final state of the configuration process.
If the configuration was loaded without errors by the rogue setDefaults command (usually by a call to
set_defaults_pv()) and all tests pass, this flag is set to True when the rogue setDefaults method exits.Warning
The register used to check if the system has been configured, AMCc:SmurfApplication:SystemConfigured, is a software register, and does not persist if the Rogue server is restarted. So this function will only tell you if the system has been successfully configured at any point during the current Rogue server session.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Boolean flag indicating the final state of the configuration process. If the configuration was loaded without errors and all tests passed, then this flag is set to True. Otherwise it is set to False. If the underlying PV can not be read, this function returns None.
- Return type:
bool or None
See also
set_defaults_pv()Loads the default configuration.
get_configuring_in_progress()Whether or not configuration process in progress.
- get_timing_crc_err_cnt(**kwargs)[source]¶
Gets CRC error counter for received timing frames.
This counter increments every time a cyclical redundancy check (=CRC) fails for a received timing packet. The content of timing frames has a CRC on it which is a running sum for each packet. Data transmitted on the timing link includes a lot of idle characters - unlike the counters returned by
get_timing_rx_dec_err_cnt()andget_timing_rx_dsp_err_cnt()which increment for any errors detected for any received timing data, the CRC is only performed on actual timing frames.Common causes of timing system error counter increments include bad network connections between the external timing system and the SMuRF system) and providing the wrong frequency or amplitude 122.88 MHz clock reference signal to the timing system.
Timing data is transmitted and received at a total data rate of 2.45 Gbps (requiring 10G SFPs and compatible fiber links between the external timing system and the SMuRF system(s)), and timing frames are transmitted and received at 480 kHz. The protocol used for communcation between the external timing and SMuRF system(s) is a serial 8B/10B encoding using the K-character symbols for byte and frame alignment. The encoding/decoding and byte alignment is supporte by common Xilinx IP.
Warning
An increment in any of the timing system error counters (obtainable through
get_timing_crc_err_cnt(),get_timing_rx_dec_err_cnt(), andget_timing_rx_dsp_err_cnt()) will cause a SMuRF timing firmware reset, resulting in a ~msec dropout of received timing data, including external triggers. Theget_timing_rx_rst_cnt()returns the value of the counter that increments everytime there is a reset. In streamed data triggering on external timing, this will look like jumps in time without corresponding dropped frames.- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
32-bit counter which increments every time the cyclical redundancy check fails for a received timing packet.
- Return type:
See also
get_timing_rx_dec_err_cnt()Gets decode error counter for received timing characters.
get_timing_rx_dsp_err_cnt()Gets disparity error counter for received timing characters.
get_timing_rx_rst_cnt()Gets timing data link reset counter.
- get_timing_link_up(**kwargs)[source]¶
Return external timing link status.
Return the value of RxLinkUp. This tells you if the FPGA recovered clock is receiving timing from somewhere, either the backplane or fiber. This doesn’t directly tell you anything about the AMCs, JESDs, or LMKs.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
1 if link is up, 0 if link is down.
- Return type:
- get_timing_rx_dec_err_cnt(**kwargs)[source]¶
Gets decode error counter for received timing characters.
This counter increments every time the SMuRF carrier firmware tries to decode a 10-bit timing word but fails, implying the data must have gotten corrupted after transmission by the timing system.
Common causes of timing system error counter increments include bad network connections between the external timing system and the SMuRF system) and providing the wrong frequency or amplitude 122.88 MHz clock reference signal to the timing system.
Timing data is transmitted and received at a total data rate of 2.45 Gbps (requiring 10G SFPs and compatible fiber links between the external timing system and the SMuRF system(s)), and timing frames are transmitted and received at 480 kHz. The protocol used for communcation between the external timing and SMuRF system(s) is a serial 8B/10B encoding using the K-character symbols for byte and frame alignment. The encoding/decoding and byte alignment is supporte by common Xilinx IP.
Warning
An increment in any of the timing system error counters (obtainable through
get_timing_crc_err_cnt(),get_timing_rx_dec_err_cnt(), andget_timing_rx_dsp_err_cnt()) will cause a SMuRF timing firmware reset, resulting in a ~msec dropout of received timing data, including external triggers. Theget_timing_rx_rst_cnt()returns the value of the counter that increments everytime there is a reset. In streamed data triggering on external timing, this will look like jumps in time without corresponding dropped frames.- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
32-bit counter which increments every time the SMuRF carrier firmware fails to decode a 10-bit timing system word.
- Return type:
See also
get_timing_crc_err_cnt()Gets CRC error counter for received timing frames.
get_timing_rx_dsp_err_cnt()Gets disparity error counter for received timing characters.
get_timing_rx_rst_cnt()Gets timing data link reset counter.
- get_timing_rx_dsp_err_cnt(**kwargs)[source]¶
Gets disparity error counter for received timing characters.
When the timing system sends out a character it has the choice of two to send ; each valid character has a dedicated on/off bit. The timing system toggles this on/off bit every other character. The SMuRF carrier then keeps a running sum of how many on vs off bits it receives from the timing system. This disparity error counter increments every time the SMuRF carrier firmware detects too many “on” or “off” bits, registering that a timing character transmitted by the timing system must have gotten dropped.
Common causes of timing system error counter increments include bad network connections between the external timing system and the SMuRF system) and providing the wrong frequency or amplitude 122.88 MHz clock reference signal to the timing system.
Timing data is transmitted and received at a total data rate of 2.45 Gbps (requiring 10G SFPs and compatible fiber links between the external timing system and the SMuRF system(s)), and timing frames are transmitted and received at 480 kHz. The protocol used for communcation between the external timing and SMuRF system(s) is a serial 8B/10B encoding using the K-character symbols for byte and frame alignment. The encoding/decoding and byte alignment is supporte by common Xilinx IP.
Warning
An increment in any of the timing system error counters (obtainable through
get_timing_crc_err_cnt(),get_timing_rx_dec_err_cnt(), andget_timing_rx_dsp_err_cnt()) will cause a SMuRF timing firmware reset, resulting in a ~msec dropout of received timing data, including external triggers. Theget_timing_rx_rst_cnt()returns the value of the counter that increments everytime there is a reset. In streamed data triggering on external timing, this will look like jumps in time without corresponding dropped frames.- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
32-bit counter which increments every time the SMuRF system detects a disparity error in the stream of decoded timing characters.
- Return type:
See also
get_timing_crc_err_cnt()Gets CRC error counter for received timing frames.
get_timing_rx_dec_err_cnt()Gets decode error counter for received timing characters.
get_timing_rx_rst_cnt()Gets timing data link reset counter.
- get_timing_rx_rst_cnt(**kwargs)[source]¶
Gets timing data link reset counter.
An increment in any of the timing system error counters (obtainable through
get_timing_crc_err_cnt(),get_timing_rx_dec_err_cnt(), andget_timing_rx_dsp_err_cnt()) will cause a SMuRF timing firmware reset, resulting in a ~msec dropout of received timing data, including external triggers. This function returns the value of the counter that increments everytime there is a reset. In streamed data triggering on external timing, this will look like jumps in time without corresponding dropped frames.Common causes of timing system error counter increments which trigger timing data link resets include bad network connections between the external timing system and the SMuRF system) and providing the wrong frequency or amplitude 122.88 MHz clock reference signal to the timing system.
Timing data is transmitted and received at a total data rate of 2.45 Gbps (requiring 10G SFPs and compatible fiber links between the external timing system and the SMuRF system(s)), and timing frames are transmitted and received at 480 kHz. The protocol used for communcation between the external timing and SMuRF system(s) is a serial 8B/10B encoding using the K-character symbols for byte and frame alignment. The encoding/decoding and byte alignment is supporte by common Xilinx IP.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
32-bit counter which increments every time there is a timing data link reset.
- Return type:
See also
get_timing_crc_err_cnt()Gets CRC error counter for received timing frames.
get_timing_rx_dec_err_cnt()Gets decode error counter for received timing characters.
get_timing_rx_dsp_err_cnt()Gets disparity error counter for received timing characters.
- get_tone_file_path(bay, **kwargs)[source]¶
Get tone file path.
Returns the tone file path that’s currently being used for this bay.
- get_tone_frequency_offset_mhz(band, **kwargs)[source]¶
Gets the subband center frequency offsets in MHz.
Returns an array of precomputed frequency offsets from the band center for each subband. These are fixed by the channelizer architecture and are not user-configurable.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Array of subband center frequency offsets in MHz, relative to the band center.
- Return type:
array
See also
get_band_center_mhz()Gets the absolute band center frequency.
- get_tone_scale(band, **kwargs)[source]¶
Gets the tone output scaling before the synthesis filter bank.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Scale factor. 2-bit unsigned (0-3). Each increment doubles the output amplitude.
- Return type:
See also
set_tone_scale()Sets the value.
- get_trigger_daq(bay, **kwargs)[source]¶
Gets the DaqMux trigger state.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Current trigger state.
- Return type:
See also
set_trigger_daq()Triggers acquisition.
- get_trigger_delay(**kwargs)[source]¶
Gets the flux ramp trigger delay offset.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Trigger delay in timing clock ticks (default 122.88 MHz).
- Return type:
See also
set_trigger_delay()Sets this value.
- get_trigger_enable(chan, **kwargs)[source]¶
Get trigger pulse generation enable for requested channel.
The triggering firmware is broken into two parts: (1) the event selection logic “Channel”, and (2) the trigger pulse generation “Trigger”. This returns whether or not the “Trigger” component for the requested channel is enabled or disabled.
- get_trigger_hw_arm(bay, **kwargs)[source]¶
Gets the DaqMux hardware trigger arm state.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Current arm state.
- Return type:
See also
set_trigger_hw_arm()Arms the trigger.
- get_trigger_reset_delay(band, **kwargs)[source]¶
Gets the trigger reset delay for the flux ramp.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Delay in processing clock ticks (default 2.4 MHz clock).
- Return type:
See also
set_trigger_reset_delay()Sets this value.
- get_tune_file_path(**kwargs)[source]¶
Gets the path to the tune file.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Path to the tune file.
- Return type:
See also
set_tune_file_path()Sets the path.
- get_ultrascale_ot_upper_threshold(**kwargs)[source]¶
Gets the FPGA over-temperature shutdown threshold.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
Temperature threshold in degrees C.
- Return type:
See also
set_ultrascale_ot_upper_threshold()Sets this value.
- get_user_config0(as_binary=False, **kwargs)[source]¶
Gets the userConfig[0] timing frame header register.
A general-purpose 32-bit field embedded in the data stream timing frame. Individual bits are used as control flags by the SmurfProcessor (e.g. bit 0 resets unwrapping and averaging when toggled).
- Parameters:
as_binary (bool, optional, default False) – If True, returns the value as a binary string.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
val – Register value, or binary string if as_binary=True.
- Return type:
See also
set_user_config0()Sets the value.
clear_unwrapping_and_averages()Toggles bit 0.
- get_waveform_end_addr(bay, engine, convert=True, **kwargs)[source]¶
No description
- Parameters:
- Returns:
val – Waveform end address (a string of hex values if convert is False, otherwise an integer if convert is True).
- Return type:
- get_waveform_select(band, **kwargs)[source]¶
Gets the DAC output source selection for a band.
- Parameters:
band (int) – Which band.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caget call.
- Returns:
0 for DSP synthesis, 1 for waveform table (tone file).
- Return type:
See also
set_waveform_select()Sets this value.
- get_waveform_wr_addr(bay, engine, convert=True, **kwargs)[source]¶
No description
- Parameters:
- Returns:
val – Waveform end address (a string of hex values if convert is False, otherwise an integer if convert is True).
- Return type:
- open_data_file(**kwargs)[source]¶
Opens the SmurfProcessor output data file for writing.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
close_data_file()Close the file.
- reset_rtm(**kwargs)[source]¶
Resets the rear transition module (RTM) CPLD.
Asserts the CPLD reset line for 100 ms, which resets the flux ramp counter, bias DAC SPI state machines, and all CPLD control logic. After releasing reset, re-writes all RTM registers from cached values to restore prior state.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
set_cpld_reset()Direct control of the reset line.
cpld_toggle()Alias for this function.
- run_pwr_up_sys_ref(bay, **kwargs)[source]¶
Powers up the SYSREF signal on the LMK clock chip.
Restores the SYSREF output on the LMK048xx clock generator after power-down. SYSREF is required for JESD204b synchronization. Waits 5 seconds after issuing the command.
- Parameters:
bay (int) – Which bay (0 or 1).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
- run_serial_eta_scan(band, timeout=240, **kwargs)[source]¶
Does an eta scan serially across the entire band. You must already be tuned close to the resontor dip. Use run_serial_gradient_descent to get it.
- run_serial_gradient_descent(band, timeout=240, **kwargs)[source]¶
Does a gradient descent search for the minimum.
- save_config(val, **kwargs)[source]¶
Writes the current (un-masked) PyRogue settings to a yml file.
- Parameters:
val (str) – The path (including file name) to write the yml file to.
- save_state(val, **kwargs)[source]¶
Dumps all PyRogue state variables to a yml file.
- Parameters:
val (str) – The path (including file name) to write the yml file to.
- sel_ext_ref(bay, **kwargs)[source]¶
Selects this bay to trigger off of external reference (through front panel)
- Parameters:
bay (int) – Which bay to set to ext ref. Either 0 or 1.
- set_50k_amp_enable(disable=False)[source]¶
Deprecated. Use
set_amp_drain_enable()instead.
- set_50k_amp_gate_voltage(voltage, override=False)[source]¶
Deprecated. Use
set_amp_gate_voltage()instead.
- set_amp_defaults()[source]¶
Applies default gate bias to all cryogenic RF amplifiers.
Reads default gate voltages from the pysmurf cfg file and sets them. On C04/C05 revision cryostat cards, configures all four amplifier gates. Does not touch drain power supplies or drain voltages — call
set_amp_drain_voltage()separately after confirming gate bias is correct.Should be called when drain power supplies are disabled and RTM DAC outputs are enabled (typical state after boot).
See also
set_amp_drain_voltage()Set drain voltage (C04/C05).
set_amp_gate_voltage()Set individual gate voltage.
- set_amp_drain_enable(amp, enable)[source]¶
Enables or disables the drain power supply for a cryogenic RF amplifier.
On C04/C05 revision cryostat cards,
set_amp_drain_voltage()manages this automatically — call this directly only if you need explicit control. Depending on the RF amplifier, applying drain voltage with the gate at zero can cause significant current draw and heating in the cryostat.
- set_amp_drain_voltage(amp, volt, override=False)[source]¶
Sets the drain voltage for a cryogenic RF amplifier.
C04/C05 revision cryostat card only. Converts the requested drain voltage to the corresponding RTM DAC voltage using the linear calibration (m, b) from the pysmurf cfg file and writes it. If 0 V is requested, the drain power supply is disabled to prevent residual output. Allowable range differs between HEMT and 50K amplifiers — configure limits in the cfg file.
- Parameters:
amp (str) – Amplifier name: ‘hemt1’, ‘hemt2’, ‘50k1’, or ‘50k2’.
volt (float) – Desired drain voltage in volts. Must be within the range [drain_volt_min, drain_volt_max] configured in the cfg file, unless override is True.
override (bool, optional, default False) – If True, bypass the configured voltage range limits.
See also
get_amp_drain_voltage()Read back drain voltage.
set_amp_drain_enable()Direct enable/disable control.
- set_amp_gate_voltage(amp, voltage, override=False, **kwargs)[source]¶
Set the voltage out one of the RTM DACs, into the cryocard, such that the voltage out the cryocard is the given voltage. To do this, use the conversion factors “gate_bit_to_volt”. The gate conversion is computed analytically.
The DACs do not respond unless their DAC enable register is 0x2, enabled. The DACs still output voltage even if their enable register is 0xe, disabled.
- set_amplifier_bias(bias_hemt=None, bias_50k=None, **kwargs)[source]¶
Deprecated. Use
set_amp_gate_voltage()instead.
- set_amplitude_scale_array(band, val, **kwargs)[source]¶
Sets the tone amplitude for all channels in a band.
Writes the full array of per-channel amplitudes to firmware BRAM. Each value controls the drive power for that channel. Each step is 3 dB. Channels with amplitude 0 output no tone and are not processed by firmware.
- Parameters:
band (int) – Which band.
val (array-like) – Array of tone amplitudes, one per channel. 4-bit unsigned (0-15) per element.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_amplitude_scale_array()Gets all channel amplitudes.
set_amplitude_scale_channel()Sets one channel.
- set_amplitude_scale_array_currentchans(band, tone_power, **kwargs)[source]¶
Set only the currently on channels to a new drive power. Essentially a more convenient wrapper for set_amplitude_scale_array to only change the channels that are on.
- set_amplitude_scale_channel(band, channel, val, **kwargs)[source]¶
Sets the tone amplitude for a single channel.
Controls the drive power of the tone output for this channel. Each step is 3 dB. When set to 0, no tone is output and the channel is not processed by firmware.
- Parameters:
See also
get_amplitude_scale_channel()Gets this channel’s amplitude.
set_amplitude_scale_array()Sets all channels at once.
- set_analysis_scale(band, val, **kwargs)[source]¶
Sets the analysis filter bank output scaling.
Controls the output amplitude of the polyphase analysis (channelizer) filter bank. Each increment doubles the output amplitude. Too low risks overflow (check with the overflow status); too high loses dynamic range. Nominal value is 1.
- Parameters:
See also
get_analysis_scale()Gets the current analysis scale.
set_synthesis_scale()Sets the synthesis filter bank scaling.
- set_arm_hw_trigger(bay, val, **kwargs)[source]¶
Arms the DaqMux hardware trigger (alternate register).
- Parameters:
See also
set_trigger_hw_arm()Arms the hardware trigger.
set_trigger_daq()Software trigger for acquisition.
- set_band_center_mhz(band, val, **kwargs)[source]¶
Sets the band center frequency in MHz.
This is a software-only variable that records the absolute RF frequency of the band center (set by the LO). It does not write to hardware. Used for converting between channel offsets and absolute frequencies.
- Parameters:
See also
get_band_center_mhz()Gets the band center frequency.
get_tone_frequency_offset_mhz()Gets subband offsets.
- set_band_delay_us(band, val, **kwargs)[source]¶
Sets the total band delay compensation in microseconds.
Configures
refPhaseDelay,refPhaseDelayFine, andlmsDelaytogether to compensate for the system round-trip latency. Most users should callestimate_phase_delay(), which measures the delay and calls this function automatically.- Parameters:
See also
get_band_delay_us()Gets the current value.
estimate_phase_delay()Measures and sets the delay.
set_ref_phase_delay()Sets coarse delay directly.
set_ref_phase_delay_fine()Sets fine delay directly.
- set_bay_sel_stream(val, **kwargs)[source]¶
Set the bay selection for I/Q data streaming.
This function sets the bay selection for I/Q data streaming. When the modeStream register (set with
set_mode_stream()routine) is set to 1 (I/Q streaming mode), this parameter determines which bay’s I/Q data is streamed.If set to 0, the I/Q data from bay 0 is streamed, and if it is 1, the I/Q data from bay 1 is streamed instead.
- Parameters:
val (int) – The AMC bay to select for I/Q data streaming, either 0 or 1.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_bay_sel_stream()Get the current bay selection for I/Q data streaming.
get_mode_stream()Get the current data streaming mode.
set_mode_stream()Set the data streaming mode.
- set_center_frequency_array(band, val, **kwargs)[source]¶
Sets the tone center frequency for all channels in a band.
Each value is the frequency offset from the band center at which that channel’s tone is placed. This is the static tone position; the tracking loop adds corrections on top of this via the loop filter output. Typically set by
setup_notches().- Parameters:
band (int) – Which band.
val (array-like) – Array of center frequencies in MHz, one per channel. Range is +/-1.2 MHz (the half-bandwidth of one subband).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_center_frequency_array()Gets all center frequencies.
set_center_frequency_mhz_channel()Sets one channel.
setup_notches()Measures and sets tone positions.
- set_center_frequency_mhz_channel(band, channel, val, **kwargs)[source]¶
Sets the tone center frequency for a single channel.
Per-channel accessor for the same data as
set_center_frequency_array().- Parameters:
See also
get_center_frequency_mhz_channel()Gets this channel’s frequency.
set_center_frequency_array()Sets all channels at once.
- set_cfg_reg_ena_bit(val, **kwargs)[source]¶
Enables or disables the flux ramp.
Controls the flux ramp enable via the RTM SPI register interface. When enabled, the FPGA generates periodic trigger pulses that drive the RTM flux ramp DAC sawtooth waveform. Most users should use
flux_ramp_on()andflux_ramp_off()instead.- Parameters:
val (int) – 1 to enable the flux ramp, 0 to disable.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_cfg_reg_ena_bit()Gets the current state.
flux_ramp_on()Convenience wrapper to enable.
flux_ramp_off()Convenience wrapper to disable.
set_ramp_max_cnt()Sets the flux ramp frequency.
- set_channel_mask(mask, **kwargs)[source]¶
Set the smurf processor channel mask.
- Parameters:
mask (list) – The channel mask.
- set_check_jesd(max_timeout_sec=60.0, **kwargs)[source]¶
Runs JESD health check and returns status.
Toggles the pysmurf core code SmurfApplication:CheckJesd register, which triggers a call to the AppTop.JesdHealth method. The command will check if the Rogue ZIP file’s AppTop device contains the JesdHealth method, call it if it exists, and return the result.
The SmurfApplication:CheckJesd and SmurfApplication:JesdStatus (see
get_jesd_status()) registers are only present in pysmurf core code versions >=4.1.0 ; returns None if pysmurf core code version is <4.1.0. The AppTop.JesdHealth method is only present in Rogue ZIP file versions >=0.3.0 ; also returns None if the AppTop.JesdHealth method is not present in the Rogue ZIP file.- Parameters:
max_timeout_sec (float, optional, default 60.0) – Seconds to wait for JESD health check to complete before giving up.
**kwargs – Arbitrary keyword arguments. Passed directly to all _caget calls.
- Returns:
status – Returns JESD health status (see
get_jesd_status()for a description of the possible statuses). Returns None for pysmurf core code versions < 4.1.0 and Rogue ZIP file versions that do not have the AppTop.JesdHealth method.- Return type:
str or None
See also
get_jesd_status()Gets the status of the Rogue AppTop.JesdHealth method.
- set_counter_select(band, val, **kwargs)[source]¶
Set the value of the counterSelect register for a given band.
If this register is enabled, the value of I and Q will be substituted with the flux ramp frame counter. This makes it possible to see what frame the data belongs to, which is useful for debugging timing issues in the system.
WARNING: If the counter-substituted IQ streams are allowed to go through phase estimation and downstream filtering, they will be hard to interpret. You can disable those steps with the following code:
# disable downstream filtering S.set_filter_disable(True) S.set_downsample_factor(1) S._caput(S.smurf_processor + "Unwrapper:Disable",1) # select IQ streaming mode # bypasses CORDIC, send I and Q over both bays # in this case we select bands corresponding to bay 0 S._caput(f'{S.app_core}baySelStream', 0, write_log=True) S._caput(f'{S.app_core}modeStream', 1, write_log=True)
- set_cpld_reset(val, **kwargs)[source]¶
No description
- Parameters:
val (int) – Set to 1 for a cpld reset.
- set_crossbar_output_config(index, val, **kwargs)[source]¶
Sets the timing crossbar output configuration.
Configures the Microchip SY56040 timing signal routing crossbar, which determines how timing signals are routed between the RTM, FPGA, and ATCA backplane. Each output index selects which input source drives it:
Index 0: RTM_TIMING_OUT0 source
Index 1: FPGA_TIMING_OUT source
Index 2: Backplane DIST0 source
Index 3: Backplane DIST1 source
For each index, val selects the input:
0x0: RTM_TIMING_IN0
0x1: FPGA_TIMING_IN
0x2: BP_TIMING_IN
0x3: RTM_TIMING_IN1
- Parameters:
See also
get_crossbar_output_config()Gets the current config.
- set_cryo_card_delatch_bit(bit, write_log=False, enable_poll=False, disable_poll=False)[source]¶
Delatches the cryo card for a bit.
- Parameters:
bit (int) – The bit to temporarily delatch.
- set_cryo_card_ps_en(enable=3, write_log=False)[source]¶
Write the cryo card power supply enables. Can use this to set both power supplies at once rather than setting them individually
- Parameters:
enables (int, optional, default 3) –
2-bit number with status of the power supplies enables Bit 0 for HEMT supply Bit 1 for 50K supply Bit == 1 means enabled Bit == 0 means disabled
therefore: 0 = all off 1 = 50K on, HEMT off 2 = HEMT on, 50K off 3 = both on
Default (enable=3) turns on both power supplies.
- set_cryo_card_relay_bit(bitPosition, oneOrZero)[source]¶
Sets a single cryo card relay to the value provided
- set_cryo_card_relays(relay, write_log=False, enable_poll=False, disable_poll=False)[source]¶
Sets the cryo card relays
- Parameters:
relays (hex) – The cryo card relays
- set_dac_axil_addr(reg, val, **kwargs)[source]¶
Low-level function. Used internally by
set_tes_bias_bipolarandset_tes_bias_bipolar_arrayto route the RTM LUT to the correct DAC pair; users should not normally need to call this directly.Sets the DacAxilAddr[#] registers.
- set_dac_enable(bay, dac, val, **kwargs)[source]¶
Low-level function. The RF DAC enable is configured automatically during
setup(); users should not normally need to call this directly.Enables DAC
- set_dac_reset(bay, dac, val, **kwargs)[source]¶
Low-level function. Called from
SmurfControl.setup()to issue the physical reset to the RF DACs aftersetDefaults; users should not normally need to call this directly.Toggles the physical reset line to DAC. Set to 1 then 0
- set_data_buffer_size(bay, val, **kwargs)[source]¶
Sets the DaqMux data buffer size.
Sets the number of 32-bit words to capture in the DaqMux waveform buffer. Determines how many samples are collected per
take_debug_data()acquisition.- Parameters:
See also
take_debug_data()Triggers a data capture using this buffer.
- set_data_file_name(name, **kwargs)[source]¶
Set the data file name.
- Parameters:
str – The file name.
- set_data_out_mux(bay, b, val, **kwargs)[source]¶
Sets the JESD transmit output data source for a lane.
Selects what data is driven on the specified JESD transmit lane.
- Parameters:
See also
get_data_out_mux()Gets the current selection.
- set_debounce_width(val, **kwargs)[source]¶
Sets the external trigger debounce width.
Controls how many JESD clock cycles (see
get_digitizer_frequency_mhz()/ 2, default 307.2 MHz) the external flux ramp trigger input (LEMO1 on the RTM front panel) must be stable before being accepted as a valid trigger event. Only relevant when the ramp start mode is set to external triggering. Prevents spurious triggers from noisy input signals.- Parameters:
val (int) – Debounce count (16-bit unsigned). Debounce time = val / (get_digitizer_frequency_mhz() * 1e6 / 2).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_debounce_width()Gets the current debounce width.
set_enable_ramp_trigger()Enables trigger pulses.
- set_debug_select(bay, val, **kwargs)[source]¶
Selects which band’s debug data is routed to the DaqMux.
Each bay has 4 bands. This register selects which band’s debug output is routed to that bay’s DaqMux debug stream for acquisition via
take_debug_data().- Parameters:
See also
get_debug_select()Gets the current selection.
take_debug_data()Takes debug data.
- set_debug_timing_override(bay, ch, val, **kwargs)[source]¶
Set the value of the debug timing override register for a given bay and channel.
If this register is enabled, the value of Counter0 will be substituted for one of the data channels (e.g. I/Q or f/df). This is useful for debugging timing issues in the system, as it allows you to see the value of Counter0 in the data stream.
Counter0 increments at 480kHz and is reset by the PPS signal to the timing system.
- set_decimation(band, val, **kwargs)[source]¶
Sets the debug data decimation factor.
Direct divisor for the debug data output rate. The debug output rate is approximately
get_channel_frequency_mhz()/ 2 / decimation MHz. Minimum value is 1 (no decimation). Applied after the IIR filter set byset_filter_alpha().- Parameters:
See also
get_decimation()Gets this value.
set_filter_alpha()IIR filter applied before decimation.
take_debug_data()Takes data using this path.
- set_defaults_pv(max_timeout_sec=300.0, **kwargs)[source]¶
Loads the default configuration.
Calls the rogue setDefaults command, which loads the default software and hardware configuration.
If using pysmurf core code versions >=4.1.0 (as reported by
get_pysmurf_version()), returns True if the setDefaults command was successfully executed on the rogue side, or failed. Returns None for older versions.- Parameters:
max_timeout_sec (float, optional, default 300.0) – Seconds to wait for system to configure before giving up. Only used for pysmurf core code versions >= 4.1.0. The underlying process will give up after 240s by default, so if a shorter timeout is set here, it may not complete.
**kwargs – Arbitrary keyword arguments. Passed directly to all _caget calls.
- Returns:
success – Returns True if the system was successfully configured, otherwise returns False. Configuration checking is only implemented for pysmurf core code versions >= 4.1.0. If configuration validation is not available, returns None.
- Return type:
bool or None
See also
get_configuring_in_progress()Whether or not configuration process in progress.
get_system_configured()Returns final state of configuration process.
- set_downsample_external_bitmask(bitmask)[source]¶
Sets the external downsampler bitmask.
Only used when downsample mode is ‘external’. The SmurfProcessor reads timing bits from each frame header, ANDs them with this bitmask, and outputs a frame only when the result equals the bitmask (i.e. all masked bits are set simultaneously in that frame).
The timing bits are: bits [9:0] are fixed-rate markers (1, 2, 3, 4, 5, 6, 8, 10, 12, 15 kHz), bits [27:10] are sequencer markers. For example, bitmask = 0x1 triggers at 1 kHz (the rate of the first fixed-rate marker).
- Parameters:
bitmask (int) – 28-bit bitmask selecting which timing bits to match.
See also
get_downsample_external_bitmask()Gets this value.
set_downsample_mode()Must be ‘external’ for this to apply.
- set_downsample_factor(factor, get_nearby=False, desperation=2, **kwargs)[source]¶
Set the smurf processor down-sampling factor.
- Parameters:
int – The down-sampling factor.
get_nearby (bool) – If True, will try to find a bitmask close to the specified downsample factor if the given factor cannot be expressed
desperation (int) – Desparation factor used when finding nearby ds-factors. This limits how far the ds-factor can be from the one requested
- set_downsample_mode(mode)[source]¶
Sets the SmurfProcessor downsampler trigger mode.
In ‘internal’ mode, the downsampler outputs one frame every N input frames (N set by
set_downsample_factor()). In ‘external’ mode, the downsampler uses timing bits from the frame header to trigger output, allowing synchronization to external timing markers.- Parameters:
mode (str) – ‘internal’ or ‘external’.
See also
get_downsample_mode()Gets the current mode.
set_downsample_factor()Set internal decimation factor.
set_downsample_external_bitmask()Set timing bits for external mode.
- set_dsp_enable(band, val, **kwargs)[source]¶
Enables or disables baseband DSP processing for a band.
When disabled, the analysis and synthesis filter banks still run but the baseband processing (tone generation, tracking, feedback, streaming) is halted.
- Parameters:
See also
get_dsp_enable()Gets the current DSP enable state.
- set_enable_ramp_trigger(val, **kwargs)[source]¶
Enables or disables the flux ramp trigger pulses.
Controls the FPGA-side gate that allows ramp trigger pulses to reach the RTM. When disabled, no trigger pulses are generated regardless of the internal ramp counter or external trigger state.
- Parameters:
val (int) – 1 to enable trigger pulses, 0 to disable.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_enable_ramp_trigger()Gets the current state.
set_cfg_reg_ena_bit()Enables the flux ramp via SPI.
- set_eta_mag_array(band, val, **kwargs)[source]¶
Sets the eta magnitude for all channels in a band.
Eta is the complex calibration parameter that rotates the measured resonator I/Q response so that frequency detuning appears as a single-axis signal. It is stored in firmware as Cartesian components (etaI, etaQ). Setting the magnitude preserves the current phase and recomputes etaI and etaQ as mag * cos(phase) and mag * sin(phase). Typically determined by
setup_notches(), which callsrun_serial_eta_scan()internally.- Parameters:
band (int) – Which band.
val (array-like) – Array of eta magnitudes (real, positive), one per channel. Maximum safe value is ~2.0 (limited by the underlying etaI/etaQ registers). Setting above ~2.0 may overflow one component depending on phase.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_eta_mag_array()Gets the current eta magnitudes.
set_eta_phase_array()Sets the eta phases for all channels.
setup_notches()Measures and sets eta parameters.
- set_eta_mag_scaled_channel(band, channel, val, **kwargs)[source]¶
Sets the eta magnitude for a single channel.
Per-channel accessor for the same data as
set_eta_mag_array(). The “Scaled” name is historical; there is no additional scaling applied. Preserves the current eta phase and recomputes the underlying etaI and etaQ.- Parameters:
band (int) – Which band.
channel (int) – Which channel.
val (float) – Eta magnitude (real, positive). Maximum safe value is ~2.0 (limited by the underlying etaI/etaQ registers). Setting above ~2.0 may overflow one component depending on phase.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_eta_mag_scaled_channel()Gets this channel’s eta magnitude.
set_eta_phase_degree_channel()Sets this channel’s eta phase.
set_eta_mag_array()Sets all channels at once.
- set_eta_phase_array(band, val, **kwargs)[source]¶
Sets the eta phase for all channels in a band.
Eta is the complex calibration parameter that rotates the measured resonator I/Q response so that frequency detuning appears as a single-axis signal. It is stored in firmware as Cartesian components (etaI, etaQ). Setting the phase preserves the current magnitude and recomputes etaI and etaQ as mag * cos(phase) and mag * sin(phase). Typically determined by
setup_notches(), which callsrun_serial_eta_scan()internally.- Parameters:
band (int) – Which band.
val (array-like) – Array of eta phases in radians, one per channel.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_eta_phase_array()Gets the current eta phases.
set_eta_mag_array()Sets the eta magnitudes for all channels.
setup_notches()Measures and sets eta parameters.
- set_eta_phase_degree_channel(band, channel, val, **kwargs)[source]¶
Sets the eta phase for a single channel in degrees.
Preserves the current eta magnitude and recomputes the underlying etaI and etaQ. Note this accepts degrees, unlike
set_eta_phase_array()which uses radians.- Parameters:
See also
get_eta_phase_degree_channel()Gets this channel’s eta phase.
set_eta_mag_scaled_channel()Sets this channel’s eta magnitude.
set_eta_phase_array()Sets all channels (in radians).
- set_eta_scan_amplitude(band, val, **kwargs)[source]¶
Sets the tone amplitude used during eta scan or find-freq.
This value is written to each channel’s amplitudeScale register during
set_run_eta_scan()orset_run_serial_find_freq(). Same scale asset_amplitude_scale_channel()— 4-bit unsigned (0–15), 3 dB per step. Typical value is 12, which the firmware tone generation was optimized for for large numbers of tones.- Parameters:
See also
set_run_eta_scan()Single-channel eta scan using this amplitude.
set_run_serial_find_freq()Multi-channel find-freq using this amplitude.
- set_eta_scan_averages(band, val, **kwargs)[source]¶
Sets the number of frequency error averages for serial eta scan.
Used by
run_serial_eta_scan()to average multiple frequency error readings at each measurement point. Not used byset_run_eta_scan()(single-channel, no averaging).- Parameters:
See also
run_serial_eta_scan()Serial scan that uses this parameter.
- set_eta_scan_channel(band, val, **kwargs)[source]¶
Sets the channel for the single-channel eta scan.
Selects which channel
set_run_eta_scan()will operate on. The scan sweeps this channel through the frequencies inset_eta_scan_freq()and records the frequency error response.Not used by
set_run_serial_find_freq()orrun_serial_eta_scan(), which operate on all channels.- Parameters:
See also
set_run_eta_scan()Triggers the scan on this channel.
- set_eta_scan_del_f(band, val, **kwargs)[source]¶
Sets offset frequency for serial eta scan estimation.
The rogue serial eta scan routine (run using
run_serial_eta_scan()) estimates the eta parameter for each tone with nonzero amplitude in the provided band by sampling the frequency error at the tone frequency +/- this offset frequency. Units are Hz.- Parameters:
See also
run_serial_eta_scan()Runs rogue serial eta scan, which uses this parameter.
get_eta_scan_del_f()Gets the current value of this parameter in rogue.
- set_eta_scan_freq(band, val, **kwargs)[source]¶
Sets the frequency array for find-freq or single-channel eta scan.
Writes an array of scan frequencies in MHz (relative to subband center) into the rogue etaScanFreqs variable. How the array is interpreted depends on which scan is triggered:
set_run_serial_find_freq(): reshapes to (n_channels × scan_points_per_channel), sweeping each channel through its row. Channels with all-identical entries are skipped.set_run_eta_scan(): uses the array as a flat 1D sweep applied to the single channel selected byset_eta_scan_channel().
- Parameters:
band (int) – Which band.
val (numpy.ndarray) – Array of scan frequencies in MHz. For serial find-freq, flatten a (n_channels, n_scan_points) array before passing.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
set_run_serial_find_freq()Triggers multi-channel sweep.
set_run_eta_scan()Triggers single-channel sweep.
- set_evr_channel_reg_enable(chan, val, **kwargs)[source]¶
Set trigger channel enable.
The triggering firmware is broken into two parts: (1) the event selection logic “Channel”, and (2) the trigger pulse generation “Trigger”. Trigger pulse generation has several required inputs including which “Channel” to listen to. Setting this “Enable” register turns on the event selection logic for the requested channel.
- Parameters:
See also
get_evr_channel_reg_enable()Get trigger channel enable.
- set_evr_trigger_channel_reg_dest_sel(chan, val, **kwargs)[source]¶
Sets the EVR trigger channel destination select.
Selects the destination mask for the specified EVR channel. Used during timing setup to configure which events are routed to the flux ramp trigger.
- Parameters:
See also
set_evr_trigger_dest_type()Sets the destination type.
- set_evr_trigger_dest_type(chan, value, **kwargs)[source]¶
Set trigger channel destination type.
The triggering firmware is broken into two parts: (1) the event selection logic “Channel”, and (2) the trigger pulse generation “Trigger”. Trigger pulse generation has several required inputs including which “Channel” to listen to. The channel destination type, or DestType, is an optional logic selection (logical AND of) on the presence of a beam where this logic is also used for LCLS-2 on the accelerator. For SMuRF we always use destination 0 (=”All” if you’re looking at the SMuRF Rogue gui) which tells the trigger channel logic to ignore all beam logic (a better name for “All” would be “DontCare”.
- Parameters:
chan (int) – Which trigger event selection logic channel’s destination type to set.
val (int) – Destination type to set. Although valid options are 0, 1, 2 or 3, for SMuRF we always use 0 corresponding to “All” in the Rogue gui which instructs the channel to ignore any selection on the presence of beam.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_evr_trigger_dest_type()Get trigger channel destination type.
- set_fast_slow_rst_value(val, **kwargs)[source]¶
Sets the flux ramp counter reset value.
The value the RTM ramp DAC counter resets to at the start of each ramp cycle (on each trigger pulse). This sets the starting point of the sawtooth waveform.
- Parameters:
val (int) – Reset value (32-bit unsigned). The top 16 bits correspond to the DAC output at ramp start.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_fast_slow_rst_value()Gets the current reset value.
set_fast_slow_step_size()Sets the ramp step size.
- set_fast_slow_step_size(val, **kwargs)[source]¶
Sets the flux ramp step size.
Controls how much the RTM ramp DAC counter increments each clock tick. The counter clock is derived from the 307.2 MHz JESD clock divided by (lowCycle + highCycle + 2), defaulting to 51.2 MHz. The counter is 32 bits wide and the top 16 bits drive the DAC, so the effective DAC increment per tick is val / 2^16. Together with the ramp rate (
set_ramp_max_cnt()), this determines the peak-to-peak amplitude of the flux ramp sawtooth.- Parameters:
val (int) – Step size (32-bit unsigned).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_fast_slow_step_size()Gets the current step size.
set_fast_slow_rst_value()Sets the ramp reset value.
set_ramp_max_cnt()Sets the ramp repetition rate.
set_low_cycle()Sets the clock divider low phase.
set_high_cycle()Sets the clock divider high phase.
- set_feedback_enable(band, val, **kwargs)[source]¶
Sets the global feedback enable for a band.
When enabled (val=1), the tone-tracking loop applies frequency corrections to all channels that also have per-channel feedback enabled. When disabled (val=0), no tracking corrections are applied regardless of per-channel settings.
- Parameters:
See also
get_feedback_enable()Gets the global feedback enable state.
set_feedback_enable_channel()Sets per-channel feedback enable.
- set_feedback_enable_array(band, val, **kwargs)[source]¶
Sets the per-channel feedback enable for all channels in a band.
Writes an array of per-channel feedback enables to firmware BRAM. Each channel must have its individual feedback enabled here AND the global feedback enable must be set via
set_feedback_enable()for tracking to be active on that channel.- Parameters:
band (int) – Which band.
val (array-like) – Array of feedback enable values, one per channel. 1 to enable, 0 to disable.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_feedback_enable_array()Gets all per-channel enables.
set_feedback_enable()Sets the global feedback enable.
set_feedback_enable_channel()Sets a single channel’s enable.
- set_feedback_enable_channel(band, channel, val, **kwargs)[source]¶
Sets the feedback enable for a single channel.
The channel must have feedback enabled here AND the global feedback enable must be set via
set_feedback_enable()for tracking to be active on this channel.- Parameters:
See also
get_feedback_enable_channel()Gets this channel’s enable.
set_feedback_enable_array()Sets all channels at once.
set_feedback_enable()Sets the global feedback enable.
- set_feedback_end(band, val, **kwargs)[source]¶
Sets the sample count at which to stop applying feedback.
Defines the end of the feedback-active window within each flux ramp cycle. Firmware only applies tracking corrections between
feedbackStartandfeedbackEndsample counts.- Parameters:
band (int) – Which band.
val (int) – End sample count (32-bit unsigned). Units are ticks of the channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz) from the beginning of each flux ramp cycle.**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_feedback_end()Gets the current feedback end count.
set_feedback_start()Sets the start of the feedback window.
- set_feedback_gain(band, val, **kwargs)[source]¶
Sets the integral gain of the tracking feedback loop.
This gain scales the frequency error before it is accumulated into the loop filter output that adjusts each tone’s center frequency. Higher values increase loop bandwidth but reduce stability margin. Distinct from
lmsGain, which controls how quickly the LMS flux ramp harmonic estimator adapts;feedbackGaincontrols how aggressively tone frequencies are corrected based on the measured error.- Parameters:
See also
get_feedback_gain()Gets the current feedback gain.
set_feedback_limit()Sets the maximum feedback excursion.
set_lms_gain()Sets the LMS harmonic estimator step size.
- set_feedback_limit(band, val, **kwargs)[source]¶
Sets the maximum feedback excursion for tone tracking.
Limits how far the loop filter output can shift a tone’s frequency from its programmed center frequency. If the accumulated feedback would exceed this limit, it is clamped. This prevents the tracker from pulling tones too far off resonance during transients or instability.
- Parameters:
See also
get_feedback_limit()Gets the current feedback limit.
set_feedback_gain()Sets the feedback loop gain.
- set_feedback_polarity(band, val, **kwargs)[source]¶
Sets the global feedback polarity for a band.
Controls the sign of the feedback correction applied to tone frequencies. The correct polarity depends on the sign convention of the eta calibration and the physical wiring.
- Parameters:
See also
get_feedback_polarity()Gets the current feedback polarity.
set_feedback_enable()Global enable for the feedback loop.
- set_feedback_start(band, val, **kwargs)[source]¶
Sets the sample count at which to start applying feedback.
Defines the start of the feedback-active window within each flux ramp cycle. Firmware only applies tracking corrections between
feedbackStartandfeedbackEndsample counts, allowing the transient at the flux ramp reset to be blanked.- Parameters:
band (int) – Which band.
val (int) – Start sample count (32-bit unsigned). Units are ticks of the channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz) from the beginning of each flux ramp cycle.**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_feedback_start()Gets the current feedback start count.
set_feedback_end()Sets the end of the feedback window.
- set_filter_a(coef, **kwargs)[source]¶
Set the smurf processor filter A coefficients.
- Parameters:
coef (list) – The filter A coefficients.
- set_filter_alpha(band, val, **kwargs)[source]¶
Sets the IIR low-pass filter coefficient for debug data.
Applies a single-pole IIR low-pass filter to each channel’s debug data before decimation: y[n] = alpha * x[n] + (1 - alpha) * y[n-1]. Larger alpha values give less filtering (higher bandwidth). This filter is applied to multichannel debug readout and single-channel readout (Opt1). It is NOT applied to singleChannelReadoutOpt2 (which picks off before the filter at the full channel processing rate) or to the main streamed data path. Most users should use
set_debug_data_filter_cutoff()to set this by desired cutoff frequency in Hz.To visualize the filter response in Python:
from scipy.signal import freqz import matplotlib.pyplot as plt alpha = val / 65536 w, h = freqz([alpha], [1, -(1 - alpha)], fs=2.4e6) plt.semilogy(w, abs(h))
- Parameters:
band (int) – Which band.
val (int) – Filter coefficient. 16-bit unsigned integer (0-65535). val/65536 gives the effective alpha (e.g. 0x4000 gives alpha=0.25, f3dB ~110 kHz; 0x10000 would give alpha=1.0 but saturates at 0xFFFF).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_filter_alpha()Gets the current filter coefficient.
set_debug_data_filter_cutoff()Sets filter by cutoff frequency.
set_decimation()Sets the decimation after filtering.
set_single_channel_readout_opt2()Bypasses this filter.
take_debug_data()Takes data using this filter/decimation path.
- set_filter_b(coef, **kwargs)[source]¶
Set the smurf processor filter B coefficients.
- Parameters:
coef (list) – The filter B coefficients.
- set_filter_disable(disable_status, **kwargs)[source]¶
If Disable is set to True, then the filter is off. Incoming data to SmurfProcessor.cpp may still be downsampled, however, filtering would not be applied.
- Parameters:
bool – The status of the Disable bit.
- set_filter_gain(gain, **kwargs)[source]¶
Set the smurf processor filter gain.
- Parameters:
float – The filter gain.
- set_filter_order(order, **kwargs)[source]¶
Set the smurf processor filter order.
- Parameters:
int – The filter order.
- set_filter_reset(**kwargs)[source]¶
Resets the SmurfProcessor downsample filter.
Clears the filter state for all channels. One-shot command (no corresponding get).
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
set_unwrapper_reset()Reset the phase unwrapper.
set_filter_a()Set filter A coefficients.
set_filter_b()Set filter B coefficients.
- set_flux_ramp_dac(val, **kwargs)[source]¶
Sets the raw flux ramp DAC value.
Writes directly to the LTC1668 flux ramp DAC data register on the RTM. This value is only output to the DAC when
ModeControlis set to 1 (test mode) viaset_mode_control(). In normal operation (ModeControl= 0), the internal ramp counter drives the DAC and this value is ignored. The flux ramp does not need to be enabled for this static value to appear at the DAC output;ModeControl= 1 is sufficient.- Parameters:
val (int) – Raw DAC value. 16-bit unsigned (0-65535).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_flux_ramp_dac()Gets the current DAC value.
set_mode_control()Switches between ramp and static DAC modes.
- set_flux_ramp_freq(val, **kwargs)[source]¶
Sets flux ramp reset rate in kHz.
Sets the flux ramp reset rate. In units of kHz. Wrapper function for
set_ramp_max_cnt().The flux ramp reset rate is specified by setting the trigger repetition rate (the RampMaxCnt register in RtmCryoDet). RampMaxCnt is a 32-bit counter where each count represents a 307.2 MHz tick.
- Parameters:
val (float) – The frequency to set the flux ramp reset rate to in kHz.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
Note
Because RampMaxCnt is specified in 307.2 MHz ticks, the flux ramp rate must be an integer divisor of 307.2 MHz. For example, for this reason it is not possible to set the flux ramp rate to exactly 7 kHz.
set_flux_ramp_freq()rounds the RampMaxCnt computed for the desired flux ramp reset rate to the nearest integer using the built-in round routine, and if the computed RampMaxCnt differs from the rounded value, reports the flux ramp reset rate that will actually be programmed.Warning
If RampMaxCnt is set too low, then it will invert and produce a train of pulses 1x or 2x 307.2 MHz ticks wide, but it will be mostly high.
See also
get_flux_ramp_freqGets the flux ramp reset rate.
set_ramp_max_cntSets the flux ramp trigger repetition rate.
- set_gradient_descent_averages(band, val, **kwargs)[source]¶
Sets the number of averages for gradient estimation.
The gradient descent estimates the gradient by measuring frequency error at +/- an offset frequency. This sets how many measurements are averaged at each point to reduce noise.
- Parameters:
See also
get_gradient_descent_averages()Gets the current value.
run_serial_gradient_descent()Runs the gradient descent.
- set_gradient_descent_beta(band, val, **kwargs)[source]¶
Sets the decay rate for serial gradient descent.
Controls the exponential decay rate for the running averages in both optimizer modes (where
gainis set byset_gradient_descent_gain()):Momentum mode: v = beta*v + (1-beta)*gain*dx
Adaptive mode: cache = beta*cache + (1-beta)*dx^2
Values closer to 1.0 give more smoothing (longer memory), values closer to 0.0 give less smoothing.
- Parameters:
See also
get_gradient_descent_beta()Gets the current value.
set_gradient_descent_gain()Sets the gain multiplier.
set_gradient_descent_momentum()Sets the optimizer mode.
run_serial_gradient_descent()Runs the gradient descent.
- set_gradient_descent_converge_hz(band, val, **kwargs)[source]¶
Sets the convergence threshold for serial gradient descent.
The gradient descent stops when the frequency step size falls below this threshold, indicating convergence.
- Parameters:
See also
get_gradient_descent_converge_hz()Gets the current value.
run_serial_gradient_descent()Runs the gradient descent.
set_gradient_descent_max_iters()Sets the max iterations.
- set_gradient_descent_gain(band, val, **kwargs)[source]¶
Sets the gain (learning rate) for serial gradient descent.
Scales the gradient before applying it as a frequency correction step. Larger values converge faster but risk overshooting. In momentum mode: v = beta*v + (1-beta)*gain*dx.
- Parameters:
See also
get_gradient_descent_gain()Gets the current value.
set_gradient_descent_beta()Sets the decay rate.
run_serial_gradient_descent()Runs the gradient descent.
- set_gradient_descent_max_iters(band, val, **kwargs)[source]¶
Sets the maximum iterations for serial gradient descent.
The gradient descent will stop after this many iterations even if it has not converged.
- Parameters:
See also
get_gradient_descent_max_iters()Gets the current value.
run_serial_gradient_descent()Runs the gradient descent.
set_gradient_descent_converge_hz()Sets the convergence threshold.
- set_gradient_descent_momentum(band, val, **kwargs)[source]¶
Sets the optimizer mode for serial gradient descent.
When set to 1, uses momentum (exponential moving average of gradients for smoother convergence). When set to 0, uses an adaptive step size that scales inversely with the history of past gradients.
- Parameters:
See also
get_gradient_descent_momentum()Gets the current value.
set_gradient_descent_beta()Sets the decay rate for both modes.
run_serial_gradient_descent()Runs the gradient descent.
- set_gradient_descent_step_hz(band, val, **kwargs)[source]¶
Sets the offset frequency for gradient estimation.
The gradient is estimated by measuring frequency error at +/- this offset from the current center frequency.
- Parameters:
See also
get_gradient_descent_step_hz()Gets the current value.
run_serial_gradient_descent()Runs the gradient descent.
- set_hemt_bias(voltage, override=False)[source]¶
Deprecated. Use
set_amp_gate_voltage()instead.
- set_hemt_enable(disable=False)[source]¶
Deprecated. Use
set_amp_drain_enable()instead.
- set_hemt_gate_voltage(voltage, override=False)[source]¶
Deprecated. Use
set_amp_gate_voltage()instead.
- set_high_cycle(val, **kwargs)[source]¶
Sets the RTM clock high cycle duration.
Along with
set_low_cycle(), sets the frequency of the RTM CPLD clock. The RTM clock frequency is jesdClk / (LowCycle + HighCycle + 2), where jesdClk isget_digitizer_frequency_mhz()/ 2 (default 307.2 MHz). Zero inclusive (a value of 0 means 1 tick high).- Parameters:
val (int) – High cycle duration in jesdClk ticks (zero inclusive). 8-bit unsigned (0–255).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
set_low_cycle()Sets the low cycle duration.
- set_input_mux_sel(bay, lane, val, **kwargs)[source]¶
Selects the data source for a DaqMux buffer lane.
The DaqMux routes internal firmware signals to acquisition buffers for debug data capture. Mapping (with InputMuxSel enum offset of 2):
0: Disabled
1: Test (incrementing counter pattern)
2-11: ADC lanes 0-9 (I/Q pairs for each converter)
12-21: DAC lanes 0-9 (I/Q pairs for each converter)
22-25: Debug outputs 0-3 (content depends on
set_iq_stream_enable()andset_rf_iq_stream_enable(); band selected byset_debug_select())
Typically configured automatically by
take_debug_data().- Parameters:
See also
get_input_mux_sel()Gets the current selection.
set_debug_select()Selects which band’s debug routes to DaqMux.
take_debug_data()Sets this up automatically.
- set_iq_stream_enable(band, val, **kwargs)[source]¶
Selects between frequency and demodulated I/Q debug output.
Toggles what data the debug readout path returns. When disabled (val=0), the system returns frequency (F) and frequency error (dF) streams. When enabled (val=1), the system returns the demodulated flux ramp I/Q from the LMS harmonic estimator — the detector signal expressed as I and Q components. This is distinct from
set_rf_iq_stream_enable(), which outputs the raw RF I/Q from the digital downconverter before any tracking or demodulation.- Parameters:
See also
get_iq_stream_enable()Gets the current state.
set_rf_iq_stream_enable()Selects raw RF I/Q output.
take_debug_data()Takes data in the selected mode.
- set_iq_swap_in(band, val, **kwargs)[source]¶
Swaps I and Q on the analysis filter bank input.
Swapping I and Q flips the input spectrum around the band center frequency. Used to correct for hardware-dependent sideband conventions. Set per-band in the pysmurf configuration file.
- Parameters:
See also
set_iq_swap_out()Swaps I/Q on the synthesis output.
- set_iq_swap_out(band, val, **kwargs)[source]¶
Swaps I and Q on the synthesis filter bank output.
Swapping I and Q flips the output spectrum around the band center frequency. Used to correct for hardware-dependent sideband conventions.
- Parameters:
See also
get_iq_swap_out()Gets the current state.
set_iq_swap_in()Swaps I/Q on the analysis input.
- set_jesd_rx_enable(bay, val, **kwargs)[source]¶
Sets the JESD receive lane enable mask for a bay.
Each bit enables one JESD204b receive lane (ADC data into the FPGA). Only 8 of the 10 available lanes are used per bay; the active mask depends on the hardware configuration.
- Parameters:
See also
get_jesd_rx_enable()Gets the current enable mask.
set_jesd_tx_enable()Sets the JESD transmit lane mask.
get_jesd_rx_data_valid()Checks if receive data is valid.
- set_jesd_tx_enable(bay, val, **kwargs)[source]¶
Sets the JESD transmit lane enable mask for a bay.
Each bit enables one JESD204b transmit lane (DAC data out of the FPGA). Only 8 of the 10 available lanes are used per bay; the active mask depends on the hardware configuration.
- Parameters:
See also
get_jesd_tx_enable()Gets the current enable mask.
set_jesd_rx_enable()Sets the JESD receive lane mask.
get_jesd_tx_data_valid()Checks if transmit data is valid.
- set_lmk_enable(bay, val, **kwargs)[source]¶
Enable the AMC LMK in bay 0. On boot, the LMK is enabled, however once the DACS are reset on SmurfControl.setup the LMK is disabled. If you need to modify LMK values, this value must be 1.
- set_lmk_reg(bay, reg, val, **kwargs)[source]¶
Sets a register on the LMK clock distribution chip.
Low-level access to individual registers of the LMK jitter cleaner on the specified AMC bay. The LMK generates and distributes clocks and JESD204B SYSREF signals to the ADC and DAC chips on the ADC/DAC card.
- Parameters:
See also
get_lmk_reg()Read back a register.
- set_lms_delay(band, val, **kwargs)[source]¶
Sets the LMS loop delay compensation.
Compensates for the round-trip latency of the system (ADC through channelizer, DSP processing, and back through the synthesis filter bank to DAC) so that the feedback correction is applied at the correct phase of the flux ramp. Typically set equal to
refPhaseDelay. Most users should callestimate_phase_delay(), which measures the system latency and sets this register (along withrefPhaseDelayandrefPhaseDelayFine) automatically.- Parameters:
band (int) – Which band.
val (int) – Delay in channel processing rate ticks (see
get_channel_frequency_mhz(), default 2.4 MHz). 6-bit unsigned (0-63).**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_lms_delay()Gets the current LMS delay.
estimate_phase_delay()Measures and sets the system latency.
set_band_delay_us()Sets all delay registers directly.
- set_lms_enable1(band, val, **kwargs)[source]¶
Enables or disables 1st harmonic tracking.
When enabled, the LMS adaptive filter tracks the fundamental frequency of the flux ramp modulation. The fundamental frequency is set by
set_lms_freq_hz().- Parameters:
See also
get_lms_enable1()Gets the current state.
set_lms_enable2()Enables 2nd harmonic tracking.
set_lms_enable3()Enables 3rd harmonic tracking.
set_lms_freq_hz()Sets the fundamental tracking frequency.
- set_lms_enable2(band, val, **kwargs)[source]¶
Enables or disables 2nd harmonic tracking.
When enabled, the LMS adaptive filter tracks the 2nd harmonic (2x the fundamental frequency) of the flux ramp modulation.
- Parameters:
See also
get_lms_enable2()Gets the current state.
set_lms_enable1()Enables 1st harmonic tracking.
set_lms_enable3()Enables 3rd harmonic tracking.
- set_lms_enable3(band, val, **kwargs)[source]¶
Enables or disables 3rd harmonic tracking.
When enabled, the LMS adaptive filter tracks the 3rd harmonic (3x the fundamental frequency) of the flux ramp modulation.
- Parameters:
See also
get_lms_enable3()Gets the current state.
set_lms_enable1()Enables 1st harmonic tracking.
set_lms_enable2()Enables 2nd harmonic tracking.
- set_lms_freq(band, val, **kwargs)[source]¶
Sets the LMS tracking frequency in raw firmware units.
The LMS frequency is the fundamental frequency at which the tracker demodulates the flux ramp signal. It should equal the flux ramp rate times the number of flux quanta per ramp cycle (nPhi0). Most users should use
set_lms_freq_hz()which accepts Hz directly.- Parameters:
band (int) – Which band.
val (int) – LMS frequency as a fraction of the channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz). 24-bit unsigned (0 to 2^24-1). To convert to Hz: val * get_channel_frequency_mhz() * 1e6 / 2^24.**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_lms_freq()Gets the current raw LMS frequency.
set_lms_freq_hz()Sets the LMS frequency in Hz.
get_channel_frequency_mhz()Gets the channel processing rate.
- set_lms_freq_hz(band, val, **kwargs)[source]¶
Sets the LMS tracking frequency in Hz.
The LMS frequency is the fundamental frequency at which the tracker demodulates the flux ramp signal. It should equal the flux ramp rate times the number of flux quanta per ramp cycle (nPhi0). This is a convenience wrapper that handles the conversion from Hz to raw firmware units.
- Parameters:
band (int) – Which band.
val (float) – LMS frequency in Hz. Range is 0 to just under the channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz), with resolution of ~0.14 Hz. Typical values are in the kHz range.**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_lms_freq_hz()Gets the LMS frequency in Hz.
set_lms_freq()Sets the LMS frequency in raw units.
- set_lms_gain(band, val, **kwargs)[source]¶
Sets the LMS tracking loop gain.
Controls the step size of the LMS adaptive filter that estimates flux ramp harmonic coefficients. The gain is applied as a power-of-2 bit shift, so the effective gain is 2^val. Larger values make the harmonic estimator adapt faster but can cause instability.
- Parameters:
See also
get_lms_gain()Gets the current LMS gain.
set_feedback_gain()Sets the integrator gain (distinct from LMS).
set_lms_enable1()Enables 1st harmonic tracking.
- set_load_tune_file(band, val, **kwargs)[source]¶
Triggers loading the tune file into firmware registers.
When set to 1, PyRogue reads the tune file (set by
set_tune_file_path()) and writes the per-channel eta, center frequency, amplitude, and feedback enable parameters to firmware BRAM for the specified band.- Parameters:
See also
set_tune_file_path()Sets the tune file path.
load_tune()Higher-level tune loading function.
- set_low_cycle(val, **kwargs)[source]¶
Sets the RTM clock low cycle duration.
Along with
set_high_cycle(), sets the frequency of the RTM CPLD clock. The RTM clock frequency is jesdClk / (LowCycle + HighCycle + 2), where jesdClk isget_digitizer_frequency_mhz()/ 2 (default 307.2 MHz). Zero inclusive (a value of 0 means 1 tick low).- Parameters:
val (int) – Low cycle duration in jesdClk ticks (zero inclusive). 8-bit unsigned (0–255).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
set_high_cycle()Sets the high cycle duration.
- set_max_file_size(size, **kwargs)[source]¶
Set maximum file size for streamed data.
If nonzero, when streaming data to disk, will split data over files of this size, in bytes. Files have the usual name but with an incrementing integer appended at the end, e.g. .dat.1, .dat.2, etc..
- Parameters:
size (int) – Number of bytes to limit the size of each file streamed to disk to before rolling over into a new file. If zero, no limit.
See also
get_max_file_size()Get maximum file size for streamed data.
- set_mcetransmit_debug(val, **kwargs)[source]¶
Sets the mcetransmit debug bit. If 1, the debugger will print to the pyrogue screen.
- Parameters:
val (int) – 0 or 1 for the debug bit.
- set_mode_control(val, **kwargs)[source]¶
Sets the RTM DAC output mode.
Switches the RTM between normal operation (flux ramp counter drives the ramp DAC) and test/load mode (DACs are programmed directly from control registers). In test mode, the flux ramp DAC outputs the static value from
set_flux_ramp_dac(), and direct SPI programming of bias DACs is enabled.- Parameters:
val (int) – 0 for normal operation (flux ramp output), 1 for test/load mode (direct DAC programming).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_mode_control()Gets the current mode.
set_flux_ramp_dac()Sets the static ramp DAC value for test mode.
- set_mode_stream(val, **kwargs)[source]¶
Set the mode for data streaming.
This function sets the mode for data streaming. If the mode is set to 0 (the default mode), the demodulated flux ramp phase will be streamed for each channel. If the mode is set to 1, the raw RF I and Q values will be streamed for each channel.
When the mode is set to 1 (I/Q streaming mode), the baySelStream register, which can be set using the
set_bay_sel_stream()routine, determines which bay’s I/Q data is streamed. If baySelStream is 0, the I/Q data from bay 0 is streamed, and if it is 1, the I/Q data from bay 1 is streamed.In I/Q streaming mode (modeSelStream=1), the I/Q data is truncated by a separate register, lmsGain, which can be set and retrieved using the set_lms_gain and get_lms_gain functions.
When using the
take_stream_data()and theread_stream_data()routines in I/Q streaming mode (modeSelStream=1), the IQ_mode input keyword must be set to True to account for the different channel mapping.- Parameters:
val (int) – The mode to set, either 0 (default mode) or 1 (I/Q streaming mode).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_mode_stream()Get the current data streaming mode.
get_lms_gain()Gets the current value of the lmsGain register.
set_lms_gain()Sets the value of the lmsGain register.
read_stream_data()Loads data taken with the take_stream_data function.
take_stream_data()Takes streaming data for a given amount of time.
set_bay_sel_stream()Set the bay selection for I/Q data streaming.
get_bay_sel_stream()Get the current bay selection for I/Q data streaming.
- set_noise_select(band, val, **kwargs)[source]¶
Enables or disables random noise output on the RF DACs.
When enabled, firmware replaces the normal resonator tracking tones with pseudo-random noise (uniformly distributed) on the RF output for this band. This outputs broadband noise across the 500 MHz band instead of discrete tones. The noise is generated digitally by an FPGA shift-register PRNG, not by the DAC hardware. Used for system diagnostics such as measuring the RF transfer function.
- Parameters:
See also
get_noise_select()Gets the current noise select state.
set_waveform_select()Selects preloaded waveform output instead.
set_rf_enable()Enables/disables RF output entirely.
- set_payload_size(payload_size, **kwargs)[source]¶
The payload size defines the number of available channels to write to disk/stream. Payload size must be larger than the number of channels going into the channel mapper
- Parameters:
int – The number of channels written to disk. This is independent of the number of active channels.
- set_postdata_emulator_amplitude(val, **kwargs)[source]¶
Sets the post-data emulator signal amplitude.
The post-data emulator injects synthetic test data into the streaming pipeline after data processing.
- Parameters:
val (float) – Signal amplitude.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_postdata_emulator_amplitude()Gets the current value.
set_postdata_emulator_enable()Enables the emulator.
- set_postdata_emulator_enable(val, **kwargs)[source]¶
Enables or disables the post-data emulator.
- Parameters:
val (int) – 1 to enable, 0 to disable.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_postdata_emulator_enable()Gets the current state.
set_postdata_emulator_amplitude()Sets the signal amplitude.
- set_postdata_emulator_offset(val, **kwargs)[source]¶
Sets the post-data emulator signal offset.
- Parameters:
val (float) – Signal DC offset.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_postdata_emulator_offset()Gets the current value.
- set_postdata_emulator_period(val, **kwargs)[source]¶
Expressed as the number of incoming frames. It must be greater that 2. This period will be expressed in terms of the downsampler periods. Note that this is different from the predata emulator.
- Parameters:
val (int) – Number of frames that make up a period.
- set_postdata_emulator_type(val, **kwargs)[source]¶
No description
- Parameters:
val (str) – The data type. Choices are - Zeros, ChannelNumber, Random, Square, Sawtooth, Triangle, Sine, and DropFrame
- set_predata_emulator_amplitude(val, **kwargs)[source]¶
Sets the pre-data emulator signal amplitude.
The pre-data emulator injects synthetic test data into the streaming pipeline before data processing.
- Parameters:
val (float) – Signal amplitude.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_predata_emulator_amplitude()Gets the current value.
set_predata_emulator_enable()Enables the emulator.
- set_predata_emulator_disable(val, **kwargs)[source]¶
Sets the predata emulator disable status.
- Parameters:
val (bool)
- set_predata_emulator_enable(val, **kwargs)[source]¶
Enables or disables the SmurfProcessor pre-data emulator.
When enabled, the emulator generates synthetic data frames upstream of the SmurfProcessor for testing without hardware.
- Parameters:
val (int) – 1 to enable, 0 to disable.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_predata_emulator_enable()Gets the enable state.
- set_predata_emulator_offset(val, **kwargs)[source]¶
Sets the pre-data emulator signal offset.
- Parameters:
val (float) – Signal DC offset.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_predata_emulator_offset()Gets the current value.
- set_predata_emulator_period(val, **kwargs)[source]¶
Expressed as the number of incoming frames. It must be greater that 2. This period will be expressed in term of the period of the received frames, which in turn is related to the flux ramp period.
- Parameters:
val (int) – Number of frames that make up a period.
- set_predata_emulator_type(val, **kwargs)[source]¶
No description
- Parameters:
val (str) – The data type. Choices are - Zeros, ChannelNumber, Random, Square, Sawtooth, Triangle, Sine, and DropFrame
- set_pulse_width(val, **kwargs)[source]¶
Sets the flux ramp pulse width on the RTM.
Width of the start ramp pulse sent to the CPLD, in units of jesdClk =
get_digitizer_frequency_mhz()/ 2 (default 307.2 MHz), same clock asset_low_cycle()andset_high_cycle(). Typical value is 64.- Parameters:
val (int) – Pulse width in jesdClk ticks (default 307.2 MHz). 16-bit unsigned (0–65535).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
- set_ramp_max_cnt(val, **kwargs)[source]¶
Sets the internal flux ramp maximum count.
Controls the flux ramp reset rate when using internal triggering (RampStartMode = 0). The ramp resets every (RampMaxCnt + 1) jesdClk cycles, giving a reset rate of
get_digitizer_frequency_mhz()/ 2 / (RampMaxCnt + 1) MHz. For example, with the default 614.4 MHz digitizer clock, RampMaxCnt = 307199 gives 1 kHz.- Parameters:
val (int) – Maximum count (32-bit unsigned).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_ramp_max_cnt()Gets this value.
set_ramp_rate()Set rate via timing system instead.
- set_ramp_rate(val, **kwargs)[source]¶
Sets the flux ramp reset rate via the timing system.
Only applies when using the timing system as the ramp trigger source (RampStartMode = 1, see
set_ramp_start_mode()). When using internal triggering, the ramp rate is instead determined byset_low_cycle()andset_high_cycle().The timing system only supports discrete rates: 1, 2, 3, 4, 5, 6, 8, 10, 12, 15 kHz.
- Parameters:
See also
get_ramp_rate()Gets the timing system rate setting.
set_ramp_start_mode()Select trigger source.
- set_ramp_slope(val, **kwargs)[source]¶
Sets the flux ramp slope polarity.
Controls whether the flux ramp sawtooth waveform ramps up (positive slope) or down (negative slope).
- Parameters:
val (int) – 0 for positive slope, 1 for negative slope.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_ramp_slope()Gets the current slope polarity.
set_cfg_reg_ena_bit()Enables/disables the flux ramp.
- set_ramp_start_mode(val, **kwargs)[source]¶
Sets the flux ramp trigger source.
- Parameters:
val (int) – 0 for internal trigger, 1 for timing system trigger, 2 for external trigger.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
- set_read_all(**kwargs)[source]¶
Reads all registers from hardware into the rogue server cache.
Necessary to update registers that have pollInterval=0 (no automatic polling). Blocks for 20 seconds after issuing the command to allow the read to complete.
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
- set_readout_channel_select(band, channel, **kwargs)[source]¶
Selects which channel to output in single-channel debug mode.
Only used when single-channel readout is enabled via
set_single_channel_readout(). Not all channel indices produce valid data; usewhich_on()to find channels with nonzero tone power, andget_processed_channels()to find which channel indices are processed by the channelizer.- Parameters:
band (int) – Which band.
channel (int) – Which channel. Range is 0 to
get_number_channels()- 1 (default firmware has 512 channels per band).**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_readout_channel_select()Gets the selected channel.
set_single_channel_readout()Enables single-channel debug mode.
which_on()Returns channels with nonzero amplitude.
get_processed_channels()Returns valid channel indices.
- set_readout_delay(delay, **kwargs)[source]¶
Set the value of a programmable delay between the startRamp pulse and when the readout FSM is triggered.
The delay step is based on the AXI-Lite clock and its frequency is 156.25MHz (1/6.4ns)
https://github.com/slaclab/cryo-det/blob/main/firmware/common/shared/rtl/CryoStream.vhd#L36 https://github.com/slaclab/cryo-det/blob/main/firmware/common/DspCoreLib/CryoDetCmbHcd/rtl/DspCoreWrapper.vhd#L234 https://github.com/slaclab/cryo-det/blob/main/firmware/common/DspCoreLib/CryoDetCmbHcd/rtl/DspCoreWrapper.vhd#L44 https://github.com/slaclab/cryo-det/blob/main/firmware/common/MicrowaveMuxApp/AppCore/hdl/AppCore.vhd#L317 https://github.com/slaclab/cryo-det/blob/main/firmware/common/MicrowaveMuxApp/AppCore/hdl/AppCore.vhd#L222
- set_ref_phase_delay(band, val, **kwargs)[source]¶
Sets the coarse reference phase delay.
Compensates for system round-trip latency at coarse resolution (channel processing rate ticks, see
get_channel_frequency_mhz(), default 2.4 MHz).refPhaseDelayFineadds sub-tick correction at the JESD clock rate (seeget_digitizer_frequency_mhz()/ 2, default 307.2 MHz), andlmsDelay(set to the same value) aligns the LMS tracking loop separately. Most users should callestimate_phase_delay(), which measures and sets all three automatically.- Parameters:
See also
get_ref_phase_delay()Gets the current value.
set_ref_phase_delay_fine()Sets the fine correction.
set_band_delay_us()Sets all delay registers together.
estimate_phase_delay()Measures and sets system latency.
- set_ref_phase_delay_fine(band, val, **kwargs)[source]¶
Sets the fine reference phase delay.
Fine correction to the DAC output timing at the JESD clock rate (see
get_digitizer_frequency_mhz()/ 2, default 307.2 MHz, ~3.25 ns steps). Compensates for the rounding ofrefPhaseDelayto the coarser channel processing rate grid. Most users should callestimate_phase_delay(), which measures and sets this automatically.- Parameters:
See also
get_ref_phase_delay_fine()Gets the current value.
set_ref_phase_delay()Sets the coarse delay.
estimate_phase_delay()Measures and sets system latency.
- set_rf_enable(band, val, **kwargs)[source]¶
Enables or disables RF DAC output for a band.
When set to 0, the DAC outputs all zeros regardless of the DSP or waveform table state. When set to 1, the DAC outputs from whichever source is selected (
set_waveform_select(),set_noise_select(), or DSP synthesis).- Parameters:
See also
set_waveform_select()Selects DSP vs. tone file output.
set_noise_select()Selects random noise output.
- set_rf_iq_stream_enable(band, val, **kwargs)[source]¶
Selects raw RF I/Q debug output from the analysis filter bank.
When enabled (val=1), the debug readout path returns the raw I/Q output from the analysis filter bank (digital downconverter), before any tracking or flux ramp demodulation. This and
set_iq_stream_enable()are two bits of the same mux select in firmware — do not enable both simultaneously. Used withtake_debug_data()for diagnostics like measuring ADC power or verifying tone placement.- Parameters:
See also
set_iq_stream_enable()Selects demodulated I/Q instead.
take_debug_data()Takes data in the selected mode.
- set_rtm_arb_waveform_continuous(val, **kwargs)[source]¶
If =1, RTM arbitrary waveform generation is continuous and repeats, otherwise if =0, waveform in LUT tables is only broadcast once on software trigger.
- Parameters:
val (int) – Whether or not arbitrary waveform generation is continuous on software trigger. Must be in [0,1].
- set_rtm_arb_waveform_enable(val, **kwargs)[source]¶
Sets the enable for generation of arbitrary waveforms on the RTM slow DACs.
- Parameters:
val (int) – The value to set enable to. EnableCh = 0x0 is disable, 0x1 is Addr[0], 0x2 is Addr[1], and 0x3 is Addr[0] and Addr[1]
- set_rtm_arb_waveform_lut_table(reg, arr, pad=0, **kwargs)[source]¶
Loads provided array into the LUT table indexed by reg. If array is empty, loads zeros into table. If array exceeds maximum length of 2048 entries, array is truncated. If array is less than 2048 entries, the table is padded on the end with the value in the pad argument.
- set_rtm_arb_waveform_max_addr(val, **kwargs)[source]¶
Slow RTM DACs will play the sequence [0…MaxAddr] of points out of the loaded LUT tables before stopping or repeating on software trigger (if in continuous mode). MaxAddr is an 11-bit number (must be in [0,2048), because that’s the maximum length of the LUT tables that store the waveforms.
- Parameters:
val (int) – The value to set MaxAddr to. Must be an integer in [0,2048).
- set_rtm_arb_waveform_timer_size(val, **kwargs)[source]¶
Arbitrary waveforms are written to the slow RTM DACs with time between samples TimerSize*6.4ns.
- Parameters:
val (int) – The value to set TimerSize to. Must be an integer in [0,2**24).
- set_rtm_slow_dac_data(dac, val, **kwargs)[source]¶
Sets the data register for the requested DAC, which sets the output voltage of the DAC.
- Parameters:
- set_rtm_slow_dac_data_array(val, **kwargs)[source]¶
Sets the data registers for all 32 DACs, which sets their output voltages. Must provide all 32 values.
- Parameters:
val (int array) – The DAC voltages to set in DAC units. Each element of the array must Must be in [-2^19,2^19). If a requested value is less (greater) than -2^19 (2^19-1), sets that DAC to -2^19 (2^19-1). (32,) in DAC units. If provided array is not 32 elements long, asserts.
- set_rtm_slow_dac_enable(dac, val=2, **kwargs)[source]¶
Set DacCtrlReg for this DAC, which configures the AD5790 analog output for the requested DAC number. Set to 0x2 to enable for normal operation, which only needs to be done once for each DAC in a boot session.
- set_rtm_slow_dac_enable_array(val, **kwargs)[source]¶
Sets DacCtrlReg for all of the DACs at once. DacCtrlReg configures the AD5790 analog outputs. Setting to 0x2 enables normal operation, and only needs to be done once for each DAC in a boot session. Writing the values as an array should be much faster than writing them to each DAC individually using the set_rtm_slow_dac_enable function (single versus multiple transactions).
- Parameters:
val (int array) – Length 32, addresses the DACs in DAC ordering. If provided array is not length 32, asserts. Power on default is 0xE, enabled is 0x2, disable is 0xE.
- set_rtm_slow_dac_volt_array(val, **kwargs)[source]¶
Sets the output voltage for all 32 DACs at once. Writing the values as an array should be much faster than writing them to each DAC individually using the set_rtm_slow_dac_volt function (single versus multiple transactions).
- Parameters:
val (float array) – TES biases to set for each DAC in Volts. Expects an array of size (32,). If provided array is not 32 elements, asserts.
- set_run_eta_scan(band, val, **kwargs)[source]¶
Triggers the single-channel eta scan.
Starts the rogue runEtaScan command, which sweeps the channel selected by
set_eta_scan_channel()through the frequencies inset_eta_scan_freq(). Measures frequency error at eta phase 90° then 0°, storing results in etaScanResultsReal and etaScanResultsImag.Blocks until the scan completes (rogue commands are synchronous).
- Parameters:
See also
set_eta_scan_channel()Select channel before calling this.
set_eta_scan_freq()Load frequencies before calling this.
get_eta_scan_results_real()Read back real results.
get_eta_scan_results_imag()Read back imaginary results.
- set_run_serial_find_freq(band, val, **kwargs)[source]¶
Triggers the serial find-freq scan across all channels.
Starts the rogue SerialFindFreq process, which sweeps each channel through the frequencies previously loaded via
set_eta_scan_freq()(reshaped to n_channels × scan_points). At each frequency, measures frequency error at eta phase 0° then -90°, storing results in etaScanResultsReal and etaScanResultsImag. Channels whose frequency rows are all identical are skipped.Blocks until the scan completes.
- Parameters:
See also
set_eta_scan_freq()Load frequencies before calling this.
set_eta_scan_amplitude()Set tone power before calling this.
get_eta_scan_results_real()Read back real results.
get_eta_scan_results_imag()Read back imaginary results.
- set_single_channel_readout(band, val, **kwargs)[source]¶
Enables filtered/decimated single-channel debug readout.
When enabled, debug data outputs only the channel specified by
set_readout_channel_select(), passed through the IIR filter (filterAlpha) and decimated. When disabled, multichannel debug data is output. For single-channel readout at the full channel processing rate without filtering or decimation, useset_single_channel_readout_opt2()instead.- Parameters:
See also
get_single_channel_readout()Gets the current state.
set_readout_channel_select()Selects which channel.
set_single_channel_readout_opt2()Full-rate single-channel mode.
take_debug_data()Takes debug data.
- set_single_channel_readout_opt2(band, val, **kwargs)[source]¶
Enables non-decimated single-channel debug readout.
When enabled, debug data outputs the selected channel at the full channel processing rate (see
get_channel_frequency_mhz(), default 2.4 MHz), bypassing the IIR filter and decimation. Channel is selected byset_readout_channel_select().- Parameters:
See also
get_single_channel_readout_opt2()Gets the current state.
set_single_channel_readout()Filtered/decimated mode.
set_readout_channel_select()Selects which channel.
take_debug_data()Takes debug data.
- set_stream_data_source_enable(val, **kwargs)[source]¶
Enables or disables the StreamDataSource emulator.
The StreamDataSource generates synthetic SMuRF frames at a configurable period for testing without hardware. This is separate from the real data path.
- Parameters:
See also
get_stream_data_source_enable()Gets the enable state.
set_stream_data_source_period()Set frame period.
- set_stream_data_source_period(val, **kwargs)[source]¶
Sets the StreamDataSource emulator frame period.
Time between emulated frames in microseconds.
- Parameters:
val (int) – Period in microseconds.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_stream_data_source_period()Gets this value.
set_stream_data_source_enable()Enable the emulator.
- set_stream_enable(val, **kwargs)[source]¶
Enables or disables streaming data output for all bands.
Master enable for the data streaming path. When enabled, firmware generates a data frame on each flux ramp trigger containing the demodulated channel data. When disabled, flux ramp triggers are ignored and no streaming frames are produced.
- Parameters:
val (int) – 1 to enable streaming, 0 to disable.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_stream_enable()Gets the current state.
take_stream_data()Takes streaming data for a duration.
- set_streamdatawriter_close(val, **kwargs)[source]¶
Closes the stream data file writer.
- Parameters:
val (int) – 1 to close.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_streamdatawriter_close()Gets the current state.
set_streamdatawriter_open()Opens the writer.
- set_streamdatawriter_datafile(datafile_path, **kwargs)[source]¶
Sets the output path for the StreamDataWriter. This is what is used for take_debug_data.
- Parameters:
datafile_path (str) – The full path for the output.
- set_streamdatawriter_open(val, **kwargs)[source]¶
Opens the stream data file writer.
- Parameters:
val (int) – 1 to open.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_streamdatawriter_open()Gets the current state.
set_streamdatawriter_close()Closes the writer.
- set_streaming_datafile(datafile, as_string=True, **kwargs)[source]¶
Sets the datafile to write streaming data
- set_streaming_file_open(val, **kwargs)[source]¶
Sets the streaming file open. 1 for streaming on. 0 for streaming off.
- Parameters:
val (int) – The streaming status.
- set_synthesis_scale(band, val, **kwargs)[source]¶
Sets the synthesis filter bank output scaling.
Controls the output amplitude of the polyphase synthesis (reconstruction) filter bank. Each increment scales the output amplitude by a factor of 2. Nominal value is 2.
- Parameters:
See also
get_synthesis_scale()Gets the current synthesis scale.
set_analysis_scale()Sets the analysis filter bank scaling.
- set_tone_scale(band, val, **kwargs)[source]¶
Sets the tone output scaling before the synthesis filter bank.
Scales the combined tone output before it enters the synthesis filter bank. Each increment doubles the output amplitude.
- Parameters:
See also
get_tone_scale()Gets the current value.
set_synthesis_scale()Scales the synthesis filter bank output.
- set_trigger_daq(bay, val, **kwargs)[source]¶
Triggers the DaqMux to start data acquisition.
- Parameters:
See also
get_trigger_daq()Gets the current state.
set_arm_hw_trigger()Arms the hardware trigger.
- set_trigger_delay(val, **kwargs)[source]¶
Sets the flux ramp trigger delay offset.
Adds a delay to the flux ramp trigger. Used to synchronize multiple carriers. Units are timing system clock ticks (default 122.88 MHz =
get_digitizer_frequency_mhz()/ 5).- Parameters:
val (int) – Trigger delay in timing clock ticks (default 122.88 MHz). 28-bit unsigned.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
- set_trigger_enable(chan, val, **kwargs)[source]¶
Set trigger pulse generation enable for requested channel.
The triggering firmware is broken into two parts: (1) the event selection logic “Channel”, and (2) the trigger pulse generation “Trigger”. This enables or disables the “Trigger” component for the requested channel.
- set_trigger_hw_arm(bay, val, **kwargs)[source]¶
Arms the DaqMux hardware trigger.
- Parameters:
See also
get_trigger_hw_arm()Gets the current state.
set_trigger_daq()Software trigger for acquisition.
- set_trigger_reset_delay(band, val, **kwargs)[source]¶
Sets the trigger reset delay for the flux ramp.
Delay in channel processing clock ticks between the flux ramp reset trigger and the actual integrator reset. Adjusted so that the reset occurs at the flux ramp glitch. Units are ticks of the channel processing clock (see
get_channel_frequency_mhz(), default 2.4 MHz).
- set_trigger_width(chan, val, **kwargs)[source]¶
Sets the trigger output pulse width.
Duration of the trigger pulse output for the given channel, in timing system clock ticks (default 122.88 MHz =
get_digitizer_frequency_mhz()/ 5).
- set_tune_file_path(val, **kwargs)[source]¶
Sets the path to the tune file for PyRogue loading.
Sets the file path that the PyRogue
loadTuneFilecommand will read from. The tune file contains per-channel eta, center frequency, and amplitude parameters. When triggered, PyRogue reads the file on the server CPU and writes the parameters to firmware registers. Most users should use higher-level functions likeload_tune()instead of setting this directly.- Parameters:
val (str) – Path to the tune file (.npy format).
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
get_tune_file_path()Gets the current path.
set_load_tune_file()Triggers loading the tune file.
load_tune()Higher-level tune loading function.
- set_ultrascale_ot_upper_threshold(val, **kwargs)[source]¶
Sets the FPGA over-temperature shutdown threshold.
If the Ultrascale+ FPGA die temperature exceeds this value, the FPGA asserts an over-temperature alarm.
- Parameters:
val (float) – Temperature threshold in degrees C.
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
- set_unwrapper_reset(**kwargs)[source]¶
Resets the SmurfProcessor phase unwrapper.
The unwrapper tracks wraps in the firmware’s fixed-point frequency output, maintaining a per-channel counter to reconstruct the continuous signal. This reset clears all wrap counters and previous-sample state, so subsequent output restarts from zero offset. One-shot command (no corresponding get).
- Parameters:
**kwargs – Arbitrary keyword arguments. Passed directly to the _caput call.
See also
set_filter_reset()Reset the downsample filter.
clear_unwrapping_and_averages()Reset unwrapper and averaging.
- set_user_config0(val, as_binary=False, **kwargs)[source]¶
Sets the userConfig[0] timing frame header register.
A general-purpose 32-bit field embedded in the data stream timing frame. Individual bits are used as control flags by the SmurfProcessor.
- Parameters:
See also
get_user_config0()Gets the current value.
clear_unwrapping_and_averages()Toggles bit 0.
- set_waveform_select(band, val, **kwargs)[source]¶
Selects the DAC output source for a band.
When set to 0, the DAC outputs the normal DSP synthesis path. When set to 1, the DAC outputs from the preloaded waveform table (tone file loaded via
load_tone_file()).- Parameters:
See also
set_tone_file_path()Sets the path to the tone file CSV.
load_tone_file()Loads the tone file into the waveform table.
set_noise_select()Selects random noise output instead.
- shell_command(cmd, **kwargs)[source]¶
Runs command on shell and returns code, stdout, & stderr.
- Parameters:
cmd (str) – Command to run on shell.
**kwargs – Arbitrary keyword arguments. Passed directly to the subprocess.run call.
- Returns:
stdout and stderr returned as str
- Return type:
(stdout, stderr)
- trigger_rtm_arb_waveform(continuous=False, **kwargs)[source]¶
Software trigger for arbitrary waveform generation on the slow RTM DACs. This will cause the RTM to play the LUT tables only once.
- Parameters:
continuous (bool, optional, default False) – Whether or not to continously broadcast the arbitrary waveform on software trigger.
- wait_configuring_in_progress(timeout=None)[source]¶
Wait until the system is no longer configuring.
Wait until either the system configuring in progress flag is set to False or the timeout is reached.
- Parameters:
timeout (float) – Time in seconds to wait before raising a TimeoutError.