ska_pst.send.dataproduct_file_manager
Module class for managing DADA files.
- class ska_pst.send.dataproduct_file_manager.DadaFileManager(folder: Path, logger: Optional[Logger] = None)[source]
Class that captures PST data files.
Parses attributes from a set of PST voltage recorder data and weights files and computes some of the derived quantities from the scales and weights, such as the inferred number of dropped/invalid packets.
- property data_files: List[DadaFileReader]
Get list of DadaFileReader objects.
- property weights_files: List[WeightsFileReader]
Get list of WeightsFileReader objects.
- class ska_pst.send.dataproduct_file_manager.DadaFileReader(file: Path, logger: Optional[Logger] = None)[source]
Class that can be used to read a PSR DADA file.
- property bw: str
Get the BW value from header.
- property data_size: int
Get the size of the data.
- property eb_id: str
Get the EB_ID value from the header.
- property file_number: int
Get the FILE_NUMBER value from header.
- property file_path: str
Get path of file in string.
- property file_size: int
Get size of file in bytes.
- property freq: str
Get the FREQ value from header.
- property header: Dict[str, str]
Get header for file.
- property intent: str
Build value using SOURCE from header.
- property nbit: int
Get the number of bits the data is encoded in.
- property nchan: int
Get the NCHAN value from header.
- property notes: str
Get the NOTES value from header.
- property npol: str
Get the NPOL value from header.
- property obs_offset: int
Get the OBS_OFFSET value.
- property observer: str
Get the OBSERVER value from header.
- property resolution: int
Get the RESOLUTION value from header.
- property scan_id: str
Get the SCAN_ID value from header.
- property source: str
Get the SOURCE value from header.
- property stt_crd1: str
Get the STT_CRD1 value from header.
- property stt_crd2: str
Get the STT_CRD2 value from header.
- property telescope: str
Get the TELESCOPE value from header.
- property tsamp: str
Get the TSAMP value from header.
- property udp_nsamp: int
Get the UDP_NSAMP value from header.
- property utc_start: str
Get the UTC_START value from header.
- class ska_pst.send.dataproduct_file_manager.WeightsFileReader(file: Path, logger: Optional[Logger] = None)[source]
Class used to read Weights PSRDADA generated by ska_pst_dsp_disk.
- property nsamp_per_weight: int
Get the number of samples the weights are used for.
- property packet_offset: int
Get the package offset for current file.
This converts the obs_offset a packet offset by dividing the value by the weights_packet_stride. This will assert that the obs_offset is a mulitple of weights_packet_stride
- property packet_scales_size: int
Get the packet scales size.
- property packet_weights_size: int
Get the packet weights size.