NASA-NAVO / navo-workshop

Tutorial notebooks for how to use PyVO to access NASA and other data in Python.
https://NASA-NAVO.github.io/navo-workshop
BSD 3-Clause "New" or "Revised" License
41 stars 26 forks source link

BUG: VO unit warnings when running the notebooks #94

Open zoghbi-a opened 1 year ago

zoghbi-a commented 1 year ago

Running some cells in the notebooks produce warnings:

WARNING: UnitsWarning: Unit 'degree' not supported by the VOUnit standard.  [astropy.units.format.vounit]
WARNING: UnitsWarning: Unit 'mjd' not supported by the VOUnit standard. Did you mean MD, MJ, Md, mD, mJ or md? [astropy.units.format.vounit]

Some are already filtered by including filters at the top (e.g. warnings.filterwarnings('ignore', '.*Unknown element .*', vo.utils.xml.elements.UnknownElementWarning)). Others are related to the units in some services not being proper VOUnits (the above two example), and they show up in the rendered notebooks (e.g. here).

This issue is to open discussion about how they should be handled.

This is a quote from @bsipocz copied from slack:

I still strongly feel that pedagogically we should not add filterwarnings into user notebooks but rather show how to fix those units. That being said, something is clearly broken with the current solution.

bsipocz commented 1 year ago

During the last call I volunteered that I'll add a cell for the notebooks that see this issue to show how to override the non VO-compliant units as opposed to automatically filter all of these warnings (btw, that filter should work, but it doesn't so this is also a bug)