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.
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.
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)
Clears rf clip bit. Use this function to clear the RF clip bit once it has been read.
Set the IF output filter on both the I and Q channel. In addition to the filter values on the front of the module, a fourth higher cutoff frequency is possible via software.
Sets the gain for the I output channel. Values are the same as on the front of the module.
Sets the gain for the Q output channel. Values are the same as on the front of the module.
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 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)
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.
Returns - 12-bit ADC data (int)
||the module number set by the user (must coincide with hardware)|
||contains a byte with the remote settings (IQ gain and filter)|