This repository has been archived by the owner on Sep 1, 2018. It is now read-only.
forked from datajoint-catalog/djcat-alyx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimaging.py
103 lines (92 loc) · 3.59 KB
/
imaging.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import datajoint as dj
import reference
import equipment
import acquisition
schema = dj.schema(dj.config['names.%s' % __name__], locals())
@schema
class SVDCompressedMovie(dj.Manual):
'''
Note:
eigenframes: (nSVs*nY*nX)
timecourses: (nSamples*nSVs)
'''
definition = """
-> acquisition.Session
svd_movie_id: int # svd movie id
---
svd_create_date: datetime # create date
eigenframes: longblob # svd eigenframes
timecourses: longblob # svd timecourses
"""
@schema
class WidefieldImaging(dj.Manual):
# <class 'imaging.models.WidefieldImaging'>
# TODO: Reference Stack
# TODO: rename imported fkeys; awaiting dj #300
# TODO: nullable CoordinateTransformation
# TODO: nullable SVDCompressedMovie
# TODO: nullable LightSource
definition = """
-> acquisition.Session
---
widefield_create_date: datetime # create date
widefield_start_time: datetime # nominal start time
widefield_end_time: datetime # nominal end time
imaging_indicator: varchar(255) # imaging indicator
preprocessing: varchar(255) # preprocessing
description: varchar(255) # description
excitation_wavelength: float # excitation nominal wavelength
recording_wavelength: float # recording nominal wavelength
recording_device: varchar(255) # recording device
raw_frames: longblob # n*w*h*c video
-> reference.CoordinateTransformation
-> SVDCompressedMovie
-> equipment.LightSource
"""
@schema
class TwoPhotonImaging(dj.Manual):
# <class 'imaging.models.TwoPhotonImaging'>
# TODO: Reference Stack
# TODO: rename imported fkeys; awaiting dj #300
# TODO: nullable CoordinateTransformation
# TODO: nullable SVDCompressedMovie
definition = """
-> acquisition.Session
---
twop_create_date: datetime # create date
twop_start_time: datetime # nominal start time
twop_end_time: datetime # nominal end time
description: varchar(255) # description
excitation_wavelength: float # excitation nominal wavelength
recording_wavelength: float # recording nominal wavelength
raw_frames=NULL: longblob # n*w*h*c video
-> reference.CoordinateTransformation
-> SVDCompressedMovie
"""
@schema
class ROIDetection(dj.Computed):
# <class 'imaging.models.TwoPhotonImaging'>
definition = """
-> acquisition.Session
---
roi_create_date: datetime # create date
roi_start_time: datetime # nominal start time
roi_end_time: datetime # nominal end time
preprocessing: varchar(255) # preprocessing
"""
class ROI(dj.Part):
# <class 'imaging.models.ROI'>
definition = """
-> ROIDetection
roi_id: int # ROI ID
---
roi_type: varchar(255) # roi type
optogenetic_response: varchar(255) # optogenetic response
putative_cell_type: varchar(255) # putative cell type
estimated_layer: varchar(255) # estimated layer
-> TwoPhotonImaging
raw_fluorescence: longblob # nTxNROI
resting_fluorescence: longblob # nTxNROI
masks: longblob # (nYxnX) masks
plane: integer # discovery plane
"""