mehta-lab / recOrder

3D quantitative label-free imaging with phase and polarization
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

Metadata is overwritten by consecutive reconstructions #474

Open ziw-liu opened 3 days ago

ziw-liu commented 3 days ago

The recOrder reconstruction writes its settings into FOV-level .zattrs. However the entire setting object is dumped, so the next channel will overwrite the settings, leaving only the last one.

ziw-liu commented 3 days ago

https://github.com/mehta-lab/recOrder/blob/57f611edd0e86618ea33e98aea3059888722dcdf/recOrder/cli/apply_inverse_transfer_function.py#L270

talonchandler commented 3 days ago

Thanks @ziw-liu.

Do you think something like this is the right move? output_dataset.zattrs[f"settings-{output_channel_name}"] = settings.dict()

cc @edyoshikun

ziw-liu commented 3 days ago

Thanks @ziw-liu.

Do you think something like this is the right move? output_dataset.zattrs[f"settings-{output_channel_name}"] = settings.dict()

cc @edyoshikun

I think this is also a chance to use namespacing, as the generic 'settings' field can collide with other things. So something like:

"recOrder-napari":{
    "channel 1": {},
    "channel 2": {},
}