From 9511eb8b2a0e3c3f65473a735700c65ec697d58d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 13 Dec 2016 20:27:02 +0800 Subject: galactic/snr.py: Small cleanup; Update default resolution --- fg21sim/galactic/snr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fg21sim/galactic') 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) -- cgit v1.2.2