bioio-devs / bioio-base

Typing, base classes, and more for BioIO projects.
https://bioio-devs.github.io/bioio-base/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

reset on resolution level change #16

Closed toloudis closed 6 months ago

toloudis commented 6 months ago

Fixes #15 by forcing a data reset when resolution level is changed (same as set_scene).

Link to Relevant Issue

This pull request resolves #15

toloudis commented 6 months ago

Could be worth guarding the reset with if self._current_resolution_level != resolution_level so that redundant set_resolution_level calls can't have performance implications?

Also, how did you test this @toloudis?

This is a good suggestion - I was a bit rushed but will add the check to do nothing if setting same current resolution level.

I tested by rebuilding and then running the repro code in the bug report #15 A new unit test would have a sensible home in bioio-ome-zarr (really could have been caught sooner!)