astromodels.functions.template_model module
- class astromodels.functions.template_model.TemplateModel(model_name: str, other_name: Optional[str] = None, log_interp: bool = True)[source]
Bases:
Function1D
- description :
A template model
- latex :
$n.a.$
- parameters :
- K :
desc : Normalization (freeze this to 1 if the template provides the normalization by itself) initial value : 1.0
- scale :
- descScale for the independent variable. The templates are handled as if they contains the fluxes
at E = scale * x.This is useful for example when the template describe energies in the rest frame, at which point the scale describe the transformation between rest frame energy and observer frame energy. Fix this to 1 to neutralize its effect.
initial value : 1.0 min : 1e-5
- redshift:
desc: redshift the energies initial value: 0. min: 0 fix: True
- clean()[source]
Table models can consume a lot of memory. If are creating lots of table models in memory for simulations, you may want to call clean on the model try and remove some of the memory consumed by the models
- Returns:
- property data_file
- static info()
- class astromodels.functions.template_model.TemplateModelFactory(name: str, description: str, energies: ndarray, names_of_parameters: List[str], interpolation_degree: int = 1, spline_smoothing_factor: int = 0)[source]
Bases:
object
- add_interpolation_data(differential_fluxes: ndarray, **parameters_values_input: Dict[str, float])[source]