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

support for VAX_REAL data type #46

Closed Sierra-MC closed 1 year ago

Sierra-MC commented 1 year ago

Product types currently commented out in ix selection rules that contain this data type: gal_nims cube gal_ssi shutter, slope mgn_altimetry arcdr pre_magellan pi_venus_img, airsar pvo imidr (also has VAX_INTEGER and that might be okay, needs review)

m-stclair commented 1 year ago

VAX integers should be fine as just LSB integers -- only the VAX floats are weird

thareUSGS commented 1 year ago

Might this code be useful for VAX floats? https://github.com/SETI/pds-tools/blob/master/vax.py

m-stclair commented 1 year ago

Might this code be useful for VAX floats? https://github.com/SETI/pds-tools/blob/master/vax.py

Yes, I think so. I stumbled across it a few months ago and it seemed to work well for the couple of test cases I tried. I don't think it's distributed on any package managers, is it? Not that vendoring it would be a huge deal; no one's going to change the VAX float format anytime soon...

thareUSGS commented 1 year ago

I don't think it is available via a package manager, but perhaps you can just borrow "vax.py" for PDR with credit? Apache 2.0 license.

There are C and FORTRAN from an old 2005 USGS publication too (public domain of course) : https://pubs.usgs.gov/of/2005/1424/ PDF report: https://pubs.usgs.gov/of/2005/1424/of2005-1424_v1.2.pdf

m-stclair commented 1 year ago

e0c3ae7 implements support for 32-bit VAX floats by vendoring vax.py from pds-tools.

This does not add support for double- or quad-precision VAX floats:

Closing this issue for now.