Daq Recevier Device
This module implements the MccsDaqReceiver device.
- class MccsDaqReceiver(*args, **kwargs)[source]
An implementation of a MccsDaqReceiver Tango device.
- BandpassDaq
Whether this DaqReceiver is a dedicated bandpass monitor.
- Configure(argin)[source]
Configure the DaqReceiver.
Applies the specified configuration to the DaqReceiver.
- Parameters:
argin (
str) – A JSON string containing the daq configuration to apply.- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> daq = tango.DeviceProxy("low-mccs/daqreceiver/001") >>> daq_config = { "receiver_ports": "4660", "receiver_interface": "eth0", } >>> daq.Configure(json.dumps(daq_config))
- class ConfigureCommand(component_manager, logger=None)[source]
Class for handling the Configure(argin) command.
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "MccsDaq Configure schema", "type": "object", "properties": { "nof_antennas": { "type": "integer", "default": 16, "description": "Number of antennas per tile." }, "nof_channels": { "type": "integer", "default": 512, "description": "Number of channels" }, "nof_beams": { "type": "integer", "default": 1, "description": "Number of beams" }, "nof_polarisations": { "type": "integer", "default": 2, "description": "Number of polarisations" }, "nof_tiles": { "type": "integer", "default": 1, "description": "Number of tiles in the station" }, "nof_raw_samples": { "type": "integer", "default": 32768, "description": "Number of raw antennas samples per buffer (requires different firmware to change)" }, "raw_rms_threshold": { "type": "integer", "default": -1, "description": "Only save raw data if RMS exceeds provided threshold; -1 disables thresholding" }, "nof_channel_samples": { "type": "integer", "default": 1024, "description": "Number of channelised spectra per buffer" }, "nof_correlator_samples": { "type": "integer", "default": 1835008, "description": "Number of channel samples for correlation per buffer" }, "nof_correlator_channels": { "type": "integer", "default": 1, "description": "Number of channels to channelise into before correlation; used only in correlator mode" }, "continuous_period": { "type": "integer", "default": 0, "description": "Seconds between successive dumps of continuous channel data; 0 means dump everything" }, "nof_beam_samples": { "type": "integer", "default": 42, "description": "Number of beam samples per buffer (requires different firmware to change)" }, "nof_beam_channels": { "type": "integer", "default": 384, "description": "Number of channels in beam data" }, "nof_station_samples": { "type": "integer", "default": 262144, "description": "Number of station beam samples per buffer" }, "integrated_channel_bitwidth": { "type": "integer", "default": 16, "description": "Bit width of integrated channel data" }, "continuous_channel_bitwidth": { "type": "integer", "default": 16, "description": "Bit width of continuous channel data" }, "append_integrated": { "type": "boolean", "default": true, "description": "Append integrated data in the same file" }, "persist_all_buffers": { "type": "boolean", "default": false, "description": "Persist all buffers. When false, we ignore the first 3 received buffers for continuous channel data" }, "sampling_time": { "type": "number", "default": 1.1325, "description": "Sampling time in seconds. Time per sample." }, "sampling_rate": { "type": "number", "default": 925925.925926, "description": "FPGA sampling rate" }, "oversampling_factor": { "type": "number", "default": 1.1851851851851851, "description": "Oversampling factor [default: 32/27]" }, "receiver_ports": { "oneOf": [ { "anyOf": [ { "type": "string", "pattern": "^[0-9]+$" }, { "type": "integer", "minimum": 0, "maximum": 65535 } ], "description": "A single UDP port as a string or integer" }, { "type": "array", "items": { "anyOf": [ { "type": "string", "pattern": "^[0-9]+$" }, { "type": "integer", "minimum": 0, "maximum": 65535 } ] }, "description": "A list of UDP ports as strings or integers" } ], "default": "4660", "description": "UDP port(s) to listen on; can be a single string or integer, or an array of them" }, "receiver_interface": { "type": "string", "default": "eth0", "description": "Receiver interface" }, "receiver_ip": { "type": "string", "default": "", "description": "IP to bind to in case of multiple virtual interfaces" }, "receiver_frame_size": { "type": "integer", "default": 8500, "description": "Receiver frame size" }, "receiver_frames_per_block": { "type": "integer", "default": 32, "description": "Receiver frames per block" }, "receiver_nof_blocks": { "type": "integer", "default": 256, "description": "Receiver number of blocks" }, "receiver_nof_threads": { "type": "integer", "default": 1, "description": "Receiver number of threads" }, "description": { "type": "string", "default": "", "description": "Observation description patched into observation_metadata" }, "station_config": { "type": [ "object", "null" ], "default": null, "description": "Station configuration file to extract additional metadata" }, "station_id": { "type": "integer", "description": "Station ID" }, "max_filesize": { "type": [ "number", "null" ], "default": null, "description": "Maximum file size in GB; set 0 to save each data set to a separate HDF5 file" }, "acquisition_duration": { "type": "integer", "default": -1, "description": "Duration of data acquisition in seconds" }, "acquisition_start_time": { "type": "integer", "default": -1, "description": "Specify acquisition start time; only for continuous channelised data" }, "station_beam_source": { "type": "string", "default": "", "description": "Station beam observed source" }, "station_beam_start_channel": { "type": "integer", "default": 0, "description": "Start channel ID for raw station beam" }, "station_beam_dada": { "type": "boolean", "default": false, "description": "Save raw station beam data as DADA files" }, "station_beam_individual_channels": { "type": "boolean", "default": false, "description": "Store raw station beam channels individually" }, "logging": { "type": "boolean", "default": true, "description": "Enable or disable logging" }, "write_to_disk": { "type": "boolean", "default": true, "description": "Write files to disk" }, "observation_metadata": { "type": "object", "description": "Metadata related to the observation; accepts arbitrary key-value pairs", "default": {}, "additionalProperties": true }, "directory": { "type": "string", "default": ".", "description": "Directory where data is saved" } } }
- ConsumersToStart
The default consumer list to start.
- DaqId
The ID of this DaqReceiver device.
- DaqStatus()[source]
Provide status information for this MccsDaqReceiver.
- This method returns status as a json string with entries for:
Daq Health: [HealthState.name: str, HealthState.value: int]
Running Consumers: [DaqMode.name: str, DaqMode.value: int]
Receiver Interface: “Interface Name”: str
Receiver Ports: [Port_List]: list[int]
Receiver IP: “IP_Address”: str
Bandpass Monitor: [Bandpass Monitor Running: bool]
- Return type:
- Returns:
A json string containing the status of this DaqReceiver.
- Example:
>>> daq = tango.DeviceProxy("low-mccs/daqreceiver/001") >>> jstr = daq.DaqStatus() >>> dict = json.loads(jstr)
- class DaqStatusCommand(component_manager, logger=None)[source]
A class for the MccsDaqReceiver’s DaqStatus() command.
- GetConfiguration()[source]
Get the Configuration from DAQ.
- Return type:
- Returns:
A JSON-encoded dictionary of the configuration.
- Example:
>>> daq = tango.DeviceProxy("low-mccs/daqreceiver/001") >>> jstr = daq.GetConfiguration() >>> dict = json.loads(jstr)
- class GetConfigurationCommand(component_manager, logger=None)[source]
Class for handling the GetConfiguration() command.
- __init__(component_manager, logger=None)[source]
Initialise a new GetConfigurationCommand instance.
- do()[source]
Implement
MccsDaqReceiver.GetConfiguration()command.- Return type:
- Returns:
The configuration as received from pydaq
- Host
The host for communication with the DAQ receiver.
- class InitCommand(*args, **kwargs)[source]
Implements device initialisation for the MccsDaqReceiver device.
- LostPushes
The number of lost pushes to the ringbuffer, typically increases when ringbuffer is full.
- NumberOfTiles
The number of tiles this DaqReceiver is monitoring.
- Port
The port for communication with the DAQ receiver.
- ReceiverInterface
The interface on which the DAQ receiver is listening for traffic.
- ReceiverIp
The IP address this DAQ receiver is monitoring.
- ReceiverPorts
The port/s this DaqReceiver is monitoring.
- SetConsumers(argin)[source]
Set the default list of consumers to start.
Sets the default list of consumers to start when left unspecified in the start_daq command.
- Parameters:
argin (
str) – A string containing a comma separated list of DaqModes.- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> daq = tango.DeviceProxy("low-mccs/daqreceiver/001") # pylint: disable=line-too-long >>> consumers = "DaqModes.INTEGRATED_BEAM_DATA,ANTENNA_BUFFER, BEAM_DATA," # noqa: E501 >>> daq.SetConsumers(consumers)
- class SetConsumersCommand(component_manager, logger=None)[source]
Class for handling the SetConsumersCommand(argin) command.
- do(argin)[source]
Implement MccsDaqReceiver.SetConsumersCommand functionality.
- Parameters:
argin (
str) – A string containing a comma separated list of DaqModes.- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SimulationMode
Whether DaqReceiver should use a simulator backend.
- SkuidUrl
The location of a running SKUID service.
- Start(argin='')[source]
Start the DaqConsumers.
- The MccsDaqReceiver will begin watching the interface specified in the
configuration and will start the configured consumers.
- Parameters:
argin (
str) – A json dictionary with optional keywords. ‘{“modes_to_start”}’.- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> daq = tango.DeviceProxy("low-mccs/daqreceiver/001") >>> argin = '{"modes_to_start": "INTEGRATED_CHANNEL_DATA, RAW_DATA"}' >>> daq.Start(argin) # use specified consumers >>> daq.Start("") # Uses default consumers.
- StartBandpassMonitor()[source]
Start monitoring antenna bandpasses.
- The MccsDaqReceiver will begin monitoring antenna bandpasses
and producing plots of the spectra.
- Stop()[source]
Stop the DaqReceiver.
The DAQ receiver will cease watching the specified interface and will stop all running consumers.
- StopBandpassMonitor()[source]
Stop monitoring antenna bandpasses.
- The MccsDaqReceiver will cease monitoring antenna bandpasses
and producing plots of the spectra.
- class StopBandpassMonitorCommand(component_manager, logger=None)[source]
Class for handling the StopBandpassMonitorCommand() command.
- __init__(component_manager, logger=None)[source]
Initialise a new StopBandpassMonitorCommand instance.
- do()[source]
Implement MccsDaqReceiver.SetConsumersCommand functionality.
Stop monitoring antenna bandpasses.
- The MccsDaqReceiver will cease monitoring antenna bandpasses
and producing plots of the spectra.
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- create_component_manager()[source]
Create and return a component manager for this device.
- Return type:
- Returns:
a component manager for this device.
- dataReceivedResult
Read the result of the receiving of data.
- Returns:
A tuple containing the data mode of transmission and a json string with any additional data about the data such as the file name.
- healthReport
Get the health report.
- Returns:
the health report.
- init_command_objects()[source]
Initialise the command handlers for commands supported by this device.
- Return type:
- init_device()[source]
Initialise the device.
This is overridden here to change the Tango serialisation model.
- Return type:
- interfaceName
Get the Reciever Interface Name.
- Returns:
“Interface Name”
- isBandpassMonitorRunning
Get the Reciever Interface Name.
- Returns:
Bandpass Monitor State
- receiverIP
Get the Reciever Interface IP address.
- Returns:
IP_Address
- receiverPorts
Get the Reciever Interface Name.
- Returns:
[Port_List]: list[int]
- rmsPlot
Read the last rms plot filepath.
- Returns:
The last block of rms data.
- runningConsumers
Get the daq Health state and value.
- Returns:
[(DaqMode.name: str, DaqMode.value: str)]
- xPolBandpass
Read the last bandpass plot data for the x-polarisation.
- Returns:
The last block of x-polarised bandpass data.
- yPolBandpass
Read the last bandpass plot data for the y-polarisation.
- Returns:
The last block of y-polarised bandpass data.