From 60fecbffad7e93238237f0f8b5da735aa55b1d75 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 8 Feb 2024 11:33:39 +0100 Subject: [PATCH] Fix formatting and also a bug in the local adaptivity --- micro_manager/adaptivity/local_adaptivity.py | 2 +- tests/unit/test_adaptivity_parallel.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/micro_manager/adaptivity/local_adaptivity.py b/micro_manager/adaptivity/local_adaptivity.py index 2f82c877..cd465a0b 100644 --- a/micro_manager/adaptivity/local_adaptivity.py +++ b/micro_manager/adaptivity/local_adaptivity.py @@ -61,7 +61,7 @@ def compute_adaptivity( is_sim_active = self._update_active_sims(similarity_dists, is_sim_active_nm1) is_sim_active, sim_is_associated_to = self._update_inactive_sims( - similarity_dists, is_sim_active_nm1, sim_is_associated_to_nm1, micro_sims) + similarity_dists, is_sim_active, sim_is_associated_to_nm1, micro_sims) sim_is_associated_to = self._associate_inactive_to_active( similarity_dists, is_sim_active, sim_is_associated_to) diff --git a/tests/unit/test_adaptivity_parallel.py b/tests/unit/test_adaptivity_parallel.py index c3f3ac77..2f1b2a4e 100644 --- a/tests/unit/test_adaptivity_parallel.py +++ b/tests/unit/test_adaptivity_parallel.py @@ -125,7 +125,8 @@ def get_state(self): for i in global_ids: dummy_micro_sims.append(MicroSimulation(i)) - _, is_sim_active, sim_is_associated_to = adaptivity_controller.compute_adaptivity(0.1, dummy_micro_sims, similarity_dists, is_sim_active, sim_is_associated_to, data_for_adaptivity) + _, is_sim_active, sim_is_associated_to = adaptivity_controller.compute_adaptivity( + 0.1, dummy_micro_sims, similarity_dists, is_sim_active, sim_is_associated_to, data_for_adaptivity) self.assertTrue(np.array_equal(expected_is_sim_active, is_sim_active)) self.assertTrue(np.array_equal(expected_sim_is_associated_to, sim_is_associated_to))