diff options
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/configs/00-general.conf.spec | 9 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters.py | 5 | ||||
-rw-r--r-- | fg21sim/foregrounds.py | 5 | ||||
-rw-r--r-- | fg21sim/galactic/freefree.py | 5 | ||||
-rw-r--r-- | fg21sim/galactic/snr.py | 5 | ||||
-rw-r--r-- | fg21sim/galactic/synchrotron.py | 5 |
6 files changed, 3 insertions, 31 deletions
diff --git a/fg21sim/configs/00-general.conf.spec b/fg21sim/configs/00-general.conf.spec index ba432c5..dc679d4 100644 --- a/fg21sim/configs/00-general.conf.spec +++ b/fg21sim/configs/00-general.conf.spec @@ -88,12 +88,9 @@ unit = option("K", default="K") # Use single-precision float instead of double (also save spaces) use_float = boolean(default=True) -# Filetype used to store the products (default: fits) -filetype = option("fits", default="fits") - -# Filename pattern (without extension) for the output products, which will -# be finally formatted using `str.format()`. -filename_pattern = string(default="{prefix}_{frequency:05.1f}") +# Filename pattern for the output products, which will be finally +# formatted using `str.format()`. +filename_pattern = string(default="{prefix}_{frequency:05.1f}.fits") # Whether calculate the checksum for the output file (e.g., "CHECKSUM" # keyword in FITS header)? diff --git a/fg21sim/extragalactic/clusters.py b/fg21sim/extragalactic/clusters.py index 3b3262f..8627c34 100644 --- a/fg21sim/extragalactic/clusters.py +++ b/fg21sim/extragalactic/clusters.py @@ -555,11 +555,6 @@ class GalaxyClusters: } data.update(kwargs) filename = self.filename_pattern.format(**data) - filetype = self.configs.getn("output/filetype") - if filetype == "fits": - filename += ".fits" - else: - raise NotImplementedError("unsupported filetype: %s" % filetype) filepath = os.path.join(self.output_dir, filename) return filepath diff --git a/fg21sim/foregrounds.py b/fg21sim/foregrounds.py index c398394..85242c1 100644 --- a/fg21sim/foregrounds.py +++ b/fg21sim/foregrounds.py @@ -123,11 +123,6 @@ class Foregrounds: } data.update(kwargs) filename = self.filename_pattern.format(**data) - filetype = self.configs.getn("output/filetype") - if filetype == "fits": - filename += ".fits" - else: - raise NotImplementedError("unsupported filetype: %s" % filetype) filepath = os.path.join(self.output_dir, filename) return filepath diff --git a/fg21sim/galactic/freefree.py b/fg21sim/galactic/freefree.py index 878a833..44bd9d5 100644 --- a/fg21sim/galactic/freefree.py +++ b/fg21sim/galactic/freefree.py @@ -184,11 +184,6 @@ class FreeFree: } data.update(kwargs) filename = self.filename_pattern.format(**data) - filetype = self.configs.getn("output/filetype") - if filetype == "fits": - filename += ".fits" - else: - raise NotImplementedError("unsupported filetype: %s" % filetype) filepath = os.path.join(self.output_dir, filename) return filepath diff --git a/fg21sim/galactic/snr.py b/fg21sim/galactic/snr.py index b493ee5..088a2ae 100644 --- a/fg21sim/galactic/snr.py +++ b/fg21sim/galactic/snr.py @@ -322,11 +322,6 @@ class SuperNovaRemnants: } data.update(kwargs) filename = self.filename_pattern.format(**data) - filetype = self.configs.getn("output/filetype") - if filetype == "fits": - filename += ".fits" - else: - raise NotImplementedError("unsupported filetype: %s" % filetype) filepath = os.path.join(self.output_dir, filename) return filepath diff --git a/fg21sim/galactic/synchrotron.py b/fg21sim/galactic/synchrotron.py index 09eefd6..8efa2db 100644 --- a/fg21sim/galactic/synchrotron.py +++ b/fg21sim/galactic/synchrotron.py @@ -146,11 +146,6 @@ class Synchrotron: } data.update(kwargs) filename = self.filename_pattern.format(**data) - filetype = self.configs.getn("output/filetype") - if filetype == "fits": - filename += ".fits" - else: - raise NotImplementedError("unsupported filetype: %s" % filetype) filepath = os.path.join(self.output_dir, filename) return filepath |