././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1696365347.01668 healpy-1.16.6/0000755000000000000000000000000014507075443011636 5ustar00rootroot././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365307.0 healpy-1.16.6/CHANGELOG.rst0000644000000000000000000003505114507075373013665 0ustar00rootrootUnreleased Release 1.16.6 3 October 2023 * Release to generate packages for Python 3.12 https://github.com/healpy/healpy/issues/890 Release 1.16.5 16 August 2023 * Fixed more packaging issues https://github.com/healpy/healpy/issues/870 Release 1.16.4 11 August 2023 * Updated HEALPix C++ to fix compilation issue, no actual changes to the library https://github.com/healpy/healpy/pull/875 * Fix support for latest Cython https://github.com/healpy/healpy/pull/862 * Minor changes to packaging and actions https://github.com/healpy/healpy/pull/872 https://github.com/healpy/healpy/pull/865 https://github.com/healpy/healpy/pull/864 https://github.com/healpy/healpy/pull/863 Release 1.16.3 4 July 2023 * Drop support for Python 3.7 https://github.com/healpy/healpy/pull/821 * Added wheels for `aarch64` under emulation in Github Actions https://github.com/healpy/healpy/pull/819 * Allow pixelfunc.get_interp_val to operate on multiple maps https://github.com/healpy/healpy/pull/816 * Add `healpy`-specific `HealpyDeprecationWarning` instead of using `astropy`'s https://github.com/healpy/healpy/pull/822 * Bugfix in `Rotator` in `rmul` https://github.com/healpy/healpy/pull/810 Release 1.16.2 26 October 2022 * Add `resize_alm` function to change a Alm array to a different ell max https://github.com/healpy/healpy/pull/803 * Build wheels for Python 3.11 https://github.com/healpy/healpy/pull/793 * Instructions on how to build an optimized package for healpy https://github.com/healpy/healpy/pull/779 Release 1.16.1 22 July 2022, included in HEALPix 3.8.2 * Updated CFITSIO included in `healpy` to 4.1.0, necessary for compatibility with Apple ARM chips https://github.com/healpy/healpy/pull/776 Release 1.16.0 17 July 2022 * Update HEALPix C++ sources to revision 1206 (just maintenance commits) https://github.com/healpy/healpy/pull/772 * Do not normalize binary arrays https://github.com/healpy/healpy/pull/767 * Fix unncessary log warning message in plots https://github.com/healpy/healpy/pull/763 * Fixed double application of `margins` in visualization functions when using subplot syntax and implemented `margins` parameter for `mollview`, `orthview`, and `azeqview` when subplot syntax is not used https://github.com/healpy/healpy/pull/757 * Fixed `reuse_axes=True` for `cartview` and `gnomview` https://github.com/healpy/healpy/pull/755 * New features in `projview`: subplots, remove monopole-dipole, labels, tickmarks, graticule, Planck and WMAP colormaps https://github.com/healpy/healpy/pull/752 * Fixed the CFITSIO version mismatch warning https://github.com/healpy/healpy/pull/764 * Added colorbar ticks and normalization https://github.com/healpy/healpy/pull/751 * New `map2alm_lsq` function to iteratively estimate Alm from a map and assess residual error https://github.com/healpy/healpy/pull/734 Release 1.15.2 24 January 2022, included in HEALPix 3.8.1 * Fix the ABI version signature of the C++ sources https://github.com/healpy/healpy/pull/746 Release 1.15.1 20 January 2022 * new function `hp.blm_gauss` to generate alm of a gaussian beam https://github.com/healpy/healpy/pull/735 * implement rotation in the graticule of projview https://github.com/healpy/healpy/pull/732 * explain how to create a local datapath for pixel weights https://github.com/healpy/healpy/pull/720 * improvement on `is_seq` to avoid `synalm` breaking on JAX input arrays, added unit tests https://github.com/healpy/healpy/pull/716 * upgraded HEALPix C++ sources to HEALPix 3.8.1, fixing incompatibility with CFITSIO 4 https://github.com/healpy/healpy/pull/727 and https://github.com/healpy/healpy/pull/743 Release 1.15.0 22 June 2021, included in HEALPix 3.8.0 * `write_map` keeps dtype of input map array instead of float32 https://github.com/healpy/healpy/pull/688 * `read_map` keeps dtype of FITS file instead of upcasting to float64 https://github.com/healpy/healpy/pull/688 * `write_cl` uses dtype of input cl instead of float64 https://github.com/healpy/healpy/pull/688 * Changed all warnings to using the `logging` module, deprecated all `verbose` keywords https://github.com/healpy/healpy/pull/693 * Experimental `projview` function to plot maps using projections from `matplotlib` https://github.com/healpy/healpy/pull/695 * Flip sign for spin-0 `alm2map_spin` and `map2alm_spin` https://github.com/healpy/healpy/issues/707 * Support transparency in plotting with the `alpha` parameter https://github.com/healpy/healpy/pull/696 * Removed the note that we will change order of cl in `synfast` and `synalm`, we will leave `new=False` default https://github.com/healpy/healpy/pull/687 * Added convenice functions `order2npix` and `npix2order` https://github.com/healpy/healpy/pull/685 * Support nested maps `hp.smoothing` https://github.com/healpy/healpy/pull/678 * Improvements of the build system https://github.com/healpy/healpy/pull/660 https://github.com/healpy/healpy/pull/661 * Automatically build wheels for Linux/MacOS on Github actions https://github.com/healpy/healpy/pull/656 * Drop support for Python 2.7-3.5 https://github.com/healpy/healpy/pull/658 * Allow OBJECT FITS header not to be a string https://github.com/healpy/healpy/pull/665 * Fixed indexing issue in `bl2beam` https://github.com/healpy/healpy/pull/667 * Fixed `map2alm_spin` bug for masked input https://github.com/healpy/healpy/pull/651 * Minor bugfixes: Accept None for cls in `synalm` https://github.com/healpy/healpy/pull/711, Get nside from length of array in `read_map` https://github.com/healpy/healpy/pull/710, Fix spin 0 transforms in `alm2map_spin` https://github.com/healpy/healpy/pull/708, Raise exception for `rotate_alm` with `complex64` inputs https://github.com/healpy/healpy/pull/704, Replace deprecated numpy aliases https://github.com/healpy/healpy/pull/698 Release 1.14.0 22 July 2020, included in HEALPix 3.70, Last release with Python 2 support * Fixed FITS files that were left open https://github.com/healpy/healpy/pull/631 * Line Integral Convolution plots to plot polarization https://github.com/healpy/healpy/pull/617 * reworked verbose, see `hp.disable_warnings` https://github.com/healpy/healpy/pull/630 * increased precision in coordinate transforms https://github.com/healpy/healpy/pull/633 * colormaps now are not overwritten by plotting functions https://github.com/healpy/healpy/pull/627 * fix propagation on `mmax` in smoothing https://github.com/healpy/healpy/pull/612 * updated HEALPix C++ to 3.70 https://github.com/healpy/healpy/pull/632 * Updated to cfitsio 3.48 (used only if missing) https://github.com/healpy/healpy/pull/597 * Local datapath for pixel weights https://github.com/healpy/healpy/pull/611 * Support pixel weights for NSIDE 8192 https://github.com/healpy/healpy/pull/595 * Minor bugfixes https://github.com/healpy/healpy/pull/626, https://github.com/healpy/healpy/pull/624, https://github.com/healpy/healpy/pull/618, https://github.com/healpy/healpy/pull/614 Release 1.13.0 3 Dec 2019, included in HEALPix 3.60 * updated HEALPix C++ to 3.60 https://github.com/healpy/healpy/pull/589 * different handling of default dtype in `read_cl`, `write_cl` and `read_map` https://github.com/healpy/healpy/pull/586 * implemented `dist2holes`, distance from pixel center to closest invalid pixel https://github.com/healpy/healpy/pull/581 * allow not-power-of-2 NSIDE for RING https://github.com/healpy/healpy/pull/584 Release 1.12.10 9 Sep 2019 * fix overflow in nside2npix at NSIDE8192 https://github.com/healpy/healpy/pull/573 * option to set UNSEEN color in plots https://github.com/healpy/healpy/pull/551 * option to rotate alms in place https://github.com/healpy/healpy/pull/555 * option to keep the FITS dtype in `read_map` https://github.com/healpy/healpy/pull/554 * fix compatibility with matplotlib 3 https://github.com/healpy/healpy/pull/563 and https://github.com/healpy/healpy/pull/566 Release 1.12.9 21 Mar 2019, related to the `healpy` JOSS paper * `lmax` support in `hp.pixwin` https://github.com/healpy/healpy/pull/544 * `use_pixel_weights` support in `hp.smoothing` https://github.com/healpy/healpy/pull/545 * improved test coverage https://github.com/healpy/healpy/pull/541 * tutorial as a Jupyter Notebook https://github.com/healpy/healpy/blob/master/doc/healpy_tutorial.ipynb Release 1.12.8 7 Dec 2018, included in HEALPix 3.5.0 * Update HEALPix C++ to latest 3.5.0 commits Release 1.12.7 6 Dec 2018 * Rebuild of broken release 1.12.6, it was built with Cython 0.26 instead of a newer version needed for Python 3.7 support Release 1.12.6 5 Dec 2018 * Broken release due to a packaging issue * Important bugfix that affected only 1.12.5, synfast had a fixed seed https://github.com/healpy/healpy/pull/510 * Updated HEALPix C++ to 3.5.0, dynamic AVX support https://github.com/healpy/healpy/pull/514 Release 1.12.5 13 Nov 2018 * Explicitely set Numpy version requirement to = 1.13 https://github.com/healpy/healpy/pull/506 * Implemented `hp.Rotator.rotate_map_alms` and `hp.Rotator.rotate_map_pixel` to rotate maps in spherical harmonics and pixel domain https://github.com/healpy/healpy/pull/489 Release 1.12.4, 25 Ago 2018 * Support for Python 3.7 on PyPi * Update minimum `healpix-cxx` version required https://github.com/healpy/healpy/pull/478 Release 1.12.3, 30 Giu 2018 * No changes, just fixed Unicode Error on README.rst Release 1.12.2, 29 Giu 2018 * No changes, just fixed upload issue to PyPI Release 1.12.1, 29 Giu 2018 * Fixed bug in polarization rotation in `hp.Rotator.rotate_map` https://github.com/healpy/healpy/pull/459 * Fixed packaging issue: Add six to `setup_requires` https://github.com/healpy/healpy/pull/457 Release 1.12.0, 12 Giu 2018 * New `hp.Rotator.rotate_map` function to change reference frame of a full map https://github.com/healpy/healpy/pull/450 * Implementation of pixel weights for map2alm that makes transform exact https://github.com/healpy/healpy/pull/442 * Change default output FITS column names to agree with other HEALPix packages https://github.com/healpy/healpy/pull/446 * Reformatted the Python code with black, this made a huge changeset https://github.com/healpy/healpy/pull/454 Release 1.11.0, 8 Aug 2017 * Remove NSIDE restriction to be a power of 2 for RING https://github.com/healpy/healpy/pull/377 * Implement Coordsys2euler zyz https://github.com/healpy/healpy/pull/399 * Return multiple maps as a single 2D array instead of a tuple of 1D arrays https://github.com/healpy/healpy/pull/400 * Support for galactic cut in anafast and map2alm https://github.com/healpy/healpy/pull/406 * Change in write_map default behavior: https://github.com/healpy/healpy/pull/379 and https://github.com/healpy/healpy/pull/386 Release 1.10.1, 8 Nov 2016 * Removed support for Python 2.6 * Implemented Lambert azimuthal equal-area projection https://github.com/healpy/healpy/pull/354 * Bugfix: write multiple alms https://github.com/healpy/healpy/pull/342 * Depend on `astropy` instead of `pyfits` https://github.com/healpy/healpy/pull/337 Release 1.9.1, 17 Nov 2015, Last version to support Python 2.6 * Remove C++ 11 features https://github.com/healpy/healpy/pull/297 * Streamlined setup.py https://github.com/healpy/healpy/pull/298 * Plotting fixes for Python 3 https://github.com/healpy/healpy/pull/303, https://github.com/healpy/healpy/pull/304 * Numpy 1.10 fix https://github.com/healpy/healpy/pull/305 Release 1.9.0, 17 Sep 2015 * updated healpix CXX to 786 (trunk) https://github.com/healpy/healpy/pull/280 * drop support for Python 2.6 https://github.com/healpy/healpy/pull/268 * option to read all fields with `read_map` https://github.com/healpy/healpy/pull/258 * `write_map` and `read_map` support for partial sky maps https://github.com/healpy/healpy/pull/254 * Allow `read_map` to also take an HDUList or HDU instance https://github.com/healpy/healpy/issues/249 Release 1.8.6, 23 Apr 2015 * Renamed `get_neighbours` to `get_interp_weights` https://github.com/healpy/healpy/issues/240 * Updated HEALPix C++ to fix bug in `query_disc` https://github.com/healpy/healpy/issues/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 https://github.com/healpy/healpy/issues/220 Release 1.8.2, 13 Jan 2015 * Several fixes in the build process * Support for `astropy.fits` https://github.com/healpy/healpy/pull/213 Release 1.8.1, 22 Jun 2014 * Added `common.pxd` to source tarball * Check that nside is less than 2^30 https://github.com/healpy/healpy/pull/193 Release 1.8.0, 21 Jun 2014 * Python 3 support https://github.com/healpy/healpy/pull/186 * Fixed bug in `get_interpol_ring`: https://github.com/healpy/healpy/pull/189 * Performance improvements in `_query_disc.pyx`: https://github.com/healpy/healpy/pull/184 Release 1.7.4, 26 Feb 2014 * Fix bug for MAC OS X build https://github.com/healpy/healpy/pull/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 harmonics 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 NSIDE8192, 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 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365307.0 healpy-1.16.6/CITATION0000644000000000000000000000316014507075373012775 0ustar00rootrootUse of the HEALPix/healpy software package should be explicitly acknowledged in all publications in the following form: * an acknowledgment statement – "Some of the results in this paper have been derived using the healpy and HEALPix package" * at the first use of the HEALPix acronym, a footnote placed in the main body of the paper referring to the HEALPix website – currently http://healpix.sourceforge.net BibTeX record: @article{Zonca2019, doi = {10.21105/joss.01298}, url = {https://doi.org/10.21105/joss.01298}, year = {2019}, month = mar, publisher = {The Open Journal}, volume = {4}, number = {35}, pages = {1298}, author = {Andrea Zonca and Leo Singer and Daniel Lenz and Martin Reinecke and Cyrille Rosset and Eric Hivon and Krzysztof Gorski}, title = {healpy: equal area pixelization and spherical harmonics transforms for data on the sphere in Python}, journal = {Journal of Open Source Software} } @ARTICLE{2005ApJ...622..759G, author = {{G{\'o}rski}, K.~M. and {Hivon}, E. and {Banday}, A.~J. and {Wandelt}, B.~D. and {Hansen}, F.~K. and {Reinecke}, M. and {Bartelmann}, M.}, title = "{HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere}", journal = {\apj}, eprint = {arXiv:astro-ph/0409513}, keywords = {Cosmology: Cosmic Microwave Background, Cosmology: Observations, Methods: Statistical}, year = 2005, month = apr, volume = 622, pages = {759-771}, doi = {10.1086/427976}, adsurl = {http://adsabs.harvard.edu/abs/2005ApJ...622..759G}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365307.0 healpy-1.16.6/COPYING0000644000000000000000000004313314507075373012677 0ustar00rootroot GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365307.0 healpy-1.16.6/INSTALL.rst0000644000000000000000000002300014507075373013473 0ustar00rootrootInstallation procedure for Healpy ================================= (NOTE: if high performance of the installed package is important, e.g. when installing in computing centers or for performing benchmarks, please be sure to read the `Generating native binaries`_ section below.) Requirements ------------ Healpy depends on the HEALPix C++ and cfitsio C libraries. Source code for both is included with Healpy and is built automatically, so you do not need to install them yourself. Only Linux and macOS are supported, Windows only through the "Windows Subsystem for Linux" (see below). Binary installation with conda (recommended for Anaconda/Miniconda users) ------------------------------------------------------------------------- Conda Forge provides a `conda channel `_ with a pre-compiled version of ``healpy`` for linux 64bit and MAC OS X platforms, you can install it in Anaconda with:: conda config --add channels conda-forge conda install healpy There have also been reports of specific installation issues under Mac OS Catalina 10.15.5 with conda install as the solver appears to run without finding the required packages. This is a general issue with a number of packages, and not limited to ``healpy``. The most straightforward solution (after adding conda-forge to the channel list) is for the user to decide which packages they wish to install alongside ``healpy`` and then create a new environment installing ``healpy`` alongside said packages. For instance if one wishes to install ``healpy`` alongside Spyder and My_Package into newly created environment env_healpy, the command will be:: conda create --name env_healpy python=3.9 healpy spyder my_package Binary installation with Pip (recommended for most other Python users) ---------------------------------------------------------------------- You can install Healpy from the Python Package Index using `pip `_. For most common architectures and platforms (Linux x86-64, Linux i686, and macOS x86-64), Pip will download and install a pre-built binary. For other platforms, it will automatically try to build healpy from source. Note that there are not yet native prebuilt binaries for Apple Silicon Macs. To install the latest version of ``healpy`` with `pip `_, simply run:: pip install --user healpy If you have installed with ``pip``, you can keep your installation up to date by upgrading from time to time:: pip install --user --upgrade healpy Source installation with Pip (not usually recommended) ------------------------------------------------------ On platforms for which we do not yet have prebuilt binaries in the Python Package Index, pip build healpy from source. You can force pip to build from source by running:: pip install --no-binary healpy healpy Some common issues that you might encounter when building from source: * ``libssl-dev`` (Debian) or ``openssl-dev`` (CentOS) is required to build ``cfitsio`` from source. * On Linux with newer compilers many users reported compilation errors like ``configure: error: cannot run C compiled programs``. The solution is to specifiy the flags for the C and CXX compiler: CC=gcc CXX=g++ CFLAGS='-fPIC' CXXFLAGS='-fPIC' pip install --user healpy Installation from package managers ---------------------------------- Debian users may install Healpy for the Debian-supplied system Python interpreter by running:: sudo apt-get install python3-healpy MacPorts users on macOS may install Healpy for the MacPorts-supplied Python interpreter by running:: sudo port install py39-healpy Compilation issues with Mac OS ------------------------------ Currently most people report they cannot install `healpy` on Mac OS either via `pip` or building from source, due to the impossibility of compiling the `HEALPix` based extension. The best alternatives are conda, binary installation with pip, or MacPorts. Installation on Mac OS with MacPorts ------------------------------------ If you are using a Mac and have the `MacPorts `_ package manager, it's even easer to install Healpy with:: sudo port install py39-healpy Installation with a package manager on Debian and Ubuntu -------------------------------------------------------- Binary `apt-get` style packages are also available in the development versions of `Debian (sid) `_ and `Ubuntu `_. Almost-as-quick installation from official source release --------------------------------------------------------- Healpy is also available in the `Python Package Index (PyPI) `_. You can download it with:: curl -O https://pypi.python.org/packages/source/h/healpy/healpy-1.14.0.tar.gz and build it with:: tar -xzf healpy-*.tar.gz cd healpy-* pip install . If everything goes fine, you can test it:: python >>> import matplotlib.pyplot as plt >>> import numpy as np >>> import healpy as hp >>> hp.mollview(np.arange(12)) >>> plt.show() or run the test suite with:: cd healpy-* && pytest Building against external Healpix and cfitsio --------------------------------------------- Healpy uses pkg-config to detect the presence of the Healpix and cfitsio libraries. pkg-config is available on most systems. If you do not have pkg-config installed, then Healpy will download and use (but not install) a Python clone called pykg-config. If you want to provide your own external builds of Healpix and cfitsio, then download the following packages: * `pkg-config `_ * `HEALPix `_ autotools-style C++ package * `cfitsio `_ If you are going to install the packages in a nonstandard location (say, ``--prefix=/path/to/local``), then you should set the environment variable ``PKG_CONFIG_PATH=/path/to/local/lib/pkgconfig`` when building. No other environment variable settings are necessary, and you do not need to set ``PKG_CONFIG_PATH`` to use Healpy after you have built it. Then, unpack each of the above packages and build them with the usual ``configure; make; make install`` recipe. Installation on Windows through the "Windows Subsystem for Linux" ----------------------------------------------------------------- 1. Restart your computer, and follow the instructions (which appear before windows starts) to enter BIOS. Usually this means pressing DEL or F2 just after powering on. Find the option to enable virtualization (exact name will depend on your system, can google your machine brand name + "enable virtualization" for instructions) 2. Follow these instructions to install Windows Subsystem for Linux: https://docs.microsoft.com/en-us/windows/wsl/install-win10 Following the instructions for WSL version 2, and choosing Ubuntu from the store. 3. Restart machine 4. Open the newly installed Ubuntu application from the Start menu and follow the setup instructions. 5. When they are complete, run these commands:: sudo apt-get update sudo apt-get upgrade sudo apt-get install python3 python3-pip 6. Quit ubuntu, restart it, and run:: pip3 install numpy jupyter matplotlib healpy ipython jupyter 7. Quit ubuntu again, restart it, and run:: ipython notebook --no-browser 8. Copy and paste the line starting with ``http://localhost:8888/?token=`` into your normal Windows web browser. Development install ------------------- Developers building from a snapshot of the github repository need: * ``autoconf`` and ``libtool`` (in Debian or Ubuntu: ``sudo apt-get install autoconf automake libtool pkg-config``) * ``libssl-dev`` (Debian) or ``openssl-dev`` (CentOS) is required to build ``cfitsio`` from source * `cython` > 0.16 * run ``git submodule init`` and ``git submodule update`` to get the bundled HEALPix sources the best way to install healpy if you plan to develop is to build the C++ extensions in place with:: python setup.py build_ext --inplace then add the ``healpy`` repository folder to your ``PYTHONPATH`` (e.g. if you cloned this repository to ``$REPOS`` such that ``$REPOS/healpy/INSTALL.rst`` exists, then add ``$REPOS/healpy`` to your ``PYTHONPATH``). In case of compilation errors, see the note above in the ``pip`` section. Generating native binaries -------------------------- Using pre-compiled wheels is typically the easiest and quickest way to install ``healpy`` on a system. However, the performance of the installed package may not be optimal, since the wheel has to work on all CPUs of a given architecture (e.g. x86_64) and will therefore probably not use all features present in your local CPU. A ``healpy`` installation which is custom-tailored for a specific target CPU may be two or three times faster for some operations (most notably ``alm2map*`` and ``map2alm*`` calls). To achieve target-specific compilation, ``healpy`` must be installed from source and the ``-march=native`` flag has to be passed to the compilers. While details may vary slightly depending on the target platform, the installation command will have this basic form:: CC=gcc CXX=g++ CFLAGS="-fPIC -O3 -march=native" CXXFLAGS="-fPIC -O3 -march=native" pip3 install --user --no-binary healpy healpy Clean ----- When you run "python setup.py", temporary build products are placed in the "build" directory. If you want to clean out and remove the ``build`` directory, then run:: python setup.py clean --all ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365307.0 healpy-1.16.6/MANIFEST.in0000644000000000000000000000175714507075373013410 0ustar00rootrootrecursive-include healpy/data *.fits recursive-include healpy/data *_cmap.dat recursive-include healpy/test/data * exclude healpy/test/data/ipython* exclude cfitsio/*pdf cfitsio/*ps cfitsio/*doc cfitsio/*tex prune cfitsio/docs exclude *.so exclude *.a exclude .gitignore .gitmodules .travis.yml clean.sh include COPYING CITATION INSTALL.rst README.rst MANIFEST.in CHANGELOG.rst ez_setup.py run_pykg_config.py include healpy/src/_healpy_utils.h include healpy/src/_healpy_hotspots_lib.h include healpy/src/_line_integral_convolution_lib.h include healpy/src/_query_disc.cpp include healpy/src/_sphtools.cpp include healpy/src/_pixelfunc.cpp include healpy/src/_masktools.cpp include healpy/src/_hotspots.cpp include healpy/src/_line_integral_convolution.cpp include healpy/src/_common.pxd include healpy/src/_query_disc.pyx include healpy/src/_sphtools.pyx include healpy/src/_pixelfunc.pyx include healpy/src/_masktools.pyx include healpy/src/_hotspots.pyx include healpy/src/_line_integral_convolution.pyx ././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1696365347.01668 healpy-1.16.6/PKG-INFO0000644000000000000000000002073014507075443012735 0ustar00rootrootMetadata-Version: 2.1 Name: healpy Version: 1.16.6 Summary: Healpix tools package for Python Author: A. Zonca Author-email: "C. Rosset" License: GPL-2.0-only Project-URL: homepage, http://github.com/healpy Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Intended Audience :: Science/Research Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) Classifier: Operating System :: POSIX Classifier: Programming Language :: C++ Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Topic :: Scientific/Engineering :: Astronomy Classifier: Topic :: Scientific/Engineering :: Visualization Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: COPYING Requires-Dist: matplotlib Requires-Dist: numpy>=1.19 Requires-Dist: astropy Requires-Dist: scipy Provides-Extra: test Requires-Dist: pytest; extra == "test" Requires-Dist: pytest-cython; extra == "test" Requires-Dist: pytest-doctestplus; extra == "test" Requires-Dist: requests; extra == "test" ==================================== Healpy, a python wrapper for healpix ==================================== .. image:: https://badge.fury.io/py/healpy.svg :target: https://badge.fury.io/py/healpy .. image:: https://anaconda.org/conda-forge/healpy/badges/version.svg :target: https://anaconda.org/conda-forge/healpy .. image:: https://github.com/healpy/healpy/actions/workflows/cibuildwheel.yml/badge.svg :target: https://github.com/healpy/healpy/actions/workflows/cibuildwheel.yml .. image:: https://readthedocs.org/projects/healpy/badge/?version=latest :target: https://readthedocs.org/projects/healpy/?badge=latest :alt: Documentation Status .. image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gist/zonca/9c114608e0903a3b8ea0bfe41c96f255/master .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2605425.svg :target: https://doi.org/10.5281/zenodo.2605425 .. image:: http://joss.theoj.org/papers/10.21105/joss.01298/status.svg :target: https://doi.org/10.21105/joss.01298 Description ----------- `healpy` is a Python package to handle pixelated data on the sphere. It is based on the `Hierarchical Equal Area isoLatitude Pixelization (HEALPix) `_ scheme and bundles the `HEALPix` C++ library. `HEALPix` was developed to efficiently process Cosmic Microwave Background data from Cosmology experiments like BOOMERANG and WMAP but it is now used in other branches of Astrophysics to store data from all-sky surveys. The target audience used to be primarily the Cosmology scientific community but currently anyone interested in handling pixelated data on the sphere is very welcome to propose new features. Capabilities ------------ `healpy` provides utilities to: * convert between sky coordinates and pixel indices in `HEALPix` nested and ring schemes * find pixels within a disk, a polygon or a strip in the sky * apply coordinate transformations between Galactic, Ecliptic and Equatorial reference frames * apply custom rotations either to vectors or full maps * read and write `HEALPix` maps to disk in FITS format * upgrade and downgrade the resolution of existing `HEALPix` maps * visualize maps in Mollweide, Gnomonic and Cartographic projections * transform maps to Spherical Harmonics space and back using multi-threaded C++ routines * compute Auto and Cross Power Spectra from maps and create map realizations from spectra The documentation can be found at https://healpy.readthedocs.io, tutorial at https://healpy.readthedocs.io/en/latest/tutorial.html, or execute it on `mybinder `_ Requirements ------------ * `Python `_ 3.9, 3.10, or 3.11 * `Numpy `_ (tested with version >=1.19) * `Matplotlib `_ * Python development package is required for some distribution (e.g., python-dev package for Ubuntu) * `Astropy `_ Quick installation with Pip --------------------------- The quickest way to install Healpy is with `pip `_ (>= 1.4.2), which automatically fetches the latest version of Healpy and any missing dependencies:: pip install --user healpy If you have installed with ``pip``, you can keep your installation up to date by upgrading from time to time:: pip install --user --upgrade healpy See `INSTALL.rst `_ for further details and other installation options. Optional -------- Healpy depends on the `HEALPix` C++ and cfitsio C libraries. Source code is include with Healpy and you do not have to install them separately. However, if you have them installed already, Healpy should detect and reuse them instead of building them from source. To use your own installations of `HEALPix` and cfitsio, you will also need: * `pkg-config `_ * `HEALPix `_ autotools-style C++ package * `cfitsio `_ See `INSTALL.rst `_ for further instructions. Known issues ------------ * Building with OpenMP support: the underlying `HEALPix` C++ library can be built to use `OpenMP `_ to speed up some operations on systems with multiple cores. Most, but not all, modern C/C++ compilers support OpenMP, `the notable exception being clang `_. If your Healpy build fails with an error message about being unable to link against `-lgomp`, then this typically means that Healpy detected an already-installed `HEALPix` C++ library that was built with OpenMP support, but you are trying to build Healpy with a compiler that does not support OpenMP. Try cleaning the build with `python setup.py clean --all`, and set the environment variables `CC` and `CXX` to point to an OpenMP-capable compiler, such as gcc/g++. * Healpy does not currently support Windows. See https://github.com/healpy/healpy/issues/25. * Incompatibility with ``cfitisio`` from ``HEASOFT``: due to a conflict of header file names it is currently not possible to use the cfitsio library provided with the HEASOFT package for compilation of `HEALPix` C++. HEASOFT's include directory contains a file called "rotmatrix.h" which clashes with `HEALPix`'s own rotmatrix.h. * Compilation problems in the C++ package: some gcc versions (we have reports for 4.4.5 and 4.4.6) crash with an internal compiler error during compilation of libsharp. Unfortunately we have not found a workaround for this compiler problem. To our knowledge, it has been fixed in gcc 4.4.7 and in the 4.5.x and newer versions. * Healpy pixel functions, e.g. ``ang2pix``, do not support 32-bit platforms. See https://github.com/healpy/healpy/issues/194. Support ------- For specific *HOWTO* questions please create a question on StackOverflow_ and tag it with the `healpy` tag, so that answers will be easily searchable on google. If you think you found a bug or you have install issues, open an issue on GitHub: https://github.com/healpy/healpy/issues .. _StackOverflow: http://stackoverflow.com/questions/ask Contribute ---------- Project development takes place on github, http://github.com/healpy/healpy, please open an issue over there for reporting bugs or suggest improvements. Collaboration is very welcome, just fork the project on github and send pull requests back to the main repository. Developers ---------- Core developers: * Cyrille Rosset * Andrea Zonca * Martin Reinecke * Leo Singer * Daniel Lenz List of contributors: https://github.com/healpy/healpy/graphs/contributors Acknowledgements ---------------- 1. Cite the HEALPix and `healpy` papers, see the `CITATION file `_ in the repository. 2. Add an acknowledgment statement: "Some of the results in this paper have been derived using the `healpy` and `HEALPix` packages". 3. at the first use of the `HEALPix` acronym, a footnote placed in the main body of the paper referring to the `HEALPix` web site, currently http://healpix.sf.net 4. You can also directly support the maintenance and development of `healpy` via `Github Sponsors `_ ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365307.0 healpy-1.16.6/README.rst0000644000000000000000000001644514507075373013341 0ustar00rootroot==================================== Healpy, a python wrapper for healpix ==================================== .. image:: https://badge.fury.io/py/healpy.svg :target: https://badge.fury.io/py/healpy .. image:: https://anaconda.org/conda-forge/healpy/badges/version.svg :target: https://anaconda.org/conda-forge/healpy .. image:: https://github.com/healpy/healpy/actions/workflows/cibuildwheel.yml/badge.svg :target: https://github.com/healpy/healpy/actions/workflows/cibuildwheel.yml .. image:: https://readthedocs.org/projects/healpy/badge/?version=latest :target: https://readthedocs.org/projects/healpy/?badge=latest :alt: Documentation Status .. image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gist/zonca/9c114608e0903a3b8ea0bfe41c96f255/master .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2605425.svg :target: https://doi.org/10.5281/zenodo.2605425 .. image:: http://joss.theoj.org/papers/10.21105/joss.01298/status.svg :target: https://doi.org/10.21105/joss.01298 Description ----------- `healpy` is a Python package to handle pixelated data on the sphere. It is based on the `Hierarchical Equal Area isoLatitude Pixelization (HEALPix) `_ scheme and bundles the `HEALPix` C++ library. `HEALPix` was developed to efficiently process Cosmic Microwave Background data from Cosmology experiments like BOOMERANG and WMAP but it is now used in other branches of Astrophysics to store data from all-sky surveys. The target audience used to be primarily the Cosmology scientific community but currently anyone interested in handling pixelated data on the sphere is very welcome to propose new features. Capabilities ------------ `healpy` provides utilities to: * convert between sky coordinates and pixel indices in `HEALPix` nested and ring schemes * find pixels within a disk, a polygon or a strip in the sky * apply coordinate transformations between Galactic, Ecliptic and Equatorial reference frames * apply custom rotations either to vectors or full maps * read and write `HEALPix` maps to disk in FITS format * upgrade and downgrade the resolution of existing `HEALPix` maps * visualize maps in Mollweide, Gnomonic and Cartographic projections * transform maps to Spherical Harmonics space and back using multi-threaded C++ routines * compute Auto and Cross Power Spectra from maps and create map realizations from spectra The documentation can be found at https://healpy.readthedocs.io, tutorial at https://healpy.readthedocs.io/en/latest/tutorial.html, or execute it on `mybinder `_ Requirements ------------ * `Python `_ 3.9, 3.10, or 3.11 * `Numpy `_ (tested with version >=1.19) * `Matplotlib `_ * Python development package is required for some distribution (e.g., python-dev package for Ubuntu) * `Astropy `_ Quick installation with Pip --------------------------- The quickest way to install Healpy is with `pip `_ (>= 1.4.2), which automatically fetches the latest version of Healpy and any missing dependencies:: pip install --user healpy If you have installed with ``pip``, you can keep your installation up to date by upgrading from time to time:: pip install --user --upgrade healpy See `INSTALL.rst `_ for further details and other installation options. Optional -------- Healpy depends on the `HEALPix` C++ and cfitsio C libraries. Source code is include with Healpy and you do not have to install them separately. However, if you have them installed already, Healpy should detect and reuse them instead of building them from source. To use your own installations of `HEALPix` and cfitsio, you will also need: * `pkg-config `_ * `HEALPix `_ autotools-style C++ package * `cfitsio `_ See `INSTALL.rst `_ for further instructions. Known issues ------------ * Building with OpenMP support: the underlying `HEALPix` C++ library can be built to use `OpenMP `_ to speed up some operations on systems with multiple cores. Most, but not all, modern C/C++ compilers support OpenMP, `the notable exception being clang `_. If your Healpy build fails with an error message about being unable to link against `-lgomp`, then this typically means that Healpy detected an already-installed `HEALPix` C++ library that was built with OpenMP support, but you are trying to build Healpy with a compiler that does not support OpenMP. Try cleaning the build with `python setup.py clean --all`, and set the environment variables `CC` and `CXX` to point to an OpenMP-capable compiler, such as gcc/g++. * Healpy does not currently support Windows. See https://github.com/healpy/healpy/issues/25. * Incompatibility with ``cfitisio`` from ``HEASOFT``: due to a conflict of header file names it is currently not possible to use the cfitsio library provided with the HEASOFT package for compilation of `HEALPix` C++. HEASOFT's include directory contains a file called "rotmatrix.h" which clashes with `HEALPix`'s own rotmatrix.h. * Compilation problems in the C++ package: some gcc versions (we have reports for 4.4.5 and 4.4.6) crash with an internal compiler error during compilation of libsharp. Unfortunately we have not found a workaround for this compiler problem. To our knowledge, it has been fixed in gcc 4.4.7 and in the 4.5.x and newer versions. * Healpy pixel functions, e.g. ``ang2pix``, do not support 32-bit platforms. See https://github.com/healpy/healpy/issues/194. Support ------- For specific *HOWTO* questions please create a question on StackOverflow_ and tag it with the `healpy` tag, so that answers will be easily searchable on google. If you think you found a bug or you have install issues, open an issue on GitHub: https://github.com/healpy/healpy/issues .. _StackOverflow: http://stackoverflow.com/questions/ask Contribute ---------- Project development takes place on github, http://github.com/healpy/healpy, please open an issue over there for reporting bugs or suggest improvements. Collaboration is very welcome, just fork the project on github and send pull requests back to the main repository. Developers ---------- Core developers: * Cyrille Rosset * Andrea Zonca * Martin Reinecke * Leo Singer * Daniel Lenz List of contributors: https://github.com/healpy/healpy/graphs/contributors Acknowledgements ---------------- 1. Cite the HEALPix and `healpy` papers, see the `CITATION file `_ in the repository. 2. Add an acknowledgment statement: "Some of the results in this paper have been derived using the `healpy` and `HEALPix` packages". 3. at the first use of the `HEALPix` acronym, a footnote placed in the main body of the paper referring to the `HEALPix` web site, currently http://healpix.sf.net 4. You can also directly support the maintenance and development of `healpy` via `Github Sponsors `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1696365346.9246783 healpy-1.16.6/bin/0000755000000000000000000000000014507075443012406 5ustar00rootroot././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365307.0 healpy-1.16.6/bin/healpy_get_wmap_maps.sh0000644000000000000000000000050114507075373017125 0ustar00rootroot#!/bin/bash wget -c http://lambda.gsfc.nasa.gov/data/map/dr4/skymaps/7yr/raw/wmap_band_iqumap_r9_7yr_W_v4.fits wget -c http://lambda.gsfc.nasa.gov/data/map/dr4/skymaps/7yr/raw/wmap_band_iqumap_r9_7yr_V_v4.fits wget -c http://lambda.gsfc.nasa.gov/data/map/dr4/ancillary/masks/wmap_temperature_analysis_mask_r9_7yr_v4.fits ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1696365346.9526787 healpy-1.16.6/cfitsio/0000755000000000000000000000000014507075443013276 5ustar00rootroot././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365311.0 healpy-1.16.6/cfitsio/CMakeLists.txt0000755000000000000000000002503714507075377016056 0ustar00rootroot#============================================================================== # CFITSIO CMakeLists.txt #============================================================================== # Ensure that build directory is not the source directory: IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "Please create a separate directory for building CFITSIO." ) ENDIF() CMAKE_MINIMUM_REQUIRED(VERSION 3.1) # Suppress warning about WIN32 no longer being defined on Cygwin: SET(CMAKE_LEGACY_CYGWIN_WIN32 0) PROJECT(CFITSIO DESCRIPTION "Library of C and Fortran subroutines for reading and writing data files in FITS data format." LANGUAGES C CXX ) # Define project version SET(${PROJECT_NAME}_MAJOR 4) SET(${PROJECT_NAME}_MINOR 1) SET(${PROJECT_NAME}_MICRO 0) SET(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}.${${PROJECT_NAME}_MICRO}) SET(LIB_NAME cfitsio) # Allow @rpath token in target install name on Macs. # See "cmake --help-policy CMP0042" for more information. IF(POLICY CMP0042) CMAKE_POLICY(SET CMP0042 NEW) ENDIF() INCLUDE(CheckLibraryExists) INCLUDE(CheckFunctionExists) INCLUDE(CheckSymbolExists) INCLUDE(CheckCSourceCompiles) #============================================================================== # Build options: #============================================================================== # Allow the developer to select if Dynamic or Static libraries are built OPTION(BUILD_SHARED_LIBS "Build Shared Libraries" ON) # Allow curl dependency to be disabled with "-DUSE_CURL=OFF": OPTION(USE_CURL "USE_CURL" ON) OPTION(USE_PTHREADS "Thread-safe build (using pthreads)" OFF) OPTION(TESTS "Build test programs Testprog and cookbook" OFF) OPTION(UTILS "Build FPack, Funpack, and Fitscopy executables" OFF) OPTION(USE_SSE2 "Enable use of instructions in the SSE2 extended instruction set" OFF) OPTION(USE_SSSE3 "Enable use of instructions in the SSSE3 extended instruction set" OFF) IF(NOT WIN32) OPTION(USE_BZIP2 "Enable bzip2 support" OFF) ENDIF() #============================================================================== FIND_PACKAGE(ZLIB REQUIRED) IF(BUILD_SHARED_LIBS) SET (LIB_TYPE SHARED) ELSE() SET (LIB_TYPE STATIC) ENDIF(BUILD_SHARED_LIBS) IF(NOT WIN32) # Find curl library, for HTTPS support: IF(USE_CURL) FIND_PACKAGE(CURL) IF(CURL_FOUND) ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL) ENDIF() ENDIF() ENDIF(NOT WIN32) IF(USE_PTHREADS) FIND_PACKAGE(Threads REQUIRED) ADD_DEFINITIONS(-D_REENTRANT) ENDIF(USE_PTHREADS) IF(USE_BZIP2) FIND_PACKAGE(BZip2 REQUIRED) ADD_DEFINITIONS(-DHAVE_BZIP2=1) ENDIF(USE_BZIP2) # Math library (not available in MSVC or MINGW) IF(MSVC OR MINGW) SET(M_LIB "") ELSE() FIND_LIBRARY(M_LIB m) ENDIF() # Support for remote file drivers is not implemented for native Windows: IF (NOT MSVC) # Find library needed for gethostbyname: CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME) IF (NOT CMAKE_HAVE_GETHOSTBYNAME) CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_HAVE_GETHOSTBYNAME) ENDIF () # Find library needed for connect: CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT) IF (NOT CMAKE_HAVE_CONNECT) CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_HAVE_CONNECT) ENDIF () # Define HAVE_NET_SERVICES if gethostbyname & connect were found: IF (CMAKE_HAVE_GETHOSTBYNAME AND CMAKE_HAVE_CONNECT) ADD_DEFINITIONS(-DHAVE_NET_SERVICES) CHECK_SYMBOL_EXISTS(fmemopen "stdio.h" HAVE_FMEMOPEN) IF(HAVE_FMEMOPEN) ADD_DEFINITIONS(-DHAVE_FMEMOPEN) ENDIF() ENDIF() ENDIF() IF(MSVC OR BORLAND) # Define ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) # Need an empty unistd.h in MSVC for flex-generated eval_l.c: FILE(WRITE ${CMAKE_SOURCE_DIR}/unistd.h "") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) ENDIF() IF(BORLAND) # Suppress spurious Borland compiler warnings about "Suspicious # pointer arithmetic", "Possibly incorrect assignment", and # "Comparing signed and unsigned values". ADD_DEFINITIONS(-w-spa) ADD_DEFINITIONS(-w-pia) ADD_DEFINITIONS(-w-csu) ENDIF() IF(USE_SSE2) IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") ADD_COMPILE_OPTIONS(-msse2) ENDIF() IF(MSVC) ADD_DEFINITIONS(-D__SSE2__=1) ENDIF() ENDIF() IF(USE_SSSE3) IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") ADD_COMPILE_OPTIONS(-mssse3) ENDIF() IF(MSVC) ADD_DEFINITIONS(-D__SSE2__=1 -D__SSSE3__=1) ENDIF() ENDIF() # Test for the unix ftruncate function CHECK_SYMBOL_EXISTS(ftruncate "unistd.h" HAVE_FTRUNCATE) IF(HAVE_FTRUNCATE) ADD_DEFINITIONS(-DHAVE_UNISTD_H -DHAVE_FTRUNCATE) ENDIF() # Check is System V IPC is supported on this machine CHECK_C_SOURCE_COMPILES(" #include #include #include int main() { shmat(0,0,0); shmdt(0); shmget(0, 0, 0); semget(0, 0, 0); return 0; }" HAVE_SHMEM_SERVICES) IF(HAVE_SHMEM_SERVICES) ADD_DEFINITIONS(-DHAVE_SHMEM_SERVICES) # Some systems define flock_t, for others we have to define it ourselves CHECK_C_SOURCE_COMPILES(" #include int main() { flock_t filler; return 0; }" HAVE_FLOCK_T) IF(HAVE_FLOCK_T) ADD_DEFINITIONS(-DHAVE_FLOCK_T) ENDIF() # Check union semun CHECK_C_SOURCE_COMPILES(" #include #include #include int main() { union semun filler; return 0; }" HAVE_UNION_SEMUN) IF(HAVE_UNION_SEMUN) ADD_DEFINITIONS(-DHAVE_UNION_SEMUN) ENDIF() ENDIF() IF(WIN32 AND BUILD_SHARED_LIBS) ADD_DEFINITIONS(-Dcfitsio_EXPORTS) ENDIF() #============================================================================== # CFITSIO source code: #============================================================================== set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/") set (BIN_DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") SET(H_FILES fitsio.h fitsio2.h longnam.h) SET(SRC_FILES buffers.c cfileio.c checksum.c drvrfile.c drvrmem.c drvrnet.c drvrsmem.c editcol.c edithdu.c eval_f.c eval_l.c eval_y.c f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c fits_hcompress.c fits_hdecompress.c fitscore.c getcol.c getcolb.c getcold.c getcole.c getcoli.c getcolj.c getcolk.c getcoll.c getcols.c getcolsb.c getcolui.c getcoluj.c getcoluk.c getkey.c group.c grparser.c histo.c imcompress.c iraffits.c modkey.c pliocomp.c putcol.c putcolb.c putcold.c putcole.c putcoli.c putcolj.c putcolk.c putcoll.c putcols.c putcolsb.c putcolu.c putcolui.c putcoluj.c putcoluk.c putkey.c quantize.c region.c ricecomp.c scalnull.c simplerng.c swapproc.c wcssub.c wcsutil.c zcompress.c zuncompress.c ) # For future modifications: # drvrsmem.c is only usable if HAVE_SHMEM_SERVICES is defined: #drvrsmem.c # drvrgsiftp.c is only usable if HAVE_NET_SERVICES & HAVE_GSIFTP are defined: #drvrgsiftp.c #============================================================================== # Add libraries: #============================================================================== ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES}) # Math: TARGET_LINK_LIBRARIES(${LIB_NAME} ${M_LIB}) # zlib: IF (ZLIB_FOUND) TARGET_INCLUDE_DIRECTORIES(${LIB_NAME} PUBLIC ${ZLIB_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(${LIB_NAME} ${ZLIB_LIBRARIES}) # For cfitsio.pc.cmake: SET (PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} -lz") ENDIF(ZLIB_FOUND) # cURL: IF (CURL_FOUND) TARGET_INCLUDE_DIRECTORIES(${LIB_NAME} PUBLIC ${CURL_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(${LIB_NAME} ${CURL_LIBRARIES}) # For cfitsio.pc.cmake: SET (PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} -lcurl") ENDIF(CURL_FOUND) # PThreads: IF (THREADS_FOUND) TARGET_LINK_LIBRARIES(${LIB_NAME} Threads::Threads) ENDIF(THREADS_FOUND) # BZip2: IF (BZIP2_FOUND) TARGET_INCLUDE_DIRECTORIES(${LIB_NAME} PUBLIC ${BZIP2_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(${LIB_NAME} ${BZIP2_LIBRARIES}) SET (PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} -lbz2") ENDIF(BZIP2_FOUND) SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR}) include(GNUInstallDirs) install(TARGETS ${LIB_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) install(FILES ${H_FILES} DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) #============================================================================== # Optional test programs: #============================================================================== IF (TESTS) ENABLE_TESTING() ADD_EXECUTABLE(TestProg testprog.c) TARGET_LINK_LIBRARIES(TestProg ${LIB_NAME}) ADD_TEST(TestProg TestProg) # Copy testprog.tpt to build directory to allow quick test # of ./TestProg (or .\Release\TestProg.exe in MSVC): FILE(COPY ${CMAKE_SOURCE_DIR}/testprog.tpt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) ADD_EXECUTABLE(cookbook cookbook.c) TARGET_LINK_LIBRARIES(cookbook ${LIB_NAME}) ADD_TEST(cookbook cookbook) ENDIF(TESTS) #============================================================================== # Optional utilities: #============================================================================== IF (UTILS) ADD_EXECUTABLE(FPack fpack.c fpackutil.c) TARGET_LINK_LIBRARIES(FPack ${LIB_NAME}) ADD_EXECUTABLE(Funpack funpack.c fpackutil.c) TARGET_LINK_LIBRARIES(Funpack ${LIB_NAME}) ADD_EXECUTABLE(Fitscopy fitscopy.c) TARGET_LINK_LIBRARIES(Fitscopy ${LIB_NAME}) # To expand the command line arguments in Windows, see: # http://msdn.microsoft.com/en-us/library/8bch7bkk.aspx if(MSVC) set_target_properties(FPack Funpack PROPERTIES LINK_FLAGS "setargv.obj") endif(MSVC) install(TARGETS FPack Funpack Fitscopy RUNTIME DESTINATION bin) ENDIF(UTILS) #============================================================================== # cfitsio.pc #============================================================================== configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cfitsio.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/cfitsio.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cfitsio.pc DESTINATION lib/pkgconfig/) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365311.0 healpy-1.16.6/cfitsio/License.txt0000644000000000000000000000260214507075377015427 0ustar00rootrootCopyright (Unpublished--all rights reserved under the copyright laws of the United States), U.S. Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S. Code. Permission to freely use, copy, modify, and distribute this software and its documentation without fee is hereby granted, provided that this copyright notice and disclaimer of warranty appears in all copies. DISCLAIMER: THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365311.0 healpy-1.16.6/cfitsio/Makefile.in0000644000000000000000000001412514507075377015354 0ustar00rootroot# # Makefile for cfitsio library: # # Oct-96 : original version by # # JDD/WDP # NASA GSFC # Oct 1996 # # 25-Jan-01 : removed conditional drvrsmem.c compilation because this # is now handled within the source file itself. # 09-Mar-98 : modified to conditionally compile drvrsmem.c. Also # changes to target all (deleted clean), added DEFS, LIBS, added # DEFS to .c.o, added SOURCES_SHMEM and MY_SHMEM, expanded getcol* # and putcol* in SOURCES, modified OBJECTS, mv changed to /bin/mv # (to bypass aliasing), cp changed to /bin/cp, add smem and # testprog targets. See also changes and comments in configure.in # Default library name: PACKAGE = cfitsio # CFITSIO version numbers: CFITSIO_MAJOR = @CFITSIO_MAJOR@ CFITSIO_MINOR = @CFITSIO_MINOR@ CFITSIO_MICRO = @CFITSIO_MICRO@ CFITSIO_SONAME = @CFITSIO_SONAME@ prefix = @prefix@ exec_prefix = @exec_prefix@ CFITSIO_BIN = ${DESTDIR}@bindir@ CFITSIO_LIB = ${DESTDIR}@libdir@ CFITSIO_INCLUDE = ${DESTDIR}@includedir@ INSTALL_DIRS = ${DESTDIR}@INSTALL_ROOT@ ${CFITSIO_INCLUDE} ${CFITSIO_LIB} ${CFITSIO_LIB}/pkgconfig SHELL = /bin/sh ARCHIVE = @ARCHIVE@ RANLIB = @RANLIB@ CC = @CC@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ SSE_FLAGS = @SSE_FLAGS@ FC = @FC@ LDFLAGS = @LDFLAGS@ LDFLAGS_BIN = @LDFLAGS_BIN@ DEFS = @DEFS@ LIBS = @LIBS@ LIBS_CURL = @LIBS_CURL@ FLEX = flex BISON = bison SHLIB_LD = @SHLIB_LD@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ CFITSIO_SHLIB = @CFITSIO_SHLIB@ CFITSIO_SHLIB_SONAME = @CFITSIO_SHLIB_SONAME@ CORE_SOURCES = buffers.c cfileio.c checksum.c drvrfile.c drvrmem.c \ drvrnet.c drvrsmem.c editcol.c edithdu.c eval_l.c \ eval_y.c eval_f.c fitscore.c getcol.c getcolb.c getcold.c getcole.c \ getcoli.c getcolj.c getcolk.c getcoll.c getcols.c getcolsb.c \ getcoluk.c getcolui.c getcoluj.c getkey.c group.c grparser.c \ histo.c iraffits.c \ modkey.c putcol.c putcolb.c putcold.c putcole.c putcoli.c \ putcolj.c putcolk.c putcoluk.c putcoll.c putcols.c putcolsb.c \ putcolu.c putcolui.c putcoluj.c putkey.c region.c scalnull.c \ swapproc.c wcssub.c wcsutil.c imcompress.c quantize.c ricecomp.c \ pliocomp.c fits_hcompress.c fits_hdecompress.c \ simplerng.c @GSIFTP_SRC@ ZLIB_SOURCES = zcompress.c zuncompress.c SOURCES = ${CORE_SOURCES} ${ZLIB_SOURCES} @F77_WRAPPERS@ OBJECTS = ${SOURCES:.c=.o} CORE_OBJECTS = ${CORE_SOURCES:.c=.o} ${ZLIB_SOURCES:.c=.o} FITSIO_SRC = f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c # ============ description of all targets ============= # - <<-- ignore error code all: @if [ "x${FC}" = x ]; then \ ${MAKE} all-nofitsio; \ else \ ${MAKE} stand_alone; \ fi all-nofitsio: ${MAKE} stand_alone "FITSIO_SRC=" stand_alone: lib${PACKAGE}.a shared lib${PACKAGE}.a: ${OBJECTS} ${ARCHIVE} $@ ${OBJECTS}; \ ${RANLIB} $@; shared: lib${PACKAGE}${SHLIB_SUFFIX} lib${PACKAGE}${SHLIB_SUFFIX}: ${OBJECTS} ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS_CURL} ${LIBS} @if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \ ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \ ln -sf ${CFITSIO_SHLIB_SONAME} $@; \ fi install: lib${PACKAGE}.a ${INSTALL_DIRS} @for lib in lib${PACKAGE}.a lib${PACKAGE}${SHLIB_SUFFIX} \ ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; do \ if [ -f $$lib ]; then \ echo "/bin/cp -a $$lib ${CFITSIO_LIB}"; \ /bin/cp -a $$lib ${CFITSIO_LIB}; \ fi; \ done /bin/cp fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE} /bin/cp cfitsio.pc ${CFITSIO_LIB}/pkgconfig @for task in ${FPACK_UTILS} ${UTILS}; do \ if [ -f $$task ]; then \ if [ ! -d ${CFITSIO_BIN} ]; then mkdir -p ${CFITSIO_BIN}; fi; \ echo "/bin/cp $$task ${CFITSIO_BIN}"; \ /bin/cp $$task ${CFITSIO_BIN}; \ fi; \ done .c.o: ${CC} -c -o ${ eval_l.c1 # Note workaround for yyfree=fffree conflict /bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' eval_l.c1 -e 's/fffree/yyfffree/g' > eval_l.c /bin/rm -f eval_l.c1 ${BISON} -d -v -y eval.y /bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.c > eval_y.c /bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.h > eval_tab.h /bin/rm -f y.tab.c y.tab.h clean: - /bin/rm -rf *.o zlib/*.o *.dSYM lib${PACKAGE}* y.output so_locations \ ${UTILS} ${FPACK_UTILS} testprog.fit testf77 distclean: clean - /bin/rm -f Makefile cfitsio.pc config.log config.status configure.lineno # Make target which outputs the list of the .o contained in the cfitsio lib # usefull to build a single big shared library containing Tcl/Tk and other # extensions. used for the Tcl Plugin. cfitsioLibObjs: @echo ${CORE_OBJECTS} cfitsioLibSrcs: @echo ${SOURCES} # This target actually builds the objects needed for the lib in the above # case objs: ${CORE_OBJECTS} ${INSTALL_DIRS}: @if [ ! -d $@ ]; then mkdir -p $@; fi ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365311.0 healpy-1.16.6/cfitsio/README0000644000000000000000000001066014507075377014167 0ustar00rootroot CFITSIO Interface Library CFITSIO is a library of ANSI C routines for reading and writing FITS format data files. A set of Fortran-callable wrapper routines are also included for the convenience of Fortran programmers. This README file gives a brief summary of how to build and test CFITSIO, but the CFITSIO User's Guide, found in the files cfitsio.doc (plain text), cfitsio.tex (LaTeX source file), cfitsio.ps, or cfitsio.pdf should be referenced for the latest and most complete information. BUILDING CFITSIO ---------------- The CFITSIO code is contained in about 40 *.c source files and several *.h header files. CFITSIO should compile and run on most Unix platforms without modification, except that Cray supercomputers computers are currently not supported. The CFITSIO library is built on Unix systems by typing: > ./configure [--prefix=/target/installation/path] > make (or 'make shared') > make install (this step is optional) at the operating system prompt. The configure command customizes the Makefile for the particular system, then the `make' command compiles the source files and builds the library. Type `./configure' and not simply `configure' to ensure that the configure script in the current directory is run and not some other system-wide configure script. The optional 'prefix' argument to configure gives the path to the directory where the CFITSIO library and include files should be installed via the later 'make install' command. For example, > ./configure --prefix=/usr1/local will cause the 'make install' command to copy the CFITSIO libcfitsio file to /usr1/local/lib and the necessary include files to /usr1/local/include (assuming of course that the process has permission to write to these directories). All the available configure options can be seen by entering the command > ./configure --help On VAX/VMS and ALPHA/VMS systems the make.com command file may be used to build the cfitsio.olb object library using the default G-floating point option for double variables. The make\_dfloat.com and make\_ieee.com files may be used instead to build the library with the other floating point options. A precompiled DLL version of CFITSIO is available for IBM-PC users of the Borland or Microsoft Visual C++ compilers in the files cfitsiodll_xxxx_borland.zip and cfitsiodll_xxxx_vcc.zip, where 'xxxx' represents the current release number. These zip archives also contains other files and instructions on how to use the CFITSIO DLL library. The CFITSIO library may also be built from the source code using the makefile.bc or makefile.vcc files. Finally, the makepc.bat file gives an example of building CFITSIO with the Borland C++ v4.5 compiler using simpler DOS commands. Instructions for building CFITSIO on Mac OS can be found in the README.MacOS file. TESTING CFITSIO --------------- The CFITSIO library should be tested by building and running the testprog.c program that is included with the release. On Unix systems, type: - % make testprog % testprog > testprog.lis % diff testprog.lis testprog.out % cmp testprog.fit testprog.std - On VMS systems, (assuming cc is the name of the C compiler command), type: - $ cc testprog.c $ link testprog, cfitsio/lib $ run testprog - The testprog program should produce a FITS file called `testprog.fit' that is identical to the testprog.std FITS file included in this release. The diagnostic messages (which were piped to the file testprog.lis in the Unix example) should be identical to the listing contained in the file testprog.out. The 'diff' and 'cmp' commands shown above should not report any differences in the files. USING CFITSIO ------------- The CFITSIO User's Guide, contained in the files cfitsio.doc (plain text file) and cfitsio.ps (postscript file), provides detailed documentation about how to build and use the CFITSIO library. It contains a description of every user-callable routine in the CFITSIO interface. The cookbook.c file provides some sample routines for performing common operations on various types of FITS files. Programmers are urged to examine these routines for recommended programming practices when using CFITSIO. Users are free to copy or modify these routines for their own purposes. Any problem reports or suggestions for improvements are welcome and should be sent to the HEASARC help desk. ------------------------------------------------------------------------- William D. Pence HEASARC, NASA/GSFC ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365311.0 healpy-1.16.6/cfitsio/README.MacOS0000644000000000000000000000467514507075377015141 0ustar00rootrootBy default, the CFITSIO library will be a "Universal Binary" (i.e. 32- and 64-bit compatible) under Mac OS X when built in the standard way, i.e. - tar xzf cfitsio3370.tar.gz (or whatever version this is) - cd cfitsio/ - ./configure - make - make install --------------------------------------------------------------------- To install CFITSIO using MacPorts: --------------------------------------------------------------------- If you have MacPorts installed, you may install CFITSIO simply with the command $ sudo port install cfitsio +universal For more information, please visit: http://macports.org https://trac.macports.org/browser/trunk/dports/science/cfitsio/Portfile --------------------------------------------------------------------- To install CFITSIO using Homebrew: --------------------------------------------------------------------- If you have Homebrew installed, you may install CFITSIO simply with the command $ brew install cfitsio For more information, please visit: http://brew.sh http://brewformulas.org/Cfitsio --------------------------------------------------------------------- To build CFITSIO using the XCode GUI: --------------------------------------------------------------------- - tar xzf cfitsio3370.tar.gz (or whatever version this is) - cd cfitsio/ - Start Xcode and open cfitsio.xcodeproj/project.pbxproj, or just "open" the file from a terminal command line, $ open cfitsio.xcodeproj/project.pbxproj and this will start up XCode for you. - Press the Build (or "Play") button in the upper left corner of the GUI. --------------------------------------------------------------------- --------------------------------------------------------------------- Below, are the old (and now obsolete) instructions for building CFITSIO on classic Mac OS-9 or earlier versions: 1. Un binhex and unstuff cfitsio_mac.sit.hqx 2. put CFitsioPPC.mcp in the cfitsio directory. 2. Load CFitsioPPC.mcp into CodeWarrior Pro 5 and make. This builds the cfitsio library for PPC. There are also targets for both the test program and the speed test program. To use the MacOS port you can add Cfitsio PPC.lib to your Codewarrior Pro 5 project. Note that this only has been tested for the PPC. It probably won't work on 68k macs. Also note that the fortran bindings aren't included. I haven't worked with the codewarrior f2c plugin so I don't know how these would work. If one is interested, please write and I can look into this. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1696365311.0 healpy-1.16.6/cfitsio/README.win0000644000000000000000000002040614507075377014762 0ustar00rootrootInstructions on building and using CFITSIO on Windows platforms for C programmers using Microsoft Visual Studio or Borland C++. These instructions for building the CFITSIO library under Windows use the CMake build system that is available from http://www.cmake.org. =============================================================================== 1. Build the CFITSIO dll library a. If CMAKE is not already installed on your machine, download it from http://www.cmake.org. It is recommended that you choose the "Add CMake to the system PATH for current user" option during the installation setup process for convenience when running CMake later on. b. Install ZLIB: The compression library "zlib" is required in order to build CFITSIO. Visit their site at https://zlib.net to download the latest distribution. Unpack it, then build and install it from a parallel directory, for example: mkdir zlib.build cd zlib.build cmake ..\zlib-1.2.11 -DCMAKE_INSTALL_PREFIX=c:\Users\myname\zlib cmake --build . --config Release cmake --install . The cmake comands below will use the path "c:\Users\myname\zlib" as an example for the installed zlib location. c. Unzip the CFITSIO .zip file (e.g. cfit-4.0.0.zip) that was obtained from the CFITSIO Web site (http://heasarc.gsfc.nasa.gov/fitsio). This will create a new \cfitsio-4.0.0 subdirectory that contains the source code and documentation files. It also contains a CMakeLists.txt file that will be used during the CMake build process. d. Open the Visual Studio Command Prompt window, likely using a desktop icon with this same name, (or the equivalent Borland command window) and cd (change directory) into the parent directory that is one level above the directory containing the CFITSIO source files that was created in the previous step. e. Create a new subdirectory (for example, "cfitsio.build"), and cd into it with the following commands: mkdir cfitsio.build cd cfitsio.build When using Visual Studio, all the files that are generated during the CMake process will be created in or under this subdirectory. f. Create the CMake files necessary for the build: To use the default Visual Studio compilers and architecture, simply run (for example): cmake ..\cfitsio-4.0.0 -DCMAKE_PREFIX_PATH=c:\Users\myname\zlib Alternatively, you can specify the name of a CMake Generator using the "-G" flag: cmake -G "" ..\cfitsio-4.0.0 -DCMAKE_PREFIX_PATH=c:\Users\myname\zlib Where the string "" designates your choice of compiler. Some possible options are: "Visual Studio 16 2019" "Visual Studio 16 2019" -A Win32 (for 32-bit builds) "Visual Studio 15 2017 Win64" "Visual Studio 15 2017" (for 32-bit builds) "Visual Studio 15 2017" -A Win32 (for 32-bit builds) "MinGW Makefiles" "Borland Makefiles" "NMake Makefiles" You can see a list of all the available CMake Generators by executing the command cmake /? Note that these names are case-sensitive and must be entered exactly as displayed. Note that the "..\cfitsio-4.0.0" argument gives the relative path to the directory that contains the CFITSIO source files and the CMakeLists.txt file. Some other optional flags are available to use during this step, using this format: cmake -G ..\cfitsio-4.0.0 -D