Commit 4e0574bd authored by Guang's avatar Guang Committed by Guang
Browse files

simplify some functions

parent d2d9b995
......@@ -163,9 +163,9 @@ class Fritz2006(SedModule):
(1 - np.cos( np.deg2rad(self.opening_angle) ))
# Casey (2012) modified black body model
conv = self.c / (self.fritz2006.wave * self.fritz2006.wave)
lumin_blackbody = (conv * (1. - np.exp(-(lambda_0 / self.fritz2006.wave)
lumin_blackbody = conv * (1. - np.exp(-(lambda_0 / self.fritz2006.wave)
** self.emissivity)) * (self.c / self.fritz2006.wave) ** 3. / (np.exp(
cst.h * self.c / (self.fritz2006.wave * cst.k * self.temperature)) - 1.))
cst.h * self.c / (self.fritz2006.wave * cst.k * self.temperature)) - 1.)
lumin_blackbody *= l_ext / np.trapz(lumin_blackbody, x=self.fritz2006.wave)
# Add the black body to dust thermal emission
lumin_therm_new = self.fritz2006.lumin_therm + lumin_blackbody
......
......@@ -144,9 +144,9 @@ class SKIRTOR2016(SedModule):
(0.4931 - 0.2113*sin_oa**2 - 0.2818*sin_oa**3)
# Casey (2012) modified black body model
conv = self.c / (self.SKIRTOR2016.wave * self.SKIRTOR2016.wave)
blackbody = (conv * (1. - np.exp(-(lambda_0 / self.SKIRTOR2016.wave)
blackbody = conv * (1. - np.exp(-(lambda_0 / self.SKIRTOR2016.wave)
** self.emissivity)) * (self.c / self.SKIRTOR2016.wave) ** 3. / (np.exp(
cst.h * self.c / (self.SKIRTOR2016.wave * cst.k * self.temperature)) - 1.))
cst.h * self.c / (self.SKIRTOR2016.wave * cst.k * self.temperature)) - 1.)
blackbody *= l_ext / np.trapz(blackbody, x=self.SKIRTOR2016.wave)
# Add the black body to dust thermal emission
dust_new = self.SKIRTOR2016.dust + blackbody
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment