File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 31
31
- Primary Key : design/tables/primary.md
32
32
- Attributes : design/tables/attributes.md
33
33
- Lookup Tables : design/tables/lookup.md
34
+ - Manual Tables : design/tables/manual.md
34
35
- Blobs : design/tables/blobs.md
35
36
- Attachments : design/tables/attach.md
36
37
- Filepaths : design/tables/filepath.md
Original file line number Diff line number Diff line change
1
+ # Manual Tables
2
+
3
+ Manual tables are populated during experiments through a variety of interfaces.
4
+ Not all manual information is entered by typing.
5
+ Automated software can enter it directly into the database.
6
+ What makes a manual table manual is that it does not perform any computations within
7
+ the DataJoint pipeline.
8
+
9
+ The following code defines three manual tables ` Animal ` , ` Session ` , and ` Scan ` :
10
+
11
+ ``` python
12
+ @schema
13
+ class Animal (dj .Manual ):
14
+ definition = """
15
+ # information about animal
16
+ animal_id : int # animal id assigned by the lab
17
+ ---
18
+ -> Species
19
+ date_of_birth=null : date # YYYY-MM-DD optional
20
+ sex='' : enum('M', 'F', '') # leave empty if unspecified
21
+ """
22
+
23
+ @schema
24
+ class Session (dj .Manual ):
25
+ definition = """
26
+ # Experiment Session
27
+ -> Animal
28
+ session : smallint # session number for the animal
29
+ ---
30
+ session_date : date # YYYY-MM-DD
31
+ -> User
32
+ -> Anesthesia
33
+ -> Rig
34
+ """
35
+
36
+ @schema
37
+ class Scan (dj .Manual ):
38
+ definition = """
39
+ # Two-photon imaging scan
40
+ -> Session
41
+ scan : smallint # scan number within the session
42
+ ---
43
+ -> Lens
44
+ laser_wavelength : decimal(5,1) # um
45
+ laser_power : decimal(4,1) # mW
46
+ """
47
+ ```
You can’t perform that action at this time.
0 commit comments