From 3f830e6628366a12f37a431cbb7e0482e9d51839 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 21 May 2017 17:06:38 +0800 Subject: galactic/freefree: Update to support sky.py --- fg21sim/galactic/synchrotron.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fg21sim/galactic/synchrotron.py') diff --git a/fg21sim/galactic/synchrotron.py b/fg21sim/galactic/synchrotron.py index 7af9088..3c9c4b2 100644 --- a/fg21sim/galactic/synchrotron.py +++ b/fg21sim/galactic/synchrotron.py @@ -73,7 +73,9 @@ class Synchrotron: def _load_maps(self): """Load the template map and spectral index map.""" sky = get_sky(self.configs) + logger.info("Loading template map ...") self.template = sky.load(self.template_path) + logger.info("Loading spectral index map ...") self.indexmap = sky.load(self.indexmap_path) def _add_smallscales(self): @@ -177,7 +179,7 @@ class Synchrotron: ) if self.use_float: skymap = skymap.astype(np.float32) - sky = self.template.copy() + sky = get_sky(configs=self.configs) sky.data = skymap sky.header = header sky.write(outfile, clobber=self.clobber, checksum=self.checksum) @@ -243,9 +245,9 @@ class Synchrotron: skymaps = [] paths = [] for f in np.array(frequencies, ndmin=1): - skymap_f, filepath = self.simulate_frequency(f) + skymap_f, outfile = self.simulate_frequency(f) skymaps.append(skymap_f) - paths.append(filepath) + paths.append(outfile) return (skymaps, paths) def postprocess(self): -- cgit v1.2.2