pyspex.lib package
Submodules
pyspex.lib.attrs_def module
Provides the common global-attributes for SPEXone Level-1 products.
- pyspex.lib.attrs_def.attrs_def(inflight: bool = True, origin: str | None = None) dict[source]
Define global attributes of a SPEXone Level-1A product.
- Parameters:
inflight (bool, default=True) – Flag for in-flight or on-ground products
origin (str) – Product origin: ‘SRON’ or ‘NASA’
- Returns:
Global attributes for a Level-1A product
- Return type:
dict
pyspex.lib.l1a_def module
Defines the format of a SPEXone Level-1A product.
- pyspex.lib.l1a_def.init_l1a(l1a_flname: str, ref_date: datetime.datetime, dims: dict, compression: bool = False) Dataset[source]
Create an empty SPEXone Level-1A product (on-ground or in-flight).
- Parameters:
l1a_flname (str) – Name of L1A product
ref_date (datetime.datetime) – Date of the first detector image
dims (dict) –
Provide length of the Level-1A dimensions. Default values:
number_of_images : None # number of image frames samples_per_image : None # depends on binning table hk_packets : None # number of HK tlm-packets (1 Hz)
compression (bool, default=False) – Use compression on dataset /science_data/detector_images.
Notes
The optional groups ‘/gse_data’ and ‘/navigation_data’ are not created by this script.
Original CDL definition is from F. S. Patt (GSFC), 08-Feb-2019
pyspex.lib.leap_sec module
Python script to determine the number of leap seconds for given timestamp.
The source for the latest version of tai-utc.dat is the US Naval Observatory:
pyspex.lib.tlm_utils module
Contains helper functions for the class SPXtlm.
pyspex.lib.tmtc_def module
Defines the SPEXone telemetry packets as numpy data-types.
References
SPX1-TN-005 Telemetry and Telecommand Handbook, issue 14, date 15-Mar-2021
- pyspex.lib.tmtc_def.tmtc_dtype(apid: int) dtype[source]
Obtain SPEXone telemetry packet definition.
- Parameters:
apid (int) – SPEXone telemetry APID. Implemented APIDs: 0x350 (Science), 0x320 (NomHK) and 0x322 (DemHK).
- Returns:
Definition of Spexone telemetry packet.
- Return type:
numpy.dtype
Examples
Usage of tmtc_dtype:
>> from pyspex.lib.tmtc_def import tmtc_dtype >> mps_dtype = tmtc_dtype(0x350)
Module contents
Necessary but empty file.