aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-13 19:37:03 +0800
committerAaron LI <aly@aaronly.me>2017-08-13 19:37:03 +0800
commit54c0b17f3484cfbe3402d8916c841f0994d62ca7 (patch)
treee2e6a2b0890eafe18df65d6284ff4bb83d83a82c /fg21sim
parent9f0aeb2226fbf705ffb6f312804d378b61127b66 (diff)
downloadfg21sim-54c0b17f3484cfbe3402d8916c841f0994d62ca7.tar.bz2
clusters/main.py: Add method "_outfilepath()"
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/extragalactic/clusters/main.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index 2361635..15a9dcd 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -321,6 +321,27 @@ class GalaxyClusters:
hdict["template"] = template
logger.info("Done drawn halo template images.")
+ def _outfilepath(self, frequency, **kwargs):
+ """
+ Generate the path/filename to the output file for writing
+ the simulate sky images.
+
+ Parameters
+ ----------
+ frequency : float
+ The frequency of the output sky image.
+ Unit: [MHz]
+
+ Returns
+ -------
+ filepath : str
+ The generated filepath for the output sky file.
+ """
+ filename = self.filename_pattern.format(
+ prefix=self.prefix, frequency=frequency, **kwargs)
+ filepath = os.path.join(self.output_dir, filename)
+ return filepath
+
def preprocess(self):
"""
Perform the preparation procedures for the later simulations.