Model Transformations#
Observed Model & Parameters#
Data containers for parameter draws and their corresponding model spectra produced during nested sampling.
- class ForMoSA.transform.observed.ObservedParameters(values)[source]#
Bases:
objectParameters drawn from the nested sampling.
Notes
Authors: Allan Denis
- property grid: ObservedParameters#
Grid parameters.
- property physics: ObservedParameters#
Non grid parameters.
- property global_params: ObservedParameters#
GLobal parameters.
- property kinds: list[ParameterKind]#
Parameter kinds of the parameters.
- property values_by_kind: dict[ParameterKind, float]#
Parameter values by kind.
- property params_by_kind: dict[ParameterKind, float]#
Parameters by kind.
- has_kind(kind)[source]#
Check whether kind is present in the parameter kinds.
- Parameters:
kind (
ParameterKind) – Kind to check- Return type:
- Returns:
bool – Whether the name is present in the parameter names
- get_name(name)[source]#
Get parameter value according to its name.
- Parameters:
name (
str) – Name of the parameter- Return type:
- Returns:
float – Value of the parameter
Notes
Authors: Allan Denis
- get_kind(kind)[source]#
Get parameter value according to its kind.
- Parameters:
kind (
ParameterKind) – Kind of the parameter- Return type:
- Returns:
float – Value of the parameter
Notes
Authors: Allan Denis
- require(*kinds)[source]#
Check that required parameters exist
- Parameters:
*kind (ParameterKind) – kinds of required parameters
kinds (ParameterKind)
- Return type:
Notes
Authors: Allan Denis
- class ForMoSA.transform.observed.ObservedModel(wave, flux, res, component=None, scaling='analytic')[source]#
Bases:
objectModel drawn from the nested sampling.
Notes
Authors: Allan Denis
- Parameters:
- classmethod from_grid_and_params(grid, params, interp_method='linear')[source]#
Build an instance of ObseredModel from a ModelGrid and an ObservedParameters objects.
- Parameters:
grid (
ModelGrid) – An instance of ModelGridparams (
ObservedParameters) – An instance of ObservedParametersinterp_method (
str) – Interpolation method
- Return type:
- Returns:
‘ObservedModel’ – An instance of class ObservedModel
Notes
Authors: Allan Denis
- residuals(flux_obs, component_only=False)[source]#
Compute residuals between observation flux and the instance of ObservedModel.
- Parameters:
- Return type:
- Returns:
np.ndarray – Residuals
Notes
Authors: Allan Denis
- std_residuals(flux_obs)[source]#
Compute the standard deviation of the residuals between observation flux and the instance of ObservedModel.
- Parameters:
flux_obs (
ndarray) – Flux of the observations- Return type:
- Returns:
float – Standard deviation of the residuals
Notes
Authors: Allan Denis
Apply Effects#
Static helpers that apply individual physical and observational effects (radial velocity, v sin i, reddening, scaling, etc.).
Spectroscopic Effects#
Orchestrates the full chain of physics and observational effects for spectroscopic data.
Photometric Effects#
Orchestrates the full chain of physics and observational effects for photometric data.