Coder Social home page Coder Social logo

Release 0.1 about reproject HOT 19 CLOSED

astrofrog avatar astrofrog commented on August 18, 2024
Release 0.1

from reproject.

Comments (19)

astrofrog avatar astrofrog commented on August 18, 2024

I'll see if I can improve the test coverage a little.

from reproject.

cdeil avatar cdeil commented on August 18, 2024

Is #59 a real bug? Or just a misunderstanding or something that has been fixed in the meantime?

from reproject.

cdeil avatar cdeil commented on August 18, 2024

I'm playing with the examples from the docs ... everything works so far.

The example in http://reproject.readthedocs.org/en/latest/healpix.html gives these warnings:

>>> array, footprint = reproject_from_healpix(filename_ligo, target_header)

/Users/deil/Library/Python/3.4/lib/python/site-packages/astropy-1.1.dev12384-py3.4-macosx-10.10-x86_64.egg/astropy/coordinates/angles.py:672: RuntimeWarning: invalid value encountered in less
  if np.any(self_angle < wrap_angle_floor) or np.any(self_angle >= wrap_angle):
/Users/deil/Library/Python/3.4/lib/python/site-packages/astropy-1.1.dev12384-py3.4-macosx-10.10-x86_64.egg/astropy/coordinates/angles.py:672: RuntimeWarning: invalid value encountered in greater_equal
  if np.any(self_angle < wrap_angle_floor) or np.any(self_angle >= wrap_angle):
/Users/deil/Library/Python/3.4/lib/python/site-packages/astropy-1.1.dev12384-py3.4-macosx-10.10-x86_64.egg/astropy/coordinates/angles.py:563: RuntimeWarning: invalid value encountered in less
  if np.any(angles.value < lower) or np.any(angles.value > upper):
/Users/deil/Library/Python/3.4/lib/python/site-packages/astropy-1.1.dev12384-py3.4-macosx-10.10-x86_64.egg/astropy/coordinates/angles.py:563: RuntimeWarning: invalid value encountered in greater
  if np.any(angles.value < lower) or np.any(angles.value > upper):

It's not important, but probably these should be fixed or suppressed?

from reproject.

cdeil avatar cdeil commented on August 18, 2024

Here it should be target_header instead of header_in I think:
https://github.com/astrofrog/reproject/blame/17b20618bd568062dcf3db00fe31bd0ff15743e6/docs/healpix.rst#L107

from reproject.

cdeil avatar cdeil commented on August 18, 2024

There's also this warning which should be suppressed because it occurs frequently in normal usage (I think):

In [8]: array_exact, footprint_exact = reproject_exact(hdu2, hdu1.header)
/Users/deil/Library/Python/3.4/lib/python/site-packages/reproject-0.0.dev214-py3.4-macosx-10.10-x86_64.egg/reproject/spherical_intersect/core.py:190: RuntimeWarning: invalid value encountered in true_divide
  return array_new / weights, weights

from reproject.

astrofrog avatar astrofrog commented on August 18, 2024

#59 is a real bug

The warnings due to the NaN values are annoying so this should fix it: https://github.com/astrofrog/reproject/pull/78

The header_in typo has been fixed directly in master with 0f367cb

from reproject.

astrofrog avatar astrofrog commented on August 18, 2024

I fixed the other warning you mentioned in #78 too.

from reproject.

astrofrog avatar astrofrog commented on August 18, 2024

@cdeil - can you try the latest master version again? I think all the warnings should now be fixed. I don't think I will be able to address #59 any time soon, but I think it's a corner case. Anything else that should be addressed?

from reproject.

cdeil avatar cdeil commented on August 18, 2024

One thing that could be useful for users: say which scipy and healpy version is needed for reproject here:
http://reproject.readthedocs.org/en/latest/#requirements

from reproject.

cdeil avatar cdeil commented on August 18, 2024

For the healpix example from the docs I still get these warnings from wcsaxes.

Possible / worth fixing or suppressing?

from astropy.wcs import WCS
import matplotlib.pyplot as plt

ax = plt.subplot(1,1,1, projection=WCS(target_header))
ax.imshow(array, vmin=0, vmax=1.e-8)
ax.coords.grid(color='white')
ax.coords.frame.set_color('none')
/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)

from reproject.

cdeil avatar cdeil commented on August 18, 2024

Saving the HEALPIX file I get Astropy deprecation warnings with healpy version 1.8.4.
Are these fixed in healpy master already? Worth a healpy issue or pull request?

from healpy import write_map
write_map('healpix_map.fits', array)
WARNING: AstropyDeprecationWarning: The new_table function is deprecated and may be removed in a future version.
        Use :meth:`BinTableHDU.from_columns` for new BINARY tables or :meth:`TableHDU.from_columns` for new ASCII tables instead. [healpy.fitsfunc]
WARNING:astropy:AstropyDeprecationWarning: The new_table function is deprecated and may be removed in a future version.
        Use :meth:`BinTableHDU.from_columns` for new BINARY tables or :meth:`TableHDU.from_columns` for new ASCII tables instead.
WARNING: AstropyDeprecationWarning: The use of header.update() to add new keywords to a header is deprecated.  Instead, use either header.set() or simply `header[keyword] = value` or `header[keyword] = (value, comment)`.  header.set() is only necessary to use if you also want to use the before/after keyword arguments. [astropy.io.fits.header]
WARNING:astropy:AstropyDeprecationWarning: The use of header.update() to add new keywords to a header is deprecated.  Instead, use either header.set() or simply `header[keyword] = value` or `header[keyword] = (value, comment)`.  header.set() is only necessary to use if you also want to use the before/after keyword arguments.

from reproject.

cdeil avatar cdeil commented on August 18, 2024

@astrofrog – I tried all examples from the docs again. All work, except for #76 for which you said it's an Astropy / CFITSIO / Macports issue. So 👍 to release now ... thank you !!!!

from reproject.

astrofrog avatar astrofrog commented on August 18, 2024

@cdeil - could you report the warnings for WCSAxes and healpy in the respective issue trackers? (this is not something we can fix here)

I've added the minimum versions (as far as I can tell, might get updated if people submit bug reports) in 0f6e5c6

from reproject.

cdeil avatar cdeil commented on August 18, 2024

OK, I'll file issues about the warnings from wcsaxes and healpy with as short as possible test cases.

from reproject.

cdeil avatar cdeil commented on August 18, 2024

I've made separate issues for the warnings mentioned above at astrofrog/wcsaxes#159 and healpy/healpy#253.

from reproject.

astrofrog avatar astrofrog commented on August 18, 2024

I think we're good to go for 0.1, since the notebook issue is not something that we can easily control

from reproject.

astrofrog avatar astrofrog commented on August 18, 2024

Version 0.1 has been released!

@cdeil - thanks for all your help!

from reproject.

cdeil avatar cdeil commented on August 18, 2024

pip install reproject and running the tests works for me.

I think the stable branch is pointing to bc2cdc2 but the 0.1 tag is pointing to ee8adde , which leads to readthedocs showing a dev version when I select "stable". Not a big deal ... probably it's OK if this is resolved with the 0.2 release ....

from reproject.

astrofrog avatar astrofrog commented on August 18, 2024

@cdeil - this is because I made a few small changes to the docs after the release (including install instructions). A little annoying esthetically, but will make sure that's not needed next time.

from reproject.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.