Closed jordanpadams closed 1 year ago
@jordanpadams
Needs a sample product for testing.
@rchenatjpl can you help find us an example?
I'll create one. I'll look, but I assume I've never seen one, else I would have started a ticket.
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.
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?
thanks @rchenatjpl we will try to use that test data noted above. @al-niessner does that suffice?
@al-niessner original test data from user added to top comment
The XML provided was heavily flawed and had to correct the schema/schematron portions to reduce it to just the bad value.
@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.
@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
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
From an e-mail from Shubham Gupta from ISRO:
Test Data SAC.zip