drs4.specs.csv module#

class drs4.specs.csv.CSVAuto(time: ~typing.Annotated[~xarrayspecs.typing.ArrayLike[~typing.Annotated[~typing.Literal['time'], Spec({'xarrayspecs_dims': <ITSELF>})], ~typing.Annotated[~typing.Literal['M8[ns]'], Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Measured time in UTC'})})], chan: ~typing.Annotated[~xarrayspecs.typing.ArrayLike[~typing.Annotated[~typing.Literal['chan'], Spec({'xarrayspecs_dims': <ITSELF>})], ~typing.Annotated[~numpy.int64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Channel number'})})], auto_usb: ~typing.Annotated[~xarrayspecs.typing.ArrayLike[~typing.Annotated[tuple[~typing.Literal['time'], ~typing.Literal['chan']], Spec({'xarrayspecs_dims': <ITSELF>})], ~typing.Annotated[~numpy.float64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'data'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Auto-correlation spectra of USB', 'units': 'Arbitrary unit'})})], auto_lsb: ~typing.Annotated[~xarrayspecs.typing.ArrayLike[~typing.Annotated[tuple[~typing.Literal['time'], ~typing.Literal['chan']], Spec({'xarrayspecs_dims': <ITSELF>})], ~typing.Annotated[~numpy.float64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'data'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Auto-correlation spectra of LSB', 'units': 'Arbitrary unit'})})])[source]#

Bases: AsDataset

Data specification of DRS4 CSV (auto-correlations).

auto_lsb: float64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'data'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Auto-correlation spectra of LSB', 'units': 'Arbitrary unit'})})]#

Auto-correlation spectra of LSB.

auto_usb: float64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'data'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Auto-correlation spectra of USB', 'units': 'Arbitrary unit'})})]#

Auto-correlation spectra of USB.

chan: int64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Channel number'})})]#

Channel number (0-511).

spec_version: Annotated[int, Spec({'xarrayspecs_use': 'attr'})] = 0#

Version of the data specification.

time: Literal['M8[ns]'], Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Measured time in UTC'})})]#

Measured time in UTC.

class drs4.specs.csv.CSVCross(time: ~typing.Annotated[~xarrayspecs.typing.ArrayLike[~typing.Annotated[~typing.Literal['time'], Spec({'xarrayspecs_dims': <ITSELF>})], ~typing.Annotated[~typing.Literal['M8[ns]'], Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Measured time in UTC'})})], chan: ~typing.Annotated[~xarrayspecs.typing.ArrayLike[~typing.Annotated[~typing.Literal['chan'], Spec({'xarrayspecs_dims': <ITSELF>})], ~typing.Annotated[~numpy.int64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Channel number'})})], cross_2sb: ~typing.Annotated[~xarrayspecs.typing.ArrayLike[~typing.Annotated[tuple[~typing.Literal['time'], ~typing.Literal['chan']], Spec({'xarrayspecs_dims': <ITSELF>})], ~typing.Annotated[~numpy.complex128, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'data'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Cross-correlation spectra of 2SB', 'units': 'Arbitrary unit'})})])[source]#

Bases: AsDataset

Data specification of DRS4 CSV (cross-correlation).

chan: int64, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Channel number'})})]#

Channel number (0-511).

cross_2sb: complex128, Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'data'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Cross-correlation spectra of 2SB', 'units': 'Arbitrary unit'})})]#

Cross-correlation spectra of 2SB (USB x LSB*).

spec_version: Annotated[int, Spec({'xarrayspecs_use': 'attr'})] = 0#

Version of the data specification.

time: Literal['M8[ns]'], Spec({'xarrayspecs_dtype': <ITSELF>})]], Spec({'xarrayspecs_use': 'coord'}), Spec({'xarrayspecs_attrs': ReadonlyDict({'long_name': 'Measured time in UTC'})})]#

Measured time in UTC.

drs4.specs.csv.open_csv_auto(csv: PathLike[str] | str, /) → Dataset[source]#

Open a CSV file of auto-correlations as a Dataset.

Parameters:

csv – Path of input CSV file (e.g. new_pow.csv).

Returns:

Dataset of the input CSV file.

drs4.specs.csv.open_csv_cross(csv: PathLike[str] | str, /) → Dataset[source]#

Open a CSV file of cross-correlation as a Dataset.

Parameters:

csv – Path of input CSV file (e.g. new_phase.csv).

Returns:

Dataset of the input CSV file.