Commit 17390678 authored by yuedong0607's avatar yuedong0607
Browse files

reformated

parent dd6f7bb9
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -127,7 +127,9 @@ class ExtinctionMW(object):
        c = SkyCoord(ra=ra * u.degree, dec=dec * u.degree, frame="icrs").galactic
        phi, 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.0 - b, phi=phi, nest=True)
        pix = hp.pixelfunc.ang2pix(
            nside=NSIDE, theta=np.pi / 2.0 - b, phi=phi, nest=True
        )
        return self.ebv_planck[pix] * self.Rv

    def apply_extinction(self, spec, Av=1.0):
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ import datetime
import importlib

import gc

gc.enable()