opera-adt / COMPASS

COregistered Multi-temPorAl Sar Slc
Apache License 2.0
38 stars 18 forks source link

save only 6 digits of datetime in orbit metadata #137

Closed scottstanie closed 1 year ago

scottstanie commented 1 year ago
>>> import isce3, datetime
>>> isce3.core.DateTime(datetime.datetime(2022, 11, 20, 16, 16, 43, 152613)).isoformat()

'2022-11-20T16:16:43.152613000'

the current orbit description says

description: b'Reference epoch of the state vectors, format: b'YYYY-MM-DD HH:MM:SS.6f'

but isce's isoformat gives 9 digits, so it fails datetime.datetime.fromisoformat but would also fail if a user looked at the description to parse it

scottstanie commented 1 year ago

LGTM. I am assuming that it is sufficient for the downstream workflows to save digits

just to check on that... I think there never are 9 digits of precision in the Sentinel orbits:

(mapping) staniewi:s1-reader$ grep "\<UTC\>" tests/data/orbits/S1A_OPER_AUX_POEORB_OPOD_20210318T120818_V20200510T225942_20200512T005942.EOF 
      <UTC>UTC=2020-05-10T22:59:42.000000</UTC>
      <UTC>UTC=2020-05-10T22:59:52.000000</UTC>
      <UTC>UTC=2020-05-10T23:00:02.000000</UTC>
      <UTC>UTC=2020-05-10T23:00:12.000000</UTC>
      <UTC>UTC=2020-05-10T23:00:22.000000</UTC>
      <UTC>UTC=2020-05-10T23:00:32.000000</UTC>
...