From b3cb58da0191f91dbeffd2e2f435f079184acd6b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 12 Jun 2017 16:01:40 +0800 Subject: astro/21cm/tile_slice.py: Save information to header --- astro/21cm/tile_slice.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'astro/21cm') 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, -- cgit v1.2.2