lephare.reddening
Functions
|
Compute model-dependent reddening following Galametz et al. (2017). |
|
Compute model-dependent band pass correction following Galametz et al. (2017). |
|
Calculate the extinction values for a set of filters using the classic method |
Module Contents
- compute_model_reddening(config)[source]
Compute model-dependent reddening following Galametz et al. (2017).
For each SED in the model library, the function: 1. Observes the SED (redshift, extinction, etc.). 2. Convolves it with a set of filters. 3. Computes the reddening relative to a baseline filter.
The resulting values can then be applied per model during the C++ fit process.
- Parameters:
config (dict) – Configuration dictionary containing model parameters and file paths required to generate the SED library and filters.
verbose (bool, optional) – If True, print additional information during computation. Default is False.
- Returns:
A 2D array of reddening values with shape (n_models, n_filters), where each row corresponds to a model and each column to a filter.
- Return type:
numpy.ndarray
Notes
The function assumes the presence of a valid LePHARE environment and paths defined by LEPHAREWORK or LEPHAREDIR.
Supports Cardelli, Calzetti, and SMC Prevot extinction laws.
Observed SEDs are modified in place using the observe function.
The output array values[i, j] corresponds to the reddening for model i through filter j.
- compute_band_pass_correction(config)[source]
Compute model-dependent band pass correction following Galametz et al. (2017).
For each SED in the model library, the function: 1. Observes the SED (redshift, extinction, etc.). 2. Convolves it with the Johnson B and V filters. 3. Compares the E(B-V) value relative to a B5 star that defines the E(B-V) value 4. Returns E(B-V)_SED / E(B-V)_B5 for each model, which is the band pass correction.
The resulting values can then be applied per model during the C++ fit process.
- Parameters:
config (dict) – Configuration dictionary containing model parameters and file paths required to generate the SED library and filters.
type (str) – The type of the reference model. Defaults to ‘star’.
verbose (bool, optional) – If True, print additional information during computation. Default is False.
- Returns:
A 1D array of band pass correction values with shape (n_models), where each row corresponds to a model.
- Return type:
numpy.ndarray
Notes
The function assumes the presence of a valid LePHARE environment and paths defined by LEPHAREWORK or LEPHAREDIR.
Supports Cardelli, Calzetti, and SMC Prevot extinction laws.
Observed SEDs are modified in place using the observe function.
The output array values[i] corresponds to the band pass correction for model i.
- classic_extinction_values(config, verbose=False)[source]
Calculate the extinction values for a set of filters using the classic method
- Parameters:
config (dict) – Configuration dictionary containing model parameters and file paths required to generate the SED library and filters.
verbose (bool) – Increase onscreen verbosity
- Returns:
all_filters (list of lephare.flt) – The list of filter objects
aint (np.array) – Atmospheric extinction in each filter (mag/airmass)
albdav (np.array) – Galactic extinction in each filter A(lbd)/Av
albd (np.array) – Galactic extinction in each filter A(lbd)/E(B-V)