Non-actionable warnings in astropy (specifically io.fits and units)
See original GitHub issueI have some production code where I added reading in a CIAO X-ray event file and it now generates a warning each time:
UnitsWarning: The unit 'angstrom' has been deprecated in the FITS standard. Suggested: nm (with data multiplied by 0.1).
Why are we issuing this warning? A substantial fraction of FITS files are generated by some other person or institution and there is nothing to be done about this warning except add code to suppress it. In my case this warning is causing a red flag every day to come up in our processing status board, so I really have to suppress it.
Maybe if people really want to opt in to these warnings it could be done via a configuration setting?
Issue Analytics
- State:
- Created 7 years ago
- Comments:25 (25 by maintainers)
Top Results From Across the Web
Python warnings system — Astropy v5.2
Python warnings system¶. Astropy uses the Python warnings module to issue warning messages. The details of using the warnings module are general to...
Read more >FITS File Handling (astropy.io.fits)
The open function returns an object called an HDUList which is a list -like collection of HDU objects. An HDU (Header Data Unit)...
Read more >Table Data — Astropy v5.2
The data in a FITS table HDU is basically a record array with added attributes. The metadata (i.e., information about the table data)...
Read more >astropy.io.fits FAQ
If the file is malformatted, fitsverify will output errors and warnings. If fitsverify confirms no problems with a file, and astropy is still...
Read more >FITS Headers — Astropy v5.2
Every Header Data Unit (HDU) normally has two components: header and data. In astropy these two components ... from astropy.io import fits >>>...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@saimn - No, I don’t think so. Also it’s a rather low priority as only a cosmetic issue, the warning doesn’t cause any failure for us.
Yes, the latter three.
The stat one is more serious and we need to fix or get rid of the example (#4927), as that warning is actually not one of these “non-actionable ones” and breaks tests when using pytest 3.1.1 and sphinx 1.6.2