Commit 4b2d9012 authored by Yannick Roehlly's avatar Yannick Roehlly
Browse files

Add flux computation to "param" module

Add the possibility to compute some fluxes in the "param" module to add
them to the SED info dictionary.  This can be used for instance to
compute probability distribution of fluxes during an analysis.
parent d41e1401
......@@ -10,6 +10,12 @@ Module that estimates other parameters, e.g., UV slope, Lick indices, etc.
This module estimates additional parameters of interest
close to the observation, e.g., the ultraviolet slope (beta), the rest-frame
far-ultraviolet luminosity, any type of indices (Lick), etc.
This module can also be used to compute the fluxes in some filters and add them
to the SED parameters (each flux will be added as “param.FILTERID”). This can
be used for instance to compute the flux probability distribution for not
observed filters during an analysis.
This module will be the last one (after redshifting) to account
for all the physical processes at play to build the received total emission.
......@@ -36,6 +42,13 @@ class Param(CreationModule):
"boolean",
"Are you here?.",
"True"
)),
("filter_list", (
"string",
"Filters for with the flux will be computed and added to the SED "
"information dictionary. You can give several filter names "
"separated by a & (don't use commas).",
None
))
])
......@@ -113,5 +126,15 @@ class Param(CreationModule):
sed.add_info("param.FUV_luminosity", L_FUV, True)
sed.add_info("param.D_4000", D_4000)
# Computation of fluxes
filter_list = [item.strip() for item in
self.parameters["filter_list"].split("&")]
for filter_ in filter_list:
sed.add_info(
"param.{}".format(filter_),
sed.compute_fnu(filter_)
)
# CreationModule to be returned by get_module
Module = Param
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