LorenFrankLab / spyglass

Neuroscience data analysis framework for reproducible research built by Loren Frank Lab at UCSF
https://lorenfranklab.github.io/spyglass/
MIT License
82 stars 40 forks source link

CurationV1 does not track a metrics source. #939

Open samuelbray32 opened 2 months ago

samuelbray32 commented 2 months ago

Describe the bug

Solutions Brainstorm

khl02007 commented 2 months ago

@samuelbray32 This is true. One solution I had thought of (and had implemented) is to make a column in CurationV1 that tells you where it came from and provide a method to define it. For example, once you have populated MetricCuration and you want to do another curation, you can use insert_metric_curation method of CurationV1 which inserts metric curation id in the description field (https://github.com/LorenFrankLab/spyglass/blob/35335fbc339d1b7fbfb64bc54947a7bcbf31ad62/src/spyglass/spikesorting/v1/curation.py#L163). Of course this only works if the user uses this method. And if you delete a row in MetricCuration, it doesn't automatically find the associated row in CurationV1 and delete that (that was something I had planned to implement but didn't).

But this solution is not very elegant and I'm open to suggestions.