Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to support ComplexLSB8 data types and investigate Floating point exception #7

Closed
jordanpadams opened this issue Jun 24, 2019 · 11 comments · Fixed by #650
Closed

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Jun 24, 2019

From an e-mail from Shubham Gupta from ISRO:

Dear Sir,

As discussed on meeting dated 12.03.2019, we are facing an issue while validating "ComplexLSB8" datatype file. The XML file is open in PDS4Viewer , but while validating it gives an error 
"ComplexLSB8 is not supported at this time". Similarly , while using "float" datatype it gives an error "IEEE754 Floating point exception".

We are currently using Information Model Version-11 and validation tool version 14.
"

Test Data
SAC.zip

@al-niessner
Copy link
Contributor

@jordanpadams

Needs a sample product for testing.

@jordanpadams
Copy link
Member Author

@rchenatjpl can you help find us an example?

@rchenatjpl
Copy link

I'll create one. I'll look, but I assume I've never seen one, else I would have started a ticket.

@rchenatjpl
Copy link

OR I have seen one, and it worked. On https://pds-ppi.igpp.ucla.edu/search/view/?f=null&id=pds://PPI/mess-rs-raw/data-rsr/2015/mess_rs_20150010130_2b1_rsr&o=1, there's 1 field with data_type=ComplexMSB16. It validates, and you can muck around and set it to MSB8 or LSB8 or LSB16, though for the 8, you'll have to change field_length to 8. pds4_viewer does the right thing as well.

@rchenatjpl
Copy link

The schematron has another place that allows ComplexLSB8 et al: Element_Array/data_type. I could try to dummy something up if desired, but please let me know if so. Can we press the original guy for a sample?

@jordanpadams
Copy link
Member Author

thanks @rchenatjpl we will try to use that test data noted above. @al-niessner does that suffice?

@jordanpadams
Copy link
Member Author

@al-niessner original test data from user added to top comment

@al-niessner
Copy link
Contributor

Note:

The XML provided was heavily flawed and had to correct the schema/schematron portions to reduce it to just the bad value.

@al-niessner
Copy link
Contributor

@jordanpadams

Um, this is a really deep problem because it seems as though pds4-jparser does not support complex types at all. All of the data that we process goes through this interface: gov.nasa.pds.objectAccess.array.DataTypeAdapter. It only has the ability for scalars.

What is happening is that gov.nasa.pds.objectAccess.array.ElementType does not have a ComplexLSB8 - should it be IEEE754ComplexLSB8? - and is thus generating a null which then is accessed which then throws a NullPointerException and is caught way over in validate and turned into a bad_field_value message.

Can improve error messaging and will to say that given <data_type> is not known instead of bad_field_value (because it is not a bad field value).

However, need breakout time today to discuss how to move forward with complex data types. It is probably going to really break a lot of jparser and validate to support it.

@jordanpadams
Copy link
Member Author

@al-niessner Complex Binary Data Types should be supported by PDS4: https://pds.nasa.gov/datastandards/documents/im/v1/index_1J00.html#class_pds_complex

@rchenatjpl
Copy link

rchenatjpl commented May 23, 2023

The XML provided was heavily flawed

Are there more validate issues? Mine passes it

% validate -V
gov.nasa.pds:validate
Version 3.2.0
Release Date: 2023-04-14 00:53:23
% validate -t mess_rs_20150010130_2b1_rsr.xml
PDS Validate Tool Report
Configuration:
Version 3.2.0
Date 2023-05-23T20:41:43Z
Parameters:
Targets [file:/Users/rchen/Desktop/mess-rs-raw/mess_rs_20150010130_2b1_rsr.xml]
Severity Level WARNING
Recurse Directories true
File Filters Used [*.xml, *.XML]
Data Content Validation on
Product Level Validation on
Max Errors 100000
Registered Contexts File /Users/rchen/PDS4tools/validate/resources/registered_context_products.json
Product Level Validation Results
PASS: file:/Users/rchen/Desktop/mess-rs-raw/mess_rs_20150010130_2b1_rsr.xml
1 product validation(s) completed
Summary:
0 error(s)
0 warning(s)
Product Validation Summary:
1 product(s) passed
0 product(s) failed
0 product(s) skipped
Referential Integrity Check Summary:
0 check(s) passed
0 check(s) failed
0 check(s) skipped
End of Report
Completed execution in 2234 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 🏁 Done
Development

Successfully merging a pull request may close this issue.

5 participants