aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-04 15:02:06 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-04 15:02:06 +0800
commit27873cfb348d0263dc6015b13d82d10806664c41 (patch)
tree59d1ac959ef8bf7497b36919921a3a98c5788e75
parent1e0d443c4c77a8a2cc0ae6e503e8811aca6b3e39 (diff)
downloadfg21sim-27873cfb348d0263dc6015b13d82d10806664c41.tar.bz2
Remove the "common/data_dir" config item
-rw-r--r--fg21sim/configs/00-general.conf.spec4
-rw-r--r--fg21sim/configs/10-galactic.conf.spec1
-rw-r--r--fg21sim/galactic/synchrotron.py9
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