From 86c77f5819fea976f0ee5d98dff02c1c5dd6a9bd Mon Sep 17 00:00:00 2001 From: Adam Amster Date: Tue, 13 Dec 2022 16:49:55 -0500 Subject: [PATCH] don't modify a property --- .../nb/visual_behavior_mouse_history.ipynb | 3818 +++++++++++------ 1 file changed, 2543 insertions(+), 1275 deletions(-) diff --git a/doc_template/examples_root/examples/nb/visual_behavior_mouse_history.ipynb b/doc_template/examples_root/examples/nb/visual_behavior_mouse_history.ipynb index e24cad72f..58ccd2f1f 100644 --- a/doc_template/examples_root/examples/nb/visual_behavior_mouse_history.ipynb +++ b/doc_template/examples_root/examples/nb/visual_behavior_mouse_history.ipynb @@ -76,7 +76,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "allensdk version 2.10.2 or higher is required, you have 2.10.2 installed\n" + "allensdk version 2.10.2 or higher is required, you have 2.14.0 installed\n" ] } ], @@ -97,7 +97,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 36, "metadata": {}, "outputs": [], "source": [ @@ -106,7 +106,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 37, "metadata": {}, "outputs": [ { @@ -138,7 +138,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": { "tags": [ "parameters" @@ -147,21 +147,22 @@ "outputs": [], "source": [ "# choose a location on your file system to cache NWB files as they are loaded:\n", - "output_dir = 'A_PATH_TO_SOME_LOCAL_FOLDER'" + "output_dir = '/tmp/cache'" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "ophys_session_table.csv: 100%|██████████| 165k/165k [00:00<00:00, 1.54MMB/s]\n", - "behavior_session_table.csv: 100%|██████████| 885k/885k [00:00<00:00, 4.96MMB/s]\n", - "ophys_experiment_table.csv: 100%|██████████| 336k/336k [00:00<00:00, 3.05MMB/s]\n" + "ophys_session_table.csv: 100%|██████████| 227k/227k [00:00<00:00, 269kMB/s] \n", + "behavior_session_table.csv: 100%|██████████| 1.21M/1.21M [00:03<00:00, 403kMB/s] \n", + "ophys_experiment_table.csv: 100%|██████████| 610k/610k [00:01<00:00, 404kMB/s] \n", + "ophys_cells_table.csv: 100%|██████████| 4.29M/4.29M [00:09<00:00, 448kMB/s] \n" ] } ], @@ -676,16 +677,16 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "445002" + "'440298'" ] }, - "execution_count": 6, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -719,7 +720,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 9, "metadata": { "scrolled": false }, @@ -752,7 +753,6 @@ " driver_line\n", " sex\n", " age_in_days\n", - " session_type\n", " cre_line\n", " indicator\n", " session_number\n", @@ -764,6 +764,7 @@ " ophys_container_id\n", " project_code\n", " date_of_acquisition\n", + " session_type\n", " file_id\n", " \n", " \n", @@ -792,861 +793,997 @@ " \n", " \n", " \n", - " 837658854\n", - " BEH.B-Box3\n", + " 831129394\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 72.0\n", - " TRAINING_0_gratings_autorewards_15min\n", + " 81.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-15 14:49:24.015\n", + " 2019-03-01 13:25:23.766\n", + " TRAINING_0_gratings_autorewards_15min\n", " 1.085362e+09\n", " \n", " \n", - " 838515247\n", - " BEH.B-Box1\n", + " 832021447\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 75.0\n", - " TRAINING_1_gratings\n", + " 84.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-18 13:44:01.474\n", + " 2019-03-04 14:21:34.570\n", + " TRAINING_1_gratings\n", " 1.085362e+09\n", " \n", " \n", - " 839219841\n", - " BEH.B-Box1\n", + " 832544149\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 76.0\n", - " TRAINING_1_gratings\n", + " 85.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 1\n", + " 1.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-19 12:50:12.068\n", + " 2019-03-05 13:52:38.642\n", + " TRAINING_1_gratings\n", " 1.085362e+09\n", " \n", " \n", - " 839565422\n", - " BEH.B-Box1\n", + " 833328750\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 77.0\n", - " TRAINING_1_gratings\n", + " 86.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 2\n", + " 2.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-20 13:16:44.461\n", + " 2019-03-06 14:27:39.035\n", + " TRAINING_1_gratings\n", " 1.085362e+09\n", " \n", " \n", - " 839912316\n", - " BEH.B-Box1\n", + " 834087859\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 78.0\n", - " TRAINING_2_gratings_flashed\n", + " 87.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 3.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-21 12:54:25.388\n", - " 1.081589e+09\n", + " 2019-03-07 14:01:17.016\n", + " TRAINING_1_gratings\n", + " 1.085362e+09\n", " \n", " \n", - " 840581827\n", - " BEH.B-Box1\n", + " 834903060\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 79.0\n", - " TRAINING_2_gratings_flashed\n", + " 88.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 1\n", + " 0.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-22 12:56:37.162\n", - " 1.081589e+09\n", + " 2019-03-08 14:38:02.472\n", + " TRAINING_2_gratings_flashed\n", + " 1.081585e+09\n", " \n", " \n", - " 841426832\n", - " BEH.B-Box1\n", + " 835557296\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 82.0\n", - " TRAINING_3_images_A_10uL_reward\n", + " 91.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 1.0\n", + " NaN\n", " 0.0\n", - " 0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-25 13:33:53.275\n", - " 1.081589e+09\n", + " 2019-03-11 12:33:20.147\n", + " TRAINING_2_gratings_flashed\n", + " 1.081586e+09\n", " \n", " \n", - " 841827774\n", - " BEH.B-Box1\n", + " 836166694\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 83.0\n", + " 92.0\n", + " Slc17a7-IRES2-Cre\n", + " GCaMP6f\n", + " NaN\n", + " 0.0\n", + " 0.0\n", + " 0.0\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 2019-03-12 14:54:22.690\n", " TRAINING_3_images_A_10uL_reward\n", + " 1.081586e+09\n", + " \n", + " \n", + " 836761653\n", + " BEH.F\n", + " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", + " 440298\n", + " Ai93(TITL-GCaMP6f)\n", + " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", + " M\n", + " 93.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 1\n", " 1.0\n", - " 0\n", + " 1.0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-26 12:43:01.470\n", - " 1.081590e+09\n", + " 2019-03-13 12:53:27.462\n", + " TRAINING_3_images_A_10uL_reward\n", + " 1.081587e+09\n", " \n", " \n", - " 842385277\n", - " BEH.B-Box1\n", + " 837192567\n", + " BEH.F-Box5\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 84.0\n", - " TRAINING_3_images_A_10uL_reward\n", + " 94.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 2\n", " 2.0\n", - " 0\n", + " 2.0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-27 12:13:04.923\n", - " 1.081591e+09\n", + " 2019-03-14 12:49:43.211\n", + " TRAINING_3_images_A_10uL_reward\n", + " 1.081587e+09\n", " \n", " \n", - " 842819933\n", - " BEH.B-Box1\n", + " 837638916\n", + " BEH.F-Box5\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 85.0\n", - " TRAINING_4_images_A_training\n", + " 95.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 0.0\n", " 3.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-28 12:11:36.413\n", - " 1.081591e+09\n", + " 2019-03-15 13:29:50.376\n", + " TRAINING_4_images_A_training\n", + " 1.081587e+09\n", " \n", " \n", - " 843400453\n", - " BEH.B-Box1\n", + " 838496126\n", + " BEH.F-Box5\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 86.0\n", - " TRAINING_5_images_A_epilogue\n", + " 98.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 0.0\n", " 4.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-29 13:03:16.029\n", - " 1.081592e+09\n", + " 2019-03-18 13:05:17.767\n", + " TRAINING_5_images_A_epilogue\n", + " 1.081588e+09\n", " \n", " \n", - " 844199758\n", - " BEH.B-Box1\n", + " 839234289\n", + " BEH.F-Box5\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 89.0\n", - " TRAINING_5_images_A_handoff_ready\n", + " 99.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 0.0\n", " 5.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-04-01 11:59:06.026\n", - " 1.081591e+09\n", + " 2019-03-19 13:15:41.106\n", + " TRAINING_5_images_A_handoff_ready\n", + " 1.081588e+09\n", " \n", " \n", - " 844908261\n", - " BEH.B-Box1\n", + " 839566045\n", + " BEH.F-Box5\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 90.0\n", - " TRAINING_5_images_A_handoff_ready\n", + " 100.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 1\n", + " 1.0\n", " 6.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-04-02 12:34:16.170\n", - " 1.081592e+09\n", + " 2019-03-20 13:07:21.399\n", + " TRAINING_5_images_A_handoff_ready\n", + " 1.081589e+09\n", " \n", " \n", - " 845572044\n", - " BEH.B-Box1\n", + " 839939986\n", + " BEH.F-Box5\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 91.0\n", - " TRAINING_5_images_A_handoff_ready\n", + " 101.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 2\n", + " 2.0\n", " 7.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-04-03 12:16:13.522\n", - " 1.081592e+09\n", + " 2019-03-21 13:10:44.301\n", + " TRAINING_5_images_A_handoff_ready\n", + " 1.081589e+09\n", " \n", " \n", - " 846331423\n", - " CAM2P.3\n", + " 840594514\n", + " BEH.F-Box5\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 92.0\n", - " OPHYS_0_images_A_habituation\n", + " 102.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", - " 0.0\n", - " 0\n", + " NaN\n", + " 3.0\n", " 8.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-04-04 13:13:13.399\n", - " 1.085362e+09\n", + " 2019-03-22 13:23:58.465\n", + " TRAINING_5_images_A_handoff_ready\n", + " 1.081589e+09\n", " \n", " \n", - " 847036328\n", + " 841148118\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 93.0\n", - " OPHYS_0_images_A_habituation\n", + " 105.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 0.0\n", - " 1\n", + " 0.0\n", " 9.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-04-05 12:47:32.422\n", + " 2019-03-25 08:22:19.380\n", + " OPHYS_0_images_A_habituation\n", " 1.085362e+09\n", " \n", " \n", - " 847874940\n", + " 841707177\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 96.0\n", - " OPHYS_0_images_A_habituation\n", + " 106.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 0.0\n", - " 2\n", + " 1.0\n", " 10.0\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-04-08 13:27:21.095\n", + " 2019-03-26 08:21:46.265\n", + " OPHYS_0_images_A_habituation\n", " 1.085362e+09\n", " \n", " \n", - " 848613406\n", + " 842174399\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 97.0\n", - " OPHYS_1_images_A\n", + " 107.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", - " 1.0\n", - " 0\n", + " 0.0\n", + " 2.0\n", " 11.0\n", - " 0\n", - " 848264483.0\n", - " [848697625]\n", - " [846215539]\n", + " 0.0\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 2019-03-27 09:00:04.195\n", + " OPHYS_0_images_A_habituation\n", + " 1.085362e+09\n", + " \n", + " \n", + " 842729895\n", + " CAM2P.3\n", + " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", + " 440298\n", + " Ai93(TITL-GCaMP6f)\n", + " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", + " M\n", + " 108.0\n", + " Slc17a7-IRES2-Cre\n", + " GCaMP6f\n", + " 1.0\n", + " 0.0\n", + " 12.0\n", + " 0.0\n", + " 842583486.0\n", + " [842973730]\n", + " [843049827]\n", " VisualBehavior\n", - " 2019-04-09 13:26:26.372\n", + " 2019-03-28 09:17:59.122\n", + " OPHYS_1_images_A\n", " NaN\n", " \n", " \n", - " 849147676\n", + " 843203333\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 98.0\n", - " OPHYS_2_images_A_passive\n", + " 109.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 2.0\n", - " 0\n", - " 12.0\n", - " 1\n", - " 848894137.0\n", - " [849203565]\n", - " [846215539]\n", + " 0.0\n", + " 13.0\n", + " 1.0\n", + " 843049997.0\n", + " [843519218]\n", + " [843049827]\n", " VisualBehavior\n", - " 2019-04-10 13:34:39.264\n", + " 2019-03-29 08:58:48.934\n", + " OPHYS_2_images_A_passive\n", " NaN\n", " \n", " \n", - " 849651275\n", + " 844164376\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 99.0\n", + " 112.0\n", + " Slc17a7-IRES2-Cre\n", + " GCaMP6f\n", + " 3.0\n", + " 0.0\n", + " 14.0\n", + " 2.0\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 2019-04-01 10:52:03.251\n", " OPHYS_3_images_A\n", + " 1.081592e+09\n", + " \n", + " \n", + " 844849972\n", + " CAM2P.3\n", + " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", + " 440298\n", + " Ai93(TITL-GCaMP6f)\n", + " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", + " M\n", + " 113.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 3.0\n", - " 0\n", - " 13.0\n", - " 2\n", - " 849597937.0\n", - " [850479305]\n", - " [846215539]\n", - " VisualBehavior\n", - " 2019-04-11 12:31:50.074\n", + " 1.0\n", + " 15.0\n", + " 3.0\n", + " NaN\n", + " NaN\n", + " NaN\n", " NaN\n", + " 2019-04-02 11:36:52.447\n", + " OPHYS_3_images_A\n", + " 1.081592e+09\n", " \n", " \n", - " 850989832\n", + " 845441512\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 100.0\n", - " OPHYS_4_images_B\n", + " 114.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 4.0\n", - " 0\n", " 0.0\n", - " 3\n", - " 850959102.0\n", - " [851060467]\n", - " [846215539]\n", + " 0.0\n", + " 4.0\n", + " 845219209.0\n", + " [848694639]\n", + " [843049827]\n", " VisualBehavior\n", - " 2019-04-12 13:30:27.946\n", + " 2019-04-03 10:15:51.376\n", + " OPHYS_4_images_B\n", " NaN\n", " \n", " \n", - " 851773928\n", + " 846194950\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 103.0\n", - " OPHYS_5_images_B_passive\n", + " 115.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 5.0\n", - " 0\n", + " 0.0\n", " 1.0\n", - " 4\n", + " 5.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-04-15 12:20:00.123\n", - " 1.081596e+09\n", + " 2019-04-04 11:13:54.409\n", + " OPHYS_5_images_B_passive\n", + " 1.081593e+09\n", " \n", " \n", - " 852451567\n", + " 846929750\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 104.0\n", - " OPHYS_6_images_B\n", + " 116.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 6.0\n", - " 0\n", + " 0.0\n", " 2.0\n", - " 5\n", - " 852326785.0\n", - " [852691524]\n", - " [846215539]\n", + " 6.0\n", + " 846599329.0\n", + " [847125577]\n", + " [843049827]\n", " VisualBehavior\n", - " 2019-04-16 12:24:46.804\n", + " 2019-04-05 11:07:22.302\n", + " OPHYS_6_images_B\n", " NaN\n", " \n", " \n", - " 855200229\n", + " 848503804\n", " CAM2P.3\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 110.0\n", - " OPHYS_5_images_B_passive\n", + " 120.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " 5.0\n", - " 1\n", + " 1.0\n", " 3.0\n", - " 6\n", - " 855083235.0\n", - " [855582961]\n", - " [846215539]\n", + " 7.0\n", + " 848264175.0\n", + " [848698709]\n", + " [843049827]\n", " VisualBehavior\n", - " 2019-04-22 09:01:33.022\n", + " 2019-04-09 11:30:55.092\n", + " OPHYS_5_images_B_passive\n", " NaN\n", " \n", - " \n", - "\n", - "" - ], - "text/plain": [ - " equipment_name \\\n", - "behavior_session_id \n", - "837658854 BEH.B-Box3 \n", - "838515247 BEH.B-Box1 \n", - "839219841 BEH.B-Box1 \n", - "839565422 BEH.B-Box1 \n", - "839912316 BEH.B-Box1 \n", - "840581827 BEH.B-Box1 \n", - "841426832 BEH.B-Box1 \n", - "841827774 BEH.B-Box1 \n", - "842385277 BEH.B-Box1 \n", - "842819933 BEH.B-Box1 \n", - "843400453 BEH.B-Box1 \n", - "844199758 BEH.B-Box1 \n", - "844908261 BEH.B-Box1 \n", - "845572044 BEH.B-Box1 \n", - "846331423 CAM2P.3 \n", - "847036328 CAM2P.3 \n", - "847874940 CAM2P.3 \n", - "848613406 CAM2P.3 \n", - "849147676 CAM2P.3 \n", - "849651275 CAM2P.3 \n", - "850989832 CAM2P.3 \n", - "851773928 CAM2P.3 \n", - "852451567 CAM2P.3 \n", - "855200229 CAM2P.3 \n", - "\n", - " full_genotype \\\n", + " \n", + " 853526948\n", + " CAM2P.3\n", + " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", + " 440298\n", + " Ai93(TITL-GCaMP6f)\n", + " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", + " M\n", + " 129.0\n", + " Slc17a7-IRES2-Cre\n", + " GCaMP6f\n", + " 3.0\n", + " 2.0\n", + " 16.0\n", + " 8.0\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 2019-04-18 09:36:48.583\n", + " OPHYS_3_images_A\n", + " 1.081598e+09\n", + " \n", + " \n", + "\n", + "" + ], + "text/plain": [ + " equipment_name \\\n", + "behavior_session_id \n", + "831129394 BEH.F \n", + "832021447 BEH.F \n", + "832544149 BEH.F \n", + "833328750 BEH.F \n", + "834087859 BEH.F \n", + "834903060 BEH.F \n", + "835557296 BEH.F \n", + "836166694 BEH.F \n", + "836761653 BEH.F \n", + "837192567 BEH.F-Box5 \n", + "837638916 BEH.F-Box5 \n", + "838496126 BEH.F-Box5 \n", + "839234289 BEH.F-Box5 \n", + "839566045 BEH.F-Box5 \n", + "839939986 BEH.F-Box5 \n", + "840594514 BEH.F-Box5 \n", + "841148118 CAM2P.3 \n", + "841707177 CAM2P.3 \n", + "842174399 CAM2P.3 \n", + "842729895 CAM2P.3 \n", + "843203333 CAM2P.3 \n", + "844164376 CAM2P.3 \n", + "844849972 CAM2P.3 \n", + "845441512 CAM2P.3 \n", + "846194950 CAM2P.3 \n", + "846929750 CAM2P.3 \n", + "848503804 CAM2P.3 \n", + "853526948 CAM2P.3 \n", + "\n", + " full_genotype \\\n", "behavior_session_id \n", - "837658854 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "838515247 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "839219841 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "839565422 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "839912316 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "840581827 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "841426832 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "841827774 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "842385277 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "842819933 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "843400453 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "844199758 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "844908261 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "845572044 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "846331423 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "847036328 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "847874940 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "848613406 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "849147676 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "849651275 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "850989832 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "851773928 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "852451567 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "855200229 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "\n", - " mouse_id reporter_line \\\n", - "behavior_session_id \n", - "837658854 445002 Ai93(TITL-GCaMP6f) \n", - "838515247 445002 Ai93(TITL-GCaMP6f) \n", - "839219841 445002 Ai93(TITL-GCaMP6f) \n", - "839565422 445002 Ai93(TITL-GCaMP6f) \n", - "839912316 445002 Ai93(TITL-GCaMP6f) \n", - "840581827 445002 Ai93(TITL-GCaMP6f) \n", - "841426832 445002 Ai93(TITL-GCaMP6f) \n", - "841827774 445002 Ai93(TITL-GCaMP6f) \n", - "842385277 445002 Ai93(TITL-GCaMP6f) \n", - "842819933 445002 Ai93(TITL-GCaMP6f) \n", - "843400453 445002 Ai93(TITL-GCaMP6f) \n", - "844199758 445002 Ai93(TITL-GCaMP6f) \n", - "844908261 445002 Ai93(TITL-GCaMP6f) \n", - "845572044 445002 Ai93(TITL-GCaMP6f) \n", - "846331423 445002 Ai93(TITL-GCaMP6f) \n", - "847036328 445002 Ai93(TITL-GCaMP6f) \n", - "847874940 445002 Ai93(TITL-GCaMP6f) \n", - "848613406 445002 Ai93(TITL-GCaMP6f) \n", - "849147676 445002 Ai93(TITL-GCaMP6f) \n", - "849651275 445002 Ai93(TITL-GCaMP6f) \n", - "850989832 445002 Ai93(TITL-GCaMP6f) \n", - "851773928 445002 Ai93(TITL-GCaMP6f) \n", - "852451567 445002 Ai93(TITL-GCaMP6f) \n", - "855200229 445002 Ai93(TITL-GCaMP6f) \n", + "831129394 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "832021447 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "832544149 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "833328750 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "834087859 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "834903060 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "835557296 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "836166694 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "836761653 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "837192567 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "837638916 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "838496126 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "839234289 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "839566045 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "839939986 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "840594514 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "841148118 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "841707177 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "842174399 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "842729895 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "843203333 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "844164376 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "844849972 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "845441512 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "846194950 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "846929750 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "848503804 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "853526948 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "\n", + " mouse_id reporter_line \\\n", + "behavior_session_id \n", + "831129394 440298 Ai93(TITL-GCaMP6f) \n", + "832021447 440298 Ai93(TITL-GCaMP6f) \n", + "832544149 440298 Ai93(TITL-GCaMP6f) \n", + "833328750 440298 Ai93(TITL-GCaMP6f) \n", + "834087859 440298 Ai93(TITL-GCaMP6f) \n", + "834903060 440298 Ai93(TITL-GCaMP6f) \n", + "835557296 440298 Ai93(TITL-GCaMP6f) \n", + "836166694 440298 Ai93(TITL-GCaMP6f) \n", + "836761653 440298 Ai93(TITL-GCaMP6f) \n", + "837192567 440298 Ai93(TITL-GCaMP6f) \n", + "837638916 440298 Ai93(TITL-GCaMP6f) \n", + "838496126 440298 Ai93(TITL-GCaMP6f) \n", + "839234289 440298 Ai93(TITL-GCaMP6f) \n", + "839566045 440298 Ai93(TITL-GCaMP6f) \n", + "839939986 440298 Ai93(TITL-GCaMP6f) \n", + "840594514 440298 Ai93(TITL-GCaMP6f) \n", + "841148118 440298 Ai93(TITL-GCaMP6f) \n", + "841707177 440298 Ai93(TITL-GCaMP6f) \n", + "842174399 440298 Ai93(TITL-GCaMP6f) \n", + "842729895 440298 Ai93(TITL-GCaMP6f) \n", + "843203333 440298 Ai93(TITL-GCaMP6f) \n", + "844164376 440298 Ai93(TITL-GCaMP6f) \n", + "844849972 440298 Ai93(TITL-GCaMP6f) \n", + "845441512 440298 Ai93(TITL-GCaMP6f) \n", + "846194950 440298 Ai93(TITL-GCaMP6f) \n", + "846929750 440298 Ai93(TITL-GCaMP6f) \n", + "848503804 440298 Ai93(TITL-GCaMP6f) \n", + "853526948 440298 Ai93(TITL-GCaMP6f) \n", "\n", " driver_line sex age_in_days \\\n", "behavior_session_id \n", - "837658854 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 72.0 \n", - "838515247 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 75.0 \n", - "839219841 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 76.0 \n", - "839565422 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 77.0 \n", - "839912316 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 78.0 \n", - "840581827 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 79.0 \n", - "841426832 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 82.0 \n", - "841827774 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 83.0 \n", - "842385277 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 84.0 \n", - "842819933 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 85.0 \n", - "843400453 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 86.0 \n", - "844199758 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 89.0 \n", - "844908261 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 90.0 \n", - "845572044 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 91.0 \n", - "846331423 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 92.0 \n", - "847036328 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 93.0 \n", - "847874940 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 96.0 \n", - "848613406 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 97.0 \n", - "849147676 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 98.0 \n", - "849651275 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 99.0 \n", - "850989832 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 100.0 \n", - "851773928 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 103.0 \n", - "852451567 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 104.0 \n", - "855200229 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 110.0 \n", - "\n", - " session_type cre_line \\\n", - "behavior_session_id \n", - "837658854 TRAINING_0_gratings_autorewards_15min Slc17a7-IRES2-Cre \n", - "838515247 TRAINING_1_gratings Slc17a7-IRES2-Cre \n", - "839219841 TRAINING_1_gratings Slc17a7-IRES2-Cre \n", - "839565422 TRAINING_1_gratings Slc17a7-IRES2-Cre \n", - "839912316 TRAINING_2_gratings_flashed Slc17a7-IRES2-Cre \n", - "840581827 TRAINING_2_gratings_flashed Slc17a7-IRES2-Cre \n", - "841426832 TRAINING_3_images_A_10uL_reward Slc17a7-IRES2-Cre \n", - "841827774 TRAINING_3_images_A_10uL_reward Slc17a7-IRES2-Cre \n", - "842385277 TRAINING_3_images_A_10uL_reward Slc17a7-IRES2-Cre \n", - "842819933 TRAINING_4_images_A_training Slc17a7-IRES2-Cre \n", - "843400453 TRAINING_5_images_A_epilogue Slc17a7-IRES2-Cre \n", - "844199758 TRAINING_5_images_A_handoff_ready Slc17a7-IRES2-Cre \n", - "844908261 TRAINING_5_images_A_handoff_ready Slc17a7-IRES2-Cre \n", - "845572044 TRAINING_5_images_A_handoff_ready Slc17a7-IRES2-Cre \n", - "846331423 OPHYS_0_images_A_habituation Slc17a7-IRES2-Cre \n", - "847036328 OPHYS_0_images_A_habituation Slc17a7-IRES2-Cre \n", - "847874940 OPHYS_0_images_A_habituation Slc17a7-IRES2-Cre \n", - "848613406 OPHYS_1_images_A Slc17a7-IRES2-Cre \n", - "849147676 OPHYS_2_images_A_passive Slc17a7-IRES2-Cre \n", - "849651275 OPHYS_3_images_A Slc17a7-IRES2-Cre \n", - "850989832 OPHYS_4_images_B Slc17a7-IRES2-Cre \n", - "851773928 OPHYS_5_images_B_passive Slc17a7-IRES2-Cre \n", - "852451567 OPHYS_6_images_B Slc17a7-IRES2-Cre \n", - "855200229 OPHYS_5_images_B_passive Slc17a7-IRES2-Cre \n", - "\n", - " indicator session_number \\\n", - "behavior_session_id \n", - "837658854 GCaMP6f NaN \n", - "838515247 GCaMP6f NaN \n", - "839219841 GCaMP6f NaN \n", - "839565422 GCaMP6f NaN \n", - "839912316 GCaMP6f NaN \n", - "840581827 GCaMP6f NaN \n", - "841426832 GCaMP6f NaN \n", - "841827774 GCaMP6f NaN \n", - "842385277 GCaMP6f NaN \n", - "842819933 GCaMP6f NaN \n", - "843400453 GCaMP6f NaN \n", - "844199758 GCaMP6f NaN \n", - "844908261 GCaMP6f NaN \n", - "845572044 GCaMP6f NaN \n", - "846331423 GCaMP6f 0.0 \n", - "847036328 GCaMP6f 0.0 \n", - "847874940 GCaMP6f 0.0 \n", - "848613406 GCaMP6f 1.0 \n", - "849147676 GCaMP6f 2.0 \n", - "849651275 GCaMP6f 3.0 \n", - "850989832 GCaMP6f 4.0 \n", - "851773928 GCaMP6f 5.0 \n", - "852451567 GCaMP6f 6.0 \n", - "855200229 GCaMP6f 5.0 \n", + "831129394 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 81.0 \n", + "832021447 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 84.0 \n", + "832544149 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 85.0 \n", + "833328750 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 86.0 \n", + "834087859 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 87.0 \n", + "834903060 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 88.0 \n", + "835557296 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 91.0 \n", + "836166694 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 92.0 \n", + "836761653 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 93.0 \n", + "837192567 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 94.0 \n", + "837638916 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 95.0 \n", + "838496126 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 98.0 \n", + "839234289 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 99.0 \n", + "839566045 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 100.0 \n", + "839939986 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 101.0 \n", + "840594514 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 102.0 \n", + "841148118 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 105.0 \n", + "841707177 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 106.0 \n", + "842174399 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 107.0 \n", + "842729895 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 108.0 \n", + "843203333 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 109.0 \n", + "844164376 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 112.0 \n", + "844849972 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 113.0 \n", + "845441512 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 114.0 \n", + "846194950 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 115.0 \n", + "846929750 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 116.0 \n", + "848503804 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 120.0 \n", + "853526948 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 129.0 \n", + "\n", + " cre_line indicator session_number \\\n", + "behavior_session_id \n", + "831129394 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "832021447 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "832544149 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "833328750 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "834087859 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "834903060 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "835557296 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "836166694 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "836761653 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "837192567 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "837638916 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "838496126 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "839234289 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "839566045 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "839939986 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "840594514 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "841148118 Slc17a7-IRES2-Cre GCaMP6f 0.0 \n", + "841707177 Slc17a7-IRES2-Cre GCaMP6f 0.0 \n", + "842174399 Slc17a7-IRES2-Cre GCaMP6f 0.0 \n", + "842729895 Slc17a7-IRES2-Cre GCaMP6f 1.0 \n", + "843203333 Slc17a7-IRES2-Cre GCaMP6f 2.0 \n", + "844164376 Slc17a7-IRES2-Cre GCaMP6f 3.0 \n", + "844849972 Slc17a7-IRES2-Cre GCaMP6f 3.0 \n", + "845441512 Slc17a7-IRES2-Cre GCaMP6f 4.0 \n", + "846194950 Slc17a7-IRES2-Cre GCaMP6f 5.0 \n", + "846929750 Slc17a7-IRES2-Cre GCaMP6f 6.0 \n", + "848503804 Slc17a7-IRES2-Cre GCaMP6f 5.0 \n", + "853526948 Slc17a7-IRES2-Cre GCaMP6f 3.0 \n", "\n", " prior_exposures_to_session_type \\\n", "behavior_session_id \n", - "837658854 0 \n", - "838515247 0 \n", - "839219841 1 \n", - "839565422 2 \n", - "839912316 0 \n", - "840581827 1 \n", - "841426832 0 \n", - "841827774 1 \n", - "842385277 2 \n", - "842819933 0 \n", - "843400453 0 \n", - "844199758 0 \n", - "844908261 1 \n", - "845572044 2 \n", - "846331423 0 \n", - "847036328 1 \n", - "847874940 2 \n", - "848613406 0 \n", - "849147676 0 \n", - "849651275 0 \n", - "850989832 0 \n", - "851773928 0 \n", - "852451567 0 \n", - "855200229 1 \n", + "831129394 0.0 \n", + "832021447 0.0 \n", + "832544149 1.0 \n", + "833328750 2.0 \n", + "834087859 3.0 \n", + "834903060 0.0 \n", + "835557296 1.0 \n", + "836166694 0.0 \n", + "836761653 1.0 \n", + "837192567 2.0 \n", + "837638916 0.0 \n", + "838496126 0.0 \n", + "839234289 0.0 \n", + "839566045 1.0 \n", + "839939986 2.0 \n", + "840594514 3.0 \n", + "841148118 0.0 \n", + "841707177 1.0 \n", + "842174399 2.0 \n", + "842729895 0.0 \n", + "843203333 0.0 \n", + "844164376 0.0 \n", + "844849972 1.0 \n", + "845441512 0.0 \n", + "846194950 0.0 \n", + "846929750 0.0 \n", + "848503804 1.0 \n", + "853526948 2.0 \n", "\n", " prior_exposures_to_image_set \\\n", "behavior_session_id \n", - "837658854 NaN \n", - "838515247 NaN \n", - "839219841 NaN \n", - "839565422 NaN \n", - "839912316 NaN \n", - "840581827 NaN \n", - "841426832 0.0 \n", - "841827774 1.0 \n", - "842385277 2.0 \n", - "842819933 3.0 \n", - "843400453 4.0 \n", - "844199758 5.0 \n", - "844908261 6.0 \n", - "845572044 7.0 \n", - "846331423 8.0 \n", - "847036328 9.0 \n", - "847874940 10.0 \n", - "848613406 11.0 \n", - "849147676 12.0 \n", - "849651275 13.0 \n", - "850989832 0.0 \n", - "851773928 1.0 \n", - "852451567 2.0 \n", - "855200229 3.0 \n", + "831129394 NaN \n", + "832021447 NaN \n", + "832544149 NaN \n", + "833328750 NaN \n", + "834087859 NaN \n", + "834903060 NaN \n", + "835557296 NaN \n", + "836166694 0.0 \n", + "836761653 1.0 \n", + "837192567 2.0 \n", + "837638916 3.0 \n", + "838496126 4.0 \n", + "839234289 5.0 \n", + "839566045 6.0 \n", + "839939986 7.0 \n", + "840594514 8.0 \n", + "841148118 9.0 \n", + "841707177 10.0 \n", + "842174399 11.0 \n", + "842729895 12.0 \n", + "843203333 13.0 \n", + "844164376 14.0 \n", + "844849972 15.0 \n", + "845441512 0.0 \n", + "846194950 1.0 \n", + "846929750 2.0 \n", + "848503804 3.0 \n", + "853526948 16.0 \n", "\n", " prior_exposures_to_omissions ophys_session_id \\\n", "behavior_session_id \n", - "837658854 0 NaN \n", - "838515247 0 NaN \n", - "839219841 0 NaN \n", - "839565422 0 NaN \n", - "839912316 0 NaN \n", - "840581827 0 NaN \n", - "841426832 0 NaN \n", - "841827774 0 NaN \n", - "842385277 0 NaN \n", - "842819933 0 NaN \n", - "843400453 0 NaN \n", - "844199758 0 NaN \n", - "844908261 0 NaN \n", - "845572044 0 NaN \n", - "846331423 0 NaN \n", - "847036328 0 NaN \n", - "847874940 0 NaN \n", - "848613406 0 848264483.0 \n", - "849147676 1 848894137.0 \n", - "849651275 2 849597937.0 \n", - "850989832 3 850959102.0 \n", - "851773928 4 NaN \n", - "852451567 5 852326785.0 \n", - "855200229 6 855083235.0 \n", + "831129394 0.0 NaN \n", + "832021447 0.0 NaN \n", + "832544149 0.0 NaN \n", + "833328750 0.0 NaN \n", + "834087859 0.0 NaN \n", + "834903060 0.0 NaN \n", + "835557296 0.0 NaN \n", + "836166694 0.0 NaN \n", + "836761653 0.0 NaN \n", + "837192567 0.0 NaN \n", + "837638916 0.0 NaN \n", + "838496126 0.0 NaN \n", + "839234289 0.0 NaN \n", + "839566045 0.0 NaN \n", + "839939986 0.0 NaN \n", + "840594514 0.0 NaN \n", + "841148118 0.0 NaN \n", + "841707177 0.0 NaN \n", + "842174399 0.0 NaN \n", + "842729895 0.0 842583486.0 \n", + "843203333 1.0 843049997.0 \n", + "844164376 2.0 NaN \n", + "844849972 3.0 NaN \n", + "845441512 4.0 845219209.0 \n", + "846194950 5.0 NaN \n", + "846929750 6.0 846599329.0 \n", + "848503804 7.0 848264175.0 \n", + "853526948 8.0 NaN \n", "\n", " ophys_experiment_id ophys_container_id project_code \\\n", "behavior_session_id \n", - "837658854 NaN NaN NaN \n", - "838515247 NaN NaN NaN \n", - "839219841 NaN NaN NaN \n", - "839565422 NaN NaN NaN \n", - "839912316 NaN NaN NaN \n", - "840581827 NaN NaN NaN \n", - "841426832 NaN NaN NaN \n", - "841827774 NaN NaN NaN \n", - "842385277 NaN NaN NaN \n", - "842819933 NaN NaN NaN \n", - "843400453 NaN NaN NaN \n", - "844199758 NaN NaN NaN \n", - "844908261 NaN NaN NaN \n", - "845572044 NaN NaN NaN \n", - "846331423 NaN NaN NaN \n", - "847036328 NaN NaN NaN \n", - "847874940 NaN NaN NaN \n", - "848613406 [848697625] [846215539] VisualBehavior \n", - "849147676 [849203565] [846215539] VisualBehavior \n", - "849651275 [850479305] [846215539] VisualBehavior \n", - "850989832 [851060467] [846215539] VisualBehavior \n", - "851773928 NaN NaN NaN \n", - "852451567 [852691524] [846215539] VisualBehavior \n", - "855200229 [855582961] [846215539] VisualBehavior \n", - "\n", - " date_of_acquisition file_id \n", - "behavior_session_id \n", - "837658854 2019-03-15 14:49:24.015 1.085362e+09 \n", - "838515247 2019-03-18 13:44:01.474 1.085362e+09 \n", - "839219841 2019-03-19 12:50:12.068 1.085362e+09 \n", - "839565422 2019-03-20 13:16:44.461 1.085362e+09 \n", - "839912316 2019-03-21 12:54:25.388 1.081589e+09 \n", - "840581827 2019-03-22 12:56:37.162 1.081589e+09 \n", - "841426832 2019-03-25 13:33:53.275 1.081589e+09 \n", - "841827774 2019-03-26 12:43:01.470 1.081590e+09 \n", - "842385277 2019-03-27 12:13:04.923 1.081591e+09 \n", - "842819933 2019-03-28 12:11:36.413 1.081591e+09 \n", - "843400453 2019-03-29 13:03:16.029 1.081592e+09 \n", - "844199758 2019-04-01 11:59:06.026 1.081591e+09 \n", - "844908261 2019-04-02 12:34:16.170 1.081592e+09 \n", - "845572044 2019-04-03 12:16:13.522 1.081592e+09 \n", - "846331423 2019-04-04 13:13:13.399 1.085362e+09 \n", - "847036328 2019-04-05 12:47:32.422 1.085362e+09 \n", - "847874940 2019-04-08 13:27:21.095 1.085362e+09 \n", - "848613406 2019-04-09 13:26:26.372 NaN \n", - "849147676 2019-04-10 13:34:39.264 NaN \n", - "849651275 2019-04-11 12:31:50.074 NaN \n", - "850989832 2019-04-12 13:30:27.946 NaN \n", - "851773928 2019-04-15 12:20:00.123 1.081596e+09 \n", - "852451567 2019-04-16 12:24:46.804 NaN \n", - "855200229 2019-04-22 09:01:33.022 NaN " + "831129394 NaN NaN NaN \n", + "832021447 NaN NaN NaN \n", + "832544149 NaN NaN NaN \n", + "833328750 NaN NaN NaN \n", + "834087859 NaN NaN NaN \n", + "834903060 NaN NaN NaN \n", + "835557296 NaN NaN NaN \n", + "836166694 NaN NaN NaN \n", + "836761653 NaN NaN NaN \n", + "837192567 NaN NaN NaN \n", + "837638916 NaN NaN NaN \n", + "838496126 NaN NaN NaN \n", + "839234289 NaN NaN NaN \n", + "839566045 NaN NaN NaN \n", + "839939986 NaN NaN NaN \n", + "840594514 NaN NaN NaN \n", + "841148118 NaN NaN NaN \n", + "841707177 NaN NaN NaN \n", + "842174399 NaN NaN NaN \n", + "842729895 [842973730] [843049827] VisualBehavior \n", + "843203333 [843519218] [843049827] VisualBehavior \n", + "844164376 NaN NaN NaN \n", + "844849972 NaN NaN NaN \n", + "845441512 [848694639] [843049827] VisualBehavior \n", + "846194950 NaN NaN NaN \n", + "846929750 [847125577] [843049827] VisualBehavior \n", + "848503804 [848698709] [843049827] VisualBehavior \n", + "853526948 NaN NaN NaN \n", + "\n", + " date_of_acquisition \\\n", + "behavior_session_id \n", + "831129394 2019-03-01 13:25:23.766 \n", + "832021447 2019-03-04 14:21:34.570 \n", + "832544149 2019-03-05 13:52:38.642 \n", + "833328750 2019-03-06 14:27:39.035 \n", + "834087859 2019-03-07 14:01:17.016 \n", + "834903060 2019-03-08 14:38:02.472 \n", + "835557296 2019-03-11 12:33:20.147 \n", + "836166694 2019-03-12 14:54:22.690 \n", + "836761653 2019-03-13 12:53:27.462 \n", + "837192567 2019-03-14 12:49:43.211 \n", + "837638916 2019-03-15 13:29:50.376 \n", + "838496126 2019-03-18 13:05:17.767 \n", + "839234289 2019-03-19 13:15:41.106 \n", + "839566045 2019-03-20 13:07:21.399 \n", + "839939986 2019-03-21 13:10:44.301 \n", + "840594514 2019-03-22 13:23:58.465 \n", + "841148118 2019-03-25 08:22:19.380 \n", + "841707177 2019-03-26 08:21:46.265 \n", + "842174399 2019-03-27 09:00:04.195 \n", + "842729895 2019-03-28 09:17:59.122 \n", + "843203333 2019-03-29 08:58:48.934 \n", + "844164376 2019-04-01 10:52:03.251 \n", + "844849972 2019-04-02 11:36:52.447 \n", + "845441512 2019-04-03 10:15:51.376 \n", + "846194950 2019-04-04 11:13:54.409 \n", + "846929750 2019-04-05 11:07:22.302 \n", + "848503804 2019-04-09 11:30:55.092 \n", + "853526948 2019-04-18 09:36:48.583 \n", + "\n", + " session_type file_id \n", + "behavior_session_id \n", + "831129394 TRAINING_0_gratings_autorewards_15min 1.085362e+09 \n", + "832021447 TRAINING_1_gratings 1.085362e+09 \n", + "832544149 TRAINING_1_gratings 1.085362e+09 \n", + "833328750 TRAINING_1_gratings 1.085362e+09 \n", + "834087859 TRAINING_1_gratings 1.085362e+09 \n", + "834903060 TRAINING_2_gratings_flashed 1.081585e+09 \n", + "835557296 TRAINING_2_gratings_flashed 1.081586e+09 \n", + "836166694 TRAINING_3_images_A_10uL_reward 1.081586e+09 \n", + "836761653 TRAINING_3_images_A_10uL_reward 1.081587e+09 \n", + "837192567 TRAINING_3_images_A_10uL_reward 1.081587e+09 \n", + "837638916 TRAINING_4_images_A_training 1.081587e+09 \n", + "838496126 TRAINING_5_images_A_epilogue 1.081588e+09 \n", + "839234289 TRAINING_5_images_A_handoff_ready 1.081588e+09 \n", + "839566045 TRAINING_5_images_A_handoff_ready 1.081589e+09 \n", + "839939986 TRAINING_5_images_A_handoff_ready 1.081589e+09 \n", + "840594514 TRAINING_5_images_A_handoff_ready 1.081589e+09 \n", + "841148118 OPHYS_0_images_A_habituation 1.085362e+09 \n", + "841707177 OPHYS_0_images_A_habituation 1.085362e+09 \n", + "842174399 OPHYS_0_images_A_habituation 1.085362e+09 \n", + "842729895 OPHYS_1_images_A NaN \n", + "843203333 OPHYS_2_images_A_passive NaN \n", + "844164376 OPHYS_3_images_A 1.081592e+09 \n", + "844849972 OPHYS_3_images_A 1.081592e+09 \n", + "845441512 OPHYS_4_images_B NaN \n", + "846194950 OPHYS_5_images_B_passive 1.081593e+09 \n", + "846929750 OPHYS_6_images_B NaN \n", + "848503804 OPHYS_5_images_B_passive NaN \n", + "853526948 OPHYS_3_images_A 1.081598e+09 " ] }, - "execution_count": 7, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -1672,37 +1809,103 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "behavior_session_837658854.nwb: 100%|██████████| 51.7M/51.7M [00:04<00:00, 11.3MMB/s] \n", - "behavior_session_838515247.nwb: 100%|██████████| 66.9M/66.9M [00:05<00:00, 12.1MMB/s] \n", - "behavior_session_839219841.nwb: 100%|██████████| 66.7M/66.7M [00:06<00:00, 10.1MMB/s] \n", - "behavior_session_839565422.nwb: 100%|██████████| 66.7M/66.7M [00:06<00:00, 11.0MMB/s] \n", - "behavior_session_839912316.nwb: 100%|██████████| 68.0M/68.0M [00:05<00:00, 11.4MMB/s] \n", - "behavior_session_840581827.nwb: 100%|██████████| 68.0M/68.0M [00:06<00:00, 11.1MMB/s] \n", - "behavior_session_841426832.nwb: 100%|██████████| 188M/188M [00:15<00:00, 12.0MMB/s] \n", - "behavior_session_841827774.nwb: 100%|██████████| 188M/188M [00:14<00:00, 13.1MMB/s] \n", - "behavior_session_842385277.nwb: 100%|██████████| 188M/188M [00:16<00:00, 11.5MMB/s] \n", - "behavior_session_842819933.nwb: 100%|██████████| 188M/188M [00:15<00:00, 12.1MMB/s] \n", - "behavior_session_843400453.nwb: 100%|██████████| 193M/193M [00:17<00:00, 11.1MMB/s] \n", - "behavior_session_844199758.nwb: 100%|██████████| 193M/193M [00:18<00:00, 10.5MMB/s] \n", - "behavior_session_844908261.nwb: 100%|██████████| 193M/193M [00:15<00:00, 12.8MMB/s] \n", - "behavior_session_845572044.nwb: 100%|██████████| 193M/193M [00:15<00:00, 12.3MMB/s] \n", - "behavior_session_846331423.nwb: 100%|██████████| 193M/193M [00:16<00:00, 11.8MMB/s] \n", - "behavior_session_847036328.nwb: 100%|██████████| 193M/193M [00:16<00:00, 11.8MMB/s] \n", - "behavior_session_847874940.nwb: 100%|██████████| 193M/193M [00:15<00:00, 12.5MMB/s] \n", - "behavior_ophys_experiment_848697625.nwb: 100%|██████████| 819M/819M [01:04<00:00, 12.7MMB/s] \n", - "behavior_ophys_experiment_849203565.nwb: 100%|██████████| 950M/950M [01:14<00:00, 12.7MMB/s] \n", - "behavior_ophys_experiment_850479305.nwb: 100%|██████████| 898M/898M [01:12<00:00, 12.3MMB/s] \n", - "behavior_ophys_experiment_851060467.nwb: 100%|██████████| 877M/877M [01:07<00:00, 12.9MMB/s] \n", - "behavior_session_851773928.nwb: 100%|██████████| 192M/192M [00:14<00:00, 13.4MMB/s] \n", - "behavior_ophys_experiment_852691524.nwb: 100%|██████████| 926M/926M [01:09<00:00, 13.4MMB/s] \n", - "behavior_ophys_experiment_855582961.nwb: 100%|██████████| 1.04G/1.04G [01:17<00:00, 13.4MMB/s] \n" + "behavior_session_831129394.nwb: 100%|██████████| 51.7M/51.7M [00:10<00:00, 5.10MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_832021447.nwb: 100%|██████████| 66.9M/66.9M [00:13<00:00, 5.06MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_832544149.nwb: 100%|██████████| 66.9M/66.9M [00:13<00:00, 4.92MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_833328750.nwb: 100%|██████████| 66.8M/66.8M [00:14<00:00, 4.49MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_834087859.nwb: 100%|██████████| 66.7M/66.7M [00:14<00:00, 4.51MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_834903060.nwb: 100%|██████████| 67.9M/67.9M [00:17<00:00, 3.78MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_835557296.nwb: 100%|██████████| 68.0M/68.0M [00:10<00:00, 6.38MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_836166694.nwb: 100%|██████████| 188M/188M [00:23<00:00, 7.95MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_836761653.nwb: 100%|██████████| 188M/188M [00:26<00:00, 7.07MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_837192567.nwb: 100%|██████████| 188M/188M [00:41<00:00, 4.52MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_837638916.nwb: 100%|██████████| 188M/188M [00:37<00:00, 5.07MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_838496126.nwb: 100%|██████████| 193M/193M [01:37<00:00, 1.97MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_839234289.nwb: 100%|██████████| 193M/193M [00:44<00:00, 4.29MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_839566045.nwb: 100%|██████████| 193M/193M [00:39<00:00, 4.94MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_839939986.nwb: 100%|██████████| 193M/193M [00:42<00:00, 4.55MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_840594514.nwb: 100%|██████████| 193M/193M [00:52<00:00, 3.66MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_841148118.nwb: 100%|██████████| 193M/193M [00:29<00:00, 6.43MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_841707177.nwb: 100%|██████████| 193M/193M [00:40<00:00, 4.77MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_842174399.nwb: 100%|██████████| 193M/193M [00:39<00:00, 4.89MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_ophys_experiment_842973730.nwb: 100%|██████████| 864M/864M [01:52<00:00, 7.71MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_ophys_experiment_843519218.nwb: 100%|██████████| 829M/829M [01:56<00:00, 7.11MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_844164376.nwb: 100%|██████████| 193M/193M [00:15<00:00, 12.1MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_844849972.nwb: 100%|██████████| 193M/193M [00:24<00:00, 8.02MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "behavior_ophys_experiment_848694639.nwb: 100%|██████████| 428M/428M [00:42<00:00, 10.2MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_846194950.nwb: 100%|██████████| 193M/193M [00:17<00:00, 10.7MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_ophys_experiment_847125577.nwb: 100%|██████████| 924M/924M [02:11<00:00, 7.03MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_ophys_experiment_848698709.nwb: 100%|██████████| 1.33G/1.33G [02:30<00:00, 8.81MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", + "behavior_session_853526948.nwb: 100%|██████████| 193M/193M [01:37<00:00, 1.98MMB/s] \n", + "/opt/anaconda3/lib/python3.8/site-packages/hdmf/spec/namespace.py:532: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.3.0 because version 1.5.0 is already loaded.\n", + " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n" ] } ], @@ -1723,7 +1926,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 11, "metadata": { "scrolled": true }, @@ -1732,6 +1935,8 @@ "data": { "text/plain": [ "['behavior_session_id',\n", + " 'eye_tracking',\n", + " 'eye_tracking_rig_geometry',\n", " 'get_performance_metrics',\n", " 'get_reward_rate',\n", " 'get_rolling_performance_df',\n", @@ -1747,7 +1952,7 @@ " 'trials']" ] }, - "execution_count": 9, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -1766,7 +1971,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -1822,7 +2027,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -1842,7 +2047,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -1868,15 +2073,14 @@ " \n", " duration\n", " end_frame\n", + " flashes_since_change\n", " image_index\n", " image_name\n", - " image_set\n", - " index\n", + " is_change\n", " omitted\n", " start_frame\n", " start_time\n", - " stop_time\n", - " is_change\n", + " end_time\n", " \n", " \n", " stimulus_presentations_id\n", @@ -1890,119 +2094,105 @@ " \n", " \n", " \n", - " \n", " \n", " \n", " \n", " \n", " 0\n", - " 0.250208\n", + " 0.250124\n", " 18000.0\n", + " 0.0\n", " 0\n", " im065\n", - " Natural_Images_Lum_Matched_set_training_2017.0...\n", - " 0\n", " False\n", - " 17985.0\n", - " 300.001180\n", - " 300.251388\n", " False\n", + " 17985.0\n", + " 299.950758\n", + " 300.200882\n", " \n", " \n", " 1\n", - " 0.250228\n", + " 0.250210\n", " 18045.0\n", + " 1.0\n", " 0\n", " im065\n", - " Natural_Images_Lum_Matched_set_training_2017.0...\n", - " 1\n", " False\n", - " 18030.0\n", - " 300.751814\n", - " 301.002042\n", " False\n", + " 18030.0\n", + " 300.701224\n", + " 300.951433\n", " \n", " \n", " 2\n", - " 0.250259\n", + " 0.250219\n", " 18090.0\n", + " 2.0\n", " 0\n", " im065\n", - " Natural_Images_Lum_Matched_set_training_2017.0...\n", - " 2\n", " False\n", - " 18075.0\n", - " 301.502388\n", - " 301.752647\n", " False\n", + " 18075.0\n", + " 301.451832\n", + " 301.702052\n", " \n", " \n", " 3\n", - " 0.250277\n", - " 18136.0\n", + " 0.250164\n", + " 18135.0\n", + " 3.0\n", " 0\n", " im065\n", - " Natural_Images_Lum_Matched_set_training_2017.0...\n", - " 3\n", " False\n", - " 18121.0\n", - " 302.269753\n", - " 302.520030\n", " False\n", + " 18120.0\n", + " 302.202335\n", + " 302.452499\n", " \n", " \n", " 4\n", " 0.250199\n", - " 18181.0\n", + " 18180.0\n", + " 4.0\n", " 0\n", " im065\n", - " Natural_Images_Lum_Matched_set_training_2017.0...\n", - " 4\n", " False\n", - " 18166.0\n", - " 303.020392\n", - " 303.270591\n", " False\n", + " 18165.0\n", + " 302.952841\n", + " 303.203040\n", " \n", " \n", "\n", "" ], "text/plain": [ - " duration end_frame image_index image_name \\\n", - "stimulus_presentations_id \n", - "0 0.250208 18000.0 0 im065 \n", - "1 0.250228 18045.0 0 im065 \n", - "2 0.250259 18090.0 0 im065 \n", - "3 0.250277 18136.0 0 im065 \n", - "4 0.250199 18181.0 0 im065 \n", - "\n", - " image_set \\\n", - "stimulus_presentations_id \n", - "0 Natural_Images_Lum_Matched_set_training_2017.0... \n", - "1 Natural_Images_Lum_Matched_set_training_2017.0... \n", - "2 Natural_Images_Lum_Matched_set_training_2017.0... \n", - "3 Natural_Images_Lum_Matched_set_training_2017.0... \n", - "4 Natural_Images_Lum_Matched_set_training_2017.0... \n", - "\n", - " index omitted start_frame start_time \\\n", - "stimulus_presentations_id \n", - "0 0 False 17985.0 300.001180 \n", - "1 1 False 18030.0 300.751814 \n", - "2 2 False 18075.0 301.502388 \n", - "3 3 False 18121.0 302.269753 \n", - "4 4 False 18166.0 303.020392 \n", - "\n", - " stop_time is_change \n", - "stimulus_presentations_id \n", - "0 300.251388 False \n", - "1 301.002042 False \n", - "2 301.752647 False \n", - "3 302.520030 False \n", - "4 303.270591 False " + " duration end_frame flashes_since_change \\\n", + "stimulus_presentations_id \n", + "0 0.250124 18000.0 0.0 \n", + "1 0.250210 18045.0 1.0 \n", + "2 0.250219 18090.0 2.0 \n", + "3 0.250164 18135.0 3.0 \n", + "4 0.250199 18180.0 4.0 \n", + "\n", + " image_index image_name is_change omitted \\\n", + "stimulus_presentations_id \n", + "0 0 im065 False False \n", + "1 0 im065 False False \n", + "2 0 im065 False False \n", + "3 0 im065 False False \n", + "4 0 im065 False False \n", + "\n", + " start_frame start_time end_time \n", + "stimulus_presentations_id \n", + "0 17985.0 299.950758 300.200882 \n", + "1 18030.0 300.701224 300.951433 \n", + "2 18075.0 301.451832 301.702052 \n", + "3 18120.0 302.202335 302.452499 \n", + "4 18165.0 302.952841 303.203040 " ] }, - "execution_count": 13, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -2021,7 +2211,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -2051,44 +2241,44 @@ " \n", " \n", " \n", - " 1240\n", - " 1570.283190\n", - " 94138\n", + " 871\n", + " 1173.788210\n", + " 70380\n", " \n", " \n", - " 470\n", - " 722.889309\n", - " 43337\n", + " 2205\n", + " 2580.700469\n", + " 154738\n", " \n", " \n", - " 503\n", - " 780.270804\n", - " 46777\n", + " 691\n", + " 952.589523\n", + " 57117\n", " \n", " \n", - " 1252\n", - " 1580.992166\n", - " 94780\n", + " 2525\n", + " 2806.819128\n", + " 168296\n", " \n", " \n", - " 1257\n", - " 1581.726111\n", - " 94824\n", + " 3367\n", + " 4449.856814\n", + " 266812\n", " \n", " \n", "\n", "" ], "text/plain": [ - " timestamps frame\n", - "1240 1570.283190 94138\n", - "470 722.889309 43337\n", - "503 780.270804 46777\n", - "1252 1580.992166 94780\n", - "1257 1581.726111 94824" + " timestamps frame\n", + "871 1173.788210 70380\n", + "2205 2580.700469 154738\n", + "691 952.589523 57117\n", + "2525 2806.819128 168296\n", + "3367 4449.856814 266812" ] }, - "execution_count": 14, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -2291,13 +2481,13 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "unique_stimuli = [stimulus for stimulus in dataset.stimulus_presentations['image_name'].unique()]\n", "colormap = {image_name: sns.color_palette()[image_number] for image_number, image_name in enumerate(np.sort(unique_stimuli))}\n", - "dataset.stimulus_presentations['color'] = dataset.stimulus_presentations['image_name'].map(lambda image_name: colormap[image_name])" + "dataset._stimuli._presentations.value['color'] = dataset.stimulus_presentations['image_name'].map(lambda image_name: colormap[image_name])" ] }, { @@ -2309,7 +2499,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -2385,7 +2575,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 38, "metadata": { "scrolled": false }, @@ -2552,9 +2742,6 @@ " 1;\n", "\n", " this.ratio = (window.devicePixelRatio || 1) / backingStore;\n", - " if (this.ratio !== 1) {\n", - " fig.send_message('set_dpi_ratio', { dpi_ratio: this.ratio });\n", - " }\n", "\n", " var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n", " 'canvas'\n", @@ -2564,7 +2751,1012 @@ " 'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n", " );\n", "\n", - " var resizeObserver = new ResizeObserver(function (entries) {\n", + " // Apply a ponyfill if ResizeObserver is not implemented by browser.\n", + " if (this.ResizeObserver === undefined) {\n", + " if (window.ResizeObserver !== undefined) {\n", + " this.ResizeObserver = window.ResizeObserver;\n", + " } else {\n", + " var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n", + " this.ResizeObserver = obs.ResizeObserver;\n", + " }\n", + " }\n", + "\n", + " this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n", + " var nentries = entries.length;\n", + " for (var i = 0; i < nentries; i++) {\n", + " var entry = entries[i];\n", + " var width, height;\n", + " if (entry.contentBoxSize) {\n", + " if (entry.contentBoxSize instanceof Array) {\n", + " // Chrome 84 implements new version of spec.\n", + " width = entry.contentBoxSize[0].inlineSize;\n", + " height = entry.contentBoxSize[0].blockSize;\n", + " } else {\n", + " // Firefox implements old version of spec.\n", + " width = entry.contentBoxSize.inlineSize;\n", + " height = entry.contentBoxSize.blockSize;\n", + " }\n", + " } else {\n", + " // Chrome <84 implements even older version of spec.\n", + " width = entry.contentRect.width;\n", + " height = entry.contentRect.height;\n", + " }\n", + "\n", + " // Keep the size of the canvas and rubber band canvas in sync with\n", + " // the canvas container.\n", + " if (entry.devicePixelContentBoxSize) {\n", + " // Chrome 84 implements new version of spec.\n", + " canvas.setAttribute(\n", + " 'width',\n", + " entry.devicePixelContentBoxSize[0].inlineSize\n", + " );\n", + " canvas.setAttribute(\n", + " 'height',\n", + " entry.devicePixelContentBoxSize[0].blockSize\n", + " );\n", + " } else {\n", + " canvas.setAttribute('width', width * fig.ratio);\n", + " canvas.setAttribute('height', height * fig.ratio);\n", + " }\n", + " canvas.setAttribute(\n", + " 'style',\n", + " 'width: ' + width + 'px; height: ' + height + 'px;'\n", + " );\n", + "\n", + " rubberband_canvas.setAttribute('width', width);\n", + " rubberband_canvas.setAttribute('height', height);\n", + "\n", + " // And update the size in Python. We ignore the initial 0/0 size\n", + " // that occurs as the element is placed into the DOM, which should\n", + " // otherwise not happen due to the minimum size styling.\n", + " if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n", + " fig.request_resize(width, height);\n", + " }\n", + " }\n", + " });\n", + " this.resizeObserverInstance.observe(canvas_div);\n", + "\n", + " function on_mouse_event_closure(name) {\n", + " return function (event) {\n", + " return fig.mouse_event(event, name);\n", + " };\n", + " }\n", + "\n", + " rubberband_canvas.addEventListener(\n", + " 'mousedown',\n", + " on_mouse_event_closure('button_press')\n", + " );\n", + " rubberband_canvas.addEventListener(\n", + " 'mouseup',\n", + " on_mouse_event_closure('button_release')\n", + " );\n", + " rubberband_canvas.addEventListener(\n", + " 'dblclick',\n", + " on_mouse_event_closure('dblclick')\n", + " );\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband_canvas.addEventListener(\n", + " 'mousemove',\n", + " on_mouse_event_closure('motion_notify')\n", + " );\n", + "\n", + " rubberband_canvas.addEventListener(\n", + " 'mouseenter',\n", + " on_mouse_event_closure('figure_enter')\n", + " );\n", + " rubberband_canvas.addEventListener(\n", + " 'mouseleave',\n", + " on_mouse_event_closure('figure_leave')\n", + " );\n", + "\n", + " canvas_div.addEventListener('wheel', function (event) {\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " on_mouse_event_closure('scroll')(event);\n", + " });\n", + "\n", + " canvas_div.appendChild(canvas);\n", + " canvas_div.appendChild(rubberband_canvas);\n", + "\n", + " this.rubberband_context = rubberband_canvas.getContext('2d');\n", + " this.rubberband_context.strokeStyle = '#000000';\n", + "\n", + " this._resize_canvas = function (width, height, forward) {\n", + " if (forward) {\n", + " canvas_div.style.width = width + 'px';\n", + " canvas_div.style.height = height + 'px';\n", + " }\n", + " };\n", + "\n", + " // Disable right mouse context menu.\n", + " this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\n", + " event.preventDefault();\n", + " return false;\n", + " });\n", + "\n", + " function set_focus() {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "};\n", + "\n", + "mpl.figure.prototype._init_toolbar = function () {\n", + " var fig = this;\n", + "\n", + " var toolbar = document.createElement('div');\n", + " toolbar.classList = 'mpl-toolbar';\n", + " this.root.appendChild(toolbar);\n", + "\n", + " function on_click_closure(name) {\n", + " return function (_event) {\n", + " return fig.toolbar_button_onclick(name);\n", + " };\n", + " }\n", + "\n", + " function on_mouseover_closure(tooltip) {\n", + " return function (event) {\n", + " if (!event.currentTarget.disabled) {\n", + " return fig.toolbar_button_onmouseover(tooltip);\n", + " }\n", + " };\n", + " }\n", + "\n", + " fig.buttons = {};\n", + " var buttonGroup = document.createElement('div');\n", + " buttonGroup.classList = 'mpl-button-group';\n", + " for (var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " /* Instead of a spacer, we start a new button group. */\n", + " if (buttonGroup.hasChildNodes()) {\n", + " toolbar.appendChild(buttonGroup);\n", + " }\n", + " buttonGroup = document.createElement('div');\n", + " buttonGroup.classList = 'mpl-button-group';\n", + " continue;\n", + " }\n", + "\n", + " var button = (fig.buttons[name] = document.createElement('button'));\n", + " button.classList = 'mpl-widget';\n", + " button.setAttribute('role', 'button');\n", + " button.setAttribute('aria-disabled', 'false');\n", + " button.addEventListener('click', on_click_closure(method_name));\n", + " button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n", + "\n", + " var icon_img = document.createElement('img');\n", + " icon_img.src = '_images/' + image + '.png';\n", + " icon_img.srcset = '_images/' + image + '_large.png 2x';\n", + " icon_img.alt = tooltip;\n", + " button.appendChild(icon_img);\n", + "\n", + " buttonGroup.appendChild(button);\n", + " }\n", + "\n", + " if (buttonGroup.hasChildNodes()) {\n", + " toolbar.appendChild(buttonGroup);\n", + " }\n", + "\n", + " var fmt_picker = document.createElement('select');\n", + " fmt_picker.classList = 'mpl-widget';\n", + " toolbar.appendChild(fmt_picker);\n", + " this.format_dropdown = fmt_picker;\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = document.createElement('option');\n", + " option.selected = fmt === mpl.default_extension;\n", + " option.innerHTML = fmt;\n", + " fmt_picker.appendChild(option);\n", + " }\n", + "\n", + " var status_bar = document.createElement('span');\n", + " status_bar.classList = 'mpl-message';\n", + " toolbar.appendChild(status_bar);\n", + " this.message = status_bar;\n", + "};\n", + "\n", + "mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', { width: x_pixels, height: y_pixels });\n", + "};\n", + "\n", + "mpl.figure.prototype.send_message = function (type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "};\n", + "\n", + "mpl.figure.prototype.send_draw_message = function () {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_save = function (fig, _msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_resize = function (fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1], msg['forward']);\n", + " fig.send_message('refresh', {});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n", + " var x0 = msg['x0'] / fig.ratio;\n", + " var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n", + " var x1 = msg['x1'] / fig.ratio;\n", + " var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0,\n", + " 0,\n", + " fig.canvas.width / fig.ratio,\n", + " fig.canvas.height / fig.ratio\n", + " );\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_cursor = function (fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch (cursor) {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_message = function (fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_draw = function (fig, _msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n", + " for (var key in msg) {\n", + " if (!(key in fig.buttons)) {\n", + " continue;\n", + " }\n", + " fig.buttons[key].disabled = !msg[key];\n", + " fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n", + " if (msg['mode'] === 'PAN') {\n", + " fig.buttons['Pan'].classList.add('active');\n", + " fig.buttons['Zoom'].classList.remove('active');\n", + " } else if (msg['mode'] === 'ZOOM') {\n", + " fig.buttons['Pan'].classList.remove('active');\n", + " fig.buttons['Zoom'].classList.add('active');\n", + " } else {\n", + " fig.buttons['Pan'].classList.remove('active');\n", + " fig.buttons['Zoom'].classList.remove('active');\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function () {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message('ack', {});\n", + "};\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function (fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " var img = evt.data;\n", + " if (img.type !== 'image/png') {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " img.type = 'image/png';\n", + " }\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src\n", + " );\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " img\n", + " );\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " } else if (\n", + " typeof evt.data === 'string' &&\n", + " evt.data.slice(0, 21) === 'data:image/png;base64'\n", + " ) {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig['handle_' + msg_type];\n", + " } catch (e) {\n", + " console.log(\n", + " \"No handler for the '\" + msg_type + \"' message type: \",\n", + " msg\n", + " );\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\n", + " \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n", + " e,\n", + " e.stack,\n", + " msg\n", + " );\n", + " }\n", + " }\n", + " };\n", + "};\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function (e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e) {\n", + " e = window.event;\n", + " }\n", + " if (e.target) {\n", + " targ = e.target;\n", + " } else if (e.srcElement) {\n", + " targ = e.srcElement;\n", + " }\n", + " if (targ.nodeType === 3) {\n", + " // defeat Safari bug\n", + " targ = targ.parentNode;\n", + " }\n", + "\n", + " // pageX,Y are the mouse positions relative to the document\n", + " var boundingRect = targ.getBoundingClientRect();\n", + " var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\n", + " var y = e.pageY - (boundingRect.top + document.body.scrollTop);\n", + "\n", + " return { x: x, y: y };\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys(original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object') {\n", + " obj[key] = original[key];\n", + " }\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function (event, name) {\n", + " var canvas_pos = mpl.findpos(event);\n", + "\n", + " if (name === 'button_press') {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x * this.ratio;\n", + " var y = canvas_pos.y * this.ratio;\n", + "\n", + " this.send_message(name, {\n", + " x: x,\n", + " y: y,\n", + " button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event),\n", + " });\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "};\n", + "\n", + "mpl.figure.prototype._key_event_extra = function (_event, _name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "};\n", + "\n", + "mpl.figure.prototype.key_event = function (event, name) {\n", + " // Prevent repeat events\n", + " if (name === 'key_press') {\n", + " if (event.key === this._key) {\n", + " return;\n", + " } else {\n", + " this._key = event.key;\n", + " }\n", + " }\n", + " if (name === 'key_release') {\n", + " this._key = null;\n", + " }\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.key !== 'Control') {\n", + " value += 'ctrl+';\n", + " }\n", + " else if (event.altKey && event.key !== 'Alt') {\n", + " value += 'alt+';\n", + " }\n", + " else if (event.shiftKey && event.key !== 'Shift') {\n", + " value += 'shift+';\n", + " }\n", + "\n", + " value += 'k' + event.key;\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n", + " return false;\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function (name) {\n", + " if (name === 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message('toolbar_button', { name: name });\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "\n", + "///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n", + "// prettier-ignore\n", + "var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";/* global mpl */\n", + "\n", + "var comm_websocket_adapter = function (comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.binaryType = comm.kernel.ws.binaryType;\n", + " ws.readyState = comm.kernel.ws.readyState;\n", + " function updateReadyState(_event) {\n", + " if (comm.kernel.ws) {\n", + " ws.readyState = comm.kernel.ws.readyState;\n", + " } else {\n", + " ws.readyState = 3; // Closed state.\n", + " }\n", + " }\n", + " comm.kernel.ws.addEventListener('open', updateReadyState);\n", + " comm.kernel.ws.addEventListener('close', updateReadyState);\n", + " comm.kernel.ws.addEventListener('error', updateReadyState);\n", + "\n", + " ws.close = function () {\n", + " comm.close();\n", + " };\n", + " ws.send = function (m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function (msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " var data = msg['content']['data'];\n", + " if (data['blob'] !== undefined) {\n", + " data = {\n", + " data: new Blob(msg['buffers'], { type: data['blob'] }),\n", + " };\n", + " }\n", + " // Pass the mpl event to the overridden (by mpl) onmessage function.\n", + " ws.onmessage(data);\n", + " });\n", + " return ws;\n", + "};\n", + "\n", + "mpl.mpl_figure_comm = function (comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = document.getElementById(id);\n", + " var ws_proxy = comm_websocket_adapter(comm);\n", + "\n", + " function ondownload(figure, _format) {\n", + " window.open(figure.canvas.toDataURL());\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element;\n", + " fig.cell_info = mpl.find_output_cell(\"
\");\n", + " if (!fig.cell_info) {\n", + " console.error('Failed to find cell for figure', id, fig);\n", + " return;\n", + " }\n", + " fig.cell_info[0].output_area.element.on(\n", + " 'cleared',\n", + " { fig: fig },\n", + " fig._remove_fig_handler\n", + " );\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function (fig, msg) {\n", + " var width = fig.canvas.width / fig.ratio;\n", + " fig.cell_info[0].output_area.element.off(\n", + " 'cleared',\n", + " fig._remove_fig_handler\n", + " );\n", + " fig.resizeObserverInstance.unobserve(fig.canvas_div);\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable();\n", + " fig.parent_element.innerHTML =\n", + " '';\n", + " fig.close_ws(fig, msg);\n", + "};\n", + "\n", + "mpl.figure.prototype.close_ws = function (fig, msg) {\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "};\n", + "\n", + "mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var width = this.canvas.width / this.ratio;\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] =\n", + " '';\n", + "};\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function () {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message('ack', {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () {\n", + " fig.push_to_output();\n", + " }, 1000);\n", + "};\n", + "\n", + "mpl.figure.prototype._init_toolbar = function () {\n", + " var fig = this;\n", + "\n", + " var toolbar = document.createElement('div');\n", + " toolbar.classList = 'btn-toolbar';\n", + " this.root.appendChild(toolbar);\n", + "\n", + " function on_click_closure(name) {\n", + " return function (_event) {\n", + " return fig.toolbar_button_onclick(name);\n", + " };\n", + " }\n", + "\n", + " function on_mouseover_closure(tooltip) {\n", + " return function (event) {\n", + " if (!event.currentTarget.disabled) {\n", + " return fig.toolbar_button_onmouseover(tooltip);\n", + " }\n", + " };\n", + " }\n", + "\n", + " fig.buttons = {};\n", + " var buttonGroup = document.createElement('div');\n", + " buttonGroup.classList = 'btn-group';\n", + " var button;\n", + " for (var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " /* Instead of a spacer, we start a new button group. */\n", + " if (buttonGroup.hasChildNodes()) {\n", + " toolbar.appendChild(buttonGroup);\n", + " }\n", + " buttonGroup = document.createElement('div');\n", + " buttonGroup.classList = 'btn-group';\n", + " continue;\n", + " }\n", + "\n", + " button = fig.buttons[name] = document.createElement('button');\n", + " button.classList = 'btn btn-default';\n", + " button.href = '#';\n", + " button.title = name;\n", + " button.innerHTML = '';\n", + " button.addEventListener('click', on_click_closure(method_name));\n", + " button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n", + " buttonGroup.appendChild(button);\n", + " }\n", + "\n", + " if (buttonGroup.hasChildNodes()) {\n", + " toolbar.appendChild(buttonGroup);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = document.createElement('span');\n", + " status_bar.classList = 'mpl-message pull-right';\n", + " toolbar.appendChild(status_bar);\n", + " this.message = status_bar;\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = document.createElement('div');\n", + " buttongrp.classList = 'btn-group inline pull-right';\n", + " button = document.createElement('button');\n", + " button.classList = 'btn btn-mini btn-primary';\n", + " button.href = '#';\n", + " button.title = 'Stop Interaction';\n", + " button.innerHTML = '';\n", + " button.addEventListener('click', function (_evt) {\n", + " fig.handle_close(fig, {});\n", + " });\n", + " button.addEventListener(\n", + " 'mouseover',\n", + " on_mouseover_closure('Stop Interaction')\n", + " );\n", + " buttongrp.appendChild(button);\n", + " var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n", + " titlebar.insertBefore(buttongrp, titlebar.firstChild);\n", + "};\n", + "\n", + "mpl.figure.prototype._remove_fig_handler = function (event) {\n", + " var fig = event.data.fig;\n", + " if (event.target !== this) {\n", + " // Ignore bubbled events from children.\n", + " return;\n", + " }\n", + " fig.close_ws(fig, {});\n", + "};\n", + "\n", + "mpl.figure.prototype._root_extra_style = function (el) {\n", + " el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n", + "};\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function (el) {\n", + " // this is important to make the div 'focusable\n", + " el.setAttribute('tabindex', 0);\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " } else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype._key_event_extra = function (event, _name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager) {\n", + " manager = IPython.keyboard_manager;\n", + " }\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which === 13) {\n", + " this.canvas_div.blur();\n", + " // select the cell after this one\n", + " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", + " IPython.notebook.select(index + 1);\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_save = function (fig, _msg) {\n", + " fig.ondownload(fig, null);\n", + "};\n", + "\n", + "mpl.find_output_cell = function (html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i = 0; i < ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code') {\n", + " for (var j = 0; j < cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] === html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "};\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel !== null) {\n", + " IPython.notebook.kernel.comm_manager.register_target(\n", + " 'matplotlib',\n", + " mpl.mpl_figure_comm\n", + " );\n", + "}\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "/* global mpl */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function () {\n", + " if (typeof WebSocket !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof MozWebSocket !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert(\n", + " 'Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.'\n", + " );\n", + " }\n", + "};\n", + "\n", + "mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = this.ws.binaryType !== undefined;\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById('mpl-warnings');\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent =\n", + " 'This browser does not support binary websocket messages. ' +\n", + " 'Performance may be slow.';\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = document.createElement('div');\n", + " this.root.setAttribute('style', 'display: inline-block');\n", + " this._root_extra_style(this.root);\n", + "\n", + " parent_element.appendChild(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message('supports_binary', { value: fig.supports_binary });\n", + " fig.send_message('send_image_mode', {});\n", + " if (fig.ratio !== 1) {\n", + " fig.send_message('set_dpi_ratio', { dpi_ratio: fig.ratio });\n", + " }\n", + " fig.send_message('refresh', {});\n", + " };\n", + "\n", + " this.imageObj.onload = function () {\n", + " if (fig.image_mode === 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function () {\n", + " fig.ws.close();\n", + " };\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "};\n", + "\n", + "mpl.figure.prototype._init_header = function () {\n", + " var titlebar = document.createElement('div');\n", + " titlebar.classList =\n", + " 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n", + " var titletext = document.createElement('div');\n", + " titletext.classList = 'ui-dialog-title';\n", + " titletext.setAttribute(\n", + " 'style',\n", + " 'width: 100%; text-align: center; padding: 3px;'\n", + " );\n", + " titlebar.appendChild(titletext);\n", + " this.root.appendChild(titlebar);\n", + " this.header = titletext;\n", + "};\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n", + "\n", + "mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n", + "\n", + "mpl.figure.prototype._init_canvas = function () {\n", + " var fig = this;\n", + "\n", + " var canvas_div = (this.canvas_div = document.createElement('div'));\n", + " canvas_div.setAttribute(\n", + " 'style',\n", + " 'border: 1px solid #ddd;' +\n", + " 'box-sizing: content-box;' +\n", + " 'clear: both;' +\n", + " 'min-height: 1px;' +\n", + " 'min-width: 1px;' +\n", + " 'outline: 0;' +\n", + " 'overflow: hidden;' +\n", + " 'position: relative;' +\n", + " 'resize: both;'\n", + " );\n", + "\n", + " function on_keyboard_event_closure(name) {\n", + " return function (event) {\n", + " return fig.key_event(event, name);\n", + " };\n", + " }\n", + "\n", + " canvas_div.addEventListener(\n", + " 'keydown',\n", + " on_keyboard_event_closure('key_press')\n", + " );\n", + " canvas_div.addEventListener(\n", + " 'keyup',\n", + " on_keyboard_event_closure('key_release')\n", + " );\n", + "\n", + " this._canvas_extra_style(canvas_div);\n", + " this.root.appendChild(canvas_div);\n", + "\n", + " var canvas = (this.canvas = document.createElement('canvas'));\n", + " canvas.classList.add('mpl-canvas');\n", + " canvas.setAttribute('style', 'box-sizing: content-box;');\n", + "\n", + " this.context = canvas.getContext('2d');\n", + "\n", + " var backingStore =\n", + " this.context.backingStorePixelRatio ||\n", + " this.context.webkitBackingStorePixelRatio ||\n", + " this.context.mozBackingStorePixelRatio ||\n", + " this.context.msBackingStorePixelRatio ||\n", + " this.context.oBackingStorePixelRatio ||\n", + " this.context.backingStorePixelRatio ||\n", + " 1;\n", + "\n", + " this.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n", + " 'canvas'\n", + " ));\n", + " rubberband_canvas.setAttribute(\n", + " 'style',\n", + " 'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n", + " );\n", + "\n", + " // Apply a ponyfill if ResizeObserver is not implemented by browser.\n", + " if (this.ResizeObserver === undefined) {\n", + " if (window.ResizeObserver !== undefined) {\n", + " this.ResizeObserver = window.ResizeObserver;\n", + " } else {\n", + " var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n", + " this.ResizeObserver = obs.ResizeObserver;\n", + " }\n", + " }\n", + "\n", + " this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n", " var nentries = entries.length;\n", " for (var i = 0; i < nentries; i++) {\n", " var entry = entries[i];\n", @@ -2612,12 +3804,12 @@ " // And update the size in Python. We ignore the initial 0/0 size\n", " // that occurs as the element is placed into the DOM, which should\n", " // otherwise not happen due to the minimum size styling.\n", - " if (width != 0 && height != 0) {\n", + " if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n", " fig.request_resize(width, height);\n", " }\n", " }\n", " });\n", - " resizeObserver.observe(canvas_div);\n", + " this.resizeObserverInstance.observe(canvas_div);\n", "\n", " function on_mouse_event_closure(name) {\n", " return function (event) {\n", @@ -2633,6 +3825,10 @@ " 'mouseup',\n", " on_mouse_event_closure('button_release')\n", " );\n", + " rubberband_canvas.addEventListener(\n", + " 'dblclick',\n", + " on_mouse_event_closure('dblclick')\n", + " );\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband_canvas.addEventListener(\n", " 'mousemove',\n", @@ -2890,11 +4086,14 @@ "mpl.figure.prototype._make_on_message_function = function (fig) {\n", " return function socket_on_message(evt) {\n", " if (evt.data instanceof Blob) {\n", - " /* FIXME: We get \"Resource interpreted as Image but\n", - " * transferred with MIME type text/plain:\" errors on\n", - " * Chrome. But how to set the MIME type? It doesn't seem\n", - " * to be part of the websocket stream */\n", - " evt.data.type = 'image/png';\n", + " var img = evt.data;\n", + " if (img.type !== 'image/png') {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " img.type = 'image/png';\n", + " }\n", "\n", " /* Free the memory for the previous frames */\n", " if (fig.imageObj.src) {\n", @@ -2904,7 +4103,7 @@ " }\n", "\n", " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", - " evt.data\n", + " img\n", " );\n", " fig.updated_canvas_event();\n", " fig.waiting = false;\n", @@ -3023,10 +4222,10 @@ "mpl.figure.prototype.key_event = function (event, name) {\n", " // Prevent repeat events\n", " if (name === 'key_press') {\n", - " if (event.which === this._key) {\n", + " if (event.key === this._key) {\n", " return;\n", " } else {\n", - " this._key = event.which;\n", + " this._key = event.key;\n", " }\n", " }\n", " if (name === 'key_release') {\n", @@ -3034,18 +4233,17 @@ " }\n", "\n", " var value = '';\n", - " if (event.ctrlKey && event.which !== 17) {\n", + " if (event.ctrlKey && event.key !== 'Control') {\n", " value += 'ctrl+';\n", " }\n", - " if (event.altKey && event.which !== 18) {\n", + " else if (event.altKey && event.key !== 'Alt') {\n", " value += 'alt+';\n", " }\n", - " if (event.shiftKey && event.which !== 16) {\n", + " else if (event.shiftKey && event.key !== 'Shift') {\n", " value += 'shift+';\n", " }\n", "\n", - " value += 'k';\n", - " value += event.which.toString();\n", + " value += 'k' + event.key;\n", "\n", " this._key_event_extra(event, name);\n", "\n", @@ -3064,9 +4262,13 @@ "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n", " this.message.textContent = tooltip;\n", "};\n", + "\n", + "///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n", + "// prettier-ignore\n", + "var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n", "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", "\n", - "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", "\n", "mpl.default_extension = \"png\";/* global mpl */\n", "\n", @@ -3076,6 +4278,19 @@ " // socket, so there is still some room for performance tuning.\n", " var ws = {};\n", "\n", + " ws.binaryType = comm.kernel.ws.binaryType;\n", + " ws.readyState = comm.kernel.ws.readyState;\n", + " function updateReadyState(_event) {\n", + " if (comm.kernel.ws) {\n", + " ws.readyState = comm.kernel.ws.readyState;\n", + " } else {\n", + " ws.readyState = 3; // Closed state.\n", + " }\n", + " }\n", + " comm.kernel.ws.addEventListener('open', updateReadyState);\n", + " comm.kernel.ws.addEventListener('close', updateReadyState);\n", + " comm.kernel.ws.addEventListener('error', updateReadyState);\n", + "\n", " ws.close = function () {\n", " comm.close();\n", " };\n", @@ -3086,8 +4301,14 @@ " // Register the callback with on_msg.\n", " comm.on_msg(function (msg) {\n", " //console.log('receiving', msg['content']['data'], msg);\n", + " var data = msg['content']['data'];\n", + " if (data['blob'] !== undefined) {\n", + " data = {\n", + " data: new Blob(msg['buffers'], { type: data['blob'] }),\n", + " };\n", + " }\n", " // Pass the mpl event to the overridden (by mpl) onmessage function.\n", - " ws.onmessage(msg['content']['data']);\n", + " ws.onmessage(data);\n", " });\n", " return ws;\n", "};\n", @@ -3118,7 +4339,7 @@ " console.error('Failed to find cell for figure', id, fig);\n", " return;\n", " }\n", - " fig.cell_info[0].output_area.element.one(\n", + " fig.cell_info[0].output_area.element.on(\n", " 'cleared',\n", " { fig: fig },\n", " fig._remove_fig_handler\n", @@ -3131,6 +4352,7 @@ " 'cleared',\n", " fig._remove_fig_handler\n", " );\n", + " fig.resizeObserverInstance.unobserve(fig.canvas_div);\n", "\n", " // Update the output cell to use the data from the current canvas.\n", " fig.push_to_output();\n", @@ -3251,6 +4473,10 @@ "\n", "mpl.figure.prototype._remove_fig_handler = function (event) {\n", " var fig = event.data.fig;\n", + " if (event.target !== this) {\n", + " // Ignore bubbled events from children.\n", + " return;\n", + " }\n", " fig.close_ws(fig, {});\n", "};\n", "\n", @@ -3335,7 +4561,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -3348,6 +4574,8 @@ "source": [ "initial_time = 775 # initial time for plot, in seconds\n", "final_time = 800 # final time for plot, in seconds\n", + "\n", + "plt.clf()\n", "fig, ax = plt.subplots(figsize = (15,5))\n", "plot_running(ax, initial_time, final_time)\n", "plot_licks(ax, initial_time, final_time)\n", @@ -3379,7 +4607,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 39, "metadata": {}, "outputs": [ { @@ -3411,7 +4639,7 @@ " hit\n", " false_alarm\n", " miss\n", - " stimulus_change\n", + " is_change\n", " aborted\n", " go\n", " catch\n", @@ -3452,60 +4680,60 @@ " \n", " \n", " \n", - " 133\n", - " 1145.777254\n", - " 1148.362823\n", - " [1147.8956996658817, 1148.0458577824757]\n", - " NaN\n", - " 0.0\n", - " False\n", - " False\n", + " 534\n", + " 2713.389660\n", + " 2724.430433\n", + " [2720.7613205829402, 2721.061486430117, 2721.1...\n", + " 2720.761321\n", + " 0.007\n", + " True\n", " False\n", " False\n", " True\n", " False\n", + " True\n", " False\n", " False\n", " False\n", - " 2.585569\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " im065\n", - " im065\n", + " 11.040773\n", + " 2720.761321\n", + " 163100.0\n", + " 2720.182019\n", + " 0.579301\n", + " im066\n", + " im085\n", " \n", " \n", - " 62\n", - " 650.712128\n", - " 658.018251\n", - " []\n", + " 154\n", + " 962.496140\n", + " 970.534928\n", + " [967.299401847762]\n", " NaN\n", - " 0.0\n", + " 0.000\n", " False\n", " False\n", - " True\n", - " True\n", " False\n", - " True\n", " False\n", " False\n", " False\n", - " 7.306123\n", - " NaN\n", - " 39191.0\n", - " 653.752495\n", - " inf\n", - " im063\n", - " im061\n", + " True\n", + " False\n", + " True\n", + " 8.038788\n", + " 967.299402\n", + " 57937.0\n", + " 966.286483\n", + " 1.012919\n", + " im077\n", + " im077\n", " \n", " \n", - " 239\n", - " 1768.766277\n", - " 1771.885580\n", - " [1771.5686300797388]\n", + " 341\n", + " 1913.485372\n", + " 1918.088494\n", + " [1917.6214574656915, 1917.7715836032294]\n", " NaN\n", - " 0.0\n", + " 0.000\n", " False\n", " False\n", " False\n", @@ -3515,109 +4743,117 @@ " False\n", " False\n", " False\n", - " 3.119302\n", + " 4.603122\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " im066\n", - " im066\n", + " im077\n", + " im077\n", " \n", " \n", - " 497\n", - " 3736.683052\n", - " 3743.972490\n", - " []\n", + " 225\n", + " 1318.435434\n", + " 1322.588245\n", + " [1321.821011143853, 1322.0878457906656, 1322.2...\n", " NaN\n", - " 0.0\n", + " 0.000\n", + " False\n", " False\n", " False\n", - " True\n", - " True\n", " False\n", " True\n", " False\n", " False\n", " False\n", - " 7.289437\n", + " False\n", + " 4.152811\n", + " NaN\n", + " NaN\n", + " NaN\n", " NaN\n", - " 224193.0\n", - " 3739.723400\n", - " inf\n", - " im061\n", - " im063\n", + " im062\n", + " im062\n", " \n", " \n", - " 463\n", - " 3443.887593\n", - " 3451.193661\n", - " []\n", + " 432\n", + " 2370.058931\n", + " 2373.144351\n", + " [2372.677347698016, 2372.827426743461]\n", " NaN\n", - " 0.0\n", + " 0.000\n", + " False\n", " False\n", " False\n", - " True\n", - " True\n", " False\n", " True\n", " False\n", " False\n", " False\n", - " 7.306068\n", + " False\n", + " 3.085420\n", " NaN\n", - " 206640.0\n", - " 3446.927890\n", - " inf\n", - " im062\n", - " im065\n", + " NaN\n", + " NaN\n", + " NaN\n", + " im085\n", + " im085\n", " \n", " \n", "\n", "" ], "text/plain": [ - " start_time stop_time lick_times \\\n", - "trials_id \n", - "133 1145.777254 1148.362823 [1147.8956996658817, 1148.0458577824757] \n", - "62 650.712128 658.018251 [] \n", - "239 1768.766277 1771.885580 [1771.5686300797388] \n", - "497 3736.683052 3743.972490 [] \n", - "463 3443.887593 3451.193661 [] \n", - "\n", - " reward_time reward_volume hit false_alarm miss \\\n", - "trials_id \n", - "133 NaN 0.0 False False False \n", - "62 NaN 0.0 False False True \n", - "239 NaN 0.0 False False False \n", - "497 NaN 0.0 False False True \n", - "463 NaN 0.0 False False True \n", - "\n", - " stimulus_change aborted go catch auto_rewarded \\\n", - "trials_id \n", - "133 False True False False False \n", - "62 True False True False False \n", - "239 False True False False False \n", - "497 True False True False False \n", - "463 True False True False False \n", - "\n", - " correct_reject trial_length response_time change_frame \\\n", + " start_time stop_time \\\n", + "trials_id \n", + "534 2713.389660 2724.430433 \n", + "154 962.496140 970.534928 \n", + "341 1913.485372 1918.088494 \n", + "225 1318.435434 1322.588245 \n", + "432 2370.058931 2373.144351 \n", + "\n", + " lick_times reward_time \\\n", + "trials_id \n", + "534 [2720.7613205829402, 2721.061486430117, 2721.1... 2720.761321 \n", + "154 [967.299401847762] NaN \n", + "341 [1917.6214574656915, 1917.7715836032294] NaN \n", + "225 [1321.821011143853, 1322.0878457906656, 1322.2... NaN \n", + "432 [2372.677347698016, 2372.827426743461] NaN \n", + "\n", + " reward_volume hit false_alarm miss is_change aborted \\\n", + "trials_id \n", + "534 0.007 True False False True False \n", + "154 0.000 False False False False False \n", + "341 0.000 False False False False True \n", + "225 0.000 False False False False True \n", + "432 0.000 False False False False True \n", + "\n", + " go catch auto_rewarded correct_reject trial_length \\\n", "trials_id \n", - "133 False 2.585569 NaN NaN \n", - "62 False 7.306123 NaN 39191.0 \n", - "239 False 3.119302 NaN NaN \n", - "497 False 7.289437 NaN 224193.0 \n", - "463 False 7.306068 NaN 206640.0 \n", - "\n", - " change_time response_latency initial_image_name change_image_name \n", - "trials_id \n", - "133 NaN NaN im065 im065 \n", - "62 653.752495 inf im063 im061 \n", - "239 NaN NaN im066 im066 \n", - "497 3739.723400 inf im061 im063 \n", - "463 3446.927890 inf im062 im065 " + "534 True False False False 11.040773 \n", + "154 False True False True 8.038788 \n", + "341 False False False False 4.603122 \n", + "225 False False False False 4.152811 \n", + "432 False False False False 3.085420 \n", + "\n", + " response_time change_frame change_time response_latency \\\n", + "trials_id \n", + "534 2720.761321 163100.0 2720.182019 0.579301 \n", + "154 967.299402 57937.0 966.286483 1.012919 \n", + "341 NaN NaN NaN NaN \n", + "225 NaN NaN NaN NaN \n", + "432 NaN NaN NaN NaN \n", + "\n", + " initial_image_name change_image_name \n", + "trials_id \n", + "534 im066 im085 \n", + "154 im077 im077 \n", + "341 im077 im077 \n", + "225 im062 im062 \n", + "432 im085 im085 " ] }, - "execution_count": 20, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -3641,39 +4877,38 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 40, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[{'start_time': 831.2635398912244,\n", - " 'stop_time': 838.5529783256352,\n", - " 'lick_times': array([834.69975263, 834.81651755, 835.1001309 , 835.25021287,\n", - " 835.40033855, 835.53378616, 835.68391515, 835.83403254,\n", - " 836.01752922, 836.16765357, 836.33444306, 836.51795332,\n", - " 836.6513857 ]),\n", - " 'reward_time': 834.6997526283376,\n", + "[{'start_time': 1712.116697982885,\n", + " 'stop_time': 1720.1720967957517,\n", + " 'lick_times': array([1716.53632556, 1716.61971894, 1716.86988826, 1716.98660287,\n", + " 1717.10337204, 1717.23680377, 1717.37018203, 1717.47025015,\n", + " 1717.6036877 , 1717.73710363, 1718.02067646, 1718.17075606]),\n", + " 'reward_time': 1716.5363255622797,\n", " 'reward_volume': 0.007,\n", " 'hit': True,\n", " 'false_alarm': False,\n", " 'miss': False,\n", - " 'stimulus_change': True,\n", + " 'is_change': True,\n", " 'aborted': False,\n", " 'go': True,\n", " 'catch': False,\n", " 'auto_rewarded': False,\n", " 'correct_reject': False,\n", - " 'trial_length': 7.28943843441084,\n", - " 'response_time': 834.6997526283376,\n", - " 'change_frame': 50014.0,\n", - " 'change_time': 834.287206646593,\n", - " 'response_latency': 0.41254598174464263,\n", - " 'initial_image_name': 'im063',\n", - " 'change_image_name': 'im069'}]" + " 'trial_length': 8.05539881286677,\n", + " 'response_time': 1716.5363255622797,\n", + " 'change_frame': 102884.0,\n", + " 'change_time': 1715.9070473431634,\n", + " 'response_latency': 0.6292782191162587,\n", + " 'initial_image_name': 'im061',\n", + " 'change_image_name': 'im077'}]" ] }, - "execution_count": 21, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -3691,38 +4926,38 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'trial_count': 516,\n", - " 'go_trial_count': 285,\n", - " 'catch_trial_count': 41,\n", - " 'hit_trial_count': 112,\n", - " 'miss_trial_count': 173,\n", - " 'false_alarm_trial_count': 4,\n", - " 'correct_reject_trial_count': 37,\n", + "{'trial_count': 731,\n", + " 'go_trial_count': 182,\n", + " 'catch_trial_count': 23,\n", + " 'hit_trial_count': 140,\n", + " 'miss_trial_count': 42,\n", + " 'false_alarm_trial_count': 9,\n", + " 'correct_reject_trial_count': 14,\n", " 'auto_reward_count': 5,\n", - " 'earned_reward_count': 112,\n", - " 'total_reward_count': 117,\n", - " 'total_reward_volume': 0.8090000000000003,\n", - " 'maximum_reward_rate': 4.538096320942588,\n", - " 'engaged_trial_count': 286,\n", - " 'mean_hit_rate': 0.5083809219533421,\n", - " 'mean_hit_rate_uncorrected': 0.5117040303378002,\n", - " 'mean_hit_rate_engaged': 0.8257788159919642,\n", - " 'mean_false_alarm_rate': 0.149303880370626,\n", - " 'mean_false_alarm_rate_uncorrected': 0.14679636896218598,\n", - " 'mean_false_alarm_rate_engaged': 0.26905802530802525,\n", - " 'mean_dprime': 1.1510474492903153,\n", - " 'mean_dprime_engaged': 1.6017817039091797,\n", - " 'max_dprime': 2.1577849816633154,\n", - " 'max_dprime_engaged': 2.1577849816633154}" + " 'earned_reward_count': 140,\n", + " 'total_reward_count': 145,\n", + " 'total_reward_volume': 1.005,\n", + " 'maximum_reward_rate': 4.075808888375142,\n", + " 'engaged_trial_count': 592,\n", + " 'mean_hit_rate': 0.8502914507732704,\n", + " 'mean_hit_rate_uncorrected': 0.8566154925851169,\n", + " 'mean_hit_rate_engaged': 0.8501338035208221,\n", + " 'mean_false_alarm_rate': 0.4443704962837621,\n", + " 'mean_false_alarm_rate_uncorrected': 0.4367174350592722,\n", + " 'mean_false_alarm_rate_engaged': 0.44609689480379144,\n", + " 'mean_dprime': 1.1971098252194952,\n", + " 'mean_dprime_engaged': 1.193310233405481,\n", + " 'max_dprime': 1.7904646832340632,\n", + " 'max_dprime_engaged': 1.5810766796714655}" ] }, - "execution_count": 22, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -3741,7 +4976,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 42, "metadata": {}, "outputs": [], "source": [ @@ -3752,7 +4987,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 43, "metadata": {}, "outputs": [ { @@ -3803,20 +5038,20 @@ " \n", " \n", " \n", - " 837658854\n", - " 118\n", + " 831129394\n", + " 122\n", " 0\n", " 0\n", " 0\n", " 0\n", " 0\n", " 0\n", - " 118\n", + " 122\n", " 0\n", - " 118\n", - " 0.590\n", - " 4.852157\n", - " 101\n", + " 122\n", + " 0.610\n", + " 7.940230\n", + " 112\n", " NaN\n", " NaN\n", " NaN\n", @@ -3829,108 +5064,108 @@ " NaN\n", " \n", " \n", - " 838515247\n", - " 1405\n", - " 133\n", - " 13\n", - " 106\n", - " 27\n", - " 6\n", + " 832021447\n", + " 1609\n", + " 101\n", + " 17\n", + " 67\n", + " 34\n", + " 10\n", " 7\n", - " 5\n", - " 106\n", - " 111\n", - " 1.085\n", - " 5.294545\n", - " 346\n", - " 0.808946\n", - " 0.819726\n", - " 0.822212\n", - " 0.574381\n", - " 0.624039\n", - " 0.421906\n", - " 0.662053\n", - " 1.145407\n", - " 1.832280\n", - " 1.832280\n", + " 6\n", + " 67\n", + " 73\n", + " 0.700\n", + " 3.003025\n", + " 172\n", + " 0.438318\n", + " 0.427423\n", + " 0.433100\n", + " 0.421818\n", + " 0.397976\n", + " 0.435379\n", + " 0.121475\n", + " -0.006137\n", + " 0.792775\n", + " 0.131320\n", " \n", " \n", - " 839219841\n", - " 451\n", - " 335\n", - " 61\n", - " 48\n", - " 287\n", + " 832544149\n", + " 1581\n", + " 76\n", + " 13\n", + " 75\n", " 1\n", - " 60\n", - " 29\n", - " 48\n", - " 77\n", - " 0.625\n", - " 5.015095\n", - " 49\n", - " 0.231115\n", - " 0.233778\n", - " 0.809956\n", - " 0.059502\n", - " 0.025165\n", - " 0.176463\n", - " 0.452645\n", - " 1.875796\n", - " 2.288211\n", - " 2.288211\n", - " \n", - " \n", - " 839565422\n", - " 683\n", - " 269\n", - " 41\n", - " 107\n", - " 162\n", + " 9\n", " 4\n", - " 37\n", - " 15\n", - " 107\n", - " 122\n", - " 1.145\n", - " 5.393113\n", - " 403\n", - " 0.523621\n", - " 0.529213\n", - " 0.877314\n", - " 0.192331\n", - " 0.169870\n", - " 0.377171\n", - " 1.208391\n", - " 1.599180\n", - " 2.201408\n", - " 2.201408\n", + " 5\n", + " 75\n", + " 80\n", + " 0.775\n", + " 4.100249\n", + " 388\n", + " 0.957304\n", + " 0.974269\n", + " 0.974991\n", + " 0.787584\n", + " 0.881553\n", + " 0.805444\n", + " 1.093624\n", + " 1.089942\n", + " 1.857055\n", + " 1.857055\n", " \n", " \n", - " 839912316\n", - " 966\n", - " 174\n", - " 20\n", - " 103\n", - " 71\n", - " 6\n", + " 833328750\n", + " 1158\n", + " 189\n", + " 21\n", + " 140\n", + " 49\n", + " 7\n", " 14\n", - " 10\n", - " 103\n", - " 113\n", - " 1.080\n", - " 3.833645\n", - " 583\n", - " 0.778670\n", - " 0.785813\n", - " 0.919466\n", - " 0.439618\n", - " 0.511879\n", - " 0.586558\n", - " 1.164035\n", - " 1.240594\n", - " 1.679661\n", - " 1.644854\n", + " 7\n", + " 140\n", + " 147\n", + " 1.435\n", + " 4.914088\n", + " 664\n", + " 0.870796\n", + " 0.881694\n", + " 0.935623\n", + " 0.502420\n", + " 0.482349\n", + " 0.633119\n", + " 1.485135\n", + " 1.364075\n", + " 2.217040\n", + " 2.104946\n", + " \n", + " \n", + " 834087859\n", + " 565\n", + " 294\n", + " 53\n", + " 124\n", + " 170\n", + " 7\n", + " 46\n", + " 17\n", + " 124\n", + " 141\n", + " 1.325\n", + " 5.402127\n", + " 322\n", + " 0.531782\n", + " 0.539226\n", + " 0.832751\n", + " 0.197336\n", + " 0.165555\n", + " 0.301101\n", + " 1.129222\n", + " 1.766182\n", + " 2.850748\n", + " 2.850748\n", " \n", " \n", "\n", @@ -3938,70 +5173,63 @@ ], "text/plain": [ " trial_count go_trial_count catch_trial_count hit_trial_count \\\n", - "837658854 118 0 0 0 \n", - "838515247 1405 133 13 106 \n", - "839219841 451 335 61 48 \n", - "839565422 683 269 41 107 \n", - "839912316 966 174 20 103 \n", + "831129394 122 0 0 0 \n", + "832021447 1609 101 17 67 \n", + "832544149 1581 76 13 75 \n", + "833328750 1158 189 21 140 \n", + "834087859 565 294 53 124 \n", "\n", " miss_trial_count false_alarm_trial_count \\\n", - "837658854 0 0 \n", - "838515247 27 6 \n", - "839219841 287 1 \n", - "839565422 162 4 \n", - "839912316 71 6 \n", - "\n", - " correct_reject_trial_count auto_reward_count \\\n", - "837658854 0 118 \n", - "838515247 7 5 \n", - "839219841 60 29 \n", - "839565422 37 15 \n", - "839912316 14 10 \n", - "\n", - " earned_reward_count total_reward_count total_reward_volume \\\n", - "837658854 0 118 0.590 \n", - "838515247 106 111 1.085 \n", - "839219841 48 77 0.625 \n", - "839565422 107 122 1.145 \n", - "839912316 103 113 1.080 \n", - "\n", - " maximum_reward_rate engaged_trial_count mean_hit_rate \\\n", - "837658854 4.852157 101 NaN \n", - "838515247 5.294545 346 0.808946 \n", - "839219841 5.015095 49 0.231115 \n", - "839565422 5.393113 403 0.523621 \n", - "839912316 3.833645 583 0.778670 \n", - "\n", - " mean_hit_rate_uncorrected mean_hit_rate_engaged \\\n", - "837658854 NaN NaN \n", - "838515247 0.819726 0.822212 \n", - "839219841 0.233778 0.809956 \n", - "839565422 0.529213 0.877314 \n", - "839912316 0.785813 0.919466 \n", - "\n", - " mean_false_alarm_rate mean_false_alarm_rate_uncorrected \\\n", - "837658854 NaN NaN \n", - "838515247 0.574381 0.624039 \n", - "839219841 0.059502 0.025165 \n", - "839565422 0.192331 0.169870 \n", - "839912316 0.439618 0.511879 \n", - "\n", - " mean_false_alarm_rate_engaged mean_dprime mean_dprime_engaged \\\n", - "837658854 NaN NaN NaN \n", - "838515247 0.421906 0.662053 1.145407 \n", - "839219841 0.176463 0.452645 1.875796 \n", - "839565422 0.377171 1.208391 1.599180 \n", - "839912316 0.586558 1.164035 1.240594 \n", - "\n", - " max_dprime max_dprime_engaged \n", - "837658854 NaN NaN \n", - "838515247 1.832280 1.832280 \n", - "839219841 2.288211 2.288211 \n", - "839565422 2.201408 2.201408 \n", - "839912316 1.679661 1.644854 " + "831129394 0 0 \n", + "832021447 34 10 \n", + "832544149 1 9 \n", + "833328750 49 7 \n", + "834087859 170 7 \n", + "\n", + " correct_reject_trial_count auto_reward_count earned_reward_count \\\n", + "831129394 0 122 0 \n", + "832021447 7 6 67 \n", + "832544149 4 5 75 \n", + "833328750 14 7 140 \n", + "834087859 46 17 124 \n", + "\n", + " total_reward_count total_reward_volume maximum_reward_rate \\\n", + "831129394 122 0.610 7.940230 \n", + "832021447 73 0.700 3.003025 \n", + "832544149 80 0.775 4.100249 \n", + "833328750 147 1.435 4.914088 \n", + "834087859 141 1.325 5.402127 \n", + "\n", + " engaged_trial_count mean_hit_rate mean_hit_rate_uncorrected \\\n", + "831129394 112 NaN NaN \n", + "832021447 172 0.438318 0.427423 \n", + "832544149 388 0.957304 0.974269 \n", + "833328750 664 0.870796 0.881694 \n", + "834087859 322 0.531782 0.539226 \n", + "\n", + " mean_hit_rate_engaged mean_false_alarm_rate \\\n", + "831129394 NaN NaN \n", + "832021447 0.433100 0.421818 \n", + "832544149 0.974991 0.787584 \n", + "833328750 0.935623 0.502420 \n", + "834087859 0.832751 0.197336 \n", + "\n", + " mean_false_alarm_rate_uncorrected mean_false_alarm_rate_engaged \\\n", + "831129394 NaN NaN \n", + "832021447 0.397976 0.435379 \n", + "832544149 0.881553 0.805444 \n", + "833328750 0.482349 0.633119 \n", + "834087859 0.165555 0.301101 \n", + "\n", + " mean_dprime mean_dprime_engaged max_dprime max_dprime_engaged \n", + "831129394 NaN NaN NaN NaN \n", + "832021447 0.121475 -0.006137 0.792775 0.131320 \n", + "832544149 1.093624 1.089942 1.857055 1.857055 \n", + "833328750 1.485135 1.364075 2.217040 2.104946 \n", + "834087859 1.129222 1.766182 2.850748 2.850748 " ] }, - "execution_count": 24, + "execution_count": 43, "metadata": {}, "output_type": "execute_result" } @@ -4019,7 +5247,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 44, "metadata": {}, "outputs": [ { @@ -4050,7 +5278,6 @@ " driver_line\n", " sex\n", " age_in_days\n", - " session_type\n", " cre_line\n", " indicator\n", " session_number\n", @@ -4062,6 +5289,7 @@ " ophys_container_id\n", " project_code\n", " date_of_acquisition\n", + " session_type\n", " file_id\n", " trial_count\n", " go_trial_count\n", @@ -4136,40 +5364,40 @@ " \n", " \n", " \n", - " 837658854\n", - " BEH.B-Box3\n", + " 831129394\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 72.0\n", - " TRAINING_0_gratings_autorewards_15min\n", + " 81.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-15 14:49:24.015\n", + " 2019-03-01 13:25:23.766\n", + " TRAINING_0_gratings_autorewards_15min\n", " 1.085362e+09\n", - " 118\n", + " 122\n", " 0\n", " 0\n", " 0\n", " 0\n", " 0\n", " 0\n", - " 118\n", + " 122\n", " 0\n", - " 118\n", - " 0.590\n", - " 4.852157\n", - " 101\n", + " 122\n", + " 0.610\n", + " 7.940230\n", + " 112\n", " NaN\n", " NaN\n", " NaN\n", @@ -4182,188 +5410,188 @@ " NaN\n", " \n", " \n", - " 838515247\n", - " BEH.B-Box1\n", + " 832021447\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 75.0\n", - " TRAINING_1_gratings\n", + " 84.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-18 13:44:01.474\n", + " 2019-03-04 14:21:34.570\n", + " TRAINING_1_gratings\n", " 1.085362e+09\n", - " 1405\n", - " 133\n", - " 13\n", - " 106\n", - " 27\n", - " 6\n", + " 1609\n", + " 101\n", + " 17\n", + " 67\n", + " 34\n", + " 10\n", " 7\n", - " 5\n", - " 106\n", - " 111\n", - " 1.085\n", - " 5.294545\n", - " 346\n", - " 0.808946\n", - " 0.819726\n", - " 0.822212\n", - " 0.574381\n", - " 0.624039\n", - " 0.421906\n", - " 0.662053\n", - " 1.145407\n", - " 1.832280\n", - " 1.832280\n", + " 6\n", + " 67\n", + " 73\n", + " 0.700\n", + " 3.003025\n", + " 172\n", + " 0.438318\n", + " 0.427423\n", + " 0.433100\n", + " 0.421818\n", + " 0.397976\n", + " 0.435379\n", + " 0.121475\n", + " -0.006137\n", + " 0.792775\n", + " 0.131320\n", " \n", " \n", - " 839219841\n", - " BEH.B-Box1\n", + " 832544149\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 76.0\n", - " TRAINING_1_gratings\n", + " 85.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 1\n", + " 1.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-19 12:50:12.068\n", + " 2019-03-05 13:52:38.642\n", + " TRAINING_1_gratings\n", " 1.085362e+09\n", - " 451\n", - " 335\n", - " 61\n", - " 48\n", - " 287\n", + " 1581\n", + " 76\n", + " 13\n", + " 75\n", " 1\n", - " 60\n", - " 29\n", - " 48\n", - " 77\n", - " 0.625\n", - " 5.015095\n", - " 49\n", - " 0.231115\n", - " 0.233778\n", - " 0.809956\n", - " 0.059502\n", - " 0.025165\n", - " 0.176463\n", - " 0.452645\n", - " 1.875796\n", - " 2.288211\n", - " 2.288211\n", + " 9\n", + " 4\n", + " 5\n", + " 75\n", + " 80\n", + " 0.775\n", + " 4.100249\n", + " 388\n", + " 0.957304\n", + " 0.974269\n", + " 0.974991\n", + " 0.787584\n", + " 0.881553\n", + " 0.805444\n", + " 1.093624\n", + " 1.089942\n", + " 1.857055\n", + " 1.857055\n", " \n", " \n", - " 839565422\n", - " BEH.B-Box1\n", + " 833328750\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 77.0\n", - " TRAINING_1_gratings\n", + " 86.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 2\n", + " 2.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-20 13:16:44.461\n", + " 2019-03-06 14:27:39.035\n", + " TRAINING_1_gratings\n", " 1.085362e+09\n", - " 683\n", - " 269\n", - " 41\n", - " 107\n", - " 162\n", - " 4\n", - " 37\n", - " 15\n", - " 107\n", - " 122\n", - " 1.145\n", - " 5.393113\n", - " 403\n", - " 0.523621\n", - " 0.529213\n", - " 0.877314\n", - " 0.192331\n", - " 0.169870\n", - " 0.377171\n", - " 1.208391\n", - " 1.599180\n", - " 2.201408\n", - " 2.201408\n", + " 1158\n", + " 189\n", + " 21\n", + " 140\n", + " 49\n", + " 7\n", + " 14\n", + " 7\n", + " 140\n", + " 147\n", + " 1.435\n", + " 4.914088\n", + " 664\n", + " 0.870796\n", + " 0.881694\n", + " 0.935623\n", + " 0.502420\n", + " 0.482349\n", + " 0.633119\n", + " 1.485135\n", + " 1.364075\n", + " 2.217040\n", + " 2.104946\n", " \n", " \n", - " 839912316\n", - " BEH.B-Box1\n", + " 834087859\n", + " BEH.F\n", " Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G...\n", - " 445002\n", + " 440298\n", " Ai93(TITL-GCaMP6f)\n", " [Slc17a7-IRES2-Cre, Camk2a-tTA]\n", " M\n", - " 78.0\n", - " TRAINING_2_gratings_flashed\n", + " 87.0\n", " Slc17a7-IRES2-Cre\n", " GCaMP6f\n", " NaN\n", - " 0\n", + " 3.0\n", " NaN\n", - " 0\n", + " 0.0\n", " NaN\n", " NaN\n", " NaN\n", " NaN\n", - " 2019-03-21 12:54:25.388\n", - " 1.081589e+09\n", - " 966\n", - " 174\n", - " 20\n", - " 103\n", - " 71\n", - " 6\n", - " 14\n", - " 10\n", - " 103\n", - " 113\n", - " 1.080\n", - " 3.833645\n", - " 583\n", - " 0.778670\n", - " 0.785813\n", - " 0.919466\n", - " 0.439618\n", - " 0.511879\n", - " 0.586558\n", - " 1.164035\n", - " 1.240594\n", - " 1.679661\n", - " 1.644854\n", + " 2019-03-07 14:01:17.016\n", + " TRAINING_1_gratings\n", + " 1.085362e+09\n", + " 565\n", + " 294\n", + " 53\n", + " 124\n", + " 170\n", + " 7\n", + " 46\n", + " 17\n", + " 124\n", + " 141\n", + " 1.325\n", + " 5.402127\n", + " 322\n", + " 0.531782\n", + " 0.539226\n", + " 0.832751\n", + " 0.197336\n", + " 0.165555\n", + " 0.301101\n", + " 1.129222\n", + " 1.766182\n", + " 2.850748\n", + " 2.850748\n", " \n", " \n", "\n", @@ -4372,174 +5600,174 @@ "text/plain": [ " equipment_name \\\n", "behavior_session_id \n", - "837658854 BEH.B-Box3 \n", - "838515247 BEH.B-Box1 \n", - "839219841 BEH.B-Box1 \n", - "839565422 BEH.B-Box1 \n", - "839912316 BEH.B-Box1 \n", + "831129394 BEH.F \n", + "832021447 BEH.F \n", + "832544149 BEH.F \n", + "833328750 BEH.F \n", + "834087859 BEH.F \n", "\n", " full_genotype \\\n", "behavior_session_id \n", - "837658854 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "838515247 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "839219841 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "839565422 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "839912316 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", - "\n", - " mouse_id reporter_line \\\n", - "behavior_session_id \n", - "837658854 445002 Ai93(TITL-GCaMP6f) \n", - "838515247 445002 Ai93(TITL-GCaMP6f) \n", - "839219841 445002 Ai93(TITL-GCaMP6f) \n", - "839565422 445002 Ai93(TITL-GCaMP6f) \n", - "839912316 445002 Ai93(TITL-GCaMP6f) \n", + "831129394 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "832021447 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "832544149 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "833328750 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "834087859 Slc17a7-IRES2-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-G... \n", + "\n", + " mouse_id reporter_line \\\n", + "behavior_session_id \n", + "831129394 440298 Ai93(TITL-GCaMP6f) \n", + "832021447 440298 Ai93(TITL-GCaMP6f) \n", + "832544149 440298 Ai93(TITL-GCaMP6f) \n", + "833328750 440298 Ai93(TITL-GCaMP6f) \n", + "834087859 440298 Ai93(TITL-GCaMP6f) \n", "\n", " driver_line sex age_in_days \\\n", "behavior_session_id \n", - "837658854 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 72.0 \n", - "838515247 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 75.0 \n", - "839219841 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 76.0 \n", - "839565422 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 77.0 \n", - "839912316 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 78.0 \n", - "\n", - " session_type cre_line \\\n", - "behavior_session_id \n", - "837658854 TRAINING_0_gratings_autorewards_15min Slc17a7-IRES2-Cre \n", - "838515247 TRAINING_1_gratings Slc17a7-IRES2-Cre \n", - "839219841 TRAINING_1_gratings Slc17a7-IRES2-Cre \n", - "839565422 TRAINING_1_gratings Slc17a7-IRES2-Cre \n", - "839912316 TRAINING_2_gratings_flashed Slc17a7-IRES2-Cre \n", - "\n", - " indicator session_number \\\n", - "behavior_session_id \n", - "837658854 GCaMP6f NaN \n", - "838515247 GCaMP6f NaN \n", - "839219841 GCaMP6f NaN \n", - "839565422 GCaMP6f NaN \n", - "839912316 GCaMP6f NaN \n", + "831129394 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 81.0 \n", + "832021447 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 84.0 \n", + "832544149 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 85.0 \n", + "833328750 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 86.0 \n", + "834087859 [Slc17a7-IRES2-Cre, Camk2a-tTA] M 87.0 \n", + "\n", + " cre_line indicator session_number \\\n", + "behavior_session_id \n", + "831129394 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "832021447 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "832544149 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "833328750 Slc17a7-IRES2-Cre GCaMP6f NaN \n", + "834087859 Slc17a7-IRES2-Cre GCaMP6f NaN \n", "\n", " prior_exposures_to_session_type \\\n", "behavior_session_id \n", - "837658854 0 \n", - "838515247 0 \n", - "839219841 1 \n", - "839565422 2 \n", - "839912316 0 \n", + "831129394 0.0 \n", + "832021447 0.0 \n", + "832544149 1.0 \n", + "833328750 2.0 \n", + "834087859 3.0 \n", "\n", " prior_exposures_to_image_set \\\n", "behavior_session_id \n", - "837658854 NaN \n", - "838515247 NaN \n", - "839219841 NaN \n", - "839565422 NaN \n", - "839912316 NaN \n", + "831129394 NaN \n", + "832021447 NaN \n", + "832544149 NaN \n", + "833328750 NaN \n", + "834087859 NaN \n", "\n", " prior_exposures_to_omissions ophys_session_id \\\n", "behavior_session_id \n", - "837658854 0 NaN \n", - "838515247 0 NaN \n", - "839219841 0 NaN \n", - "839565422 0 NaN \n", - "839912316 0 NaN \n", + "831129394 0.0 NaN \n", + "832021447 0.0 NaN \n", + "832544149 0.0 NaN \n", + "833328750 0.0 NaN \n", + "834087859 0.0 NaN \n", "\n", " ophys_experiment_id ophys_container_id project_code \\\n", "behavior_session_id \n", - "837658854 NaN NaN NaN \n", - "838515247 NaN NaN NaN \n", - "839219841 NaN NaN NaN \n", - "839565422 NaN NaN NaN \n", - "839912316 NaN NaN NaN \n", - "\n", - " date_of_acquisition file_id trial_count \\\n", - "behavior_session_id \n", - "837658854 2019-03-15 14:49:24.015 1.085362e+09 118 \n", - "838515247 2019-03-18 13:44:01.474 1.085362e+09 1405 \n", - "839219841 2019-03-19 12:50:12.068 1.085362e+09 451 \n", - "839565422 2019-03-20 13:16:44.461 1.085362e+09 683 \n", - "839912316 2019-03-21 12:54:25.388 1.081589e+09 966 \n", - "\n", - " go_trial_count catch_trial_count hit_trial_count \\\n", - "behavior_session_id \n", - "837658854 0 0 0 \n", - "838515247 133 13 106 \n", - "839219841 335 61 48 \n", - "839565422 269 41 107 \n", - "839912316 174 20 103 \n", - "\n", - " miss_trial_count false_alarm_trial_count \\\n", - "behavior_session_id \n", - "837658854 0 0 \n", - "838515247 27 6 \n", - "839219841 287 1 \n", - "839565422 162 4 \n", - "839912316 71 6 \n", - "\n", - " correct_reject_trial_count auto_reward_count \\\n", - "behavior_session_id \n", - "837658854 0 118 \n", - "838515247 7 5 \n", - "839219841 60 29 \n", - "839565422 37 15 \n", - "839912316 14 10 \n", - "\n", - " earned_reward_count total_reward_count \\\n", - "behavior_session_id \n", - "837658854 0 118 \n", - "838515247 106 111 \n", - "839219841 48 77 \n", - "839565422 107 122 \n", - "839912316 103 113 \n", - "\n", - " total_reward_volume maximum_reward_rate \\\n", - "behavior_session_id \n", - "837658854 0.590 4.852157 \n", - "838515247 1.085 5.294545 \n", - "839219841 0.625 5.015095 \n", - "839565422 1.145 5.393113 \n", - "839912316 1.080 3.833645 \n", - "\n", - " engaged_trial_count mean_hit_rate \\\n", - "behavior_session_id \n", - "837658854 101 NaN \n", - "838515247 346 0.808946 \n", - "839219841 49 0.231115 \n", - "839565422 403 0.523621 \n", - "839912316 583 0.778670 \n", + "831129394 NaN NaN NaN \n", + "832021447 NaN NaN NaN \n", + "832544149 NaN NaN NaN \n", + "833328750 NaN NaN NaN \n", + "834087859 NaN NaN NaN \n", + "\n", + " date_of_acquisition \\\n", + "behavior_session_id \n", + "831129394 2019-03-01 13:25:23.766 \n", + "832021447 2019-03-04 14:21:34.570 \n", + "832544149 2019-03-05 13:52:38.642 \n", + "833328750 2019-03-06 14:27:39.035 \n", + "834087859 2019-03-07 14:01:17.016 \n", + "\n", + " session_type file_id \\\n", + "behavior_session_id \n", + "831129394 TRAINING_0_gratings_autorewards_15min 1.085362e+09 \n", + "832021447 TRAINING_1_gratings 1.085362e+09 \n", + "832544149 TRAINING_1_gratings 1.085362e+09 \n", + "833328750 TRAINING_1_gratings 1.085362e+09 \n", + "834087859 TRAINING_1_gratings 1.085362e+09 \n", + "\n", + " trial_count go_trial_count catch_trial_count \\\n", + "behavior_session_id \n", + "831129394 122 0 0 \n", + "832021447 1609 101 17 \n", + "832544149 1581 76 13 \n", + "833328750 1158 189 21 \n", + "834087859 565 294 53 \n", + "\n", + " hit_trial_count miss_trial_count \\\n", + "behavior_session_id \n", + "831129394 0 0 \n", + "832021447 67 34 \n", + "832544149 75 1 \n", + "833328750 140 49 \n", + "834087859 124 170 \n", + "\n", + " false_alarm_trial_count correct_reject_trial_count \\\n", + "behavior_session_id \n", + "831129394 0 0 \n", + "832021447 10 7 \n", + "832544149 9 4 \n", + "833328750 7 14 \n", + "834087859 7 46 \n", + "\n", + " auto_reward_count earned_reward_count \\\n", + "behavior_session_id \n", + "831129394 122 0 \n", + "832021447 6 67 \n", + "832544149 5 75 \n", + "833328750 7 140 \n", + "834087859 17 124 \n", + "\n", + " total_reward_count total_reward_volume \\\n", + "behavior_session_id \n", + "831129394 122 0.610 \n", + "832021447 73 0.700 \n", + "832544149 80 0.775 \n", + "833328750 147 1.435 \n", + "834087859 141 1.325 \n", + "\n", + " maximum_reward_rate engaged_trial_count mean_hit_rate \\\n", + "behavior_session_id \n", + "831129394 7.940230 112 NaN \n", + "832021447 3.003025 172 0.438318 \n", + "832544149 4.100249 388 0.957304 \n", + "833328750 4.914088 664 0.870796 \n", + "834087859 5.402127 322 0.531782 \n", "\n", " mean_hit_rate_uncorrected mean_hit_rate_engaged \\\n", "behavior_session_id \n", - "837658854 NaN NaN \n", - "838515247 0.819726 0.822212 \n", - "839219841 0.233778 0.809956 \n", - "839565422 0.529213 0.877314 \n", - "839912316 0.785813 0.919466 \n", + "831129394 NaN NaN \n", + "832021447 0.427423 0.433100 \n", + "832544149 0.974269 0.974991 \n", + "833328750 0.881694 0.935623 \n", + "834087859 0.539226 0.832751 \n", "\n", " mean_false_alarm_rate mean_false_alarm_rate_uncorrected \\\n", "behavior_session_id \n", - "837658854 NaN NaN \n", - "838515247 0.574381 0.624039 \n", - "839219841 0.059502 0.025165 \n", - "839565422 0.192331 0.169870 \n", - "839912316 0.439618 0.511879 \n", + "831129394 NaN NaN \n", + "832021447 0.421818 0.397976 \n", + "832544149 0.787584 0.881553 \n", + "833328750 0.502420 0.482349 \n", + "834087859 0.197336 0.165555 \n", "\n", " mean_false_alarm_rate_engaged mean_dprime \\\n", "behavior_session_id \n", - "837658854 NaN NaN \n", - "838515247 0.421906 0.662053 \n", - "839219841 0.176463 0.452645 \n", - "839565422 0.377171 1.208391 \n", - "839912316 0.586558 1.164035 \n", + "831129394 NaN NaN \n", + "832021447 0.435379 0.121475 \n", + "832544149 0.805444 1.093624 \n", + "833328750 0.633119 1.485135 \n", + "834087859 0.301101 1.129222 \n", "\n", " mean_dprime_engaged max_dprime max_dprime_engaged \n", "behavior_session_id \n", - "837658854 NaN NaN NaN \n", - "838515247 1.145407 1.832280 1.832280 \n", - "839219841 1.875796 2.288211 2.288211 \n", - "839565422 1.599180 2.201408 2.201408 \n", - "839912316 1.240594 1.679661 1.644854 " + "831129394 NaN NaN NaN \n", + "832021447 -0.006137 0.792775 0.131320 \n", + "832544149 1.089942 1.857055 1.857055 \n", + "833328750 1.364075 2.217040 2.104946 \n", + "834087859 1.766182 2.850748 2.850748 " ] }, - "execution_count": 25, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -4563,7 +5791,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 45, "metadata": {}, "outputs": [ { @@ -4728,9 +5956,6 @@ " 1;\n", "\n", " this.ratio = (window.devicePixelRatio || 1) / backingStore;\n", - " if (this.ratio !== 1) {\n", - " fig.send_message('set_dpi_ratio', { dpi_ratio: this.ratio });\n", - " }\n", "\n", " var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n", " 'canvas'\n", @@ -4740,7 +5965,17 @@ " 'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n", " );\n", "\n", - " var resizeObserver = new ResizeObserver(function (entries) {\n", + " // Apply a ponyfill if ResizeObserver is not implemented by browser.\n", + " if (this.ResizeObserver === undefined) {\n", + " if (window.ResizeObserver !== undefined) {\n", + " this.ResizeObserver = window.ResizeObserver;\n", + " } else {\n", + " var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n", + " this.ResizeObserver = obs.ResizeObserver;\n", + " }\n", + " }\n", + "\n", + " this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n", " var nentries = entries.length;\n", " for (var i = 0; i < nentries; i++) {\n", " var entry = entries[i];\n", @@ -4788,12 +6023,12 @@ " // And update the size in Python. We ignore the initial 0/0 size\n", " // that occurs as the element is placed into the DOM, which should\n", " // otherwise not happen due to the minimum size styling.\n", - " if (width != 0 && height != 0) {\n", + " if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n", " fig.request_resize(width, height);\n", " }\n", " }\n", " });\n", - " resizeObserver.observe(canvas_div);\n", + " this.resizeObserverInstance.observe(canvas_div);\n", "\n", " function on_mouse_event_closure(name) {\n", " return function (event) {\n", @@ -4809,6 +6044,10 @@ " 'mouseup',\n", " on_mouse_event_closure('button_release')\n", " );\n", + " rubberband_canvas.addEventListener(\n", + " 'dblclick',\n", + " on_mouse_event_closure('dblclick')\n", + " );\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband_canvas.addEventListener(\n", " 'mousemove',\n", @@ -5066,11 +6305,14 @@ "mpl.figure.prototype._make_on_message_function = function (fig) {\n", " return function socket_on_message(evt) {\n", " if (evt.data instanceof Blob) {\n", - " /* FIXME: We get \"Resource interpreted as Image but\n", - " * transferred with MIME type text/plain:\" errors on\n", - " * Chrome. But how to set the MIME type? It doesn't seem\n", - " * to be part of the websocket stream */\n", - " evt.data.type = 'image/png';\n", + " var img = evt.data;\n", + " if (img.type !== 'image/png') {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " img.type = 'image/png';\n", + " }\n", "\n", " /* Free the memory for the previous frames */\n", " if (fig.imageObj.src) {\n", @@ -5080,7 +6322,7 @@ " }\n", "\n", " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", - " evt.data\n", + " img\n", " );\n", " fig.updated_canvas_event();\n", " fig.waiting = false;\n", @@ -5199,10 +6441,10 @@ "mpl.figure.prototype.key_event = function (event, name) {\n", " // Prevent repeat events\n", " if (name === 'key_press') {\n", - " if (event.which === this._key) {\n", + " if (event.key === this._key) {\n", " return;\n", " } else {\n", - " this._key = event.which;\n", + " this._key = event.key;\n", " }\n", " }\n", " if (name === 'key_release') {\n", @@ -5210,18 +6452,17 @@ " }\n", "\n", " var value = '';\n", - " if (event.ctrlKey && event.which !== 17) {\n", + " if (event.ctrlKey && event.key !== 'Control') {\n", " value += 'ctrl+';\n", " }\n", - " if (event.altKey && event.which !== 18) {\n", + " else if (event.altKey && event.key !== 'Alt') {\n", " value += 'alt+';\n", " }\n", - " if (event.shiftKey && event.which !== 16) {\n", + " else if (event.shiftKey && event.key !== 'Shift') {\n", " value += 'shift+';\n", " }\n", "\n", - " value += 'k';\n", - " value += event.which.toString();\n", + " value += 'k' + event.key;\n", "\n", " this._key_event_extra(event, name);\n", "\n", @@ -5240,9 +6481,13 @@ "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n", " this.message.textContent = tooltip;\n", "};\n", + "\n", + "///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n", + "// prettier-ignore\n", + "var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n", "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", "\n", - "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", "\n", "mpl.default_extension = \"png\";/* global mpl */\n", "\n", @@ -5252,6 +6497,19 @@ " // socket, so there is still some room for performance tuning.\n", " var ws = {};\n", "\n", + " ws.binaryType = comm.kernel.ws.binaryType;\n", + " ws.readyState = comm.kernel.ws.readyState;\n", + " function updateReadyState(_event) {\n", + " if (comm.kernel.ws) {\n", + " ws.readyState = comm.kernel.ws.readyState;\n", + " } else {\n", + " ws.readyState = 3; // Closed state.\n", + " }\n", + " }\n", + " comm.kernel.ws.addEventListener('open', updateReadyState);\n", + " comm.kernel.ws.addEventListener('close', updateReadyState);\n", + " comm.kernel.ws.addEventListener('error', updateReadyState);\n", + "\n", " ws.close = function () {\n", " comm.close();\n", " };\n", @@ -5262,8 +6520,14 @@ " // Register the callback with on_msg.\n", " comm.on_msg(function (msg) {\n", " //console.log('receiving', msg['content']['data'], msg);\n", + " var data = msg['content']['data'];\n", + " if (data['blob'] !== undefined) {\n", + " data = {\n", + " data: new Blob(msg['buffers'], { type: data['blob'] }),\n", + " };\n", + " }\n", " // Pass the mpl event to the overridden (by mpl) onmessage function.\n", - " ws.onmessage(msg['content']['data']);\n", + " ws.onmessage(data);\n", " });\n", " return ws;\n", "};\n", @@ -5294,7 +6558,7 @@ " console.error('Failed to find cell for figure', id, fig);\n", " return;\n", " }\n", - " fig.cell_info[0].output_area.element.one(\n", + " fig.cell_info[0].output_area.element.on(\n", " 'cleared',\n", " { fig: fig },\n", " fig._remove_fig_handler\n", @@ -5307,6 +6571,7 @@ " 'cleared',\n", " fig._remove_fig_handler\n", " );\n", + " fig.resizeObserverInstance.unobserve(fig.canvas_div);\n", "\n", " // Update the output cell to use the data from the current canvas.\n", " fig.push_to_output();\n", @@ -5427,6 +6692,10 @@ "\n", "mpl.figure.prototype._remove_fig_handler = function (event) {\n", " var fig = event.data.fig;\n", + " if (event.target !== this) {\n", + " // Ignore bubbled events from children.\n", + " return;\n", + " }\n", " fig.close_ws(fig, {});\n", "};\n", "\n", @@ -5511,7 +6780,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -5553,14 +6822,13 @@ } ], "metadata": { - "celltoolbar": "Tags", "interpreter": { "hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1" }, "kernelspec": { - "display_name": "Python 3", + "display_name": "allensdk", "language": "python", - "name": "python3" + "name": "allensdk" }, "language_info": { "codemirror_mode": {