Skip to content
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

write_map and read_map support for partial sky maps #254

Merged
merged 2 commits into from
May 9, 2015

Conversation

arahlin
Copy link
Contributor

@arahlin arahlin commented May 8, 2015

Added support for reading and writing partial sky maps.

New keywords OBJECT and GRAIN are written by write_map, and an index column is added if partial=True. read_map parses INDXSCHM, OBJECT and GRAIN to determine whether the map
is a full or partial sky map, and returns an UNSEEN-padded map if the input map is partial. The field index begins from the first column after the pixel index.

This might be useful for #252 ?

@zonca
Copy link
Member

zonca commented May 8, 2015

thanks @arahlin ! what is the meaning of the GRAIN keyword?

@arahlin
Copy link
Contributor Author

arahlin commented May 8, 2015

In trying to make this method sort of compatible with typical uses of partial-sky maps, I ran across this keyword. I believe that a value of GRAIN > 1 means that one pixel index corresponds to that many consecutive map pixels. This way, you can control the size of the stored map, the indexing scheme, and the granularity with separate keywords. In principle, support for that can be added in, but as it stands I guess the keyword is kind of redundant.

@zonca
Copy link
Member

zonca commented May 8, 2015

I would remove the GRAIN keyword, apart from that the patch looks good to merge. maybe you can print out a warning if that keyword is present in the file.

@arahlin
Copy link
Contributor Author

arahlin commented May 8, 2015

Sure I can do that.

@arahlin
Copy link
Contributor Author

arahlin commented May 9, 2015

I didn't bother adding a warning, the GRAIN keyword seems uncommon enough that it's unlikely to be used by healpy users.

zonca added a commit that referenced this pull request May 9, 2015
write_map and read_map support for partial sky maps
@zonca zonca merged commit a38578f into healpy:master May 9, 2015
@zonca
Copy link
Member

zonca commented May 9, 2015

great, thanks!

@arahlin arahlin deleted the read_write_partial branch May 10, 2015 19:01
0-wiz-0 pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Jan 30, 2016
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants