diff --git a/kinisi/arrhenius.py b/kinisi/arrhenius.py index 66670b9e..67a9af9a 100644 --- a/kinisi/arrhenius.py +++ b/kinisi/arrhenius.py @@ -15,7 +15,6 @@ from typing import List, Union, Tuple import numpy as np from uravu.relationship import Relationship -from uravu.distribution import Distribution from scipy.constants import R, N_A, eV # Convert R to eV @@ -68,7 +67,7 @@ def distribution(self) -> np.ndarray: """ return self.function(self.x[:, np.newaxis], self.flatchain[:, 0], self.flatchain[:, 1]) - def extrapolate(self, extrapolated_temperature: Union[float, List[float], np.ndarray], posterior_predictive_kwargs=None) -> 'uravu.distribution.Distribution': + def extrapolate(self, extrapolated_temperature: float) -> 'uravu.distribution.Distribution': """ Extrapolate the diffusion coefficient to some un-investigated value. This can also be used for interpolation. @@ -76,13 +75,7 @@ def extrapolate(self, extrapolated_temperature: Union[float, List[float], np.nda :param: Temperature to return diffusion coefficient at. :return: Diffusion coefficient at extrapolated temperature. """ - if posterior_predictive_kwargs is None: - posterior_predictive_kwargs = {} - if isinstance(extrapolated_temperature, (float, int, complex)) : - extrapolated_temperature = np.array([extrapolated_temperature]) - if isinstance(extrapolated_temperature, List): - extrapolated_temperature = np.array(extrapolated_temperature) - return self.posterior_predictive(abscissa_values=extrapolated_temperature, **posterior_predictive_kwargs) + return self.function(extrapolated_temperature, self.flatchain[:, 0], self.flatchain[:, 1]) def arrhenius(abscissa: np.ndarray, activation_energy: float, prefactor: float) -> np.ndarray: @@ -155,7 +148,7 @@ def distribution(self) -> np.ndarray: """ return self.function(self.x[:, np.newaxis], self.flatchain[:, 0], self.flatchain[:, 1], self.flatchain[:, 2]) - def extrapolate(self, extrapolated_temperature: Union[float, List[float], np.ndarray], posterior_predictive_kwargs=None) -> 'uravu.distribution.Distribution': + def extrapolate(self, extrapolated_temperature: float) -> 'uravu.distribution.Distribution': """ Extrapolate the diffusion coefficient to some un-investigated value. This can also be used for interpolation. @@ -163,13 +156,7 @@ def extrapolate(self, extrapolated_temperature: Union[float, List[float], np.nda :param: Temperature to return diffusion coefficient at. :return: Diffusion coefficient at extrapolated temperature. """ - if posterior_predictive_kwargs is None: - posterior_predictive_kwargs = {} - if isinstance(extrapolated_temperature, (float, int, complex)) : - extrapolated_temperature = np.array([extrapolated_temperature]) - if isinstance(extrapolated_temperature, List): - extrapolated_temperature = np.array(extrapolated_temperature) - return self.posterior_predictive(abscissa_values=extrapolated_temperature, **posterior_predictive_kwargs) + return self.function(extrapolated_temperature, self.flatchain[:, 0], self.flatchain[:, 1], self.flatchain[:, 2]) def super_arrhenius(abscissa: np.ndarray, activation_energy: float, prefactor: float, t_zero: float) -> np.ndarray: