From b73992d963e64d782af140116c5c9831bdb4dbf9 Mon Sep 17 00:00:00 2001 From: Kristian Date: Thu, 12 Feb 2026 12:53:20 +0100 Subject: [PATCH 1/3] request only required parameters for linear, nonlinear solver --- ledsa/analysis/ExperimentData.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ledsa/analysis/ExperimentData.py b/ledsa/analysis/ExperimentData.py index e347356..3c3f62b 100644 --- a/ledsa/analysis/ExperimentData.py +++ b/ledsa/analysis/ExperimentData.py @@ -68,10 +68,13 @@ def load_config_parameters(self) -> None: num_layers = int(config_analysis['model_parameters']['num_layers']) self.channels = config_analysis.get_list_of_values('DEFAULT', 'camera_channels') self.num_ref_images = int(config_analysis['DEFAULT']['num_ref_images']) - self.weighting_preference = float(config_analysis['DEFAULT']['weighting_preference']) - self.weighting_curvature = float(config_analysis['DEFAULT']['weighting_curvature']) - self.lambda_reg = float(config_analysis['DEFAULT']['lambda_reg']) - self.num_iterations = int(config_analysis['DEFAULT']['num_iterations']) + self.solver = config_analysis['DEFAULT']['solver'] + if self.solver == 'nonlinear': + self.weighting_preference = float(config_analysis['DEFAULT']['weighting_preference']) + self.weighting_curvature = float(config_analysis['DEFAULT']['weighting_curvature']) + self.num_iterations = int(config_analysis['DEFAULT']['num_iterations']) + elif self.solver == 'linear': + self.lambda_reg = float(config_analysis['DEFAULT']['lambda_reg']) self.reference_property = config_analysis['DEFAULT']['reference_property'] self.solver = config_analysis['DEFAULT']['solver'] From c0dc6a544c6159ce3e50f19687a11f10892e5449 Mon Sep 17 00:00:00 2001 From: Kristian Date: Thu, 12 Feb 2026 13:07:24 +0100 Subject: [PATCH 2/3] change dependencies; rawpy sow supports arm64, so no need for newrawpy anymore --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8ace0f6..92d6851 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,8 +23,7 @@ dependencies = [ "pandas >= 2.1.2", "scipy >= 1.12.0", "tables >= 3.9.2", - "newrawpy >= 0.18.1; platform_machine == 'arm64'", - "rawpy >= 0.18.1; platform_machine != 'arm64'", + "rawpy >= 0.19.1", "tqdm >=4.66.2", "exiv2 >= 0.18.0", "piexif >= 1.1.3", From 702672947dd507c09e3c199c37a9b6d45e99e511 Mon Sep 17 00:00:00 2001 From: Kristian Date: Thu, 12 Feb 2026 13:28:42 +0100 Subject: [PATCH 3/3] Make coordinates calculation compatible with newer versions of scipy --- ledsa/ledpositions/coordinates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ledsa/ledpositions/coordinates.py b/ledsa/ledpositions/coordinates.py index 85ba67e..db7eafe 100644 --- a/ledsa/ledpositions/coordinates.py +++ b/ledsa/ledpositions/coordinates.py @@ -37,8 +37,8 @@ def conversion_matrix(self, led2) -> np.ndarray: :return: The conversion matrix between the two LEDs. :rtype: np.ndarray """ - a = np.atleast_2d(np.array([self.pix_pos, led2.pix_pos])) - b = np.atleast_2d(np.array([self.pos, led2.pos])) + a = np.array([self.pix_pos, led2.pix_pos]).reshape(2, 2) + b = np.array([self.pos, led2.pos]).reshape(2, 3) x = linalg.solve(a, b, assume_a='gen') return np.transpose(x)