SFH class#
Code author: Wilfried Mercier - LAM <wilfried.mercier@lam.fr>
Main part of the module that defines a SFH object to be manipulated.
- class SFHandle.sfh.SFH(lb_time, sfh, err)[source]#
Bases:
object
Code author: Wilfried Mercier - LAM <wilfried.mercier@lam.fr>
Class representing a SFH from Cigale.
- Parameters:
- err#
Error on the amplitude of the SFH at each time step in \({\rm M}_\odot~{\rm yr}^{-1}\)
- property integral: float16 | float32 | float64 | longdouble#
Integral of the SFH in \({\rm M}_\odot\).
- property interp_err: ndarray[Any, dtype[_ScalarType_co]] | None#
High-resolution interpolated error on the SFH amplitude \({\rm M}_\odot~{\rm yr}^{-1}\).
- property interp_lb_time: ndarray[Any, dtype[_ScalarType_co]] | None#
High-resolution time array in \({\rm Myr}\) used for SFH interpolation.
- property interp_sfh: ndarray[Any, dtype[_ScalarType_co]] | None#
High-resolution interpolated SFH in \({\rm M}_\odot~{\rm yr}^{-1}\).
- interpolate_sfh(lb_time, kind='next', bounds_error=False, fill_value=0.0, **kwargs)[source]#
Interpolate the SFH and its uncertainty on a new look-back time grid.
Important
By default
kind
is equal to'next'
. This is the correct interpolation type for non-parametric SFHs. Change this parameter only if you know what you are doing.For details regarding the parameters used for the interpolation, see interp1d.
- Parameters:
lb_time (ArrayLike) – Look-back time array in \({\rm Myr}\) onto which the SFH must be interpolated.
kind (Literal['linear', 'nearest', 'nearest-up', 'zero', 'slinear', 'quadratic', 'cubic', 'previous', 'next']) – Type of interpolation.
bounds_error (bool) – Whether to throw an error if extrapolating or not.
fill_value (float) – Value used for extrapolation.
- Returns:
Interpolated SFH and interpolated error on SFH amplitude. Both are in \({\rm M}_\odot~{\rm yr}^{-1}\).
- Return type:
- lb_time#
Look-back time steps in \({\rm Myr}\) for the SFH
- sfh#
Amplitude of the SFH at each time step in \({\rm M}_\odot~{\rm yr}^{-1}\)