Commit 8ffc1b39 authored by Médéric Boquien's avatar Médéric Boquien

Add the possibility of computing emission lines through special filters when...

Add the possibility of computing emission lines through special filters when underlying absorption lines are not subtracted.
parent 1cbf23da
......@@ -5,6 +5,7 @@
- It is now possible to optionally indicate the distance in Mpc in the input file. If present it will be used in lieu of the distance computed from the redshift. This is especially useful in the nearby universe where the redshift is a very poor indicator of the actual distance. (Médéric Boquien)
- It is now possible to fit any physical property indicated by the code (e.g. equivalent width, dust luminosity, etc.). For this the physical property needs to be given in the input file and the properties to be fitted must be given in the properties filed in pcigale.ini. (Héctor Salas & Médéric Boquien)
- It is now possible to fit emission lines. For this the line has to be indicated in the same way as any other band both in the input flux file (in units of W/m²) and in the list of bands in `pcigale.ini`. Lines are prefixed with `line.` followed by the name of the line, for instance `line.H-alpha` for Hɑ. The following lines are supported at the moment: `Ly-alpha`, `CII-133.5`, `SiIV-139.7`, `CIV-154.9`, `HeII-164.0`, `OIII-166.5`, `CIII-190.9`, `CII-232.6`, `MgII-279.8`, `OII-372.7`, `H-10`, `H-9`, `NeIII-386.9` `HeI-388.9`, `H-epsilon`, `SII-407.0`, `H-delta`, `H-gamma`, `H-beta`, `OIII-495.9`, `OIII-500.7`, `OI-630.0`, `NII-654.8`, `H-alpha`, `NII-658.4`, `SII-671.6`, `SII-673.1`. (Médéric Boquien)
- When emission lines are not corrected for absorption lines (e.g., in the case of very low resolution spectroscopy) the previous method, which computes the theoretical line fluxes, is not optimal. Rather we offer the possibility to measure the fluxes through special filters that are used like regular filters. The idea is to define filters with a positive part on the line, a negative part on the continuum, and a zero-valued integral. In such case the integration over the spectrum directly gives the flux of the integral. So this works at all redshifts, the filter is automatically redshifted at runtime. (Médéric Boquien & David Corre)
- Two new dust attenuation modules have been added: `dustatt\_modified\_CF00` and `dustatt\_modified\_starburst`. The former implements a modified 2-component Charlot & Fall (2000) model whereas the latter implements a modified starburst law with the continuum attenuated with a Calzetti (2000) curve and the lines extincted with a Milky Way or a Magellanic Cloud law. The previous models `dustatt\_powerlaw`, `dustatt\_2powerlaws`, and `dustatt\_calzleit` are still available but are deprecated. (Médéric Boquien & David Corre)
- In addition to the physical properties, the fluxes are now also estimated through a Bayesian analysis. (Médéric Boquien)
......
......@@ -168,7 +168,8 @@ def build_filters(base):
# We normalise the filter and compute the pivot wavelength. If the
# filter is a pseudo-filter used to compute line fluxes, it should not
# be normalised.
if not filter_name.startswith('PSEUDO'):
if not (filter_name.startswith('PSEUDO') or
filter_name.startswith('linefilter')):
new_filter.normalise()
else:
new_filter.pivot_wavelength = np.mean(
......
......@@ -301,8 +301,17 @@ class SED(object):
filter_ = db.get_filter(filter_name)
trans_table = filter_.trans_table
lambda_piv = filter_.pivot_wavelength
lambda_min = filter_.trans_table[0][0]
lambda_max = filter_.trans_table[0][-1]
lambda_min = trans_table[0][0]
lambda_max = trans_table[0][-1]
if filter_name.startswith('linefilter.'):
if 'universe.redshift' in self.info:
zp1 = 1. + self.info['universe.redshift']
else:
zp1 = 1.
trans_table[0] *= zp1
lambda_piv *= zp1
lambda_min *= zp1
lambda_max *= zp1
# Test if the filter covers all the spectrum extent. If not then
# the flux is not defined
......
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