From 3f7b15bb51382db7c7cdd05ce2178a303ca5c3e9 Mon Sep 17 00:00:00 2001 From: Kushal Bakshi <52367253+kushalbakshi@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:37:39 +0000 Subject: [PATCH] Minor fixes to tutorial notebook --- notebooks/tutorial.ipynb | 337 ++++++++++++++++++++------------------- 1 file changed, 169 insertions(+), 168 deletions(-) diff --git a/notebooks/tutorial.ipynb b/notebooks/tutorial.ipynb index 6d3687a..118f42b 100644 --- a/notebooks/tutorial.ipynb +++ b/notebooks/tutorial.ipynb @@ -68,15 +68,15 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "[2024-01-17 12:07:52,612][INFO]: Connecting root@fakeservices.datajoint.io:3306\n", - "[2024-01-17 12:07:52,620][INFO]: Connected root@fakeservices.datajoint.io:3306\n" + "[2024-01-17 12:35:14,558][INFO]: Connecting root@fakeservices.datajoint.io:3306\n", + "[2024-01-17 12:35:14,571][INFO]: Connected root@fakeservices.datajoint.io:3306\n" ] }, { @@ -85,7 +85,7 @@ "DataJoint connection (connected) root@fakeservices.datajoint.io:3306" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -107,14 +107,14 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "[2024-01-17 12:07:58,189][WARNING]: lab.Project and related tables will be removed in a future version of Element Lab. Please use the project schema.\n" + "[2024-01-17 12:35:14,756][WARNING]: lab.Project and related tables will be removed in a future version of Element Lab. Please use the project schema.\n" ] } ], @@ -132,192 +132,192 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ - "\n", + "\n", "\n", "%3\n", - "\n", - "\n", + "\n", + "\n", "\n", - "Device\n", - "\n", - "\n", - "Device\n", + "optogenetics.OptoStimParams\n", + "\n", + "\n", + "optogenetics.OptoStimParams\n", "\n", "\n", "\n", "\n", - "\n", + "\n", "optogenetics.OptoProtocol\n", - "\n", - "\n", - "optogenetics.OptoProtocol\n", + "\n", + "\n", + "optogenetics.OptoProtocol\n", "\n", "\n", "\n", - "\n", + "\n", "\n", - "Device->optogenetics.OptoProtocol\n", - "\n", + "optogenetics.OptoStimParams->optogenetics.OptoProtocol\n", + "\n", "\n", - "\n", + "\n", "\n", - "subject.Subject\n", - "\n", - "\n", - "subject.Subject\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "session.Session\n", - "\n", - "\n", - "session.Session\n", + "Device\n", + "\n", + "\n", + "Device\n", "\n", "\n", "\n", - "\n", + "\n", "\n", - "subject.Subject->session.Session\n", - "\n", - "\n", - "\n", - "\n", - "surgery.Implantation\n", - "\n", - "\n", - "surgery.Implantation\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "subject.Subject->surgery.Implantation\n", - "\n", - "\n", - "\n", - "\n", - "optogenetics.OptoEvent\n", - "\n", - "\n", - "optogenetics.OptoEvent\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "optogenetics.OptoProtocol->optogenetics.OptoEvent\n", - "\n", - "\n", - "\n", - "\n", - "optogenetics.OptoWaveformType\n", - "\n", - "\n", - "optogenetics.OptoWaveformType\n", - "\n", - "\n", + "Device->optogenetics.OptoProtocol\n", + "\n", "\n", "\n", - "\n", + "\n", "optogenetics.OptoWaveform\n", - "\n", - "\n", - "optogenetics.OptoWaveform\n", + "\n", + "\n", + "optogenetics.OptoWaveform\n", "\n", "\n", "\n", - "\n", - "\n", - "optogenetics.OptoWaveformType->optogenetics.OptoWaveform\n", - "\n", + "\n", + "\n", + "optogenetics.OptoWaveform->optogenetics.OptoStimParams\n", + "\n", "\n", "\n", "\n", "optogenetics.OptoWaveform.Sine\n", "\n", - "\n", - "optogenetics.OptoWaveform.Sine\n", + "\n", + "optogenetics.OptoWaveform.Sine\n", "\n", "\n", "\n", + "\n", + "\n", + "optogenetics.OptoWaveform->optogenetics.OptoWaveform.Sine\n", + "\n", + "\n", "\n", - "\n", + "\n", "optogenetics.OptoWaveform.Ramp\n", - "\n", - "\n", - "optogenetics.OptoWaveform.Ramp\n", + "\n", + "\n", + "optogenetics.OptoWaveform.Ramp\n", "\n", "\n", "\n", - "\n", - "\n", - "optogenetics.OptoWaveform->optogenetics.OptoWaveform.Sine\n", - "\n", - "\n", "\n", - "\n", + "\n", "optogenetics.OptoWaveform->optogenetics.OptoWaveform.Ramp\n", - "\n", + "\n", "\n", "\n", "\n", "optogenetics.OptoWaveform.Square\n", "\n", - "\n", - "optogenetics.OptoWaveform.Square\n", + "\n", + "optogenetics.OptoWaveform.Square\n", "\n", "\n", "\n", "\n", - "\n", + "\n", "optogenetics.OptoWaveform->optogenetics.OptoWaveform.Square\n", - "\n", + "\n", "\n", - "\n", - "\n", - "optogenetics.OptoStimParams\n", - "\n", - "\n", - "optogenetics.OptoStimParams\n", + "\n", + "\n", + "optogenetics.OptoEvent\n", + "\n", + "\n", + "optogenetics.OptoEvent\n", "\n", "\n", "\n", - "\n", - "\n", - "optogenetics.OptoWaveform->optogenetics.OptoStimParams\n", - "\n", + "\n", + "\n", + "surgery.Implantation\n", + "\n", + "\n", + "surgery.Implantation\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "surgery.Implantation->optogenetics.OptoProtocol\n", + "\n", + "\n", + "\n", + "\n", + "session.Session\n", + "\n", + "\n", + "session.Session\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "session.Session->optogenetics.OptoProtocol\n", - "\n", + "\n", "\n", - "\n", + "\n", + "\n", + "optogenetics.OptoWaveformType\n", + "\n", + "\n", + "optogenetics.OptoWaveformType\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "optogenetics.OptoWaveformType->optogenetics.OptoWaveform\n", + "\n", + "\n", + "\n", + "\n", + "subject.Subject\n", + "\n", + "\n", + "subject.Subject\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "subject.Subject->surgery.Implantation\n", + "\n", + "\n", + "\n", "\n", - "surgery.Implantation->optogenetics.OptoProtocol\n", - "\n", + "subject.Subject->session.Session\n", + "\n", "\n", - "\n", + "\n", "\n", - "optogenetics.OptoStimParams->optogenetics.OptoProtocol\n", - "\n", + "optogenetics.OptoProtocol->optogenetics.OptoEvent\n", + "\n", "\n", "\n", "" ], "text/plain": [ - "" + "" ] }, - "execution_count": 5, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -351,7 +351,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -441,7 +441,7 @@ " (Total: 0)" ] }, - "execution_count": 6, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -452,7 +452,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -475,7 +475,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -490,7 +490,7 @@ "subject_description=\"\" : varchar(1024) # " ] }, - "execution_count": 8, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -511,7 +511,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -605,7 +605,7 @@ " (Total: 1)" ] }, - "execution_count": 9, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -632,7 +632,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -653,7 +653,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -666,7 +666,7 @@ "session_datetime=null : datetime # " ] }, - "execution_count": 11, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -693,7 +693,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -702,7 +702,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -788,7 +788,7 @@ " (Total: 1)" ] }, - "execution_count": 17, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -809,7 +809,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -898,7 +898,7 @@ " (Total: 2)" ] }, - "execution_count": 18, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -916,7 +916,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -949,7 +949,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -1039,7 +1039,7 @@ " (Total: 1)" ] }, - "execution_count": 20, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -1059,7 +1059,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -1142,7 +1142,7 @@ " (Total: 6)" ] }, - "execution_count": 21, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -1153,7 +1153,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -1233,7 +1233,7 @@ " (Total: 3)" ] }, - "execution_count": 22, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -1251,7 +1251,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -1333,7 +1333,7 @@ " (Total: 1)" ] }, - "execution_count": 23, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -1347,7 +1347,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ @@ -1390,7 +1390,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -1492,7 +1492,7 @@ " (Total: 1)" ] }, - "execution_count": 25, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -1503,7 +1503,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -1633,7 +1633,7 @@ " (Total: 1)" ] }, - "execution_count": 26, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -1651,7 +1651,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -1672,7 +1672,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -1774,7 +1774,7 @@ " (Total: 1)" ] }, - "execution_count": 28, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -1797,12 +1797,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "### **Insert optogenetics recording data**\n", "Next, we'll describe the session in which these parameters are used in `OptoProtocol`." ] }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -1916,7 +1917,7 @@ " (Total: 1)" ] }, - "execution_count": 30, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -1947,7 +1948,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -2041,7 +2042,7 @@ " (Total: 1)" ] }, - "execution_count": 32, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -2069,7 +2070,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 26, "metadata": {}, "outputs": [ { @@ -2168,7 +2169,7 @@ " (Total: 2)" ] }, - "execution_count": 34, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -2198,7 +2199,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -2297,7 +2298,7 @@ " (Total: 2)" ] }, - "execution_count": 35, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -2315,7 +2316,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -2409,7 +2410,7 @@ " (Total: 1)" ] }, - "execution_count": 36, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -2428,7 +2429,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -2566,7 +2567,7 @@ " (Total: 1)" ] }, - "execution_count": 37, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -2587,7 +2588,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 30, "metadata": {}, "outputs": [ { @@ -2605,7 +2606,7 @@ " 'stim_end_time': 797.0}]" ] }, - "execution_count": 38, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -2623,7 +2624,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 31, "metadata": {}, "outputs": [ { @@ -2636,7 +2637,7 @@ " 'stim_end_time': 797.0}" ] }, - "execution_count": 39, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" }