Skip to content

Commit a1ec7bb

Browse files
committed
add jupytext paired script
1 parent ff998a6 commit a1ec7bb

4 files changed

+466
-28
lines changed

electrophysiology/02-Imported Tables - Interactive.ipynb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@
77
"# Working with automated computations: Imported tables"
88
]
99
},
10-
{
11-
"cell_type": "code",
12-
"execution_count": 1,
13-
"metadata": {},
14-
"outputs": [
15-
{
16-
"name": "stdout",
17-
"output_type": "stream",
18-
"text": [
19-
"go\n"
20-
]
21-
}
22-
],
23-
"source": [
24-
"print('go')"
25-
]
26-
},
2710
{
2811
"cell_type": "markdown",
2912
"metadata": {},
@@ -190,7 +173,7 @@
190173
"metadata": {},
191174
"outputs": [],
192175
"source": [
193-
"# ENTER YOUR CODE! - restrict session by an element of keys\n"
176+
"# ENTER YOUR CODE! - restrict session using keys and any element inside keys. \n"
194177
]
195178
},
196179
{

electrophysiology/02-Imported Tables - Interactive.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
# # Working with automated computations: Imported tables
1717

18-
print('go')
19-
2018
# Welcome back! In this session, we are going to continue working with the pipeline for the mouse electrophysiology example.
2119
#
2220
# In this session, we will learn to:
@@ -70,7 +68,7 @@
7068

7169
# Any item in this list of keys can be used to uniquely identify a single session!
7270

73-
# ENTER YOUR CODE! - restrict session by an element of keys
71+
# ENTER YOUR CODE! - restrict session using keys and any element inside keys.
7472

7573

7674
# Let's take the first key, and generate the file name that corresponds to this session. Remember the `data_{mouse_id}_{session_date}.npy` filename convetion!

electrophysiology/03-Computed Table, Lookup Table, and Part Table - Interactive.ipynb

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@
741741
"threshold = 0.5\n",
742742
"\n",
743743
"# find activity above threshold\n",
744-
"above_thrs = (activity > threshold).astype(np.int) \n",
744+
"above_thrs = (activity > threshold).astype(int) \n",
745745
"\n",
746746
"plt.plot(activity)\n",
747747
"plt.plot(above_thrs)\n",
@@ -762,7 +762,7 @@
762762
"metadata": {},
763763
"outputs": [],
764764
"source": [
765-
"rising = (np.diff(above_thrs) > 0).astype(np.int) # find rising edge of crossing threshold\n",
765+
"rising = (np.diff(above_thrs) > 0).astype(int) # find rising edge of crossing threshold\n",
766766
"spikes = np.hstack((0, rising)) # prepend 0 to account for shortening due to np.diff\n",
767767
"\n",
768768
"plt.plot(activity)\n",
@@ -807,9 +807,9 @@
807807
"threshold = # enter different threshold values here\n",
808808
"\n",
809809
"# find activity above threshold\n",
810-
"above_thrs = (activity > threshold).astype(np.int) \n",
810+
"above_thrs = (activity > threshold).astype(int) \n",
811811
"\n",
812-
"rising = (np.diff(above_thrs) > 0).astype(np.int) # find rising edge of crossing threshold\n",
812+
"rising = (np.diff(above_thrs) > 0).astype(int) # find rising edge of crossing threshold\n",
813813
"spikes = np.hstack((0, rising)) # prepend 0 to account for shortening due to np.diff\n",
814814
"\n",
815815
"count = spikes.sum() # compute total spike counts\n",
@@ -999,8 +999,8 @@
999999
" activity = (Neuron() & key).fetch1('activity')\n",
10001000
" threshold = (SpikeDetectionParam() & key).fetch1('threshold')\n",
10011001
"\n",
1002-
" above_thrs = (activity > threshold).astype(np.int) # find activity above threshold\n",
1003-
" rising = (np.diff(above_thrs) > 0).astype(np.int) # find rising edge of crossing threshold\n",
1002+
" above_thrs = (activity > threshold).astype(int) # find activity above threshold\n",
1003+
" rising = (np.diff(above_thrs) > 0).astype(int) # find rising edge of crossing threshold\n",
10041004
" spikes = np.hstack((0, rising)) # prepend 0 to account for shortening due to np.diff\n",
10051005
"\n",
10061006
" count = spikes.sum() # compute total spike counts\n",
@@ -1336,6 +1336,9 @@
13361336
}
13371337
],
13381338
"metadata": {
1339+
"jupytext": {
1340+
"formats": "ipynb,py:light"
1341+
},
13391342
"kernelspec": {
13401343
"display_name": "Python 3",
13411344
"language": "python",
@@ -1351,7 +1354,7 @@
13511354
"name": "python",
13521355
"nbconvert_exporter": "python",
13531356
"pygments_lexer": "ipython3",
1354-
"version": "3.7.0"
1357+
"version": "3.5.6"
13551358
}
13561359
},
13571360
"nbformat": 4,

0 commit comments

Comments
 (0)