Warnings from new `unit_parse_strict='warn'` settings
See original GitHub issueDescription
#11843 introduced an improved validation setting for non-standard units in FITS headers and made the 'warn'
level the default (contrary to the docstring description). This issues new UnitsWarning
s in a number of circumstances like the RTD builds in #12784.
Expected behavior
The unit_parse_strict
default should be documented in the read_table_fits
docstring.
The specific case of the RTD warnings from timeseries
is probably best addressed by explicitly setting
Table.read(hdu, format='fits', unit_parse_strict='silent')
in kepler_fits_reader
, since that function is performing its own custom treatment of nonstandard units (or should this make better use of the u.add_enabled_units
mechanism as well?)
But we probably should expect a number of similar warnings, possibly treated as errors, to pop up downstream from this change.
System Details
5.1.devx
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
No, the errors just don’t appear in the 5.0.1 backport since #11843 is on the 5.1 branch. Also it is not just a docs issue since the warnings will start popping up in anything that uses
read_table_fits
orTable.read
directly, so it should probably be dealt with before the 5.1 release.There is still the case of
BJD - 2454833
which is not handled here. And even with the “generic” parser,e
orpixels
would not be valid units. So if those files contain invalid units, I guess that’s up to timeseries’ maintainers to choose to useunit_parse_strict='silent'
or not (would make sense since it was the previous behavior), but I don’t think that’s a fits or units issue 😃.