-
Notifications
You must be signed in to change notification settings - Fork 252
Open
Labels
postprocessingRelated to postprocessing moduleRelated to postprocessing module
Description
As of v0.104.0 template_metrics saves some tmp_data_to_save: the peak_data and main_channel_templates alongside the metrics as data in the extension.
This creates a backward compatibility problem. When you load a v0.103.2 analyzer using v0.104.0, this has no peak_data. So when you try to e.g. merge two units, the analyzer cannot update the peak_data (since it has no peak data). Actual bug is here
| self.sorting_analyzer, new_sorting_analyzer, self.data[k], new_tmp_data[k], new_unit_ids |
self.data has no key "peak_data".
Wanted to raise an issue cause I think this is a general problem and there are a few solutions:
- Use
getinstead of indexing, and don't update dataself.datadidn't contain thetmp_datato being with. - Use
_handle_backward_compatibility_on_loadto add a suitable "empty" peak_data.
Number 1. feels easier but I actually quite like 2, because it ensures that no matter what you load with v0.104.0, you get the same data structure. Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
postprocessingRelated to postprocessing moduleRelated to postprocessing module