diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-10-09 22:42:27 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-10-09 22:42:27 +0800 |
commit | cbbd8eec608ac6d1b037e33ecbe0b76c4bfa6ccc (patch) | |
tree | 010e79488bfa1986e53eff1b91f79589fc1f2799 /fg21sim/utils/healpix.py | |
parent | ad0eb504996c977df190106229fbbe2b0f25caa6 (diff) | |
download | fg21sim-cbbd8eec608ac6d1b037e33ecbe0b76c4bfa6ccc.tar.bz2 |
Use newly added "read_fits_healpix()"
Also remove a unused variable in "galactic/synchrotron.py"
Diffstat (limited to 'fg21sim/utils/healpix.py')
-rw-r--r-- | fg21sim/utils/healpix.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fg21sim/utils/healpix.py b/fg21sim/utils/healpix.py index 294c588..0307f08 100644 --- a/fg21sim/utils/healpix.py +++ b/fg21sim/utils/healpix.py @@ -31,6 +31,8 @@ import numpy as np import healpy as hp from astropy.io import fits +from . import read_fits_healpix + logger = logging.getLogger(__name__) @@ -57,9 +59,7 @@ def healpix2hpx(data, header=None, append_history=None, append_comment=None): (hpx_data, hpx_header) : (2D numpy array, astropy.io.fits header) """ if isinstance(data, str) or isinstance(data, fits.BinTableHDU): - hp_data, hp_header = hp.read_map(data, nest=False, h=True, - verbose=False) - hp_header = fits.header.Header(hp_header) + hp_data, hp_header = read_fits_healpix(data) logger.info("Read HEALPix data from file or HDU") else: hp_data, hp_header = np.asarray(data), fits.header.Header(header) |