diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-12-13 20:27:02 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-12-13 20:27:02 +0800 |
commit | 9511eb8b2a0e3c3f65473a735700c65ec697d58d (patch) | |
tree | 9085f6de486f5af34bec86512db12705ee19a604 | |
parent | 418d7497e2897642229cafb1ade6f8b109748931 (diff) | |
download | fg21sim-9511eb8b2a0e3c3f65473a735700c65ec697d58d.tar.bz2 |
galactic/snr.py: Small cleanup; Update default resolution
-rw-r--r-- | fg21sim/configs/10-galactic.conf.spec | 2 | ||||
-rw-r--r-- | fg21sim/galactic/snr.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/fg21sim/configs/10-galactic.conf.spec b/fg21sim/configs/10-galactic.conf.spec index 9aa4dbe..e565297 100644 --- a/fg21sim/configs/10-galactic.conf.spec +++ b/fg21sim/configs/10-galactic.conf.spec @@ -71,7 +71,7 @@ # Resolution (unit: arcmin) for simulating each SNR, which are finally # mapped to the HEALPix map of Nside specified in "[common]" section. - resolution = float(default=1.0, min=0.0) + resolution = float(default=0.5, min=0.0) # Filename prefix for this component prefix = string(default="gsnr") diff --git a/fg21sim/galactic/snr.py b/fg21sim/galactic/snr.py index d331a88..b493ee5 100644 --- a/fg21sim/galactic/snr.py +++ b/fg21sim/galactic/snr.py @@ -261,12 +261,13 @@ class SuperNovaRemnants: templates = {} resolution = self.resolution.to(au.deg).value logger.info("Simulate HEALPix template for each SNR") + coef_size2deg = self.units["size"].to(au.deg) for row in self.catalog.itertuples(): name = row.name logger.debug("Simulate HEALPix template for SNR: {0}".format(name)) center = (row.glon, row.glat) - size = ((row.size_major * self.units["size"]).to(au.deg).value, - (row.size_minor * self.units["size"]).to(au.deg).value) + size = (row.size_major * coef_size2deg, + row.size_minor * coef_size2deg) rotation = row.rotation grid = make_grid_ellipse(center, size, resolution, rotation) hpidx, hpval = map_grid_to_healpix(grid, self.nside) |