diff options
author | Aaron LI <aly@aaronly.me> | 2017-08-13 19:34:21 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-08-13 19:34:21 +0800 |
commit | 65e93d7e2d585faa3a57a07864ed11305230248a (patch) | |
tree | 2287cda5168918384f7a55c46554fc697afd9d56 | |
parent | 0fbe7eb3a768ff604c5e979fb54159215bd56cba (diff) | |
download | fg21sim-65e93d7e2d585faa3a57a07864ed11305230248a.tar.bz2 |
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 <aly@aaronly.me>
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 9 | ||||
-rw-r--r-- | fg21sim/sky.py | 1 |
2 files changed, 6 insertions, 4 deletions
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 |