diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 569022b7..d8bf41cb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,6 +20,8 @@ Changed * Requiring netcdf4 >= 1.6.4 * Optional dependencies of xarray that improve performance are now required by default. * variance_stokes_linear() does not default through zero anymore. +* Refactored calibration_single_ended and calibration_double_ended() +* Moved ParameterIndices classes to calibration_utils.py * Flox included in requirements to speed up resampling via xarray ([Xarray #5734](https://github.com/pydata/xarray/pull/5734)). Removed diff --git a/src/dtscalibration/datastore.py b/src/dtscalibration/datastore.py index 3323c414..1c32e781 100644 --- a/src/dtscalibration/datastore.py +++ b/src/dtscalibration/datastore.py @@ -13,6 +13,8 @@ from scipy.optimize import minimize from scipy.sparse import linalg as ln +from dtscalibration.calibrate_utils import calibration_single_ended_helper +from dtscalibration.calibrate_utils import calibration_double_ended_helper from dtscalibration.calibrate_utils import match_sections from dtscalibration.calibrate_utils import parse_st_var from dtscalibration.datastore_utils import ParameterIndexDoubleEnded @@ -1931,7 +1933,8 @@ def calibration_single_ended( ) if method == "wls": - p_cov, p_val, p_var = self.calibration_single_ended_helper( + p_cov, p_val, p_var = calibration_single_ended_helper( + self, st_var, ast_var, fix_alpha, @@ -2382,7 +2385,8 @@ def calibration_double_ended( matching_indices = match_sections(self, matching_sections) if method == "wls": - p_cov, p_val, p_var = self.calibration_double_ended_helper( + p_cov, p_val, p_var = calibration_double_ended_helper( + self st_var, ast_var, rst_var,