labdata 0.1.6__tar.gz → 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {labdata-0.1.6 → labdata-0.1.7}/PKG-INFO +1 -1
- {labdata-0.1.6 → labdata-0.1.7}/labdata/__init__.py +1 -1
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/ephys.py +10 -22
- {labdata-0.1.6 → labdata-0.1.7}/labdata.egg-info/PKG-INFO +1 -1
- {labdata-0.1.6 → labdata-0.1.7}/LICENSE +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/README.md +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/cli.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/__init__.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/caiman.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/ec2.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/ephys.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/pose.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/schedulers.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/singularity.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/suite2p.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/compute/utils.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/copy.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/__init__.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/admin.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/compute.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/console.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/decisiontask.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/explorer/__init__.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/explorer/cellsegmentation.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/explorer/spikesorting.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/index.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/notes.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/procedures.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/schema_graph.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/segmentation.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/sorting.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/dashboard/video.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/export.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/rules/__init__.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/rules/ephys.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/rules/imaging.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/rules/utils.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/s3.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/__init__.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/general.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/histology.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/onephoton.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/procedures.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/tasks.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/twophoton.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/utils.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/schema/video.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/stacks.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/utils.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata/widgets.py +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata.egg-info/SOURCES.txt +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata.egg-info/dependency_links.txt +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata.egg-info/entry_points.txt +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata.egg-info/requires.txt +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/labdata.egg-info/top_level.txt +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/pyproject.toml +0 -0
- {labdata-0.1.6 → labdata-0.1.7}/setup.cfg +0 -0
|
@@ -279,39 +279,27 @@ class SpikeSorting(dj.Manual):
|
|
|
279
279
|
return [float(s) for s in sampling_rates] # cast to float if decimal
|
|
280
280
|
|
|
281
281
|
def get_units_with_waveforms(self, return_seconds = True, interp_method = 'cubic-spline'):
|
|
282
|
-
units =
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if return_seconds:
|
|
286
|
-
exps = (EphysRecording.ProbeSetting() & self.proj()).proj().fetch(as_dict = True)
|
|
287
|
-
interpolations = dict()
|
|
288
|
-
for e in exps:
|
|
289
|
-
k = '{subject_name}_{session_name}_{dataset_name}_{probe_num}'.format(**e)
|
|
290
|
-
try:
|
|
291
|
-
interpolations[k] = (StreamSync() & e).apply(None, method = interp_method)
|
|
292
|
-
except:
|
|
293
|
-
interpolations[k] = None
|
|
294
|
-
for p,u,r in zip(self.proj(),self,sampling_rates):
|
|
295
|
-
w = (SpikeSorting.Waveforms() & p)
|
|
282
|
+
units = self.get_spike_times(as_dict = True,return_seconds = return_seconds, interp_method = interp_method)
|
|
283
|
+
for u in units:
|
|
284
|
+
w = (SpikeSorting.Waveforms() & u)
|
|
296
285
|
if len(w):
|
|
297
286
|
w = w.fetch('waveform_median')[0]
|
|
298
287
|
else:
|
|
299
288
|
w = None
|
|
300
|
-
|
|
301
|
-
if return_seconds:
|
|
302
|
-
k = '{subject_name}_{session_name}_{dataset_name}_{probe_num}'.format(**p)
|
|
303
|
-
if interpolations[k] is None:
|
|
304
|
-
units[-1]['spike_times'] = units[-1]['spike_times'].astype(np.float32)/np.float32(r)
|
|
305
|
-
else:
|
|
306
|
-
units[-1]['spike_times'] = interpolations[k](units[-1]['spike_times'].astype(np.float32))
|
|
289
|
+
u['waveform_median'] = w
|
|
307
290
|
return units
|
|
308
291
|
|
|
309
|
-
def get_spike_times(self, as_dict = True,
|
|
292
|
+
def get_spike_times(self, as_dict = True,
|
|
293
|
+
return_seconds = True,
|
|
294
|
+
extra_keys = [],
|
|
295
|
+
warn = True,
|
|
296
|
+
include_metrics = False,
|
|
310
297
|
interp_method = 'cubic-spline'):
|
|
311
298
|
'''
|
|
312
299
|
spike_times = get_spike_times()
|
|
313
300
|
|
|
314
301
|
Gets spike times corrected if the sync is applied.
|
|
302
|
+
|
|
315
303
|
defaults:
|
|
316
304
|
as_dict = True
|
|
317
305
|
return_seconds = True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|