aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-06-12 16:01:40 +0800
committerAaron LI <aly@aaronly.me>2017-06-12 16:04:04 +0800
commitb3cb58da0191f91dbeffd2e2f435f079184acd6b (patch)
tree74ab3472a5e51ddf3a7788b2e52b3e56fb4691cf /astro
parent10fc945278cf0f429fba59206e52d9e3e9481510 (diff)
downloadatoolbox-b3cb58da0191f91dbeffd2e2f435f079184acd6b.tar.bz2
astro/21cm/tile_slice.py: Save information to header
Diffstat (limited to 'astro')
-rwxr-xr-xastro/21cm/tile_slice.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/astro/21cm/tile_slice.py b/astro/21cm/tile_slice.py
index a7d0fba..4f217e8 100755
--- a/astro/21cm/tile_slice.py
+++ b/astro/21cm/tile_slice.py
@@ -78,6 +78,11 @@ def main():
img2 = img_tiled[:Nside2, :Nside2]
# Rescale to the output size
img_out = scipy.ndimage.zoom(img2, zoom=args.Nside/Nside2, order=1)
+ # Record information to header
+ header["Z_C"] = (zc, "Central redshift")
+ header["FREQ_C"] = (fc, "Frequency [MHz] w.r.t. to the redshift")
+ header["FOV"] = (args.fov, "FoV [deg] of this slice")
+ header["PixSize"] = (60.0*args.fov/args.Nside, "Pixel size [arcmin]")
header.add_history(" ".join(sys.argv))
hdu = fits.PrimaryHDU(data=img_out, header=header)
outfile = args.outfile.format(prefix=args.prefix, freq=freq,