-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
There is a bug just waiting to happen in _mda_handler.
The layer is initially created with a name constructed manually as f"{fname}_{id_}" here:
napari-micromanager/src/napari_micromanager/_mda_handler.py
Lines 147 to 148 in 4c14f27
| fname = meta.file_name if meta.should_save else "Exp" | |
| self._create_empty_image_layer(z, f"{fname}_{id_}", sequence, **kwargs) |
and then that key is recreated (manually) for the purpose of looking up the layer in the viewer here:
napari-micromanager/src/napari_micromanager/_mda_handler.py
Lines 428 to 429 in 4c14f27
| # the name of this layer in the napari viewer | |
| layer_name = f"{prefix}_{event.sequence.uid}{suffix}" |
if either of those were ever changed, we'd have an issue. There should be one function that constructs a layer name, and that one function should always be used when retrieving the expected layer name
Metadata
Metadata
Assignees
Labels
No labels