aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-13 12:30:52 +0800
committerAaron LI <aly@aaronly.me>2017-08-13 12:30:52 +0800
commit4146bd76834abe2055a50b215a34cf98747f5d37 (patch)
treeb45e45ed8ed652cc228f55927782eea7e491f4b9 /fg21sim/utils
parent4e393b5430d36750d644c50342d6481cf1567b36 (diff)
downloadfg21sim-4146bd76834abe2055a50b215a34cf98747f5d37.tar.bz2
utils/io.py: Default float32=False to preserve the data type
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/utils')
-rw-r--r--fg21sim/utils/io.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/fg21sim/utils/io.py b/fg21sim/utils/io.py
index cd98ff7..a1a5000 100644
--- a/fg21sim/utils/io.py
+++ b/fg21sim/utils/io.py
@@ -176,7 +176,7 @@ def pickle_load(infile):
return pickle.load(open(infile, "rb"))
-def write_fits_image(outfile, image, header=None, float32=True,
+def write_fits_image(outfile, image, header=None, float32=False,
clobber=False, checksum=False):
"""
Write the supplied image (together with header information) into
@@ -194,7 +194,7 @@ def write_fits_image(outfile, image, header=None, float32=True,
float32 : bool, optional
Whether coerce the image data (generally double/float64 data type)
into single/float32 (in order to save space)?
- Default: True
+ Default: False (i.e., preserve the data type unchanged)
clobber : bool, optional
Whether to overwrite the existing output file.
Default: False
@@ -255,7 +255,7 @@ def read_fits_healpix(filename):
return (data.astype(dtype), header)
-def write_fits_healpix(outfile, hpmap, header=None, float32=True,
+def write_fits_healpix(outfile, hpmap, header=None, float32=False,
clobber=False, checksum=False):
"""
Write the HEALPix map to a FITS file with proper header as well
@@ -283,7 +283,7 @@ def write_fits_healpix(outfile, hpmap, header=None, float32=True,
float32 : bool, optional
Whether coerce the image data (generally double/float64 data type)
into single/float32 (in order to save space)?
- Default: True
+ Default: False (i.e., preserve the data type unchanged)
clobber : bool, optional
Whether to overwrite the existing output file?
Default: False