From 8adeeb51cca40337cce36f94d00bacc84c33731d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 21 Nov 2016 10:16:57 +0800 Subject: 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 --- fg21sim/foregrounds.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fg21sim/foregrounds.py') 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) -- cgit v1.2.2