diff --git a/catalog/C9_Catalog.py b/catalog/C9_Catalog.py index b028bdf6eb88aff10de2265a0484786cdd711e67..590dda6a67d78bb8415612635f2811bb41b0a7de 100644 --- a/catalog/C9_Catalog.py +++ b/catalog/C9_Catalog.py @@ -262,7 +262,7 @@ class Catalog(CatalogBase): if "enable_mw_ext_gal" in self.config["catalog_options"] and self.config["catalog_options"]["enable_mw_ext_gal"]: MW_Av_arr = self.mw_ext.Av_from_Planck(ra=ra_arr, dec=dec_arr) else: - MW_Av_arr = np.ones(len(ra_arr)) + MW_Av_arr = np.zeros(len(ra_arr)) for igals in range(ngals): # # (TEST) diff --git a/observation_sim/mock_objects/ExtinctionMW.py b/observation_sim/mock_objects/ExtinctionMW.py index a754deb05eac26c4a0ebae9b46c6c11bc06178fa..85ae6928b35d9d4e80fb4f84de0d2a21efcc10ed 100644 --- a/observation_sim/mock_objects/ExtinctionMW.py +++ b/observation_sim/mock_objects/ExtinctionMW.py @@ -13,7 +13,7 @@ class ExtinctionMW(object): @staticmethod def radec2pix(ra, dec, NSIDE=2048): - return hp.pixelfunc.ang2pix(nside=NSIDE, theta=ra, phi=dec, nested=True, lonlat=True) + return hp.pixelfunc.ang2pix(nside=NSIDE, theta=ra, phi=dec, nest=True, lonlat=True) def init_ext_model(self, model_name="odonnell", Av=1.0, Rv=3.1, lamb=None): self.model_name = model_name @@ -80,7 +80,7 @@ class ExtinctionMW(object): l, b = c.l.radian, c.b.radian NSIDE = hp.pixelfunc.get_nside(self.ebv_planck) pix = hp.pixelfunc.ang2pix( - nside=NSIDE, theta=np.pi/2. - b, phi=l, nested=True) + nside=NSIDE, theta=np.pi/2. - b, phi=l, nest=True) return self.ebv_planck[pix] * self.Rv def apply_extinction(self, spec, Av=1.0): @@ -91,6 +91,6 @@ class ExtinctionMW(object): raise ValueError( "Need to initialize the extinction model (init_ext_model) first") scale = 10**(-.4 * self.ext * Av) - print("scale = ", scale) + # print("scale = ", scale) spec *= scale return spec