aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/foregrounds.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-21 10:16:57 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-21 10:16:57 +0800
commit8adeeb51cca40337cce36f94d00bacc84c33731d (patch)
tree97db1ae9e7faec3375c06fdd92bc4c97603b6a7a /fg21sim/foregrounds.py
parentbc2dee6824c9507b7f73b29c0c78f6d38ac76240 (diff)
downloadfg21sim-8adeeb51cca40337cce36f94d00bacc84c33731d.tar.bz2
Update "simulate_frequency()" to also return the output file path
* Update "output()" method to return the output file path * Update "simulate()" to also return the list of output file paths
Diffstat (limited to 'fg21sim/foregrounds.py')
-rw-r--r--fg21sim/foregrounds.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/fg21sim/foregrounds.py b/fg21sim/foregrounds.py
index 2206edf..5df2584 100644
--- a/fg21sim/foregrounds.py
+++ b/fg21sim/foregrounds.py
@@ -149,6 +149,11 @@ class Foregrounds:
def _output(self, hpmap, frequency):
"""Write the simulated free-free map to disk with proper header
keywords and history.
+
+ Returns
+ -------
+ filepath : str
+ The (absolute) path to the output HEALPix map file.
"""
if not os.path.exists(self.output_dir):
os.mkdir(self.output_dir)
@@ -198,6 +203,7 @@ class Foregrounds:
for comp_obj in self.components.values():
hpmap_f += comp_obj.simulate_frequency(f)
#
+ hpmap, filepath = comp_obj.simulate_frequency(freq)
if self.combine:
self._output(hpmap_f, f)