Commit 9a76fb8b authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Compute Dn4000 more rigorously by integrating properly over Fν

parent 3b00f194
......@@ -35,6 +35,7 @@
- For some reason the wavelengths of the SCUBA 450 μm filter were a factor 10 too small. (Médéric Boquien)
- Ensure that the computation of the continuum level is correct when determining the equivalent width, in particular when the line width is very narrow. (Médéric Boquien)
- When using different line widths during a single run, ensure that the fluxes and other quantities are always computed correctly. (Médéric Boquien, special thanks to Genoveva Micheva)
- Compute Dn4000 more rigorously by integrating properly over Fν. (Médéric Boquien)
### Optimised
- The cache architecture has been simplified, making it somewhat faster. It speeds up the model generation by ~1%. (Médéric Boquien)
......@@ -109,7 +109,7 @@ class RestframeParam(SedModule):
def D4000(self, sed):
wl = sed.wavelength_grid
lumin = sed.luminosity
fnu = sed.fnu
# Strength of the D_4000 break using Balogh et al. (1999, ApJ 527, 54),
# i.e., ratio of the flux in the red continuum to that in the blue
......@@ -129,7 +129,8 @@ class RestframeParam(SedModule):
self.w_D4000blue[key] = w_D4000blue
self.w_D4000red[key] = w_D4000red
return np.mean(lumin[w_D4000red]) / np.mean(lumin[w_D4000blue])
return (np.trapz(fnu[w_D4000red], x=wl[w_D4000red]) /
np.trapz(fnu[w_D4000blue], x=wl[w_D4000blue]))
def EW(self, sed):
wl = sed.wavelength_grid
Supports Markdown
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