stcorp / procsim

Tool to simulate satellite data processor tasks
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Sx_RAW__0S, Sx_RAWP_0M - wrong om:validTime/gml:TimePeriod interval #15

Closed lmar76 closed 2 years ago

lmar76 commented 2 years ago

I have simulated L0 step 2 execution with the workaround to avoid #13 , i.e., specifying slice_frame_nr = 2 in the scenario configuration to generate products belonging to slice 2 (see test_L0PF_step2.zip).

Output S3_RAW__0S and S3_RAWP_0M are generated but the

/bio:EarthObservation/om:validTime/gml:TimePeriod/gml:beginPosition

time value is wrong. om:validTime/gml:TimePeriod/(gml:beginPosition|gml:endPosition) should contain the slice theoretic start/stop time and not the actual (i.e. with the restriction caused by the data take extension) start/stop.

For this scenario LOAD_TDS - SM idx 0 DTID 7217244 L0PFS2, the data take is defined as:

  "data_takes": [
      {
          "data_take_id": 7217244,
          "start": "2017-03-02T06:07:23.674000Z",
          "stop": "2017-03-02T06:09:37.672000Z",
          "swath": "S3",
          "operational_mode": "SM"
      }
  ]

The anx interval (e.g. see LOAD_TDS - SM idx 0 DTID 7217244 L0PFS126 in the attached scenario configuration file) is:

    "anx": [
        "2017-03-02T06:05:51.514000Z",
        "2017-03-02T07:44:02.496000Z"
    ]

Thus, the theoretic slice 2 interval is:

[2017-03-02T06:07:21.530, 2017-03-02T06:09:08.546].

Since data take starts about 2 seconds later than theoretic slice 2, the actual slice 2 interval is:

[2017-03-02T06:07:23.674, 2017-03-02T06:09:08.546].

For this reason, start/stop times in the MPH should be:

<om:phenomenonTime>
  <gml:TimePeriod gml:id="BIO_S3_...">
    <gml:beginPosition>2017-03-02T06:07:23.674Z</gml:beginPosition>
    <gml:endPosition>2017-03-02T06:09:08.545Z</gml:endPosition>
  </gml:TimePeriod>
</om:phenomenonTime>

[...]

<om:validTime>
  <gml:TimePeriod gml:id="BIO_S3_...">
    <gml:beginPosition>2017-03-02T06:07:21.530Z</gml:beginPosition>
    <gml:endPosition>2017-03-02T06:09:08.545Z</gml:endPosition>
  </gml:TimePeriod>
</om:validTime>
mivermeu commented 2 years ago

Since PR #21, the level 0 product generator generates products with a validity time that corresponds with the slice bounds, no matter the phenomenon time bounds within that slice.

lmar76 commented 2 years ago

Fixed, thank you.