From cbbd8eec608ac6d1b037e33ecbe0b76c4bfa6ccc Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 9 Oct 2016 22:42:27 +0800 Subject: Use newly added "read_fits_healpix()" Also remove a unused variable in "galactic/synchrotron.py" --- fg21sim/utils/healpix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fg21sim/utils') 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) -- cgit v1.2.2