-
Notifications
You must be signed in to change notification settings - Fork 11
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 allow NaNs for IEEE754 data types #646
Conversation
However the test data seems to be a problem because it is failing on an offset which seems to be unrelated to the reported problem.
This issue and solution are contradictory to #514 which does not want a NaN in a binary file. Because of this, the unit test for 644 passes while 514 fails. There is no resolution for this other to discover which is the correctly bug. |
@rchenatjpl can you confirm that the test data from #514 may be incorrect? at least looking at the test data on this comment, we coded up validate to throw errors on 4table.xml, but it appears those values are all IEEE: <Table_Binary>
<offset unit="byte">0</offset>
<records>4</records>
<description>FITS EDU number: 6
CAL_T1 = 0.3243 / Deposited TOF = T0 + T1*Raw TOF</description>
<Record_Binary>
<fields>2</fields>
<groups>0</groups>
<record_length unit="byte">8</record_length>
<Field_Binary>
<name>ET</name>
<field_number>1</field_number>
<field_location unit="byte">1</field_location>
<data_type>IEEE754MSBSingle</data_type>
<field_length unit="byte">4</field_length>
<unit>Seconds</unit>
<description>Ephemeris Time 12:00:00 UTC</description>
</Field_Binary>
<Field_Binary>
<name>YEAR</name>
<field_number>2</field_number>
<field_location unit="byte">5</field_location>
<data_type>IEEE754MSBSingle</data_type>
<field_length unit="byte">4</field_length>
<unit>Years</unit>
<description>Fractional Year (UTC). Use ET for accuracy!</description>
</Field_Binary>
</Record_Binary>
</Table_Binary> actually same goes for the next comment and associated test data referred to by 8table.xml: <Table_Binary>
<offset unit="byte">0</offset>
<records>4</records>
<description>FITS EDU number: 6
CAL_T1 = 0.3243 / Deposited TOF = T0 + T1*Raw TOF</description>
<Record_Binary>
<fields>1</fields>
<groups>0</groups>
<record_length unit="byte">8</record_length>
<Field_Binary>
<name>DAY_OF_YEAR</name>
<field_number>1</field_number>
<field_location unit="byte">1</field_location>
<data_type>IEEE754MSBDouble</data_type>
<field_length unit="byte">8</field_length>
<unit>Days</unit>
<description>Fractional Day of Year (UTC). Use ET for accuracy!</description>
</Field_Binary>
</Record_Binary>
</Table_Binary> if we change those field definitions to be |
🗒️ Summary
Updated the field check type check to allow nan and inf in table real IEEE types -- see comments on #514 and below for more details on nan and inf handling with IEEE types.
⚙️ Test Data and/or Report
See unit tests
♻️ Related Issues
Closes #644