Skip to content

Commit

Permalink
Fix formatting and also a bug in the local adaptivity
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Feb 8, 2024
1 parent 868c1e8 commit 60fecbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion micro_manager/adaptivity/local_adaptivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_adaptivity_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 60fecbf

Please sign in to comment.