Comments (19)
I'll see if I can improve the test coverage a little.
from reproject.
Is #59 a real bug? Or just a misunderstanding or something that has been fixed in the meantime?
from reproject.
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.
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.
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.
#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.
I fixed the other warning you mentioned in #78 too.
from reproject.
@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.
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.
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.
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.
@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.
@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.
OK, I'll file issues about the warnings from wcsaxes and healpy with as short as possible test cases.
from reproject.
I've made separate issues for the warnings mentioned above at astrofrog/wcsaxes#159 and healpy/healpy#253.
from reproject.
I think we're good to go for 0.1, since the notebook issue is not something that we can easily control
from reproject.
Version 0.1 has been released!
@cdeil - thanks for all your help!
from reproject.
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.
@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)
- Building with Python 3.11 fails HOT 1
- devdeps CI is failing HOT 2
- Implement support for dask input/output
- reproject_interp with parallel=True ignores order='nearest-neighbor'? HOT 2
- Avoid writing out a temporary memmap if the input data can already be recognized as a memmap HOT 1
- Use multi-threading instead of multi-processing HOT 40
- Upload wheels for Python 3.12 HOT 3
- reproject_interp docstring says it only takes FITS-WCS
- test_reproject_healpix_to_image_footprint failures on Debian with ARM (and other) CPUs HOT 6
- Cython performance warnings in deforest.pyx
- Reproject to Non-standard Coordinate Systems HOT 1
- BLD: build is currently broken on Python 3.8 HOT 4
- Blank pixels should be set to ... HOT 2
- In find_optimal_celestial_wcs, don't assume cdelt[0] is always negative
- Chess-like pattern when using rountrip_coords with GWCS, when using dask HOT 3
- map_coordinates in adaptive reprojection does not accept read-only arrays
- Document logging
- Artefacts appearing during reprojecting back to healpix HOT 5
- test_reproject_order[block_size1] test fails on the installed package
- Reproject using biquadratic and bicubic interpolation returns Nans HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reproject.