small-bodies-node / pds4-idl Goto Github PK
View Code? Open in Web Editor NEWIDL code for reading and browsing data from the Planetary Data System in PDS4 format
License: BSD 3-Clause "New" or "Revised" License
IDL code for reading and browsing data from the Planetary Data System in PDS4 format
License: BSD 3-Clause "New" or "Revised" License
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.