diff options
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) |