From 1d3e39979a79a27ed738d718373074b3506d2ac9 Mon Sep 17 00:00:00 2001 From: AmosSchledorn Date: Mon, 29 Jul 2024 11:36:46 +0200 Subject: [PATCH] remove duplicate staticmethods --- .../build_cop_profiles/BaseCopApproximator.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/scripts/build_cop_profiles/BaseCopApproximator.py b/scripts/build_cop_profiles/BaseCopApproximator.py index ad537a74..89118284 100644 --- a/scripts/build_cop_profiles/BaseCopApproximator.py +++ b/scripts/build_cop_profiles/BaseCopApproximator.py @@ -45,23 +45,6 @@ class BaseCopApproximator(ABC): """ pass - def celsius_to_kelvin( - t_celsius: Union[float, xr.DataArray, np.array] - ) -> Union[float, xr.DataArray, np.array]: - if (np.asarray(t_celsius) > 200).any(): - raise ValueError( - "t_celsius > 200. Are you sure you are using the right units?" - ) - return t_celsius + 273.15 - - def logarithmic_mean( - t_hot: Union[float, xr.DataArray, np.ndarray], - t_cold: Union[float, xr.DataArray, np.ndarray], - ) -> Union[float, xr.DataArray, np.ndarray]: - if (np.asarray(t_hot <= t_cold)).any(): - raise ValueError("t_hot must be greater than t_cold") - return (t_hot - t_cold) / np.log(t_hot / t_cold) - @staticmethod def celsius_to_kelvin( t_celsius: Union[float, xr.DataArray, np.array]