question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Non-actionable warnings in astropy (specifically io.fits and units)

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
bsipoczcommented, Jun 16, 2017

@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.

1reaction
bsipoczcommented, Jun 15, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found