Skip to content

Commit 7bd751a

Browse files
author
Thinh Nguyen
committed
added a CuratedClustering as master table for Unit
1 parent a889407 commit 7bd751a

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

elements_ephys/ephys.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -417,22 +417,23 @@ def create1_from_clustering_task(self, key, curation_note=''):
417417

418418

419419
@schema
420-
class Unit(dj.Imported):
421-
definition = """
422-
-> Curation
423-
unit: int
424-
---
425-
-> probe.ElectrodeConfig.Electrode # electrode on the probe that this unit has highest response amplitude
426-
-> ClusterQualityLabel
427-
spike_count: int # how many spikes in this recording of this unit
428-
spike_times: longblob # (s) spike times of this unit, relative to the start of the EphysRecording
429-
spike_sites : longblob # array of electrode associated with each spike
430-
spike_depths : longblob # (um) array of depths associated with each spike, relative to the (0, 0) of the probe
420+
class CuratedClustering(dj.Imported):
421+
definition = """
422+
-> Curation
431423
"""
432424

433-
@property
434-
def key_source(self):
435-
return Curation()
425+
class Unit(dj.Part):
426+
definition = """
427+
-> master
428+
unit: int
429+
---
430+
-> probe.ElectrodeConfig.Electrode # electrode on the probe that this unit has highest response amplitude
431+
-> ClusterQualityLabel
432+
spike_count: int # how many spikes in this recording of this unit
433+
spike_times: longblob # (s) spike times of this unit, relative to the start of the EphysRecording
434+
spike_sites : longblob # array of electrode associated with each spike
435+
spike_depths : longblob # (um) array of depths associated with each spike, relative to the (0, 0) of the probe
436+
"""
436437

437438
def make(self, key):
438439
root_dir = pathlib.Path(get_ephys_root_data_dir())
@@ -481,7 +482,7 @@ def make(self, key):
481482
@schema
482483
class Waveform(dj.Imported):
483484
definition = """
484-
-> Unit
485+
-> CuratedClustering.Unit
485486
---
486487
peak_chn_waveform_mean: longblob # mean over all spikes at the peak channel for this unit
487488
"""
@@ -554,7 +555,7 @@ def make(self, key):
554555
@schema
555556
class ClusterQualityMetrics(dj.Imported):
556557
definition = """
557-
-> Unit
558+
-> CuratedClustering.Unit
558559
---
559560
amp: float
560561
snr: float

0 commit comments

Comments
 (0)