ska_pst.lmc.beam

This subpackage implements BEAM component for PST.LMC.

class ska_pst.lmc.beam.PstBeam(*args: Any, **kwargs: Any)[source]

A logical TANGO device representing a Beam Capability for PST.LMC.

Properties:

  • Device Property
    RecvProcessApiEndpoint
    • Type:’DevString’

    SmrbProcessApiEndpoint
    • Type:’DevString’

    DspDiskProcessApiEndpoint
    • Type:’DevString’

    StatProcessApiEndpoint
    • Type:’DevString’

    ScanOutputDirPattern
    • Type:’DevString’

class ConfigureScanCommand(*args: Any, **kwargs: Any)[source]

A class for the ObsDevice ConfigureScan command.

This overrides the base validator to proxy the request to the BEAM component manager that will in turn validate the request against the CORE apps.

always_executed_hook() None[source]

Execute call before any TANGO command is executed.

availableDiskSpace() int

Available space on the disk that the PST.BEAM is writing to.

Returns

available space on the disk that PST.BEAM is writing to, in bytes.

Return type

int

availableRecordingTime() float

Get available time, in seconds, for writing available.

Returns

available time, in seconds, for writing available.

Return type

float

channelBlockConfiguration() str

Get the channel block configuration.

This is a JSON serialised string of the channel block configuration that is calculated during the ConfigureScan command. This configuration includes the following properties:

  • Number of channel blocks, between 1 and 4

  • For each channel block, the block of channel numbers using a range in the form of inclusive of the lower number and exclusive of the higher number (e.g [1, 21) would be a range of 20 channels starting from 1 and ending at channel block 20 (inclusive).

  • Channel block IPv4 address to send data to.

  • Channel block UDP port

{
    "num_channel_blocks": 2,
    "channel_blocks": [
        {
            "data_host": "10.10.0.1",
            "data_port": 20000,
            "start_channel": 0,
            "num_channels": 12,
        },
        {
            "data_host": "10.10.0.1",
            "data_port": 20001,
            "start_channel": 12,
            "num_channels": 10,
        },
    ]
}
Returns

the channel block configuration as a JSON string.

Return type

str

checksumFailurePacketRate() float

Get the current rate of packets with checkesum failures.

Returns

the current rate of packets with checkesum failures in packets/seconds.

Return type

float

checksumFailurePackets() int

Get the total number of packets with checksum failures for current scan.

Returns

the total number of packets with checksum failures for current scan.

Return type

int

create_component_manager() PstBeamComponentManager[source]

Create and return a component manager for this device.

Returns

a component manager for this device.

dataDropRate() float

Get the current rate of CBF ingest data being dropped or lost by the receiving proces.

Returns

current rate of CBF ingest data being dropped or lost in Bytes/s.

Return type

float

dataDropped() int

Get the total number of bytes dropped in the current scan.

Returns

total number of bytes dropped in the current scan.

Return type

int

dataReceiveRate() float

Get the current data receive rate from the CBF interface.

Returns

current data receive rate from the CBF interface in Gb/s.

Return type

float

dataReceived() int

Get the total amount of data received from CBF interface for current scan.

Returns

total amount of data received from CBF interface for current scan in Bytes

Return type

int

dataRecordRate() float

Get current rate of writing to the disk.

Returns

use space on the disk that PST.BEAM is writing to, in bytes.

Return type

float

dataRecorded() int

Get number of bytes written during scan.

Returns

number of bytes written during scan.

Return type

int

delete_device() None[source]

Delete resources allocated in init_device.

This method allows for any memory or other resources allocated in the init_device method to be released. This method is called by the device destructor and by the device Init command.

diskCapacity() int

Total capacity of the disk that DSP is writing to.

Returns

total capacity of the disk that DSP is writing to, in bytes.

Return type

int

diskUsedBytes() int

Get used space on the disk that DSP is writing to.

This is diskCapacity - availableDiskSpace.

Returns

used space on the disk that DSP is writing to, in bytes.

Return type

int

diskUsedPercentage() float

Get used space on the disk that DSP is writing to.

This is 100.0 * (diskCapacity - availableDiskSpace)/availableDiskSpace.

Returns

used space on the disk that DSP is writing to as a percentage.

Return type

float

property dsp_disk_process_api_endpoint: str

Get the gRPC process API endpoint for DSP.DISK.

property dsp_flow_through_process_api_endpoint: str

Get the gRPC process API endpoint for DSP.FT.

expectedDataRecordRate() float

Get the expected rate of data to be received by PST Beam component.

Returns

the expected rate of data to be received by PST Beam component.

Return type

float

handle_attribute_value_update(attribute_name: str, value: Any) None[source]

Handle update of a device attribute value.

Parameters
  • attribute_name (str) – the name of the attribute to update.

  • value (Any) – the new value of the attribute to update to.

imagPolAMeanFreqAvg() float

Get the mean of the imaginary data for pol A, averaged over all channels.

imagPolAMeanFreqAvgRfiExcised() float

Get the mean of the imaginary data for pol A, averaged over channels not flagged for RFI.

imagPolANumClippedSamples() int

Get the num of clipped samples of the imaginary data for pol A.

imagPolANumClippedSamplesRfiExcised() int

Get the num of clipped samples of the imaginary data for pol A in channels not flagged for RFI.

imagPolAVarianceFreqAvg() float

Get the variance of the imaginary data for pol A, averaged over all channels.

imagPolAVarianceFreqAvgRfiExcised() float

Get the variance of the imaginary data for pol A, averaged over channels not flagged for RFI.

imagPolBMeanFreqAvg() float

Get the mean of the imaginary data for pol B, averaged over all channels.

imagPolBMeanFreqAvgRfiExcised() float

Get the mean of the imaginary data for pol B, averaged over channels not flagged for RFI.

imagPolBNumClippedSamples() int

Get the num of clipped samples of the imaginary data for pol B.

imagPolBNumClippedSamplesRfiExcised() int

Get the num of clipped samples of the imaginary data for pol B in channels not flagged for RFI.

imagPolBVarianceFreqAvg() float

Get the variance of the imaginary data for pol B, averaged over all channels.

imagPolBVarianceFreqAvgRfiExcised() float

Get the variance of the imaginary data for pol B, averaged over channels not flagged for RFI.

init_device() None[source]

Initialise the attributes and properties of the PstBeam.

This overrides the SKABaseDevice.

malformedPacketRate() float

Get current rate of malformed packets.

Returns

current rate of malformed packets in packets/seconds.

Return type

float

malformedPackets() int

Get the total number of packets marked as malformed for current scan.

Returns

the total number of packets marked as malformed for current scan.

Return type

int

misdirectedPacketRate() float

Get the current rate of misdirected packets.

Returns

the current rate of misdirected packets in packets/seconds.

Return type

float

misdirectedPackets() int

Get the total number of packets as marked as misdirected for current scan.

Returns

the total number of packets as marked as misdirected for current scan.

Return type

int

misorderedPacketRate() float

Get the current rate of misordered packets.

Returns

the current rate of misordered packets in packets/seconds.

Return type

float

misorderedPackets() int

Get the total number of packets received out of order in the current scan.

Returns

total number of packets received out of order in the current scan.

Return type

int

monitoringPollingRate(monitoring_polling_rate_ms: int) None

Update the monitoring polling rate.

property monitoring_polling_rate_ms: int

Get the monitoring polling rate.

observationMode() str

Get the current observation mode that PST is configured for.

If the BEAM is not in a scan configured state, this will return an empty string.

realPolAMeanFreqAvg() float

Get the mean of the real data for pol A, averaged over all channels.

realPolAMeanFreqAvgRfiExcised() float

Get the mean of the real data for pol A, averaged over channels not flagged for RFI.

realPolANumClippedSamples() int

Get the num of clipped samples of the real data for pol A.

realPolANumClippedSamplesRfiExcised() int

Get the num of clipped samples of the real data for pol A in channels not flagged for RFI.

realPolAVarianceFreqAvg() float

Get the variance of the real data for pol A, averaged over all channels.

realPolAVarianceFreqAvgRfiExcised() float

Get the variance of the real data for pol A, averaged over channels not flagged for RFI.

realPolBMeanFreqAvg() float

Get the mean of the real data for pol B, averaged over all channels.

realPolBMeanFreqAvgRfiExcised() float

Get the mean of the real data for pol B, averaged over channels not flagged for RFI.

realPolBNumClippedSamples() int

Get the num of clipped samples of the real data for pol B.

realPolBNumClippedSamplesRfiExcised() int

Get the num of clipped samples of the real data for pol B in channels not flagged for RFI.

realPolBVarianceFreqAvg() float

Get the variance of the real data for pol B, averaged over all channels.

realPolBVarianceFreqAvgRfiExcised() float

Get the variance of the real data for pol B, averaged over channels not flagged for RFI.

property recv_process_api_endpoint: str

Get the gRPC process API endpoint for RECV.CORE.

ringBufferUtilisation() float

Get the percentage of the ring buffer elements that are full of data.

Returns

the percentage of the ring buffer elements that are full of data.

Return type

float

property scan_output_dir_pattern: str

Get the pattern for directory used for scan output files.

seqNumberSyncErrorPacketRate() float

Get the current rate of packets with a sequence number sync error.

Returns

the current rate of packets with a sequence number sync error in packets/seconds.

Return type

float

seqNumberSyncErrorPackets() int

Get the total number of packets with a seq num sync error in current scan.

Returns

the total number of packets with a seq num sync error in current scan.

Return type

int

property smrb_process_api_endpoint: str

Get the gRPC process API endpoint for SMRB.CORE.

property stat_process_api_endpoint: str

Get the gRPC process API endpoint for STAT.CORE.

timestampSyncErrorPacketRate() float

Get the current rate of packets with a timestamp sync error.

Returns

the current rate of packets with a timestamp sync error in packets/seconds.

Return type

float

timestampSyncErrorPackets() int

Get the total number of packets with a timestamp sync error for current scan.

Returns

the total number of packets with a timestamp sync error for current scan.

Return type

int

class ska_pst.lmc.beam.PstBeamComponentManager(*args: Any, **kwargs: Any)[source]

Component manager for the BEAM component in PST.LMC.

Since the BEAM component is a logical device, this component manager is used to orchestrate the process devices, such as BEAM, RECV.

Commands that are executed on this component manager are sent to instances of PstDeviceProxy for each device that the BEAM device manages.

This component manager only takes the fully-qualified device name (FQDN) for the remote devices, but uses the DeviceProxyFactory to retrieve instances of the device proxies that commands should be sent to.

abort(task_callback: Optional[Callable[[...], Any]] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Tell the component to abort whatever it was doing.

Parameters

task_callback – callback to be called when the status of the command changes

property available_disk_space: int

Get available bytes for disk to be written to during scan.

property available_recording_time: float

Get the available recording time, for the disk being written to during the scan, in seconds.

property channel_block_configuration: dict

Get current channel block configuration.

property checksum_failure_packet_rate: float

Get the current rate of packets with checksum failures in packets/sec.

property checksum_failure_packets: int

Get the total number of packets with checksum failures for the current scan.

configure_scan(task_callback: Optional[Callable[[...], Any]] = None, **kwargs: Any) Tuple[ska_tango_base.executor.TaskStatus, str]

Configure scan for the component.

The kwargs of this method is scan configuration. The super class method has the same signature.

Parameters
  • task_callback – callback to be called when the status of the command changes

  • kwargs – the scan configuration to use.

property data_drop_rate: float

Get current dropped data rate in bytes per second.

property data_dropped: int

Get current dropped data in bytes.

property data_receive_rate: float

Get current received data rate in Gb/s.

property data_received: int

Get current received data in bytes.

property data_record_rate: float

Get current data write rate in bytes per second.

property data_recorded: int

Get current amount of bytes written to file.

deconfigure_scan(task_callback: Optional[Callable[[...], Any]] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Deconfigure scan for this component.

Parameters

task_callback – callback to be called when the status of the command changes

property disk_capacity: int

Get size, in bytes, for the disk used for recording scan data.

property disk_used_bytes: int

Get the current amount, in bytes, of disk used used.

property disk_used_percentage: float

Get the percentage of used disk space for recording of scan data.

end_scan(task_callback: Optional[Callable[[...], Any]] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Stop scanning.

Parameters

task_callback – callback to be called when the status of the command changes

property expected_data_record_rate: float

Get the expected data rate for DSP output for current scan configuration.

go_to_fault(fault_msg: str, task_callback: Optional[Callable[[...], Any]] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Put all the sub-devices into a FAULT state.

Parameters

task_callback – callback to be called when the status of the command changes

property imag_pol_a_mean_freq_avg: float

Get the mean of the imaginary data for pol A, averaged over all channels.

property imag_pol_a_mean_freq_avg_rfi_excised: float

Get the mean of the imaginary data for pol A, averaged over channels not flagged for RFI.

property imag_pol_a_num_clipped_samples: int

Get the num of clipped samples of the imaginary data for pol A.

property imag_pol_a_num_clipped_samples_rfi_excised: int

Get the num of clipped samples of the imaginary data for pol A in channels not flagged for RFI.

property imag_pol_a_variance_freq_avg: float

Get the variance of the imaginary data for pol A, averaged over all channels.

property imag_pol_a_variance_freq_avg_rfi_excised: float

Get the variance of the imaginary data for pol A, averaged over channels not flagged for RFI.

property imag_pol_b_mean_freq_avg: float

Get the mean of the imaginary data for pol B, averaged over all channels.

property imag_pol_b_mean_freq_avg_rfi_excised: float

Get the mean of the imaginary data for pol B, averaged over channels not flagged for RFI.

property imag_pol_b_num_clipped_samples: int

Get the num of clipped samples of the imaginary data for pol B.

property imag_pol_b_num_clipped_samples_rfi_excised: int

Get the num of clipped samples of the imaginary data for pol B in channels not flagged for RFI.

property imag_pol_b_variance_freq_avg: float

Get the variance of the imaginary data for pol B, averaged over all channels.

property imag_pol_b_variance_freq_avg_rfi_excised: float

Get the variance of the imaginary data for pol B, averaged over channels not flagged for RFI.

property malformed_packet_rate: float

Get the current rate of malformed packets in packets/sec.

property malformed_packets: int

Get the total number of malformed packets in the current scan.

property misdirected_packet_rate: float

Get the current rate of misdirected packets in packets/sec.

property misdirected_packets: int

Get the total number of misdirected packets in the current scan.

property misordered_packet_rate: float

Get the current rate of packets received out of order in packets/sec.

property misordered_packets: int

Get the total number of packets received out of order in the current scan.

property monitoring_polling_rate_ms: int

Get the current monitoring polling rate, in milliseconds.

property observation_mode: ska_pst.lmc.util.observation_mode.PstObservationMode | None

Get the current observation mode.

If the PST BEAM has been configured for a scan then this will return the observation mode from the configuration JSON. If the BEAM is in an IDLE state then this will return None.

Returns

the current observation mode if there has been a configuration else None.

Return type

PstObservationMode | None

obsreset(task_callback: Optional[Callable[[...], Any]] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Reset the component and put it into an IDLE state.

The subcomponents have all the resources released and as such are moved back to the EMPTY state.

Parameters

task_callback – callback to be called when the status of the command changes

property real_pol_a_mean_freq_avg: float

Get the mean of the real data for pol A, averaged over all channels.

property real_pol_a_mean_freq_avg_rfi_excised: float

Get the mean of the real data for pol A, averaged over channels not flagged for RFI.

property real_pol_a_num_clipped_samples: int

Get the num of clipped samples of the real data for pol A.

property real_pol_a_num_clipped_samples_rfi_excised: int

Get the num of clipped samples of the real data for pol A in channels not flagged for RFI.

property real_pol_a_variance_freq_avg: float

Get the variance of the real data for pol A, averaged over all channels.

property real_pol_a_variance_freq_avg_rfi_excised: float

Get the variance of the real data for pol A, averaged over channels not flagged for RFI.

property real_pol_b_mean_freq_avg: float

Get the mean of the real data for pol B, averaged over all channels.

property real_pol_b_mean_freq_avg_rfi_excised: float

Get the mean of the real data for pol B, averaged over channels not flagged for RFI.

property real_pol_b_num_clipped_samples: int

Get the num of clipped samples of the real data for pol B.

property real_pol_b_num_clipped_samples_rfi_excised: int

Get the num of clipped samples of the real data for pol B in channels not flagged for RFI.

property real_pol_b_variance_freq_avg: float

Get the variance of the real data for pol B, averaged over all channels.

property real_pol_b_variance_freq_avg_rfi_excised: float

Get the variance of the real data for pol B, averaged over channels not flagged for RFI.

property ring_buffer_utilisation: float

Get current utilisation of ring buffer for current scan configuration.

scan(task_callback: Optional[Callable[[...], Any]] = None, **kwargs: Any) Tuple[ska_tango_base.executor.TaskStatus, str]

Start scanning.

The kwargs of this method is scan request, including the scan_id. The super class method has the same signature. By using the kwargs allow for forward compatability of accepting other parameters for the starting of the scan.

Parameters
  • task_callback (Callback) – callback for background processing to update device status.

  • kwargs (dict) – scan request as a dict

property seq_number_sync_error_packet_rate: float

Get the current rate of packets with seq.

number sync error in packets/sec.

property seq_number_sync_error_packets: int

Get the total number of packets with seq.

number sync error for the current scan.

set_logging_level(log_level: ska_control_model.LoggingLevel) None

Set LoggingLevel of all the sub-devices.

Parameters

log_level – The required TANGO LoggingLevel

Returns

None.

property timestamp_sync_error_packet_rate: float

Get the current rate of packets with timestamp sync errors in packets/sec.

property timestamp_sync_error_packets: int

Get the total number of packets with timestamp sync errors for the current scan.

validate_configure_scan(configuration: dict) None[source]

Validate the configure scan request.

class ska_pst.lmc.beam.PstBeamDeviceInterface[source]

A purely abstract class that that represents a BEAM.MGMT Device.

This is implemented by PstBeam and used by the PstBeamComponentManager which needs a limited view of the TANGO device but without having full access to it.

property dsp_disk_process_api_endpoint: str

Get the gRPC process API endpoint for DSP.DISK.

property dsp_flow_through_process_api_endpoint: str

Get the gRPC process API endpoint for DSP.DISK.

property recv_process_api_endpoint: str

Get the gRPC process API endpoint for SMRB.CORE.

property scan_output_dir_pattern: str

Get the pattern for directory used for scan output files.

property smrb_process_api_endpoint: str

Get the gRPC process API endpoint for SMRB.CORE.

property stat_process_api_endpoint: str

Get the gRPC process API endpoint for STAT.CORE.