class spirack.F1d_module(spi_rack, module)
F1d module interface class. This class does the low level interfacing with the F1d IQ-Mixer module. It requires an SPI Rack object and module number at initialization.
Allows the user to read the RF and LO power levels. Next to that, a status bit can be checked to see if the RF power level clipped. This bit needs to be cleared manually after reading. If the remote control is enabled, it also allows the user to set the I/Q gain and filter settings remotely. The module then ignores the front switch settings until remote control is disabled again.
At initialization the RF clipped bit will be cleared.
Parameters:
enable_remote(enable)
Enables remote control of module. Set to 1/True to enable remote control and 0/False to disable. If enabled, switches on the front of the module are ignored and all control happens via software.
Parameters:
rf_clipped()
Return if the RF input clipped. If the RF clipped since the last RF bit reset, returns True. Else returns False.
Returns - true/false depending if the RF clipped (bool)
clear_rf_clip()
Clears rf clip bit. Use this function to clear the RF clip bit once it has been read.
set_IQ_filter(value)
Set the IF output filter on both the I and Q channel.
Parameters:
Note that the software allows a fourth cutoff frequency in addition to the filter values on the front of the module. This may be most suitable for applications requiring higher cut-off frequencies (larger output bandwidth) which are still below the range provided by the F1e. This frequency is generically referred to as 30 MHz in the software, but must be designed per case and would require an adjustment to the specific HW. Please inquire upon interest.
set_I_gain(value)
Sets the gain for the I output channel. Values are the same as on the front of the module.
Parameters:
set_Q_gain(value)
Sets the gain for the Q output channel. Values are the same as on the front of the module.
Parameters:
get_RF_level()
Get RF input power. Calculates the RF input power from the ADC value. Within 4 dB accurate upto 4 dBm. Above will deviate more, but its also above the clipping level.
Returns - RF input power in dBm (float)
get_LO_level()
Get LO input power. Calculates the LO input power from the ADC value. Within 4 dB accurate upto 4 dBm. Above will deviate more, but its also above the clipping level.
Returns - LO input power in dBm (float)
read_adc(channel)
Reads the ADC for RF/LO power. Reads the given ADC channel. These channels are connected to the outputs of RF power detectors. Output needs to be converted to dBm. Function used internally.
Parameters:
Returns - 12-bit ADC data (int)
Attribute | Info |
---|---|
module |
the module number set by the user (must coincide with hardware) |
remote_settings |
contains a byte with the remote settings (IQ gain and filter) |