climepi.epimod.get_posterior_temperature_response#
- climepi.epimod.get_posterior_temperature_response(idata, *, curve_type, num_samples=None, temperature_vals=None, probability=False, trait_name=None, trait_attrs=None)[source]#
Get the posterior distribution of the fitted temperature response.
- Parameters:
idata (
xarray.DataTree) – The posterior distribution of the fitted parameters (as returned byclimepi.epimod.fit_temperature_response()).curve_type (
str) – The type of curve fitted. Options are ‘quadratic’ and ‘briere’.num_samples (
int, optional) – Number of samples to draw from the posterior distribution. IfNone, all samples are used.temperature_vals (
array-like, optional) – Vector of temperature values for which the response is to be computed. If not provided, a default range is generated based on the minimum and maximum temperature values in the posterior distribution.probability (
bool, optional) – IfTrue, the response is constrained to be between 0 and 1. Default isFalse.trait_name (
str, optional) – The name of the trait variable. IfNone, the response variable is named ‘response’.trait_attrs (
dict, optional) – Additional attributes to assign to the trait variable in the returned dataset. IfNone, no additional attributes are assigned.
- Returns:
xarray.DataArray– The posterior distribution of the fitted temperature response, with dimensions ‘temperature’ and ‘sample’.