DBBC3Commandset_OCT_D_110
class¶
- class DBBC3Commandset_OCT_D_110(clas)¶
Bases:
DBBC3CommandsetDefault
- adb3l_delay(board, sampler, value=512)¶
Warning
This is an expert level method and is intended for debugging purposes only. Wrong usage could bring the DBBC3 system into an unstable state and could lead to unwanted or unexpected results. Use only if you know what you are doing!
Sets the sampler delay for the specified board and sampler.
The allowed range is 0-1023 which corresponds to -60ps to +60ps with a stepping size of 120fs. The default is 512 = 0ps.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
sampler (int) – sampler number (0-3)
value (int, optional) – the delay value in steps of 120fs. Default is 512 (=0ps)
- Returns
None
- Raises
ValueError – in case the specified sampler is out of range
ValueError – in case the specified value parameter is out of range
- adb3l_gain(board, sampler, value=512)¶
Warning
This is an expert level method and is intended for debugging purposes only. Wrong usage could bring the DBBC3 system into an unstable state and could lead to unwanted or unexpected results. Use only if you know what you are doing!
Sets the sampler gain value for the specified board and sampler.
The allowed range is 0-255 which corresponds to -0.5dB to +0.5dB with a stepping size of 0.004dB. The default is 128 = 0dB.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
sampler (int) – sampler number (0-3)
value (int, optional) – the offset value in steps of 0.004dB. Default is 128 (=0 dB)
- Returns
None
- Raises
ValueError – in case the specified sampler is out of range
ValueError – in case the specified value parameter is out of range
- adb3l_offset(board, sampler, value=128)¶
Warning
This is an expert level method and is intended for debugging purposes only. Wrong usage could bring the DBBC3 system into an unstable state and could lead to unwanted or unexpected results. Use only if you know what you are doing!
Sets the sampler offset value for the specified board and sampler.
The allowed range is 0-255 which corresponds to -20mV to +20mV with a stepping size of 156microV. The default is 128 = 0mV.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
sampler (int) – sampler number (0-3)
value (int, optional) – the offset value in steps of 156 microV. Default is 128 (=0 mV)
- Returns
None
- Raises
ValueError – in case the specified sampler is out of range
ValueError – in case the specified value parameter is out of range
- adb3l_reset()¶
Resets all ADB3L boards and sets the registers to default values
- Returns
None
- adb3l_reseth()¶
Resets all ADB3L boards, but does NOT change/reset any register settings
- Returns
None
- adb3l_resets(board, sampler=None)¶
Resets the ADB3L registers to default values for the specified board and sampler
If called without the optional sampler parameter a reset is performed for all samplers of the specified board.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
sampler (int, optional) – sampler number (0-3)
- Returns
None
- adb3linit()¶
Performs full reset of all ADB3L boards
All ADB3L boards are fully reinitialized to the setting defined in the configuration file.
- Returns
True if the ADB3L boards were successfully reinitialized; False otherwise
- Return type
boolean
- checkphase()¶
Checks whether all samplers of all core boards are in sync
Warning
Do not execute checkphase while observing/recording data! Data will be invalid while checkphase is running due to phase shifting of the sampler outputs.
In case one or more samplers are not in sync use lastResponse to receive information on the failed board(s)
- Returns
True if all samplers are in sync, False otherwise
- Return type
boolean
- core3h_arp(board, mode=None)¶
Enables or disables ARP queries on all ethernet cores.
If called without the mode parameter the current setting is reported
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
mode (str, optional) – Can be “on” or “off”.
- Returns
the current ARP mode (“on” / “off”) or “unknown” in case the arp mode could not be determined
- Return type
str
- Raises
ValueError – in case an illegal mode has been requested
- core3h_core3_bstat(board, sampler)¶
Obtains the 2-bit sampler statistics for the given core board and sampler.
- Parameters
board (int or str) – can be given as a number (0 = board A) or as char e.g. A
sampler (int) – the sampler number (starting at 0)
- Returns
list containing the count of the 4 levels or None if the core board is not connected
- Return type
list
- core3h_core3_corr(board)¶
Performs cross-correlation between the samplers of the given board.
- Correlation products are calculated between these sampler pairs:
0-1
1-2
2-3
- Parameters
board (int or str) – can be given as a number (0 = board A) or as char e.g. A
- Returns
List containing the three cross-correlation coefficients in the order described above
- Return type
list
- core3h_core3_init(board)¶
Initializes the given core3h board and sets parameters as specified in the control file.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
True if successful False otherwise
- Return type
boolean
- core3h_core3_mode(board, mode=None)¶
Gets or sets the Core3h mode.
If the optional mode parameter is ommited the currently set mode is returned. If specified mode must be a valid core3h mode (as listed in
DBBC3.core3hModes
)- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
mode (str, optional) – if ommited gets the currently active mode
- Returns
the current mode
- Return type
str
- core3h_core3_power(board)¶
Obtains the gains of all 4 samplers of the given board
- Parameters
board (int or str) – can be given as a number (0 = board A) or as char e.g. A
- Returns
list containing the gains for all samplers (a[0] = sampler1 etc.) or None in case the core3 board is not connected
- Return type
list
- core3h_destination(board, outputId, ip='', port=46227, threadId=-1)¶
Sets / gets the output destination address and port for the given board and outputId.
If called without specifying only the outputId the current destination settings are returned.
When the ip parameters is set to None the respective output is disabled and no frames will be sent.
When specifying a threadId only frames from that thread are addressed to the given destination. Other threads will not be affected. This is useful when using multi-threaded VDIF. Likewise a single thread can be disabled by setting ip=None and specifying a threadID.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
outputId (int) – the index of the Core3h output device (starting at 0)
ip (str) – the destination IP address
port (int, optional) – the destination IP port number (default = 46227)
threadId (int) – the id of the tread for which to set the destination
- Returns
dictionary with the following structure:
"ip" (str): the IP address "port" (int): the port "output" (int): the index of the core3h output port (starting at 0) "thread_0" (dict, optional): dictionary holding destination "ip" and "port" for thread 0 (if defined) "thread_1" (dict, optional): dictionary holding destination "ip" and "port" for thread 1 (if defined) "...."
- Return type
dict
- core3h_devices(board)¶
Lists all devices of the the current system and their corresponding memory address ranges
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
dictionary with the following structure:
"devicename" (str): the name of the device "value" (str): memory address range
- Return type
dict
- core3h_inputselect(board, source)¶
Selects one of the available input data sources.
The command implicitly resets the VSI bitmask, input width and VSI swap settings to their respective defaults.
- The input width is reset to:
32bit for tvg, vsi1 and vsi2
64bit for vsi1-2
128bit for vsi1-2-3-4
TODO: update the documentation TODO: Find out about “vsi1-2-3-4-5-6-7-8”
Note
It is recommended to execute
core3h_reset()
(with or without the keepsync option) after changing the input source- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
source (str) – one of “tvg”,”vsi1”,”vsi2”,”vsi1-2”,”vsi1-2-3-4”,”vsi1-2-3-4-5-6-7-8”
- Returns
the current split mode setting; “unknown” if the mode could not be determined
- Return type
str
- Raises
ValueError – in case an unknown mode has been specified
- core3h_mode_fs(board)¶
Returns mode information in a machine-readble form (field-system)
TODO: implement parsing codes
Parameters: board: the board number (starting at 0=A) or board ID (e.g “A”)
- core3h_output(board, outputIdx=0, frameId=0)¶
Displays output debug information.
The command displays the first 16 words of the first frame that was sent within the current second interval. The frame is recorded at the output specified by outputIdx.
In addition the following data is displayed: 1PPS/frame-header/end-of-frame/frame-drop bits
TODO: implement output parsing
- core3h_reboot(board)¶
Reboots the system.
The FiLa10G hardware and software for the given board is reset to its initial state, i.e. as it was directly after the programming of the FPGA and lets the FiLa10G system boot again.
Warning
All previously configured settings and states are lost when rebooting!
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
True: if successful False: otherwise
- Return type
boolean
- core3h_regread(board, regNum, device='core3')¶
Reads the value of the device register
Note
Not all devices have readable registers. See the DBBC3 documentation for the core3h “devices” command. The list of available devices can be obtained with the
core3h_devices()
command.- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
regNum (int) – the index of the device register to read
device (str) – the name of the device (as returned by the
core3h_devices()
command). default = core3
- Returns
tuple containing:
register value in hexadecimal string format register value in binary string format register value in decimal format (signed 32-bit)
- Return type
tuple (str,str,int)
- core3h_regread_dec(board, regNum, device='core3')¶
Reads the decimal value of the device register
Note
Not all devices have readable registers. See the DBBC3 documentation for the core3h “devices” command. The list of available devices can be obtained with the
core3h_devices()
command.- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
regNum (int) – the index of the device register to read
device (str) – the name of the device (as returned by the
core3h_devices()
command). default = core3
- Returns
The decimal value of the device register
- Return type
int
- core3h_regupdate(board, device, regNum, value, bitmask)¶
Updates only certain bits of the value of a device register
Note
Not all devices have writable registers. See DBBC3 documentation for “devices” command
The bitmask must be in hexadecimal format.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
device (str) – the name of the device (as returned by the
core3h_devices()
command). default = core3regNum (int) – the index of the device register to read
value (hex) – the register value to write; must be 32-bit hexadecimal string, e.g. 0x01020304
bitmask (hex) – the 32-bit hexadecimal bitmask; 1=overwrite 0=leave unchanged
- Returns
True if value was changed; False otherwise
- Return type
boolean
- Raises
ValueError – in case the supplied value is not in hex format
ValueError – in case the supplied bitmask is not in hex format
- core3h_regwrite(board, device, regNum, value)¶
Writes a value into the device register
Note
Not all devices have writeable registers. See the DBBC3 documentation for the core3h “devices” command. The list of available devices can be obtained with the
core3h_devices()
command.- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
device (str) – the name of the device (as returned by the
core3h_devices()
command). default = core3regNum (int) – the index of the device register to read
value (hex) – the register value to write; must be a 32-bit hexadecimal string, e.g. 0x01020304
- Returns
True if value was changed; False otherwise
- Return type
boolean
- Raises
ValueError – in case the supplied value is not in hex format
- core3h_reset(board, keepsync=False)¶
Resets the FiLa10G datapath
If called without arguments the complete datapath is reset and time synchonization is lost.
If called with keepsync=True, FiLa10G tries to maintain the current time synchronization. For this to work the input stage of the data path and the timers are not reset.
Warning
Time synchronization will not be correct anymore in the rare but possible case that a data sample with a 1PPS flag is lost during the reset process.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
keepsync (boolean, optional) – keeps the time synchronization if set to True. Default=False
- Returns
True: if successful False: otherwise
- Return type
boolean
- core3h_splitmode(board, mode)¶
Enables / Disables the split mode
When split mode is enabled the selected and bitmasked input data is split into two halves exactly in the middle. The two halves will be processed as if they were independent input streams, The lower half (by bit position) is output at output0 the higher half is output as output1.
Split mode requires an input width of at least 2 bit.
Note
Raw and vdif format can be applied independently to each split stream with the help of the
core3h_start()
command syntaxNote
In order to specify a correct VDIF frame setup you have to take into account that the effective input width is halved when the split mode is enabled.
Note
A restriction of the split mode is that only output0 is capable of producing multi-threaded VDIF data. At output1 the data will always be forced to be single-threaded, regardless of the chosen frame setup.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
mode (str) – “on” or “off”
- Returns
the current split mode setting (“on”/”off”); “unknown” if the mode could not be determined
- Return type
str
- Raises
ValueError – in case an unknown mode has been specified
- core3h_start(board, format='vdif', force=False)¶
Starts/restarts sending of formatted output data
- The output data format can be either:
vdif: VDIF format
raw: unformatted
In case a single output format is given, this will be used for all outputs. Formats can be set for each of the outputs individually by separating the format specifiers by “+” e.g. vdif+raw+vdif+raw if not explictely specified “vdif” will be used for all outputs.
Raw format requires no time synchronization whereas vdif format requires the respective timer to be synchronized (see
core3h_timesync()
)For fast testing: set the force parameter to True to automatically synchronize the timer to “zero” time(=’2000-01-01T00:00:00’). Provided that a valid 1PPS signal is available this will always be successful.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
format (str, optional) – a single format specifier or several concatenated by +. Default is “vdif”
force (boolean, optional) – if set to True synchronize time to ‘2000-01-01T00:00:00’. Default is False
- Returns
list of format specifiers for all outputs of the specified board
- Return type
list
- Raises
ValueError – in case the number of format specifiers exceed the number of available outputs
ValueError – in case an unkown format specifier was given
- core3h_status_fs(board)¶
Returns time sync information in a machine-readble form (field-system)
TODO: implement parsing codes
Parameters: board: the board number (starting at 0=A) or board ID (e.g “A”)
- core3h_stop(board)¶
Stops sending of output data
The opposite of
core3h_start()
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
True in case the output of data was stopped; False otherwise
- Return type
boolean
- core3h_sysstat(board)¶
Displays information about the current status of the system and gives an overview of the state of the most important user settings.
All key value pairs of the sysstat output are returned as a dictionary. All whitespaces have been converted to ‘_’ all characters have been converted to lower-space.
- Parameters
board – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
a dictionary with the systat key value pairs with whitespaces converted to ‘_’
Example
[{‘selected_input’: ‘vsi1’, ‘input_sample_rate’: ‘128000000 Hz / 2’, ‘vsi_input_swapped’: ‘no’, ‘vsi_input_bitmask’: ‘0xFFFFFFFF’, ‘vsi_input_width’: ‘32 bit’, ‘pps_count’: ‘0’, ‘tvg_mode’: ‘vsi-h’, ‘mk5b_timesync’: ‘no’, ‘vdif_timesync’: ‘no’, ‘gps_receiver’: ‘installed’, ‘output’: ‘stopped’, ‘output_0_format’: ‘raw’, ‘output_0_dest’: ‘192.168.1.2:46220’, ‘output_1_format’: ‘raw’, ‘output_1_dest’: ‘192.168.1.3:46227’, ‘output_2_format’: ‘raw’, ‘output_2_dest’: ‘192.168.1.4:46227’, ‘output_3_format’: ‘raw’, ‘output_3_dest’: ‘192.168.1.5:46227’, ‘ethernet_arps’: ‘on’, ‘selected_vsi_output’: ‘vsi1-2-3-4’}]
- Return type
dict
- core3h_sysstat_fs(board)¶
Identical to core3h_sysstat but returns machine (fields-system) readable output
TODO: implement parsing code
Parameters: board: the board number (starting at 0=A) or board ID (e.g “A”)
- core3h_tengbarp(board, device, arpId, mac)¶
Sets one ARP entry for a 10Gb ethernet device
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
device (str) – the ethernet device name, e.g. eth0
arpId (int) – index of the ARP table entry to be modified
mac (str) – MAC address to be set (must be in format xx:xx:xx:xx:xx:xx)
- Raises
ValueError – in case an invalid MAC address was given
- core3h_tengbcfg(board, device, key, value)¶
Sets a parameter of the 10Gb ethernet device.
valid parameters are: “ip”: IP address “mac”: MAC address “nm”: netmask “port”: UDP port “gateway”: IP adress of gateway
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
device (str) – the ethernet device name, e.g. eth0
key (str) – the name of the parameter to set (see above)
value (str) – the new parameter value
- core3h_tengbinfo(board, device)¶
Retrieve the current parameters of the specified 10Gb ethernet device
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
device (str) – the ethernet device name, e.g. eth0
- Returns
a dictionary containing all configuration parameters as key/value pairs. The arp_cache key contains a list of arp entries (“mac”,”ip”)
- Return type
dict
- Raises
ValueError – in case an unknown ethernet device has been given
- core3h_time(board)¶
Displays the current time of the active 1pps source
The displayed time is the (synchronized) VDIF time in UTC format.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
the current UTC timestamp of the active 1PPS source
- Return type
datetime
- core3h_timesync(board, timestamp=None)¶
Performs time synchronization for the given core board.
TODO: Finish method with code for manual setting of time TODO Discuss with Sven 3 sec offset between reported seconds and GPS time
- core3h_tvg_mode(board, mode=None)¶
Gets / sets the test vector generator (tvg) mode for the given board.
- mode can be one of:
all-0: all bits = 0
all-1: all bits = 1
vsi-h: VSI-H test vector pattern
cnt: pattern with four 8-bit counters
If called without the mode parameter the current setting is returned.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
mode (str) – the tvg mode identifier (see above)
- Returns
the current tvg mode; “unknown” if the mode could not be determined
- Return type
str
- Raises
ValueError – in case an unknown mode has been specified
- core3h_vdif_enc(board)¶
Get the setting of the VDIF encoding switch.
- Possible return values::
on: VDIF encoding is switched on
off: VDIF encoding is switched off
unknown: in case the VDIF encoding could not be determined
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
current state of the VDIF encoding (for possible values see above)
- Return type
str
- core3h_vdif_frame(board, channelWidth=None, numChannels=None, payloadSize=None)¶
Gets / sets the VDIF frame properties for the specified core3H board
If the command is called without the channelWidth parameter the current properties will be returned.
If successful the command returns the resulting number of frames per second and the number of data threads, according to the currently selected input (see
core3h_inputselect()
for details).If the VDIF frame properties do not match the currently selected input the “compatible” flag in the return dictionary is set to “False”. The command fails if the desired frame setup is not supported. The frame setup is not changed in this case.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
channelWidth (int, optional) – the size of each channel in bits (allowed values: 1,2,4,8,16,32,64)
numChannels (int, optional) – number of channels per VDIF frame (allowed values: 1,2,4,8,16,32,64,128)
payloadSize (int, optional) – the total payload size in bytes (=frame size without header) of the VDIF frame
- Returns
dictionary with the following structure:
"compatible" (boolean): False in case an incompatible setup was requested, True otherwise "channelWidth" (int): the size of each channel in bits "numChannels" (int): number of channels per VDIF frame "payloadSize" (int): the total payload size in bytes "frameSize" (int): the size of the VDIF frame in bytes "numThreads" (int, optional): the number of threads "framesPerSecond" (int, optional): the number of frames per second "framesPerThread" (int, optional): the number of frames per thread
- Return type
dict
- Raises
ValueError – in case channelWidth has been specified but no numChannels were set
- core3h_vdif_station(board, stationId=None)¶
Gets / sets the VDIF station ID for the specified core3h board
If the method is called without supplying the stationID parameter the current station ID will be reported.
Note
Setting this value directly affects the header data of the VDIF data format
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
stationId (str, optional) – The two-letter station code to set
- Returns
the two-letter station code; “unknown” if the code could not be determined
- Return type
str
- Raises
ValueError – in case an illegal station code has been specified
- core3h_vdif_userdata(board, d0=None, d1=None, d2=None, d3=None)¶
Gets/sets the user data fields in the extended VDIF frame header
The user data fields are 32bit values. Note that bits 24-31 of the first user data field contain the Extended Data Version (EDV) number. See: https://vlbi.org/vdif/ for details
d0 - d3 are optional. If not specified the current value of the fields are reported
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
d0 (int, optional) – the value of the first user data field
d1 (int, optional) – the value of the second user data field
d2 (int, optional) – the value of the third user data field
d3 (int, optional) – the value of the fourth user data field
- Returns
list containing the current content of all 4 user data fields
- Return type
list
- Raises
ValueError – in case the supplied value cannot be represented as hexadecimal
ValueError – in case the length of the supplied value exceeds 32 bit
- core3h_version(board)¶
Displays the FILA10G versions of the specified board
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
a dictionary with the following structure:
"systemName" (str): the FILA10G system name "compileDate" (str): the date string of the firmware compile date "versionSW" (str): the version string of the FILA10G firmware "versionHW" (str): the version string of the FILA10G hardware
- Return type
dict
- core3h_vsi_bitmask(board)¶
Gets the vsi input bitmask.
The eight - up to 32 bit wide - bitmasks specify which bits of the eight vsi input streams are active and will be processed. Inactivated bits will be discarded which effectively reduces the total amount of data.
Note
Currently setting of the bit mask is not supported by the python package
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
a list of hex representations of the bitmasks for all active vsi inputs
- Return type
list (str)
- core3h_vsi_samplerate(board, sampleRate=None, decimation=1)¶
Gets /sets the VSI input sample rate for the specified Core3h board
All arguments are optional. If the command is called without the sampleRate parameter the current VSI input sample rate is returned.
The decimation parameter decimates the input such that the resulting sample rate is 1/decimation of the specified rate
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
sampleRate (int, optional) – the input sampling rate in samples per second
decimation (int, optional) – a divisor in the range 1..255; default=1
- Returns
dictionary with the following structure:
"sampleRate" (int): sample rate in Hz "decimation" (int): decimation factor
- Return type
dict
- Raises
DBBC3Exception – in case the sample rate could not be set
- core3h_vsi_swap(board, firstVSI=None, secondVSI=None)¶
deprecated
Not fully implemented. Don’t use.
- core3hinit(board=None)¶
Reinitializes the CORE3H board(s)
If called without the optional board parameter reinitialization is performed for all CORE3H boards present in the system; otherwise only the specified board is bein initialized. The boards are reset to their default settings as specified in the configuration files.
- Parameters
board (int or str, optional) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
True if the reinitialization was successful; False otherwise
- Return type
boolean
- dbbcif(board, inputType=None, mode='agc', target=None)¶
Gets / sets the configuration of the GCoMo IF modules
If the IF is connected on the top pin of the GCoMo (bypassing the downconversion) the inputType parameter should be set to 1.
If the IF has been downconverted by the GCoMo the inputType should be set to 2. Selecting inputType=1 will disable the the synthesizer tone.
if the inputType is not specified or set to None the current settings are reported.
- Parameters
board (int or str) – can be given as a number (0 = board A) or as char e.g. A
inputType (int) – 1 = IF input without downconversion; 2 = IF input after downconversion
mode (int or str) – “agc” = automatic gain control (default if not specified); “man” = manual attenuation (retains last agc value); numeric value = attenuation step (0-63) in steps of 0.5 dB
target (int) – the target power level for the “agc” mode
- Returns
dictionary holding the values reported by dbbcif with the following structure:
"inputType" (int): see parameter description for meaning of returned value "attenuation" (int): the current attenuation level "mode" (str): the current agc mode "count" (int): the current IF level "target" (int): the target IF level
- Raises
ValueError – in case any arguments exceeds the valid range
- disableloop()¶
Stops the automatic calibration loop
- Returns
Response message from the control software
- Return type
str
- enablecal(threshold='on', gain='off', offset='off')¶
Switches on/off the threshold, gain and offset calibration for the automatic calibration loop
The loop must be activated with the
enableloop()
command. If called without the optional parameters the defaults will be used (see below)- Parameters
threshold (optional, default=on) – switch threshold calibration [on/off]
gain (optional, default=off) – switch gain calibration [on/off]
offset (optional, default=off) – switch offset calibration [on/off]
- Returns
a dictionary with the following structure:
"threshold": "gain": "offset":
- Return type
dict
- Raises
DBBC3Exception –
if the state of the calibration loop could not be queried * if the reported state differs from what was requested
- enableloop()¶
Starts the automatic calibration loop
For changing the parameters of the calibration loop use the
enablecal()
method- Returns
Response message from the control software
- Return type
str
- reconfigure()¶
Reconfigures the core3h boards
Reloads the firmware, then reinitializes the ADB3L and core3h and finally does a PPS sync.
- Returns
None
- synthAtt(board)¶
Gets the current attenuation setting of the synthesizer output serving the given board
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
the attenuation level in dB of the synthesizer ouput serving the given board
- Return type
float
- synthFreq(board, freq=None)¶
Gets / sets the frequency in MHz of the synthesizer serving the given board.
If the freq parameter is not given or is set to None the current frequency is reported
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
freq (int, optional) – the synthesizer frequency in MHz
- Returns
A dictionary with the following structure:
"target" (int): the target frequency in MHz "actual" (int): the actual frequency in MHz
- Return type
dict
- Raises
DBBC3Exception – In case the frequency could not be set or determined
- synthLock(board)¶
Gets the lock state of the GCoMo synthesizer serving the given core board
Each sythesizer has two outputs (source=1 or 2) board A is served by synth 1 source 1 board B is served by synth 1 source 2 board C is served by synth 2 source 1 etc.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
- Returns
True if the synthesizer is locked; False otherwise
- Return type
boolean
- Raises
DBBC3Exception – in case the lock state of the synthesizer cannot be obtained
- synthOen(board, state=None)¶
Enables/disables the synthesizer output that serves the given board.
Warning
Disabling the output will switch off the downconversion stage of the DBBC3.
If called without the state argument the current output setting is reported.
- Parameters
board (int or str) – the board number (starting at 0=A) or board ID (e.g “A”)
state (str, optional) – the output state. Can be either “on” or “off”
- Returns
the current state of the synthesizer output; 0=off, 1=off None: in case the state could not be determined
- Return type
int
- Raises
ValueError – In case an illegal state argument has been supplied
- synthinit()¶
Reinitiliases the synthesizers
All synthesizers of the GCoMo boards are reset to their initial state as defined in the configuration files
- Returns
True if the synthesizers were successfully reinitialized; False otherwise
- Return type
boolean
- tap(boardNum, filterFile, scaling=1)¶
Sets the first tap filter when in OCT mode
Parameters: boardNum: filterFile: scaling: should always be one (default =1)
- tap2(boardNum, filterFile, scaling=1)¶
Sets the second tap filter when in OCT mode
Parameters: boardNum: filterFile: scaling: should always be one (default =1)
- time()¶
Obtains the time information from all boards.
For each board a dict with the following structure is returned:
'timestamp' (time.struct_time): the timestamp 'timestampAsString' (str): the timestamp in string representation %Y-%m-%dT%H:%M:%S
In the OCT mode (version 110) the dict contains the following additional fields:
'seconds'(int): seconds since the beginning of the current year 'halfYearsSince2000' (int): number of half years since the year 2000 'daysSince2000' (int): number of days since the year 2000
- Returns
The list of time information dicts. One list element for every board (0=A).
- Return type
time_list (
list
ofdict
)- Raises
DBBC3Exception – in case no time information could be obtained
- version()¶
Returns the DBBC3 control software version.
- Returns
a dictionary containing the version information of the DBBC3 control software:
"mode" (str): the current DBBC3 mode, e.g. DDC_V "majorVersion" (int): the major version, e.g. 124 "minorVersion" (int): the minor version (format YYYYMMDD) e.g. 20200113