Configuring for new instrument data product types

In this tutorial you will how to define and implement new instrument data product types. We use the example of the SIMBIO-SYS instrument on BepiColombo’s Mercury Planetary Orbiter.

Prerequisites

For this tutorial, we assume you’re using GEOGEN on your local computer and have write access to the psa_geo package, and in particular to the product.py Python module (this is not possible from the GEOGEN Training JupyterHub platform).

It requires you have completed the previous tutorial Using alternative configuration, and have basic Python programming basic skills.

Reference: Configuration.

Steps

1. Define detector type and parameters

LINE or FRAME detector?

Check existing SIMBIO-SYS detector FOV definitions:

geogen fov MPO --config-file=my_config.json | grep SIMBIO-SYS

You should see something like this:

INS-121610_FOV (MPO_SIMBIO-SYS_HRIC_FPA) [IN-SITU]                     : MPO_SIMBIO-SYS_HRIC_FPA  ->  MPO_SPACECRAFT    OK
INS-121611_FOV (MPO_SIMBIO-SYS_HRIC_F550) [IN-SITU]                    : MPO_SIMBIO-SYS_HRIC_F550  ->  MPO_SPACECRAFT    OK
INS-121612_FOV (MPO_SIMBIO-SYS_HRIC_FPAN) [IN-SITU]                    : MPO_SIMBIO-SYS_HRIC_FPAN  ->  MPO_SPACECRAFT    OK
INS-121613_FOV (MPO_SIMBIO-SYS_HRIC_F750) [IN-SITU]                    : MPO_SIMBIO-SYS_HRIC_F750  ->  MPO_SPACECRAFT    OK
INS-121614_FOV (MPO_SIMBIO-SYS_HRIC_F880) [IN-SITU]                    : MPO_SIMBIO-SYS_HRIC_F880  ->  MPO_SPACECRAFT    OK
INS-121621_FOV (MPO_SIMBIO-SYS_STC-L) [IN-SITU]                        : MPO_SIMBIO-SYS_STC-L    ->  MPO_SPACECRAFT    OK
INS-121622_FOV (MPO_SIMBIO-SYS_STC-H) [IN-SITU]                        : MPO_SIMBIO-SYS_STC-H    ->  MPO_SPACECRAFT    OK
INS-121623_FOV (MPO_SIMBIO-SYS_STC-L_F920) [IN-SITU]                   : MPO_SIMBIO-SYS_STC-L_F920  ->  MPO_SPACECRAFT    OK
INS-121624_FOV (MPO_SIMBIO-SYS_STC-L_F550) [IN-SITU]                   : MPO_SIMBIO-SYS_STC-L_F550  ->  MPO_SPACECRAFT    OK
INS-121625_FOV (MPO_SIMBIO-SYS_STC-L_P700) [IN-SITU]                   : MPO_SIMBIO-SYS_STC-L_P700  ->  MPO_SPACECRAFT    OK
INS-121626_FOV (MPO_SIMBIO-SYS_STC-H_P700) [IN-SITU]                   : MPO_SIMBIO-SYS_STC-H_P700  ->  MPO_SPACECRAFT    OK
INS-121627_FOV (MPO_SIMBIO-SYS_STC-H_F420) [IN-SITU]                   : MPO_SIMBIO-SYS_STC-H_F420  ->  MPO_SPACECRAFT    OK
INS-121628_FOV (MPO_SIMBIO-SYS_STC-H_F750) [IN-SITU]                   : MPO_SIMBIO-SYS_STC-H_F750  ->  MPO_SPACECRAFT    OK
INS-121630_FOV (MPO_SIMBIO-SYS_VIHI_FPA) [IN-SITU]                     : MPO_SIMBIO-SYS_VIHI_FPA  ->  MPO_SPACECRAFT    OK

2. Write/update addendum IK file

Create a new mpo_addendum.ti file in your data/addendum directory, and write SIMBIO-SYS detectors defintions.

3. Define required product properties

Define product properties required to derive detector and observational information. In particular, we need to understand how a given SIMBIO-SYS data product can be mapped to a SPICE detector name/code.

4. Define primary targets and applicable targets

  • Define whether primary targets required the definition of specific body-fixed reference frame and/or digital shape model.

  • Define whether or not additional applicable targets are needed.

5. Update configuration file

Add required product properties, primary targets definitions, and applicable targets in configuration file.

6. Write Instrument Product class

See examples of Instrument Product classes.

class MPO_SIMBIOSYS_RAW(Product):
    def __init__(self, props_dict, config, silent=False):
        super().__init__(props_dict, config, silent=silent)

        if self.valid:
          # self.detector_name = ?
          # self.detector_mode = ?
          # self.n_data_records = ?
          # self.detector_fov_ref_ratio = ?
          # self.detector_fov_cross_ratio = ?
          # self.time_offset = ?

7. Write representative PLF

A representative set of data products should include different combinaisons of targets and required product properties.

8. Test geometry metadata computation

Test geometry metadata computation for the representative set of data products you have identified:

$ geogen compute data/plf/mpo_sample.plf --config-file=my_config.json --addendum-dir=data/addendum --no-preview
$ geogen compute data/plf/mpo_sample.plf --config-file=my_config.json --addendum-dir=data/addendum --no-preview