@@ -543,24 +543,26 @@ def make(self, key):
543
543
@schema
544
544
class Waveform (dj .Imported ):
545
545
definition = """
546
- -> CuratedClustering.Unit
547
- ---
548
- peak_chn_waveform_mean: longblob # mean over all spikes at the peak channel for this unit
546
+ -> CuratedClustering
549
547
"""
550
548
551
- class Electrode (dj .Part ):
549
+ class Unit (dj .Part ):
552
550
definition = """
553
551
-> master
552
+ -> CuratedClustering.Unit
553
+ ---
554
+ peak_chn_waveform_mean: longblob # mean over all spikes at the peak channel for this unit
555
+ """
556
+
557
+ class UnitElectrode (dj .Part ):
558
+ definition = """
559
+ -> master.UnitWaveform
554
560
-> probe.ElectrodeConfig.Electrode
555
561
---
556
562
waveform_mean: longblob # (uV) mean over all spikes
557
563
waveforms=null: longblob # (uV) (spike x sample) waveform of each spike at each electrode
558
564
"""
559
565
560
- @property
561
- def key_source (self ):
562
- return Curation ()
563
-
564
566
def make (self , key ):
565
567
root_dir = pathlib .Path (get_clustering_root_data_dir ())
566
568
ks_dir = root_dir / (Curation & key ).fetch1 ('curation_output_dir' )
@@ -631,9 +633,10 @@ def yield_unit_waveforms():
631
633
yield unit_peak_waveform , unit_electrode_waveforms
632
634
633
635
# insert waveform on a per-unit basis to mitigate potential memory issue
636
+ self .insert1 (key )
634
637
for unit_peak_waveform , unit_electrode_waveforms in yield_unit_waveforms ():
635
- self .insert1 (unit_peak_waveform , ignore_extra_fields = True )
636
- self .Electrode .insert (unit_electrode_waveforms , ignore_extra_fields = True )
638
+ self .Unit . insert1 (unit_peak_waveform , ignore_extra_fields = True )
639
+ self .UnitElectrode .insert (unit_electrode_waveforms , ignore_extra_fields = True )
637
640
638
641
639
642
# ----------- Quality Control ----------
0 commit comments