astrofrog / wcsaxes

wcsaxes has been merged into astropy!
http://docs.astropy.org/en/stable/visualization/wcsaxes/index.html
22 stars 21 forks source link

RuntimeWarning from reproject HEALPIX plotting example #159

Closed cdeil closed 9 years ago

cdeil commented 9 years ago

As mentioned at https://github.com/astrofrog/reproject/issues/75#issuecomment-99777214 , the HEALPIX plotting example in the reproject docs (see http://reproject.readthedocs.org/en/latest/healpix.html) raises a bunch of RunTimeWarnings in wcsaxes:

/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/transforms.py:171: RuntimeWarning: invalid value encountered in greater
  invalid = np.any(np.abs(pixel_check - pixel_full) > 1., axis=1)
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_range.py:50: RuntimeWarning: invalid value encountered in greater
  reset = np.abs(wjump) > 180.
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_range.py:58: RuntimeWarning: invalid value encountered in greater
  reset = np.abs(wjump) > 180.
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_range.py:11: RuntimeWarning: invalid value encountered in greater
  values_new[values_new > 180.] -= 360
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_helpers.py:470: RuntimeWarning: invalid value encountered in greater
  reset = (((normal_angle_full - tick_angle) % 360 > 90.) &
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_helpers.py:471: RuntimeWarning: invalid value encountered in greater
  ((tick_angle - normal_angle_full) % 360 > 90.))
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_helpers.py:482: RuntimeWarning: invalid value encountered in greater
  w1[w2 - w1 > 180.] += 360
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_helpers.py:483: RuntimeWarning: invalid value encountered in greater
  w2[w1 - w2 > 180.] += 360
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/coordinate_helpers.py:513: RuntimeWarning: invalid value encountered in less
  np.nonzero(((t - w1) * (t - w2)) < 0)[0]])
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/grid_paths.py:40: RuntimeWarning: invalid value encountered in greater
  sep[sep > np.pi] -= 2. * np.pi
/Users/deil/Library/Python/3.4/lib/python/site-packages/wcsaxes-0.4.dev512-py3.4.egg/wcsaxes/grid_paths.py:42: RuntimeWarning: invalid value encountered in greater
  mask = np.abs(sep > ROUND_TRIP_TOL)

See http://nbviewer.ipython.org/gist/cdeil/4bc69590a4c60119ae70

Is it possible to fix those? Or is it a good idea to suppress them?

astrofrog commented 9 years ago

Yes they should be suppressed because it's not something that the user has any control over. We can use the same approach as in reproject.

astrofrog commented 9 years ago

Failure is unrelated (just a timeout) so merging!

astrofrog commented 9 years ago

@cdeil - can you check the latest version and see if you still get some warnings?

cdeil commented 9 years ago

@astrofrog – Yes, these warnings are gone. There's only the one from wcsaxes and healpy (see here), I think I filed separate issues for those in the wcsaxes and healpy tracker.

astrofrog commented 9 years ago

@cdeil - actually just to be clear this is the WCSAxes PR and the WCSAxes warnings should be gone now.

cdeil commented 9 years ago

@astrofrog – Ah, OK. I thought this was the issue in the reproject tracker. You're right, this is fixed in wcsaxes, no more warnings. Thanks!

astrofrog commented 9 years ago

@cdeil - thanks!