NASA-PDS / validate

Validates PDS4 product labels, data and PDS3 Volumes
https://nasa-pds.github.io/validate/
Apache License 2.0
16 stars 11 forks source link

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

Closed jordanpadams closed 1 year ago

jordanpadams commented 5 years ago

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 commented 1 year ago

@jordanpadams

Needs a sample product for testing.

jordanpadams commented 1 year ago

@rchenatjpl can you help find us an example?

rchenatjpl commented 1 year ago

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

rchenatjpl commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

jordanpadams commented 1 year ago

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

al-niessner commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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