Closed rpswenson closed 6 months ago
Could you specify what key you're trying to run?
Here's the key:
{'sorting_id': UUID('7b0e33eb-9355-426a-8141-da6cf807134e'), 'curation_id': 0, 'waveform_param_name': 'default_whitened_20000spikes_20jobs', 'metric_param_name': 'peak_offset_num_spikes_20000spikes_v2', 'metric_curation_param_name': 'noise0.03_isi0.0025_offset2', 'metric_curation_id': UUID('b6fb4af4-97d4-4f06-8328-4f5e52bcb316')}
Can you try running it with:
{
'sorting_id': '7b0e33eb-9355-426a-8141-da6cf807134e',
'curation_id': 0,
'waveform_param_name': 'default_whitened_20000spikes_20jobs',
'metric_param_name': 'peak_offset_num_spikes_20000spikes_v2',
'metric_curation_param_name': 'noise0.03_isi0.0025_offset2',
'metric_curation_id': 'b6fb4af4-97d4-4f06-8328-4f5e52bcb316'
}
How would I do that? I think the sorting_id and metric_curation_id are generated during the insert selection step. When defining the key in my code I have it like this:
key = {
"sorting_id": (
sgs.SpikeSortingSelection & {"recording_id": key["recording_id"]} & {"sorter_param_name": key["sorter_param_name"]}
).fetch1("sorting_id"),
"curation_id": 0,
"waveform_param_name": "default_whitened_20000spikes_20jobs",
"metric_param_name": "peak_offset_num_spikes_20000spikes_v2",
"metric_curation_param_name": "noise0.03_isi0.0025_offset2",
}
Ok @edeno I think I figured out what you were asking for. I ran:
key = {
'sorting_id': '7b0e33eb-9355-426a-8141-da6cf807134e',
'curation_id': 0,
'waveform_param_name': 'default_whitened_20000spikes_20jobs',
'metric_param_name': 'peak_offset_num_spikes_20000spikes_v2',
'metric_curation_param_name': 'noise0.03_isi0.0025_offset2',
'metric_curation_id': 'b6fb4af4-97d4-4f06-8328-4f5e52bcb316'
}
sgs.MetricCuration.populate(key)
on its own in a separate cell to make sure it wasn't something about the loop messing things up, but it still caused the same error
@khl02007 do you have any idea of what's gong on here?
This is happening when the results of computing quality metrics is saved to NWB. This includes spike train, waveforms, electrodes, labels, merge groups, and metrics. @rly what would be the easiest way to figure out which of these are problematic? Can you tell based on the error message? The relevant function is here https://github.com/LorenFrankLab/spyglass/blob/201c67010ec941d58fa4d325955c3a6b3cac2c12/src/spyglass/spikesorting/v1/metric_curation.py#L497
Hey all, just wondering if there's any update on this
I think it would be easiest to diagnose by running %debug
in the jupyter notebook in the cell after the error. @MichaelCoulter could you help @rpswenson with that? We just need to know what metric is causing the error.
Hey, we were able to figure out the issue. Some change to spikeinterface meant that in the waveform parameters, 'sparse' had to be set to False. We made a new WaveformParameters entry ('default_whitened_20000spikes_20jobs_v3') that has this change, and the code runs fine now.
Got the whole spikesorting loop to run properly for tetrodes (thanks yall) but when running the same code for a probe I run into this error at
sgs.MetricCuration.populate(m_key)
:It seems like something particular to probe data isn't accounted for when running this, since I don't run into this issue otherwise.