From 27873cfb348d0263dc6015b13d82d10806664c41 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 4 Oct 2016 15:02:06 +0800 Subject: Remove the "common/data_dir" config item --- fg21sim/configs/00-general.conf.spec | 4 ---- fg21sim/configs/10-galactic.conf.spec | 1 - fg21sim/galactic/synchrotron.py | 9 ++++----- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/fg21sim/configs/00-general.conf.spec b/fg21sim/configs/00-general.conf.spec index 6827a12..beee721 100644 --- a/fg21sim/configs/00-general.conf.spec +++ b/fg21sim/configs/00-general.conf.spec @@ -21,10 +21,6 @@ ordering = option("RING", "NESTED", default="RING") lmin = integer(min=0, default=10) lmax = integer(min=1, default=1535) -# Directory contains the input data, e.g., component templates -# NOTE: This config is mandatory and should be provided by the user. -data_dir = string(default=None) - # List of foreground components to be simulated: # + galactic/synchrotron: # Diffuse Galactic synchrotron emission (unpolarized) diff --git a/fg21sim/configs/10-galactic.conf.spec b/fg21sim/configs/10-galactic.conf.spec index 59d66bc..60bc341 100644 --- a/fg21sim/configs/10-galactic.conf.spec +++ b/fg21sim/configs/10-galactic.conf.spec @@ -12,7 +12,6 @@ # Synchrotron emission component (unpolarized) [[synchrotron]] # The template map for the simulation. - # This config specify the relative path to the template from "data_dir". template = string(default=None) # The frequency of the template map (same unit as in [frequency] section) template_freq = float(default=None) diff --git a/fg21sim/galactic/synchrotron.py b/fg21sim/galactic/synchrotron.py index 14b4065..d05292f 100644 --- a/fg21sim/galactic/synchrotron.py +++ b/fg21sim/galactic/synchrotron.py @@ -40,15 +40,14 @@ class Synchrotron: def _set_configs(self): """Load the configs and set the corresponding class attributes.""" - data_dir = self.configs.getn("common/data_dir") - self.template_path = os.path.join( - data_dir, self.configs.getn("galactic/synchrotron/template")) + self.template_path = self.configs.getn( + "galactic/synchrotron/template") self.template_freq = self.configs.getn( "galactic/synchrotron/template_freq") self.template_unit = au.Unit( self.configs.getn("galactic/synchrotron/template_unit")) - self.indexmap_path = os.path.join( - data_dir, self.configs.getn("galactic/synchrotron/indexmap")) + self.indexmap_path = self.configs.getn( + "galactic/synchrotron/indexmap") self.smallscales = self.configs.getn( "galactic/synchrotron/add_smallscales") # output -- cgit v1.2.2