S5i_module


class spirack.S5i_module(spi_rack, module, frequency=100e6, enable_output=1, output_level=0.0)

S5i module interface class. This class does the low level interfacing with the S5i RF generator module. It requires an SPI Rack object and module number at initialization. A start up frequency can be given, otherwise it defaults to 100 MHz. The output power will default to 0 dBm.

Parameters:

  • spi_rack (SPI_rack) - SPI_rack class object via which the communication runs
  • module (int) - module number set on the harware
  • frequency (float) - RF frequency at startup (in Hz), defaults to 100 MHz
  • output_level (float) - RF output level, value between -14 to 20 dBm. Defaults to 0 dBm

Methods

set_frequency(frequency)

Sets the frequency with the grid set by set_stepsize. Will calculate the correct register values and raises ValueErrors if the frequency is not possible. This can be due to limitations in the stepsize or when it exceeds the chip limitations.

Parameters:

  • frequency (float) - the desired RF frequency in Hz

get_optimal_stepsize(frequency)

Calculates the optimal stepsize for a given frequency such that the phase noise in minimised.

Parameters:

  • frequency (float) - the desired RF frequency in Hz

Returns - the optimal stepsize in Hz (float)


set_stepsize(stepsize)

Sets the stepsize with which the frequency will be set in set_frequency.

Parameters:

  • stepsize (float) - the stepsize in Hz, must be an integer division of the reference frequency

set_output_power(level)

Sets the output power of the unit. Can be varied from -14 dBm to 20 dBm.

Parameters:

  • level (float) - power level between -14 and 20

enable_output_soft(enable)

Enables/disable the output of the RF generator IC. This is not the same as the mute input on the front of the module. It disables the chip output internally: it has less attenuation and is slower.

Parameters:

  • enable (bool) - enables/disables RF output

write_registers()

Writes data via the SPI Rack class to the S5i module. Writes the current register settings to the ADF4351 in reversed order of storage: REG5 to REG0. This is required according to the datasheet. The output is only updated when REG0 is written to


Attributes

Attribute Info
module the module number set by the user (must coincide with hardware)
rf_frequency the currently set RF output frequency in Hz
stepsize the set stepsize in Hz
output_status output enabled/disabled