Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 11c6523

Browse files
committed
Update notebook
1 parent ac5ed4b commit 11c6523

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

notebooks/2022-allen-institute-workshop.ipynb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@
166166
"metadata": {},
167167
"outputs": [],
168168
"source": [
169-
"imaging.Fluorescence.Trace & 'subject=\"subject3\"' \\\n",
170-
" & 'session_datetime=\"2022-09-01 19:16:44\"' \\\n",
171-
" & 'mask_id=120'"
169+
"query_trace = imaging.Fluorescence.Trace & 'subject=\"subject3\"' \\\n",
170+
" & 'session_datetime=\"2022-09-01 19:16:44\"' \\\n",
171+
" & 'mask_id=120'\n",
172+
"query_trace"
172173
]
173174
},
174175
{
@@ -186,9 +187,7 @@
186187
"metadata": {},
187188
"outputs": [],
188189
"source": [
189-
"trace = (imaging.Fluorescence.Trace & 'subject=\"subject3\"' \\\n",
190-
" & 'session_datetime=\"2022-09-01 19:16:44\"' \\\n",
191-
" & 'mask_id=120').fetch('fluorescence')"
190+
"trace = (query_trace).fetch('fluorescence')"
192191
]
193192
},
194193
{

notebooks/py_scripts/2022-allen-institute-workshop.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,14 @@
6666

6767
# Restrict the table with specific criteria.
6868

69-
imaging.Fluorescence.Trace & 'subject="subject3"' \
70-
& 'session_datetime="2022-09-01 19:16:44"' \
71-
& 'mask_id=120'
69+
query_trace = imaging.Fluorescence.Trace & 'subject="subject3"' \
70+
& 'session_datetime="2022-09-01 19:16:44"' \
71+
& 'mask_id=120'
72+
query_trace
7273

7374
# Fetch a fluorescence trace from the database.
7475

75-
trace = (imaging.Fluorescence.Trace & 'subject="subject3"' \
76-
& 'session_datetime="2022-09-01 19:16:44"' \
77-
& 'mask_id=120').fetch('fluorescence')
76+
trace = (query_trace).fetch('fluorescence')
7877

7978
# Plot the fluorescence trace.
8079

0 commit comments

Comments
 (0)