From 65e93d7e2d585faa3a57a07864ed11305230248a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 13 Aug 2017 19:34:21 +0800 Subject: clusters/main.py: Set sky header properties * Clean up the unused configurations * Add "FREQ" keyword to the sky FITS header Signed-off-by: Aaron LI --- fg21sim/extragalactic/clusters/main.py | 9 +++++---- fg21sim/sky.py | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'fg21sim') diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 2d8f4d5..2361635 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -63,9 +63,13 @@ class GalaxyClusters: def __init__(self, configs=CONFIGS): self.configs = configs - self.sky = get_sky(configs) self._set_configs() + self.sky = get_sky(configs) + self.sky.add_header("CompName", self.name, "Emission component") + self.sky.add_header("BUNIT", "K", "Data in units of [Kelvin]") + self.sky.creator = __name__ + def _set_configs(self): """ Load the configs and set the corresponding class attributes. @@ -82,9 +86,6 @@ class GalaxyClusters: self.frequencies = self.configs.frequencies self.filename_pattern = self.configs.getn("output/filename_pattern") - self.use_float = self.configs.getn("output/use_float") - self.checksum = self.configs.getn("output/checksum") - self.clobber = self.configs.getn("output/clobber") # Sky and resolution if self.sky.type_ == "patch": diff --git a/fg21sim/sky.py b/fg21sim/sky.py index b100a8d..a505db5 100644 --- a/fg21sim/sky.py +++ b/fg21sim/sky.py @@ -182,6 +182,7 @@ class SkyBase: hdr["SkyType"] = (self.type_, "Patch / HEALPix") hdr["PixSize"] = (self.pixelsize, "Pixel size [arcsec]") hdr["CREATOR"] = (self.creator, "Sky Creator") + hdr["FREQ"] = (self.frequency, "Sky frequency [MHz]") hdr["DATE"] = (datetime.now(timezone.utc).astimezone().isoformat(), "File creation date") return hdr -- cgit v1.2.2