aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-17 15:12:06 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-17 15:12:06 +0800
commite748c1fd0928a1a98324b465de6f78e062052a73 (patch)
tree3bbc4eeb86fbc9a958c508699c757a68d69cc528
parent744a3748ea6e1c24c2fee46b2f7ebd8592f591d2 (diff)
downloadfg21sim-e748c1fd0928a1a98324b465de6f78e062052a73.tar.bz2
bin/fg21sim: Support new component "galactic/snr"
Also update the general config for the new "galactic/snr" component.
-rwxr-xr-xbin/fg21sim10
-rw-r--r--fg21sim/configs/00-general.conf.spec6
2 files changed, 15 insertions, 1 deletions
diff --git a/bin/fg21sim b/bin/fg21sim
index 2b087a7..1143baa 100755
--- a/bin/fg21sim
+++ b/bin/fg21sim
@@ -19,6 +19,7 @@ from fg21sim.configs import configs, validate_configs
from fg21sim.utils import setup_logging
from fg21sim.galactic import Synchrotron as GalacticSynchrotron
from fg21sim.galactic import FreeFree as GalacticFreeFree
+from fg21sim.galactic import SuperNovaRemnants as GalacticSNR
def main():
@@ -82,6 +83,15 @@ def main():
logger.info("Done simulate Galactic free-free foreground!")
fg_maps[id_gfree] = hpmap_gfree
+ # Galactic supernova remnants
+ id_gsnr = "galactic/snr"
+ if id_gsnr in fg_components:
+ logger.info("Simulating the Galactic supernova remnants emission ...")
+ gsnr = GalacticSNR(configs)
+ hpmap_gsnr = gsnr.simulate(frequencies)
+ logger.info("Done simulate Galactic supernova remnants foreground!")
+ fg_maps[id_gsnr] = hpmap_gsnr
+
if __name__ == "__main__":
main()
diff --git a/fg21sim/configs/00-general.conf.spec b/fg21sim/configs/00-general.conf.spec
index 45d3e6f..57d5a6b 100644
--- a/fg21sim/configs/00-general.conf.spec
+++ b/fg21sim/configs/00-general.conf.spec
@@ -24,7 +24,11 @@ lmax = integer(min=1, default=3071)
# List of foreground components to be simulated:
# + galactic/synchrotron:
# Diffuse Galactic synchrotron emission (unpolarized)
-components = force_list(default=list("galactic/synchrotron"))
+# + galactic/freefree:
+# Diffuse Galactic free-free emission
+# + galactic/snr:
+# Galactic supernova remnants emission
+components = force_list(default=list("galactic/synchrotron", "galactic/freefree", "galactic/snr"))
# Frequencies specification of the simulation products