-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
query_disc bug #229
Comments
This is most likely a bug in the C++ library. I'll try to come up with a fix soon! |
I think I have a fix. Is it sufficient if I commit this to the Healpix SVN trunk, or do you need it on a specific branch as well, Andrea? |
Trunk is fine
|
Ok, it's there already. |
Very hard to describe ... the original code always assumed that the whole ring that's currently being processed would lie inside the queried disk if no intersection points could be determined between ring and disk. In the case of a non-inclusive query this could be incorrect, and "no intersection" could in fact mean "ring lies completely outside the disk". I tried to address that problem. |
Interesting. Are you going to add a test case to healpix-cxx? |
I'm thinking about adding the test case above to hpxtest; but a positive result will not necessarily indicate that the algorithm works as expected - it could also just happen to work correctly because of numerical noise. If I can think of a more stringent test, I'll use that! |
I don't think it worked... I checked out the latest code from trunk, rebuilt, and ran @bwinkel's test script. The result is attached below. What am I even looking at here? |
Looks fine to me. It's the result of the query_disc plotted in lon/lat coordinates (radians). |
Oh! I just realized that those are crosses marking points in a scatter plot; I had thought that they were thin stripes across a HEALPix image. @mreineck, when is your next opportunity for a healpix-cxx release? It would be great to get this bug fix into both the standalone packages and the source that we are bundling with healpy. |
Sorry, that took some time ... |
ok, I updated the healpix git mirror: should I update the healpy git submodule or should we wait for a new On Mon, Mar 23, 2015 at 3:56 AM, mreineck notifications@github.com wrote:
|
The Makefile.am file will have to be updated to create the new executable. The new release should have a new version number, but it's up to you which part of the version number should be incremented. |
Might as well coordinate the changes and simultaneously release new versions of healpix-cxx and healpy. |
@mreineck, the last few lines of output from
Is this related, and what does it mean? Does this constitute a unit test failure? If so, why doesn't |
It's not (really) a bug and unrelated. Hpxtest isn't really a set of unit tests either ... it reports problems and errors on stdout and probably shouldn't run as part of "make distcheck" before it has been properly adjusted. Unfortunately I haven't found time for this so far. |
Great!
Just testing that it runs without crashing is helpful; we found some issues with OpenMP on extremely esoteric microcontrollers this way. I think we should leave it in the |
I just made the necessary change ... future releases of hpxtest will return an error status if a regression is detected. |
Thank you, @mreineck! Can we add a C++ implementation of @bwinkel's test case too? Here is a quick translation (sorry for my rusty C++):
One question:
Does this mean that the tests fail only if there are 100 or more failures? |
The tst case is already in: see check_issue_229() Concerning the FAIL: if more than 100 errors have accumulated, the code stops immediately. Otherwise the tests will run to the end, but then an error will be returned if (errcount>0). This is mostly for the benefit of people who run hpxtest interactively. |
Awesome! This bug is most certainly dead now. @zonca, can we close this? |
sure, but are we going to have an Healpix release? |
Yes please! |
Renamed get_neighbours to get_interp_weights <healpy/healpy#240> Updated HEALPix C++ to fix bug in query_disc healpy/healpy#229> Release 1.8.4, 16 Jan 2015 Fixed another permission issue on install-sh Release 1.8.3, 16 Jan 2015 Fix permission issue in the release tarball <healpy/healpy#220> Release 1.8.2, 13 Jan 2015 Several fixes in the build process Support for astropy.fits <healpy/healpy#213> Release 1.8.1, 22 Jun 2014 Added common.pxd to source tarball Check that nside is less than 2^30 <healpy/healpy#193> Release 1.8.0, 21 Jun 2014 Python 3 support <healpy/healpy#186> Fixed bug in get_interpol_ring: <healpy/healpy#189> Performance improvements in _query_disc.pyx: <healpy/healpy#184> Release 1.7.4, 26 Feb 2014 Fix bug for MAC OS X build <healpy/healpy#159> Release 1.7.3, 28 Jan 2014 Minor cleanup for submitting debian package Release 1.7.2, 27 Jan 2014 now package does not require autotools, fixes #155 Release 1.7.1, 23 Jan 2014 bugfix for Anaconda/Canopy on MAC OSX #152, #153 fixed packaging issue #154 Release 1.7.0, 14 Jan 2014 rewritten spherical armonics unit tests, now it uses low res maps included in the repository fix in HEALPix C++ build flags allows easier install on MAC-OSX and other python environments (e.g. anaconda) orthview: orthografic projection fixed bug in monopole removal in anafast Release 1.6.3, 26 Aug 2013: updated C++ sources to 3.11 verbose=True default for most functions Release 1.6.2, 11 Jun 2013: ez_setup, switch from distribute to the new setuptools Release 1.6.0, 15th March 2013: support for NSIDE>8192, this broke compatibility with 32bit systems using the new autotools based build system of healpix_cxx pkg-config based install for cfitsio and healpix_cxx common definition file for cython modules test build script new matplotlib based mollview in healpy.newvisufunc Release 1.5.0, 16th January 2013: Healpix C++ sources and cython compiled files removed from the repository, they are however added for the release tarballs * Added back support for CFITSIO_EXT_INC and CFITSIO_EXT_LIB, but with same definition of HealPix * gauss_beam: gaussian beam transfer function Release 1.4.1, 5th November 2012: Removed support for CFITSIO_EXT_INC and CFITSIO_EXT_LIB Support for linking with libcfitsio.so or libcfitsio.dyn Release 1.4, 4th September 2012: Support for building using an external HealPix library, by Leo Singer fixes on masked array maps Release 1.3, 21th August 2012: all functions covered with unit testing or doctests rewrote setup.py using distutils, by Leo Singer all functions accept and return masked arrays created with hp.ma read_cl and write_cl support polarization matplotlib imported only after first plotting function is called
Remove C++ 11 features <healpy/healpy#297> Streamlined setup.py <healpy/healpy#298> Plotting fixes for Python 3 <healpy/healpy#303>, <healpy/healpy#304> Numpy 1.10 fix <healpy/healpy#305> Release 1.9.0, 17 Sep 2015 updated healpix CXX to 786 (trunk) <healpy/healpy#280> drop support for Python 2.6 <healpy/healpy#268> option to read all fields with read_map <healpy/healpy#258> write_map and read_map support for partial sky maps <healpy/healpy#254> Allow read_map to also take an HDUList or HDU instance <healpy/healpy#249> Release 1.8.6, 23 Apr 2015 Renamed get_neighbours to get_interp_weights <healpy/healpy#240> Updated HEALPix C++ to fix bug in query_disc <healpy/healpy#229> Release 1.8.4, 16 Jan 2015 Fixed another permission issue on install-sh Release 1.8.3, 16 Jan 2015 Fix permission issue in the release tarball <healpy/healpy#220> Release 1.8.2, 13 Jan 2015 Several fixes in the build process Support for astropy.fits <healpy/healpy#213> Release 1.8.1, 22 Jun 2014 Added common.pxd to source tarball Check that nside is less than 2^30 <healpy/healpy#193> Release 1.8.0, 21 Jun 2014 Python 3 support <healpy/healpy#186> Fixed bug in get_interpol_ring: <healpy/healpy#189> Performance improvements in _query_disc.pyx: <healpy/healpy#184> Release 1.7.4, 26 Feb 2014 Fix bug for MAC OS X build <healpy/healpy#159> Release 1.7.3, 28 Jan 2014 Minor cleanup for submitting debian package Release 1.7.2, 27 Jan 2014 now package does not require autotools, fixes #155 Release 1.7.1, 23 Jan 2014 bugfix for Anaconda/Canopy on MAC OSX #152, #153 fixed packaging issue #154 Release 1.7.0, 14 Jan 2014 rewritten spherical armonics unit tests, now it uses low res maps included in the repository fix in HEALPix C++ build flags allows easier install on MAC-OSX and other python environments (e.g. anaconda) orthview: orthografic projection fixed bug in monopole removal in anafast Release 1.6.3, 26 Aug 2013: updated C++ sources to 3.11 verbose=True default for most functions Release 1.6.2, 11 Jun 2013: ez_setup, switch from distribute to the new setuptools Release 1.6.0, 15th March 2013: support for NSIDE>8192, this broke compatibility with 32bit systems using the new autotools based build system of healpix_cxx pkg-config based install for cfitsio and healpix_cxx common definition file for cython modules test build script new matplotlib based mollview in healpy.newvisufunc Release 1.5.0, 16th January 2013: Healpix C++ sources and cython compiled files removed from the repository, they are however added for the release tarballs * Added back support for CFITSIO_EXT_INC and CFITSIO_EXT_LIB, but with same definition of HealPix * gauss_beam: gaussian beam transfer function Release 1.4.1, 5th November 2012: Removed support for CFITSIO_EXT_INC and CFITSIO_EXT_LIB Support for linking with libcfitsio.so or libcfitsio.dyn Release 1.4, 4th September 2012: Support for building using an external HealPix library, by Leo Singer fixes on masked array maps Release 1.3, 21th August 2012: all functions covered with unit testing or doctests rewrote setup.py using distutils, by Leo Singer all functions accept and return masked arrays created with hp.ma read_cl and write_cl support polarization matplotlib imported only after first plotting function is called
Under rare circumstances query_disc produces wrong results. This seems to happen, when the
sphere edge "touches" the equator (but not always).
The text was updated successfully, but these errors were encountered: