MillionConcepts / pdr

[P]lanetary [D]ata [R]eader - A single function to read all Planetary Data System (PDS) data into Python
Other
60 stars 6 forks source link

Reindex duplicated pointers we don't warn about #61

Open Sierra-MC opened 2 months ago

Sierra-MC commented 2 months ago

Doing some cleanup / docs / etc. on marslab and noticed an undesirable behavior. It doesn't matter that much but is unpleasant:

keys=['LABEL', 'IMAGE_HEADER', 'ANCILLARY_TABLE', 'CMD_REPLY_FRAME_SOHB_TABLE', 'SOH_BEFORE_CHECKSUM_TABLE', 'TAKE_IMAGE_TIME_TABLE', 'CMD_REPLY_FRAME_SOHA_TABLE', 'SOH_AFTER_CHECKSUM_TABLE', 'CMD_REPLY_FRAME_AF_TABLE', 'AUTOFOCUS_TABLE', 'MUHEADER_TABLE', 'MUFOOTER_TABLE', 'IMAGE_REPLY_TABLE', 'IMAGE', 'MODEL_DESC', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'DESCRIPTION', 'DESCRIPTION']
not yet loaded: ('IMAGE_REPLY_TABLE', 'MODEL_DESC', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'PDS_OBJECT', 'DESCRIPTION', 'DESCRIPTION')

We don't reindex pointers we don't warn people about dupes of (^STRUCTURE, ^DESCRIPTION, ^PDS_OBJECT).

  1. ^STRUCTURE should of course never be presented directly to the user and also shouldn't be reindexed. So that behavior is correct for it.
  2. We currently throw a tbd() for ^PDS_OBJECT. We have by this point determined with pretty high certainty that it is a useless-to-us pointer that appears only in MSL CCAM products, probably intended to define the physical order of binary objects in internal processing pipelines. We should just trivialize it.
  3. We should not warn people about multiple ^DESCRIPTIONS but should reindex them.