GithubHelp home page GithubHelp logo

small-bodies-node / pds4-idl Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 6.0 299 KB

IDL code for reading and browsing data from the Planetary Data System in PDS4 format

License: BSD 3-Clause "New" or "Revised" License

IDL 31.65% Prolog 47.95% HTML 20.40%

pds4-idl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pds4-idl's Issues

Problem reading PDS4 file with skipped byte in record line

We are using the PDS4-IDL code for reading some PDS4 files we are creating.
We have been able to read those products in the past, but then we had to make a change to a DateTime field because it had a bad format, it had a space in the middle between date and time (e.g. 2011-04-10 00:31:05.694), so we splitted it into two fields, one for the DATE and one for the TIME. The date field "ends" before the space while the time field starts after the space (e.g. time field finishes @byte 65574 while date field starts @byte 65576).

[...]
<Field_Binary>
                    <name>UTC_MIDPOINT_MET_DATE</name>
                    <field_number>11</field_number>
                    <field_location unit="byte">65565</field_location>
                    <data_type>ASCII_Date_YMD</data_type>
                    <field_length unit="byte">10</field_length>                
                    <description>MIDPOINT_MET converted to UTC Date, stored as
                        yyyy-mm-dd</description>
</Field_Binary>
<Field_Binary>
                    <name>UTC_MIDPOINT_MET_TIME</name>
                    <field_number>12</field_number>
                    <field_location unit="byte">65576</field_location>
                    <data_type>ASCII_Time</data_type>
                    <field_length unit="byte">12</field_length>                
                    <description>MIDPOINT_MET converted to UTC Time, stored as
                        hh:mm:ss.sss</description>
</Field_Binary>
[...]

There is a byte in the middle between Date and Time that is skippied because not needed. That is causing issues with the pds_read IDL code.

Please can you fix this issue?

Here is a sample product.
sample.zip

Error reading table

A reviewer attempted to read a label from yesterday's review, but the program crashed. The files they were using: pds4-review.zip. Their report:

Data files can not be read using READ_PDS on the .xml files. Here the error message produced by READ_PDS:

water_c_103p_hartley_2_1997.xml
read_pds: Data file is ./water_c_103p_hartley_2_1997.tab
Error index: -198
Error message: Variable is undefined: TABLEN.

Here is the relevant lines in read_pds.pro:
ELSE $
table_name = tablen

the variable “tablen” appears nowhere prior in the code, so naturally it is undefined at this point, and the code crashes. Since The code would not run, I can not verify whether the XML files are valid or not. There are however, additional issues with either the code or the provided xml files, as read_pds will crash on the very next line, if you just skip the suspect tablen definition line.

Also, line 126 of READ_PDS.pro is missing a closing single quote mark —still works, but messes up colorization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.