drs4.specs.ms module#
- class drs4.specs.ms.MS(time: ~typing.Annotated[~drs4.specs.common.Time | ~typing.Any, <Role.COORD: 'coord'>], chan: ~typing.Annotated[~drs4.specs.common.Chan | ~typing.Any, <Role.COORD: 'coord'>], freq: ~typing.Annotated[~drs4.specs.ms.Freq | ~typing.Any, <Role.COORD: 'coord'>], signal_sb: ~typing.Annotated[~drs4.specs.ms.SignalSB | ~typing.Any, <Role.COORD: 'coord'>], signal_chan: ~typing.Annotated[~drs4.specs.ms.SignalChan | ~typing.Any, <Role.COORD: 'coord'>], auto_usb: ~typing.Annotated[~drs4.specs.common.AutoUSB | ~typing.Any, <Role.DATA: 'data'>], auto_lsb: ~typing.Annotated[~drs4.specs.common.AutoLSB | ~typing.Any, <Role.DATA: 'data'>], cross_2sb: ~typing.Annotated[~drs4.specs.common.Cross2SB | ~typing.Any, <Role.DATA: 'data'>], chassis: ~typing.Annotated[~typing.Literal[1, 2], <Role.ATTR: 'attr'>], interface: ~typing.Annotated[~typing.Literal[1, 2], <Role.ATTR: 'attr'>], integ_time: ~typing.Annotated[~typing.Literal[100, 200, 500, 1000], <Role.ATTR: 'attr'>])[source]#
Bases:
AsDatasetData specification of DRS4 measurement set.
- auto_lsb: DATA: 'data'>]#
Auto-correlation spectra of LSB.
- auto_usb: DATA: 'data'>]#
Auto-correlation spectra of USB.
- chan: COORD: 'coord'>]#
Channel number (0-511).
- chassis: ATTR: 'attr'>]#
Chassis number of DRS4 (1|2).
- cross_2sb: DATA: 'data'>]#
Cross-correlation spectra of 2SB (USB x LSB*).
- freq: COORD: 'coord'>]#
Intermediate frequency in GHz.
- integ_time: ATTR: 'attr'>]#
Spectral integration time in ms (100|200|500|1000).
- interface: ATTR: 'attr'>]#
Interface (IF) number of DRS4 (1|2).
- signal_chan: COORD: 'coord'>]#
Signal channel number (0-511|-1).
- signal_sb: COORD: 'coord'>]#
Signal sideband (USB|LSB|NA).
- spec_version: ATTR: 'attr'>] = 0#
Version of the data specification.
- time: COORD: 'coord'>]#
Measured time in UTC.
- drs4.specs.ms.open_csvs(csv_autos: PathLike[str] | str, csv_cross: PathLike[str] | str, /, *, chassis: Literal[1, 2], interface: Literal[1, 2], freq_range: Literal['inner', 'outer'], integ_time: Literal[100, 200, 500, 1000], signal_sb: Literal['USB', 'LSB'] | None = None, signal_chan: int | None = None, join: Literal['outer', 'inner', 'left', 'right', 'exact', 'override'] = 'inner') Dataset[source]#
Open CSV files of auto/cross correlations as a Dataset.
- Parameters:
csv_autos – Path of input CSV file of auto-correlations.
csv_cross – Path of input CSV file of cross-correlation.
chassis – Chassis number of DRS4 (1|2).
interface – Interface number of DRS4 (1|2).
freq_range – Intermediate frequency range (inner|outer).
integ_time – Spectral integration time in ms (100|200|500|1000).
signal_sb – Signal sideband (USB|LSB). If not specified, NA (missing indicator) will be assigned.
signal_chan – Signal channel number (0-511). If not specified, -1 (missing indicator) will be assigned.
join – Method for joining the CSV files.
- Returns:
Dataset of the input CSV files.
- Raises:
ValueError – Raised if the given value of either chassis, freq_range, integ_time, or interface is not valid.
- drs4.specs.ms.open_vdifs(vdif_usb: PathLike[str] | str, vdif_lsb: PathLike[str] | str, /, *, chassis: Literal[1, 2], interface: Literal[1, 2], freq_range: Literal['inner', 'outer'], integ_time: Literal[100, 200, 500, 1000] | None = None, signal_sb: Literal['USB', 'LSB'] | None = None, signal_chan: int | None = None, join: Literal['outer', 'inner', 'left', 'right', 'exact', 'override'] = 'inner') Dataset[source]#
Open USB/LSB VDIF files as a Dataset.
- Parameters:
vdif_usb – Path of input USB VDIF file.
vdif_lsb – Path of input LSB VDIF file.
chassis – Chassis number of DRS4 (1|2).
interface – Interface number of DRS4 (1|2).
freq_range – Intermediate frequency range (inner|outer).
integ_time – Spectral integration time in ms (100|200|500|1000). If not specified, it will be inferred from the VDIF files.
signal_sb – Signal sideband (USB|LSB). If not specified, NA (missing indicator) will be assigned.
signal_chan – Signal channel number (0-511). If not specified, -1 (missing indicator) will be assigned.
join – Method for joining the VDIF files.
- Returns:
Dataset of the input VDIF files.
- Raises:
RuntimeError – Raised if USB/LSB spectral integration times are not same.
ValueError – Raised if the given value of either chassis, freq_range, integ_time, or interface is not valid.