MillionConcepts / pdr

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

Incorrect parsing of bit mask values #51

Closed fkmjr closed 1 year ago

fkmjr commented 1 year ago

pdr incorrectly parses a bit mask value as an integer, removing the bit mask after the # character. Consequently, such a value cannot be retrieved.

Example:

OBJECT                            = IMAGE
  SAMPLE_TYPE                     = MSB_INTEGER
  SAMPLE_BITS                     = 16
  SAMPLE_BIT_MASK                 = 2#0000111111111111#
END_OBJECT                        = IMAGE

SAMPLE_BIT_MASK is parsed to an integer with the numerical value of 2, removing the bit mask after the # character. Instead, the result should be a string holding the value of the PDS attribute, e.g. 2#0000111111111111# in the above example.

Sierra-MC commented 1 year ago

Hi, thank you for opening an issue. Can you please provide an example file that this issue is occurring with?

fkmjr commented 1 year ago

Example file: ZL0_0168_0681869032_144IOF_N0060170ZCAM08180_048085A03.zip

Sierra-MC commented 1 year ago

This has been fixed with the release of 1.0.4.

Please refer to the release notes for more details.

The new version should be available on conda a few hours from posting this (the changes have already been submitted to conda-forge).