Skip to content

Commit 99114f9

Browse files
committed
Add manual page
1 parent dd0a210 commit 99114f9

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

docs/mkdocs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ nav:
3131
- Primary Key: design/tables/primary.md
3232
- Attributes: design/tables/attributes.md
3333
- Lookup Tables: design/tables/lookup.md
34+
- Manual Tables: design/tables/manual.md
3435
- Blobs: design/tables/blobs.md
3536
- Attachments: design/tables/attach.md
3637
- Filepaths: design/tables/filepath.md

docs/src/design/tables/manual.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
```

0 commit comments

Comments
 (0)