Product module
Contents
Product module¶
The product module holds the Product class, the Instrument Product classes
inherating from the Product class, and PLFParser and
ProductFactory classes, respectively used to parse an input PLF file and create
corresponding valid Product objects.
props_dict¶
A product properties dictionary typically comes from parsing a PLF file. It must contain the following keys:
instrument_host_id, instrument_id, product_type so as to identify and create a corresponding
Instrument Product class object. Additional required keys are defined in the
Configuration File and retuned by a geogen.config.Config.get_product_req_props() method call.
Example of product properties dictionary:
{
"product_id": "HH852_0008_SR2.IMG",
"instrument_host_id": "MEX",
"instrument_id": "HRSC",
"product_type": "",
"target_name": "MARS",
"start_time": "2018-02-08T02:08:35.476Z",
"stop_time": "2018-02-08T02:08:35.481Z",
"detector_id": "MEX_HRSC_SRC",
"lines": "1018"
}
Product class¶
- class geogen.product.Product(props_dict, config, silent=False)[source]¶
Bases:
objectClass that represents any PDS observational data product.
Its hold the observational data product properties required to initiate a valid
Observationobject, and compute its geometry metadata.- valid¶
Whether or not Product object is valid.
- Type
bol
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
Instrument Product classes¶
Instrument Product classes inherits all the Product class attributes. They holds
additional attributes, specific to each instrument data product type, that are passed by an input props_dict.
Their __init__ contructor method is used to set and/or modify any of these attributes so that a valid
Observation object can be instantiated, and its corresponding geometry metadata
computed.
Mars Express (MEX)¶
- class geogen.product.MEX_OMEGA_EDR(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for MEX/OMEGA EDR data products.
detector_nameis always set to ‘MEX_OMEGA_SWIR_C’.detector_modeis set to the first element of the data cube dimension, given by thecore_itemsproperty value.n_data_recordsis set to the third element of the data cube dimension, given by thecore_itemsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.MEX_HRSC_RDR(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for MEX/HRSC RDR data products.
detector_nameis set to thedetector_idproperty value.n_data_recordsis set to thelinesproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.MEX_PFS_EDR(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for MEX/PFS EDR data products.
detector_nameis set based on thedetector_idproperty value.n_data_recordsis set to thefile_recordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.MEX_SPICAM_RDR(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for MEX/SPICAM RDR data products.
detector_nameis set based on thechannel_id,target_type,spacecraft_pointing_modeandspicam_binningproperties values.n_data_recordsis set to thefile_recordsproperty value.target_nameis set to thespicam_targetproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.MEX_MARSIS(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for MEX/MARSIS data products.
Currently defined as applicable to EDR and RDR product types in psa_config.json file. Temporary detector FOV definition in mex_addendum.ti file:
\begindata INS-41300_FOV_FRAME = 'MEX_SPACECRAFT' INS-41300_FOV_SHAPE = 'RECTANGLE' INS-41300_BORESIGHT = ( 0.00000 0.00000 1.00000 ) INS-41300_FOV_CLASS_SPEC = 'ANGLES' INS-41300_FOV_REF_VECTOR = ( 1.00000 0.00000 0.00000 ) INS-41300_FOV_REF_ANGLE = 1.0 INS-41300_FOV_CROSS_ANGLE = 1.0 INS-41300_FOV_ANGLE_UNITS = 'DEGREES' \begintext
detector_nameis always set to ‘MEX_MARSIS’n_data_recordsis set to therowsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.MEX_ASPERA(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for MEX/ASPERA-3 data products.
Currently defined as applicable to DATA and DDR product types in psa_config.json file.
detector_nameis set based onproduct_idproperty value.n_data_recordsis set tofile_recordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.MEX_VMC(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for MEX/VMC data products.
Currently defined as applicable to EDR and RDR product types in psa_config.json file.
detector_nameis set todetector_idproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
Rosetta (ROS)¶
- class geogen.product.ROS_OSIRIS(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for ROSETTA/OSIRIS WAC and NAC data products.
Currently defined as applicable to EDR product type in psa_config.json file.
detector_nameis set based oninstrument_idandgeometric_distortion_correction_flagproperties values.target_nameis currently updated so as to take into account for undefined SPICE body name synonyms.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.ROS_NAVCAM_EDR(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for ROSETTA/NAVCAM EDR data products.
detector_nameis set based onchannel_idproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.ROS_ALICE(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for ROSETTA/ALICE data products.
Currently defined as applicable to EDR, REDR and REFDR product types in psa_config.json file.
detector_nameis always set to ‘ROS_ALICE’.n_data_recordsis set tolinesproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.ROS_VIRTIS_EDR(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for ROSETTA/VIRTIS EDR data products.
detector_nameis set based onchannel_idproperty value.n_data_recordsis set to the third element of the data cube dimension, given by thecore_itemsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.ROS_MIRO(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for ROSETTA/MIRO data products.
Currently defined as applicable to EDR and RDR product types in psa_config.json file.
detector_nameis set based onproduct_idproperty value.n_data_recordsis set tofile_recordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
ExoMars TGO (TGO)¶
- class geogen.product.TGO_ACS_RAW(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for TGO/ACS Raw data products.
detector_nameis set based onidentifierproperty value.n_data_recordsis set torecordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.TGO_ACS_CAL(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for TGO/ACS Calibrated data products.
detector_nameis based onidentifierandnir_observation_typeproperties values.n_data_recordsis set torecordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.TGO_CASSIS_RAW(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for TGO/CASSIS Raw data products.
detector_nameis set based onproduct_idproperty value.detector_fov_ref_ratiois set based onsamplesproperty value.detector_fov_cross_ratiois set based onlinesandfilterproperties values.stop_timeis set tostart_timeproperty value.No
time_offsetis applied (can be changed if deemed necessary).
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.TGO_CASSIS_CAL(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for TGO/CASSIS Calibrated data products.
detector_nameis set based onfilterproperty value.detector_fov_ref_ratiois set based onsamplesproperty value.detector_fov_cross_ratiois set based onlinesandfilterproperties values.stop_timeis set tostart_timeproperty value.No
time_offsetis applied (can be changed if deemed necessary).
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.TGO_FREND_CAL(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for TGO/FREND Calibrated data products.
detector_nameis always set to ‘TGO_FREND’.n_data_recordsis set torecordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.TGO_NOMAD_RAW(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for TGO/NOMAD Raw data products.
detector_nameis set basedidentifierproperty value.n_data_recordsis set torecordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
- class geogen.product.TGO_NOMAD_CAL(props_dict, config, silent=False)[source]¶
Bases:
geogen.product.ProductProduct class for TGO/NOMAD Calibrated data products.
detector_nameis set based onidentifierandproduct_idproperties values.n_data_recordsis set torecordsproperty value.
Constructs Product object.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
config (Config) – Input Config object.
silent (bool) – Indicates whether or not missing-required-product-property warning message is kept silent.
PLFParser class¶
- class geogen.product.PLFParser(config)[source]¶
Bases:
objectClass that parses Product List File (PLF) files.
Holds valid
Productobjects resulting from a PLF file parsing.- n_product_items¶
Number of valid product items in PFL file.
- Type
- products¶
List of Product objects matching valid product items.
- Type
List[Product]
Constructs PLFParser object.
- Parameters
config (Config) – Config object to be associated to the parser.
ProductFactory class¶
- class geogen.product.ProductFactory(config)[source]¶
Bases:
objectClass that creates Product or Product-child objects.
Constructs ProductFactory object.
- Parameters
config (Config) – Input Config object.
- create(props_dict, silent=False)[source]¶
Returns a valid Product-children class object from an input product props dictionary.
- Parameters
props_dict (dict) – Input product properties dictionary (see props_dict).
silent (bool, optional) – Indicates whether or not missing-required-product-property warning message is kept silent.
- Return type
