From 4f9c4953b036990ac4b75e4b19f0d20050f789d0 Mon Sep 17 00:00:00 2001 From: Caitlin Lewis Date: Mon, 17 Jul 2023 17:18:38 -0400 Subject: [PATCH 1/3] update notebooks --- notebooks/cnmf_viz.ipynb | 676 ++------------- notebooks/mcorr_cnmf.ipynb | 1685 ++---------------------------------- 2 files changed, 162 insertions(+), 2199 deletions(-) diff --git a/notebooks/cnmf_viz.ipynb b/notebooks/cnmf_viz.ipynb index a0584c6..dd01863 100644 --- a/notebooks/cnmf_viz.ipynb +++ b/notebooks/cnmf_viz.ipynb @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "222bf36f-45e9-4408-800b-aaaa843d748d", "metadata": { "pycharm": { @@ -37,7 +37,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "468afef4-7a36-4c2c-adb4-20bfd785b786", "metadata": { "pycharm": { @@ -46,13 +46,13 @@ }, "outputs": [], "source": [ - "from fastplotlib import ImageWidget, Plot, GridPlot\n", + "import fastplotlib as fpl\n", "from ipywidgets import VBox, IntSlider, Layout" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "82f6922d-c042-4ecd-bed7-560705d247f4", "metadata": {}, "outputs": [], @@ -70,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "b6f3f3ed-29f0-4831-816b-7fe05119734a", "metadata": { "pycharm": { @@ -96,261 +96,14 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "ba62939e-4584-44b8-8b84-df6c63b52187", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '...{'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n...2023-01-10T23:13:392023-01-10T23:16:4615.09 secNoneb4aa1ac6-73cf-441a-8eda-dc10b9de25e4
1cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't...{'mean-projection-path': 51fbd870-6072-4c32-9e37-928756227f2f/51fbd870-6072-4c32-9e37-928756227f2f_mean_projection.n...2023-01-10T23:31:212023-01-10T23:37:1719.71 secNone51fbd870-6072-4c32-9e37-928756227f2f
2cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts...{'mean-projection-path': 49475ead-203a-411f-9eae-7fe050621f27/49475ead-203a-411f-9eae-7fe050621f27_mean_projection.n...2023-01-10T23:31:272023-01-10T23:37:4120.79 secNone49475ead-203a-411f-9eae-7fe050621f27
3cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't...{'mean-projection-path': 96a58ab3-fdff-4ece-9640-c0ab65c92337/96a58ab3-fdff-4ece-9640-c0ab65c92337_mean_projection.n...2023-01-10T23:31:272023-01-10T23:38:0721.46 secNone96a58ab3-fdff-4ece-9640-c0ab65c92337
4cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts...{'mean-projection-path': 61cf64e3-4933-4e55-8e6b-1b4fc9282aea/61cf64e3-4933-4e55-8e6b-1b4fc9282aea_mean_projection.n...2023-01-10T23:31:272023-01-10T23:38:3322.7 secNone61cf64e3-4933-4e55-8e6b-1b4fc9282aea
5cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't...{'mean-projection-path': 906758f8-daee-4711-af96-9bc5a2084d3d/906758f8-daee-4711-af96-9bc5a2084d3d_mean_projection.n...2023-01-10T23:31:272023-01-10T23:39:0223.9 secNone906758f8-daee-4711-af96-9bc5a2084d3d
6cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts...{'mean-projection-path': 72732687-50c5-4ffd-aa36-d82a2e8a468a/72732687-50c5-4ffd-aa36-d82a2e8a468a_mean_projection.n...2023-01-10T23:31:272023-01-10T23:39:2822.45 secNone72732687-50c5-4ffd-aa36-d82a2e8a468a
7cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't...{'mean-projection-path': 73b38310-e53e-451f-90f8-e387812fa408/73b38310-e53e-451f-90f8-e387812fa408_mean_projection.n...2023-01-10T23:31:272023-01-10T23:39:5421.84 secNone73b38310-e53e-451f-90f8-e387812fa408
8cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts...{'mean-projection-path': 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0/6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0_mean_projection.n...2023-01-10T23:31:272023-01-10T23:40:2424.52 secNone6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0
9cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't...{'mean-projection-path': 83f18dfd-29e6-47e1-bdb5-4039c2a09918/83f18dfd-29e6-47e1-bdb5-4039c2a09918_mean_projection.n...2023-01-10T23:31:272023-01-10T23:40:5525.38 secNone83f18dfd-29e6-47e1-bdb5-4039c2a09918
\n", - "
" - ], - "text/plain": [ - " algo item_name \\\n", - "0 mcorr Sue_2x_3000_40_-46 \n", - "1 cnmf Sue_2x_3000_40_-46 \n", - "2 cnmf Sue_2x_3000_40_-46 \n", - "3 cnmf Sue_2x_3000_40_-46 \n", - "4 cnmf Sue_2x_3000_40_-46 \n", - "5 cnmf Sue_2x_3000_40_-46 \n", - "6 cnmf Sue_2x_3000_40_-46 \n", - "7 cnmf Sue_2x_3000_40_-46 \n", - "8 cnmf Sue_2x_3000_40_-46 \n", - "9 cnmf Sue_2x_3000_40_-46 \n", - "\n", - " input_movie_path \\\n", - "0 example_movies/Sue_2x_3000_40_-46.tif \n", - "1 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "2 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "3 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "4 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "5 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "6 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "7 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "8 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "9 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "\n", - " params \\\n", - "0 {'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '... \n", - "1 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't... \n", - "2 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "3 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "4 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "5 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "6 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "7 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "8 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "9 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "\n", - " outputs \\\n", - "0 {'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n... \n", - "1 {'mean-projection-path': 51fbd870-6072-4c32-9e37-928756227f2f/51fbd870-6072-4c32-9e37-928756227f2f_mean_projection.n... \n", - "2 {'mean-projection-path': 49475ead-203a-411f-9eae-7fe050621f27/49475ead-203a-411f-9eae-7fe050621f27_mean_projection.n... \n", - "3 {'mean-projection-path': 96a58ab3-fdff-4ece-9640-c0ab65c92337/96a58ab3-fdff-4ece-9640-c0ab65c92337_mean_projection.n... \n", - "4 {'mean-projection-path': 61cf64e3-4933-4e55-8e6b-1b4fc9282aea/61cf64e3-4933-4e55-8e6b-1b4fc9282aea_mean_projection.n... \n", - "5 {'mean-projection-path': 906758f8-daee-4711-af96-9bc5a2084d3d/906758f8-daee-4711-af96-9bc5a2084d3d_mean_projection.n... \n", - "6 {'mean-projection-path': 72732687-50c5-4ffd-aa36-d82a2e8a468a/72732687-50c5-4ffd-aa36-d82a2e8a468a_mean_projection.n... \n", - "7 {'mean-projection-path': 73b38310-e53e-451f-90f8-e387812fa408/73b38310-e53e-451f-90f8-e387812fa408_mean_projection.n... \n", - "8 {'mean-projection-path': 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0/6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0_mean_projection.n... \n", - "9 {'mean-projection-path': 83f18dfd-29e6-47e1-bdb5-4039c2a09918/83f18dfd-29e6-47e1-bdb5-4039c2a09918_mean_projection.n... \n", - "\n", - " added_time ran_time algo_duration comments \\\n", - "0 2023-01-10T23:13:39 2023-01-10T23:16:46 15.09 sec None \n", - "1 2023-01-10T23:31:21 2023-01-10T23:37:17 19.71 sec None \n", - "2 2023-01-10T23:31:27 2023-01-10T23:37:41 20.79 sec None \n", - "3 2023-01-10T23:31:27 2023-01-10T23:38:07 21.46 sec None \n", - "4 2023-01-10T23:31:27 2023-01-10T23:38:33 22.7 sec None \n", - "5 2023-01-10T23:31:27 2023-01-10T23:39:02 23.9 sec None \n", - "6 2023-01-10T23:31:27 2023-01-10T23:39:28 22.45 sec None \n", - "7 2023-01-10T23:31:27 2023-01-10T23:39:54 21.84 sec None \n", - "8 2023-01-10T23:31:27 2023-01-10T23:40:24 24.52 sec None \n", - "9 2023-01-10T23:31:27 2023-01-10T23:40:55 25.38 sec None \n", - "\n", - " uuid \n", - "0 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4 \n", - "1 51fbd870-6072-4c32-9e37-928756227f2f \n", - "2 49475ead-203a-411f-9eae-7fe050621f27 \n", - "3 96a58ab3-fdff-4ece-9640-c0ab65c92337 \n", - "4 61cf64e3-4933-4e55-8e6b-1b4fc9282aea \n", - "5 906758f8-daee-4711-af96-9bc5a2084d3d \n", - "6 72732687-50c5-4ffd-aa36-d82a2e8a468a \n", - "7 73b38310-e53e-451f-90f8-e387812fa408 \n", - "8 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0 \n", - "9 83f18dfd-29e6-47e1-bdb5-4039c2a09918 " - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df = load_batch(batch_path)\n", "df" @@ -372,22 +125,14 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "91132418-82f8-4853-bd77-084a0b5e2915", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n" - ] - } - ], + "outputs": [], "source": [ "# You can change this to plot the outputs for different batch items\n", "index = 1\n", @@ -431,85 +176,47 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "8f61a04d-8c27-4aa1-9955-3190a528dee0", "metadata": {}, "outputs": [], "source": [ "# LineSlider is very new and experimental and is likely to change\n", "# that's why it's not exposed as a top-level import\n", - "from fastplotlib.graphics.line_slider import LineSlider" + "from fastplotlib.graphics.selectors import LinearSelector" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "133fe390-988c-465f-a26f-552ac81d26ea", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d92a6b3018404de2b696372d6921b14d", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "b305cf1eb3554e0c84376912d387ac65", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d6e8eccba92e49f2bc5ae23836d9bece", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(JupyterWgpuCanvas(), VBox(children=(JupyterWgpuCanvas(), IntSlider(value=0, description='dimens…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "# for the image data and contours\n", - "iw_cnmf = ImageWidget(cnmf_movie, vmin_vmax_sliders=True, cmap=\"gnuplot2\")\n", + "iw_cnmf = fpl.ImageWidget(cnmf_movie, vmin_vmax_sliders=True, cmap=\"gnuplot2\")\n", "\n", "# add good contours to the plot within the widget\n", - "contours_graphic = iw_cnmf.plot.add_line_collection(contours, colors=\"cyan\", name=\"contours\")\n", + "contours_graphic = iw_cnmf.gridplot[0,0].add_line_collection(contours, colors=\"cyan\", name=\"contours\")\n", "contours_graphic[ixs_good].colors = \"cyan\"\n", "contours_graphic[ixs_bad].colors = \"magenta\"\n", "\n", "\n", "# temporal plot\n", - "plot_temporal = Plot()\n", + "plot_temporal = fpl.Plot()\n", "\n", "temporal_graphic = plot_temporal.add_line_collection(temporal, colors=\"cyan\", name=\"temporal\")\n", "temporal_graphic[ixs_good].colors = \"cyan\"\n", "temporal_graphic[ixs_bad].colors = \"magenta\"\n", "\n", + "def update_movie(ev):\n", + " ix = ev.pick_info[\"selected_index\"][0]\n", + " iw_cnmf.sliders[\"t\"].value = ix \n", + "\n", "# a vertical line that is syncronized to the image widget \"t\" (timepoint) slider\n", - "_ls = LineSlider(x_pos=0, bounds=(temporal.min(), temporal.max()), slider=iw_cnmf.sliders[\"t\"])\n", - "plot_temporal.add_graphic(_ls)\n", + "temporal_graphic.add_linear_selector(name=\"temp select\")\n", + "plot_temporal[\"temp select\"].selection.add_event_handler(update_movie)\n", + "\n", "\n", "# stack them\n", "VBox([plot_temporal.show(), iw_cnmf.show()])" @@ -525,13 +232,13 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "9d69932b-ea97-4af1-a27f-46649a6b1c9a", "metadata": {}, "outputs": [], "source": [ "plot_temporal.auto_scale()\n", - "plot_temporal.camera.scale.x = 0.85" + "plot_temporal.camera.world.scale_x = 0.85" ] }, { @@ -544,7 +251,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "2d4dc4b4-acc6-40fd-b1d5-542106c21540", "metadata": {}, "outputs": [], @@ -574,25 +281,15 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "1633e5b1-fca2-4e21-a55d-a45a2f482c54", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/fastplotlib/fastplotlib/graphics/features/_base.py:87: UserWarning: Event handler Graphics> is already registered.\n", - " warn(f\"Event handler {handler} is already registered.\")\n" - ] - } - ], + "outputs": [], "source": [ "# so we can view them one by one, first hide all of them\n", "temporal_graphic[:].present = False\n", "\n", - "image_graphic = iw_cnmf.plot[\"image\"]\n", + "image_graphic = iw_cnmf.gridplot[0,0][\"image_widget_managed\"]\n", "\n", "# link image to contours\n", "image_graphic.link(\n", @@ -619,12 +316,12 @@ "id": "7ecf6c63-8190-4e72-bcdb-eca0304d891d", "metadata": {}, "source": [ - "Close canvases if you GPU is slow" + "Close plot if you GPU is slow" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "51102b50-e146-4c25-94ee-4a532cf4a27b", "metadata": { "pycharm": { @@ -633,8 +330,8 @@ }, "outputs": [], "source": [ - "plot_temporal.canvas.close()\n", - "iw_cnmf.plot.canvas.close()" + "plot_temporal.close()\n", + "iw_cnmf.gridplot.close()" ] }, { @@ -653,29 +350,14 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "9294d10b-4d09-467e-b9f3-63ef7b55b766", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "LazyArrayRCM @0x7f8566f7e380\n", - "LazyArray for reconstructed movie, i.e. A ⊗ C\n", - "Frames are computed only upon indexing\n", - "shape [frames, x, y]: (3000, 170, 170)\n", - "n_components: 155" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# reconstructed movie, A * C\n", "rcm = df.iloc[index].cnmf.get_rcm()\n", @@ -692,42 +374,20 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "6cf04c45-f1ba-4fe5-b4c8-95ba9e6d0a2e", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(170, 170)" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "rcm[100].shape" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "f35fd885-bf63-4df2-9eed-7c4d24bf9cb1", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(3000, 170, 170)" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "rcm.shape" ] @@ -744,21 +404,10 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "f3f708fe-e3d5-4daa-94d4-ab52f40b0817", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.6936" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "rcm.nbytes_gb" ] @@ -773,75 +422,22 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "2d1d4b79-8d42-4284-806a-4ed93ab54259", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1723.8088634442593" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "rcm.max" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "66a293c3-9c0e-477c-ab30-bc476352656e", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "8aa742c1043249da81ec514591583c28", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
initial snapshot
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "9092112fb88e4c1686d72bf324c56fc0", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "JupyterWgpuCanvas()" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "gp = GridPlot((2, 2), controllers=\"sync\")\n", + "gp = fpl.GridPlot((2, 2), controllers=\"sync\")\n", "\n", "for sp, img in zip(gp, [rcm.max_image, rcm.min_image, rcm.mean_image, rcm.std_image]):\n", " sp.add_image(img)\n", @@ -851,12 +447,12 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "889817d7-a4a3-4a60-8087-fe6f13f165d1", "metadata": {}, "outputs": [], "source": [ - "gp.canvas.close()" + "gp.close()" ] }, { @@ -869,68 +465,22 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "ba8f33fe-a170-45cb-8e89-623194117446", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6209c96048b44986a24a3f75c82bfe62", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/mesmerize-core/mesmerize_core/arrays/_cnmf.py:246: UserWarning: min and max not yet implemented for LazyArrayResiduals. Using first frame of raw movie\n", - " warn(\"min and max not yet implemented for LazyArrayResiduals. \"\n", - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/mesmerize-core/mesmerize_core/arrays/_cnmf.py:252: UserWarning: min and max not yet implemented for LazyArrayResiduals. Using first frame of raw movie\n", - " warn(\"min and max not yet implemented for LazyArrayResiduals. \"\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "7fee2642472a41b28dcfeec4a308b30c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(JupyterWgpuCanvas(), IntSlider(value=0, description='dimension: t', max=2999), FloatRangeSlider…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "rcb = df.iloc[index].cnmf.get_rcb()\n", "residuals = df.iloc[index].cnmf.get_residuals()\n", "\n", - "iw_cnmf_grid = ImageWidget(\n", + "iw_cnmf_grid = fpl.ImageWidget(\n", " data=[cnmf_movie, rcm, rcb, residuals],\n", " vmin_vmax_sliders=True,\n", " cmap=\"gnuplot2\",\n", " names=[\"movie\", \"A * C\", \"b * f\", \"residuals\"]\n", ")\n", "\n", - "for subplot in iw_cnmf_grid.plot:\n", + "for subplot in iw_cnmf_grid.gridplot:\n", " _contours = subplot.add_line_collection(contours, thickness=1.0, name=\"contours\")\n", " _contours[ixs_good].colors = \"cyan\"\n", " _contours[ixs_bad].colors = \"magenta\"\n", @@ -940,37 +490,37 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "cb3b4e92-6f4b-4538-aeae-3a8d11115fe7", "metadata": {}, "outputs": [], "source": [ "# temporarily hide bad components\n", - "for subplot in iw_cnmf_grid.plot:\n", + "for subplot in iw_cnmf_grid.gridplot:\n", " subplot[\"contours\"][ixs_bad].present = False" ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "id": "d7a8185a-5a82-43ae-8a08-fb9aba8972ff", "metadata": {}, "outputs": [], "source": [ " # hide good components\n", - "for subplot in iw_cnmf_grid.plot:\n", + "for subplot in iw_cnmf_grid.gridplot:\n", " subplot[\"contours\"][ixs_good].present = False" ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "3da3f01e-aae4-4525-99d1-f0ec8a03277e", "metadata": {}, "outputs": [], "source": [ "# make everything un-hidden, indexing [:] means \"everything\"\n", - "for subplot in iw_cnmf_grid.plot:\n", + "for subplot in iw_cnmf_grid.gridplot:\n", " subplot[\"contours\"][:].present = True" ] }, @@ -979,17 +529,17 @@ "id": "84301fdf-4d50-4157-a1ae-a76187da11e5", "metadata": {}, "source": [ - "### Close the canvas to free up the GPU if necessary " + "### Close the plot to free up the GPU if necessary " ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "69359b5b-aa25-4e3a-96ca-93440f82944c", "metadata": {}, "outputs": [], "source": [ - "iw_cnmf_grid.plot.canvas.close()" + "iw_cnmf_grid.gridplot.close()" ] }, { @@ -1004,56 +554,13 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "477fb129-4453-4fa6-ae29-7dc3ba08568b", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "5ba1fb0d545f4023a009b82591ff3f08", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "933762fb79c64215a1774842a582cf09", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2019d81468fe40c8803ee89c210677ca", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(JupyterWgpuCanvas(), JupyterWgpuCanvas(), IntSlider(value=0, max=2999)))" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "# 1 row, 3 columns, sync the first 2 subplots plots\n", - "cnmf_grid_more = GridPlot((1, 3), controllers=[[0, 0, 1]], names=[[\"movie\", \"rcm\", \"temporal\"]])\n", + "cnmf_grid_more = fpl.GridPlot((1, 3), controllers=[[0, 0, 1]], names=[[\"movie\", \"rcm\", \"temporal\"]])\n", "\n", "# movie and rcm, rcm is a lazy array and behaves similar to numpy arrays\n", "movie_graphic = cnmf_grid_more[\"movie\"].add_image(cnmf_movie[0], cmap=\"gnuplot2\")\n", @@ -1078,17 +585,22 @@ "temporal_stack = cnmf_grid_more[\"temporal\"].add_line_stack(temporal_good, colors=rand_colors, thickness=3.0, separate=15)\n", "\n", "# plot single temporal, just like before\n", - "plot_temporal_single = Plot()\n", + "plot_temporal_single = fpl.Plot()\n", "temporal_graphic = plot_temporal_single.add_line_collection(temporal_good, colors=rand_colors)\n", "\n", "# since this is a GridPlot and not an ImageWidget we need to define sliders\n", "slider = IntSlider(min=0, max=cnmf_movie.shape[0] - 1, value=0, step=1)\n", "\n", "# vertical line sliders\n", - "_ls = LineSlider(x_pos=0, bounds=(temporal.min(), temporal.max()), slider=slider)\n", - "_ls2 = LineSlider(x_pos=0, bounds=(temporal.min(), temporal.max() + temporal_stack.graphics[-1].position.y), slider=slider)\n", - "plot_temporal_single.add_graphic(_ls)\n", - "cnmf_grid_more[\"temporal\"].add_graphic(_ls2)\n", + "temporal_graphic.add_linear_selector(name=\"temp_single\")\n", + "temporal_stack.add_linear_selector(name=\"temp_stack\")\n", + "\n", + "def update_slider(ev):\n", + " ix = ev.pick_info[\"selected_index\"][0]\n", + " slider.value = ix\n", + "\n", + "plot_temporal_single[\"temp_single\"].selection.add_event_handler(update_slider)\n", + "cnmf_grid_more[\"temporal\"][\"temp_stack\"].selection.add_event_handler(update_slider)\n", "\n", "# function to update each frame\n", "def update_frame(change):\n", @@ -1116,13 +628,13 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "514834da-9f95-44f1-abd3-b90c58d3a9b9", "metadata": {}, "outputs": [], "source": [ "plot_temporal_single.auto_scale()\n", - "plot_temporal_single.camera.scale.x = 0.85\n", + "plot_temporal_single.camera.scale_x = 0.85\n", "cnmf_grid_more[\"temporal\"].auto_scale()" ] }, @@ -1136,26 +648,10 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "36ff16c2-7675-4f2f-9b3c-26699e36e305", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/fastplotlib/fastplotlib/graphics/features/_base.py:87: UserWarning: Event handler Graphics> is already registered.\n", - " warn(f\"Event handler {handler} is already registered.\")\n", - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/fastplotlib/fastplotlib/graphics/features/_base.py:87: UserWarning: Event handler Graphics> is already registered.\n", - " warn(f\"Event handler {handler} is already registered.\")\n", - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/fastplotlib/fastplotlib/graphics/features/_base.py:87: UserWarning: Event handler Graphics> is already registered.\n", - " warn(f\"Event handler {handler} is already registered.\")\n" - ] - } - ], + "outputs": [], "source": [ "# so we can view them one by one, first hide all of them\n", "temporal_graphic[:].present = False\n", @@ -1201,14 +697,22 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "5795ad78-2f64-4a0b-8a00-c743a45218f8", "metadata": {}, "outputs": [], "source": [ - "plot_temporal_single.canvas.close()\n", - "cnmf_grid_more.canvas.close()" + "plot_temporal_single.close()\n", + "cnmf_grid_more.close()" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "73ab1828-b211-422d-a787-46d7c280d504", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -1227,7 +731,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.5" + "version": "3.11.3" } }, "nbformat": 4, diff --git a/notebooks/mcorr_cnmf.ipynb b/notebooks/mcorr_cnmf.ipynb index eab1763..dc74b35 100644 --- a/notebooks/mcorr_cnmf.ipynb +++ b/notebooks/mcorr_cnmf.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "175ae92b-73fa-44d8-ab75-fb3399f68e12", "metadata": { "pycharm": { @@ -28,22 +28,23 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "3402ada9-b273-4660-b736-83668e036426", "metadata": { "pycharm": { "name": "#%%\n" - } + }, + "tags": [] }, "outputs": [], "source": [ - "from fastplotlib import ImageWidget\n", + "import fastplotlib as fpl\n", "from ipywidgets import VBox, IntSlider, Layout" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "d8e11779-e36d-42d6-a885-8a527742195b", "metadata": {}, "outputs": [], @@ -86,25 +87,14 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "233fa7a9-c623-48bd-aa2a-ef41a7204874", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "PosixPath('/home/kushal/caiman_data')" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# for this demo set this dir as the path to your `caiman_data` dir\n", "set_parent_raw_data_path(\"/home/kushal/caiman_data/\")" @@ -124,7 +114,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "97455d84-91d8-4b3b-88d8-c8772d03c736", "metadata": { "pycharm": { @@ -150,7 +140,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "ee720c3f-6eab-4552-bee4-01357d38e3cd", "metadata": { "pycharm": { @@ -162,7 +152,7 @@ "# create a new batch\n", "df = create_batch(batch_path)\n", "# to load existing batches use `load_batch()`\n", - "# df = load_batch(batch_path)" + "#df = load_batch(batch_path)" ] }, { @@ -177,59 +167,10 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "9b488891-0314-4d64-9f53-73e2cd8c6288", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
\n", - "
" - ], - "text/plain": [ - "Empty DataFrame\n", - "Columns: [algo, item_name, input_movie_path, params, outputs, added_time, ran_time, algo_duration, comments, uuid]\n", - "Index: []" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df" ] @@ -246,21 +187,10 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "b94f1158-9d5e-40a3-94f1-cb3896b30336", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'/home/kushal/caiman_data/example_movies/Sue_2x_3000_40_-46.tif'" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# We'll use teh Sue movie from caiman\n", "# download it if you don't have it\n", @@ -270,7 +200,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "06afbf97-9044-497c-ad8b-ba0ad72bff5d", "metadata": {}, "outputs": [], @@ -298,7 +228,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "28396502-0758-49cb-a135-38430a2aa085", "metadata": { "pycharm": { @@ -341,84 +271,14 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "0d25ff8d-a4b5-4377-afa7-ea60c7bfde72", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':...None2023-01-10T23:13:35NoneNoneNone9144c544-a7da-4e25-81a5-361938b82bba
\n", - "
" - ], - "text/plain": [ - " algo item_name input_movie_path \\\n", - "0 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "\n", - " params \\\n", - "0 {'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':... \n", - "\n", - " outputs added_time ran_time algo_duration comments \\\n", - "0 None 2023-01-10T23:13:35 None None None \n", - "\n", - " uuid \n", - "0 9144c544-a7da-4e25-81a5-361938b82bba " - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# add an item to the batch\n", "df.caiman.add_item(\n", @@ -447,97 +307,10 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "5f5d0785-da70-41ed-b31c-418a407ef6ad", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':...None2023-01-10T23:13:35NoneNoneNone9144c544-a7da-4e25-81a5-361938b82bba
1mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':...None2023-01-10T23:13:37NoneNoneNone75c722a6-48c2-4251-ace0-bdee0231e97b
\n", - "
" - ], - "text/plain": [ - " algo item_name input_movie_path \\\n", - "0 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "1 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "\n", - " params \\\n", - "0 {'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':... \n", - "1 {'main': {'max_shifts': (24, 24), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':... \n", - "\n", - " outputs added_time ran_time algo_duration comments \\\n", - "0 None 2023-01-10T23:13:35 None None None \n", - "1 None 2023-01-10T23:13:37 None None None \n", - "\n", - " uuid \n", - "0 9144c544-a7da-4e25-81a5-361938b82bba \n", - "1 75c722a6-48c2-4251-ace0-bdee0231e97b " - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# We create another set of params, useful for gridsearches for example\n", "mcorr_params2 =\\\n", @@ -577,7 +350,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "8b66724d-8164-4c9f-996d-fe3d2e592900", "metadata": {}, "outputs": [], @@ -603,148 +376,10 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "e990f5d5-5d20-48c8-a39a-ef6f7e4d9862", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':...None2023-01-10T23:13:35NoneNoneNone9144c544-a7da-4e25-81a5-361938b82bba
1mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':...None2023-01-10T23:13:37NoneNoneNone75c722a6-48c2-4251-ace0-bdee0231e97b
2mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (1, 1), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '...None2023-01-10T23:13:39NoneNoneNone47595f5b-e478-40c7-a0f3-ac96a935198c
3mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '...None2023-01-10T23:13:39NoneNoneNoneb4aa1ac6-73cf-441a-8eda-dc10b9de25e4
4mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (12, 12), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':...None2023-01-10T23:13:39NoneNoneNone46cbf19b-f13f-4737-9df4-75a02478823e
\n", - "
" - ], - "text/plain": [ - " algo item_name input_movie_path \\\n", - "0 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "1 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "2 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "3 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "4 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "\n", - " params \\\n", - "0 {'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':... \n", - "1 {'main': {'max_shifts': (24, 24), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':... \n", - "2 {'main': {'max_shifts': (1, 1), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '... \n", - "3 {'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '... \n", - "4 {'main': {'max_shifts': (12, 12), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':... \n", - "\n", - " outputs added_time ran_time algo_duration comments \\\n", - "0 None 2023-01-10T23:13:35 None None None \n", - "1 None 2023-01-10T23:13:37 None None None \n", - "2 None 2023-01-10T23:13:39 None None None \n", - "3 None 2023-01-10T23:13:39 None None None \n", - "4 None 2023-01-10T23:13:39 None None None \n", - "\n", - " uuid \n", - "0 9144c544-a7da-4e25-81a5-361938b82bba \n", - "1 75c722a6-48c2-4251-ace0-bdee0231e97b \n", - "2 47595f5b-e478-40c7-a0f3-ac96a935198c \n", - "3 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4 \n", - "4 46cbf19b-f13f-4737-9df4-75a02478823e " - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df" ] @@ -761,37 +396,10 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "6398946b-ced7-4ef2-9614-f062b7a65ad5", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/tmp/ipykernel_3773845/1437176290.py:1: FutureWarning: You are trying to use the following experimental feature, this may change in the future without warning:\n", - "CaimanDataFrameExtensions.get_params_diffs\n", - "This feature is new and the might improve in the future\n", - "\n", - " diffs = df.caiman.get_params_diffs(algo=\"mcorr\", item_name=df.iloc[0][\"item_name\"])\n" - ] - }, - { - "data": { - "text/plain": [ - "0 {'overlaps': (24, 24), 'max_shifts': (24, 24), 'strides': (48, 48)}\n", - "1 {'overlaps': (12, 12), 'max_shifts': (24, 24), 'strides': (24, 24)}\n", - "2 {'overlaps': (12, 12), 'max_shifts': (1, 1), 'strides': (24, 24)}\n", - "3 {'overlaps': (12, 12), 'max_shifts': (6, 6), 'strides': (24, 24)}\n", - "4 {'overlaps': (12, 12), 'max_shifts': (12, 12), 'strides': (24, 24)}\n", - "Name: params, dtype: object" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "diffs = df.caiman.get_params_diffs(algo=\"mcorr\", item_name=df.iloc[0][\"item_name\"])\n", "diffs" @@ -812,7 +420,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "ffd2c6ca-3a60-4cc7-8ea0-f059ae400d40", "metadata": {}, "outputs": [], @@ -855,50 +463,14 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "ea0299c0-4946-4deb-877f-5ce749e161ae", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "starting mc\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:root:Movie average is negative. Removing 1st percentile.\n", - "WARNING:root:Movie average is negative. Removing 1st percentile.\n", - "WARNING:root:Movie average is negative. Removing 1st percentile.\n", - "WARNING:root:Movie average is negative. Removing 1st percentile.\n", - "WARNING:root:Movie average is negative. Removing 1st percentile.\n", - "WARNING:root:Movie average is negative. Removing 1st percentile.\n", - "100%|██████████| 1/1 [00:00<00:00, 3.31it/s]\n", - "100%|██████████| 1/1 [00:00<00:00, 2.06it/s]\n", - "100%|██████████| 1/1 [00:00<00:00, 1.64it/s]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/9144c544-a7da-4e25-81a5-361938b82bba/9144c544-a7da-4e25-81a5-361938b82bba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n", - "mc finished successfully!\n", - "computing projections\n", - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/9144c544-a7da-4e25-81a5-361938b82bba/9144c544-a7da-4e25-81a5-361938b82bba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n", - "Computing correlation image\n", - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/9144c544-a7da-4e25-81a5-361938b82bba/9144c544-a7da-4e25-81a5-361938b82bba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n", - "finished computing correlation image\n" - ] - } - ], + "outputs": [], "source": [ "# run the first \"batch item\"\n", "# this will run in a subprocess by default on Linux & Mac\n", @@ -957,7 +529,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "id": "ab1bfbb4-2737-4aea-9e2f-673cf539279d", "metadata": {}, "outputs": [], @@ -975,159 +547,14 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "fc41f7a8-e80b-4262-890a-58cfb621f017", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':...{'mean-projection-path': 9144c544-a7da-4e25-81a5-361938b82bba/9144c544-a7da-4e25-81a5-361938b82bba_mean_projection.n...2023-01-10T23:13:352023-01-10T23:15:089.98 secNone9144c544-a7da-4e25-81a5-361938b82bba
1mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':...{'mean-projection-path': 75c722a6-48c2-4251-ace0-bdee0231e97b/75c722a6-48c2-4251-ace0-bdee0231e97b_mean_projection.n...2023-01-10T23:13:372023-01-10T23:16:0814.43 secNone75c722a6-48c2-4251-ace0-bdee0231e97b
2mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (1, 1), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '...{'mean-projection-path': 47595f5b-e478-40c7-a0f3-ac96a935198c/47595f5b-e478-40c7-a0f3-ac96a935198c_mean_projection.n...2023-01-10T23:13:392023-01-10T23:16:2715.24 secNone47595f5b-e478-40c7-a0f3-ac96a935198c
3mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '...{'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n...2023-01-10T23:13:392023-01-10T23:16:4615.09 secNoneb4aa1ac6-73cf-441a-8eda-dc10b9de25e4
4mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (12, 12), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':...{'mean-projection-path': 46cbf19b-f13f-4737-9df4-75a02478823e/46cbf19b-f13f-4737-9df4-75a02478823e_mean_projection.n...2023-01-10T23:13:392023-01-10T23:17:0414.95 secNone46cbf19b-f13f-4737-9df4-75a02478823e
\n", - "
" - ], - "text/plain": [ - " algo item_name input_movie_path \\\n", - "0 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "1 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "2 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "3 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "4 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "\n", - " params \\\n", - "0 {'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':... \n", - "1 {'main': {'max_shifts': (24, 24), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':... \n", - "2 {'main': {'max_shifts': (1, 1), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '... \n", - "3 {'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '... \n", - "4 {'main': {'max_shifts': (12, 12), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan':... \n", - "\n", - " outputs \\\n", - "0 {'mean-projection-path': 9144c544-a7da-4e25-81a5-361938b82bba/9144c544-a7da-4e25-81a5-361938b82bba_mean_projection.n... \n", - "1 {'mean-projection-path': 75c722a6-48c2-4251-ace0-bdee0231e97b/75c722a6-48c2-4251-ace0-bdee0231e97b_mean_projection.n... \n", - "2 {'mean-projection-path': 47595f5b-e478-40c7-a0f3-ac96a935198c/47595f5b-e478-40c7-a0f3-ac96a935198c_mean_projection.n... \n", - "3 {'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n... \n", - "4 {'mean-projection-path': 46cbf19b-f13f-4737-9df4-75a02478823e/46cbf19b-f13f-4737-9df4-75a02478823e_mean_projection.n... \n", - "\n", - " added_time ran_time algo_duration comments \\\n", - "0 2023-01-10T23:13:35 2023-01-10T23:15:08 9.98 sec None \n", - "1 2023-01-10T23:13:37 2023-01-10T23:16:08 14.43 sec None \n", - "2 2023-01-10T23:13:39 2023-01-10T23:16:27 15.24 sec None \n", - "3 2023-01-10T23:13:39 2023-01-10T23:16:46 15.09 sec None \n", - "4 2023-01-10T23:13:39 2023-01-10T23:17:04 14.95 sec None \n", - "\n", - " uuid \n", - "0 9144c544-a7da-4e25-81a5-361938b82bba \n", - "1 75c722a6-48c2-4251-ace0-bdee0231e97b \n", - "2 47595f5b-e478-40c7-a0f3-ac96a935198c \n", - "3 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4 \n", - "4 46cbf19b-f13f-4737-9df4-75a02478823e " - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df" ] @@ -1146,25 +573,14 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "43a416ef-7e5a-4006-b042-43c0ae98bc69", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# True if the algo ran succesfully\n", "df.iloc[0][\"outputs\"][\"success\"]" @@ -1195,22 +611,14 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "b7233088-43d2-4705-ade8-30c48446fdef", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/9144c544-a7da-4e25-81a5-361938b82bba/9144c544-a7da-4e25-81a5-361938b82bba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n" - ] - } - ], + "outputs": [], "source": [ "# you can change the index to look at the mcorr results of different batch items\n", "index = 0\n", @@ -1240,45 +648,16 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "b9481967-b29c-44fe-9483-a5dfe4b51939", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d7e9381fc9d64b999f59e173247e33cd", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "4c3f9726dde44e9a89e89b97262d647c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(JupyterWgpuCanvas(), IntSlider(value=0, description='dimension: t', max=2999), FloatRangeSlider…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ - "mcorr_iw = ImageWidget(\n", + "mcorr_iw = fpl.ImageWidget(\n", " data=[input_movie, mcorr_movie], \n", " vmin_vmax_sliders=True, \n", " cmap=\"gnuplot2\"\n", @@ -1298,7 +677,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "a724b41e-828e-4984-b08e-fd1ae117fe5c", "metadata": {}, "outputs": [], @@ -1312,12 +691,12 @@ "id": "0914941f-3f5c-444d-a5c0-19650f277680", "metadata": {}, "source": [ - "## Close the canvas to free up GPU processing time, not necessary if you have a powerful GPU" + "## Close the plot to free up GPU processing time, not necessary if you have a powerful GPU" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "c1b71c47-97a9-417b-bb6a-c8a63da61bd3", "metadata": { "pycharm": { @@ -1326,7 +705,7 @@ }, "outputs": [], "source": [ - "mcorr_iw.plot.canvas.close()" + "mcorr_iw.gridplot.close()" ] }, { @@ -1341,50 +720,10 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "d0351fcd-58ef-47cf-9f72-6a6a116da929", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/9144c544-a7da-4e25-81a5-361938b82bba/9144c544-a7da-4e25-81a5-361938b82bba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n", - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/75c722a6-48c2-4251-ace0-bdee0231e97b/75c722a6-48c2-4251-ace0-bdee0231e97b-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n", - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/47595f5b-e478-40c7-a0f3-ac96a935198c/47595f5b-e478-40c7-a0f3-ac96a935198c-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n", - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n", - "Decode mmap filename /home/kushal/caiman_data/mesmerize-batch/46cbf19b-f13f-4737-9df4-75a02478823e/46cbf19b-f13f-4737-9df4-75a02478823e-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d32475f24ee64a60a0220fc43c09217e", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "RFBOutputContext()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "7289fe66e25547e081e544887c884762", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(JupyterWgpuCanvas(), IntSlider(value=0, description='dimension: t', max=2999), FloatRangeSlider…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "# first item is just the raw movie\n", "movies = [df.iloc[0].caiman.get_input_movie()]\n", @@ -1407,7 +746,7 @@ " means.append(row.caiman.get_projection(\"mean\"))\n", "\n", "# create the widget\n", - "mcorr_iw_multiple = ImageWidget(\n", + "mcorr_iw_multiple = fpl.ImageWidget(\n", " data=movies, # list of movies\n", " window_funcs={\"t\": (np.mean, 17)}, # window_funcs is also a kwarg\n", " vmin_vmax_sliders=True,\n", @@ -1420,37 +759,10 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "id": "a96358a7-1039-452b-bdc2-97a64731ccb7", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/tmp/ipykernel_3773845/3787477196.py:1: FutureWarning: You are trying to use the following experimental feature, this may change in the future without warning:\n", - "CaimanDataFrameExtensions.get_params_diffs\n", - "This feature is new and the might improve in the future\n", - "\n", - " df.caiman.get_params_diffs(algo=\"mcorr\", item_name=df.iloc[0][\"item_name\"])\n" - ] - }, - { - "data": { - "text/plain": [ - "0 {'overlaps': (24, 24), 'max_shifts': (24, 24), 'strides': (48, 48)}\n", - "1 {'overlaps': (12, 12), 'max_shifts': (24, 24), 'strides': (24, 24)}\n", - "2 {'overlaps': (12, 12), 'max_shifts': (1, 1), 'strides': (24, 24)}\n", - "3 {'overlaps': (12, 12), 'max_shifts': (6, 6), 'strides': (24, 24)}\n", - "4 {'overlaps': (12, 12), 'max_shifts': (12, 12), 'strides': (24, 24)}\n", - "Name: params, dtype: object" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.caiman.get_params_diffs(algo=\"mcorr\", item_name=df.iloc[0][\"item_name\"])" ] @@ -1465,7 +777,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": null, "id": "cec3c2bf-e211-49fb-b7c8-bae5ceca99eb", "metadata": {}, "outputs": [], @@ -1496,7 +808,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": null, "id": "845ad96a-7d94-4e50-b50e-4f866ea07d4e", "metadata": {}, "outputs": [], @@ -1513,7 +825,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "id": "c175b726-808a-4ed1-ad98-1fac793f0833", "metadata": {}, "outputs": [], @@ -1531,18 +843,18 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "id": "6edd2dd5-82fa-4325-9fe8-c04a96ac949b", "metadata": {}, "outputs": [], "source": [ - "for sp in mcorr_iw_multiple.plot:\n", + "for sp in mcorr_iw_multiple.gridplot:\n", " sp.graphics[0].cmap = \"jet\"" ] }, { "cell_type": "code", - "execution_count": 33, + "execution_count": null, "id": "2bc649d3-c897-47da-a6d9-ae5d07e1f6cf", "metadata": {}, "outputs": [], @@ -1565,21 +877,10 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": null, "id": "cc1fb4fd-4cb3-41ca-9ec1-a62c15711afa", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['b4aa1ac6-73cf-441a-8eda-dc10b9de25e4']" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# make a list of rows we want to keep using the uuids\n", "rows_keep = [df.iloc[3].uuid]\n", @@ -1599,109 +900,10 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": null, "id": "0985f784-9ef1-4718-91ee-61c6c5b931c0", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/mesmerize-core/mesmerize_core/caiman_extensions/common.py:209: FutureWarning: You are trying to use the following experimental feature, this may change in the future without warning:\n", - "CaimanDataFrameExtensions.get_children\n", - "This feature will change in the future and directly return the a DataFrame of children (rows, ie. child batch items row) instead of a list of UUIDs\n", - "\n", - " children = self.get_children(index)\n", - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/mesmerize-core/mesmerize_core/caiman_extensions/common.py:209: FutureWarning: You are trying to use the following experimental feature, this may change in the future without warning:\n", - "CaimanDataFrameExtensions.get_children\n", - "This feature will change in the future and directly return the a DataFrame of children (rows, ie. child batch items row) instead of a list of UUIDs\n", - "\n", - " children = self.get_children(index)\n", - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/mesmerize-core/mesmerize_core/caiman_extensions/common.py:209: FutureWarning: You are trying to use the following experimental feature, this may change in the future without warning:\n", - "CaimanDataFrameExtensions.get_children\n", - "This feature will change in the future and directly return the a DataFrame of children (rows, ie. child batch items row) instead of a list of UUIDs\n", - "\n", - " children = self.get_children(index)\n", - "/home/kushal/Insync/kushalkolar@gmail.com/drive/repos/mesmerize-core/mesmerize_core/caiman_extensions/common.py:209: FutureWarning: You are trying to use the following experimental feature, this may change in the future without warning:\n", - "CaimanDataFrameExtensions.get_children\n", - "This feature will change in the future and directly return the a DataFrame of children (rows, ie. child batch items row) instead of a list of UUIDs\n", - "\n", - " children = self.get_children(index)\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '...{'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n...2023-01-10T23:13:392023-01-10T23:16:4615.09 secNoneb4aa1ac6-73cf-441a-8eda-dc10b9de25e4
\n", - "
" - ], - "text/plain": [ - " algo item_name input_movie_path \\\n", - "0 mcorr Sue_2x_3000_40_-46 example_movies/Sue_2x_3000_40_-46.tif \n", - "\n", - " params \\\n", - "0 {'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '... \n", - "\n", - " outputs \\\n", - "0 {'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n... \n", - "\n", - " added_time ran_time algo_duration comments \\\n", - "0 2023-01-10T23:13:39 2023-01-10T23:16:46 15.09 sec None \n", - "\n", - " uuid \n", - "0 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4 " - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "for i, row in df.iterrows():\n", " if row.uuid not in rows_keep:\n", @@ -1736,7 +938,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": null, "id": "cc283595-b82a-4270-a51b-f1d9cdc78d19", "metadata": { "pycharm": { @@ -1782,7 +984,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": null, "id": "29c48dd1-0eb5-48e5-96ab-0b2633983b88", "metadata": { "pycharm": { @@ -1810,7 +1012,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": null, "id": "fc7684d2-3d2c-43ac-9064-ba3997f7a1c8", "metadata": {}, "outputs": [], @@ -1856,257 +1058,10 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": null, "id": "0fb3f94d-34d2-4eef-ad2d-b4f6db89fa72", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '...{'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n...2023-01-10T23:13:392023-01-10T23:16:4615.09 secNoneb4aa1ac6-73cf-441a-8eda-dc10b9de25e4
1cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't...None2023-01-10T23:31:21NoneNoneNone51fbd870-6072-4c32-9e37-928756227f2f
2cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone49475ead-203a-411f-9eae-7fe050621f27
3cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone96a58ab3-fdff-4ece-9640-c0ab65c92337
4cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone61cf64e3-4933-4e55-8e6b-1b4fc9282aea
5cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone906758f8-daee-4711-af96-9bc5a2084d3d
6cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone72732687-50c5-4ffd-aa36-d82a2e8a468a
7cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone73b38310-e53e-451f-90f8-e387812fa408
8cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0
9cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone83f18dfd-29e6-47e1-bdb5-4039c2a09918
\n", - "
" - ], - "text/plain": [ - " algo item_name \\\n", - "0 mcorr Sue_2x_3000_40_-46 \n", - "1 cnmf Sue_2x_3000_40_-46 \n", - "2 cnmf Sue_2x_3000_40_-46 \n", - "3 cnmf Sue_2x_3000_40_-46 \n", - "4 cnmf Sue_2x_3000_40_-46 \n", - "5 cnmf Sue_2x_3000_40_-46 \n", - "6 cnmf Sue_2x_3000_40_-46 \n", - "7 cnmf Sue_2x_3000_40_-46 \n", - "8 cnmf Sue_2x_3000_40_-46 \n", - "9 cnmf Sue_2x_3000_40_-46 \n", - "\n", - " input_movie_path \\\n", - "0 example_movies/Sue_2x_3000_40_-46.tif \n", - "1 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "2 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "3 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "4 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "5 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "6 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "7 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "8 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "9 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "\n", - " params \\\n", - "0 {'main': {'max_shifts': (6, 6), 'strides': (24, 24), 'overlaps': (12, 12), 'max_deviation_rigid': 3, 'border_nan': '... \n", - "1 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't... \n", - "2 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "3 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "4 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "5 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "6 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "7 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "8 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "9 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "\n", - " outputs \\\n", - "0 {'mean-projection-path': b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4_mean_projection.n... \n", - "1 None \n", - "2 None \n", - "3 None \n", - "4 None \n", - "5 None \n", - "6 None \n", - "7 None \n", - "8 None \n", - "9 None \n", - "\n", - " added_time ran_time algo_duration comments \\\n", - "0 2023-01-10T23:13:39 2023-01-10T23:16:46 15.09 sec None \n", - "1 2023-01-10T23:31:21 None None None \n", - "2 2023-01-10T23:31:27 None None None \n", - "3 2023-01-10T23:31:27 None None None \n", - "4 2023-01-10T23:31:27 None None None \n", - "5 2023-01-10T23:31:27 None None None \n", - "6 2023-01-10T23:31:27 None None None \n", - "7 2023-01-10T23:31:27 None None None \n", - "8 2023-01-10T23:31:27 None None None \n", - "9 2023-01-10T23:31:27 None None None \n", - "\n", - " uuid \n", - "0 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4 \n", - "1 51fbd870-6072-4c32-9e37-928756227f2f \n", - "2 49475ead-203a-411f-9eae-7fe050621f27 \n", - "3 96a58ab3-fdff-4ece-9640-c0ab65c92337 \n", - "4 61cf64e3-4933-4e55-8e6b-1b4fc9282aea \n", - "5 906758f8-daee-4711-af96-9bc5a2084d3d \n", - "6 72732687-50c5-4ffd-aa36-d82a2e8a468a \n", - "7 73b38310-e53e-451f-90f8-e387812fa408 \n", - "8 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0 \n", - "9 83f18dfd-29e6-47e1-bdb5-4039c2a09918 " - ] - }, - "execution_count": 40, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df" ] @@ -2123,41 +1078,10 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": null, "id": "80b98249-b3b5-4481-a4e2-dbdcbf8d1ed9", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/tmp/ipykernel_3773845/3330105589.py:1: FutureWarning: You are trying to use the following experimental feature, this may change in the future without warning:\n", - "CaimanDataFrameExtensions.get_params_diffs\n", - "This feature is new and the might improve in the future\n", - "\n", - " df.caiman.get_params_diffs(algo=\"cnmf\", item_name=df.iloc[1][\"item_name\"])\n" - ] - }, - { - "data": { - "text/plain": [ - "1 {'gSig': (4, 4), 'merge_thr': 0.85, 'K': 4}\n", - "2 {'gSig': (6, 6), 'merge_thr': 0.8, 'K': 4}\n", - "3 {'gSig': (6, 6), 'merge_thr': 0.95, 'K': 4}\n", - "4 {'gSig': (6, 6), 'merge_thr': 0.8, 'K': 8}\n", - "5 {'gSig': (6, 6), 'merge_thr': 0.95, 'K': 8}\n", - "6 {'gSig': (8, 8), 'merge_thr': 0.8, 'K': 4}\n", - "7 {'gSig': (8, 8), 'merge_thr': 0.95, 'K': 4}\n", - "8 {'gSig': (8, 8), 'merge_thr': 0.8, 'K': 8}\n", - "9 {'gSig': (8, 8), 'merge_thr': 0.95, 'K': 8}\n", - "Name: params, dtype: object" - ] - }, - "execution_count": 41, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.caiman.get_params_diffs(algo=\"cnmf\", item_name=df.iloc[1][\"item_name\"])" ] @@ -2174,227 +1098,10 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": null, "id": "ee0b9ac5-f66d-4370-842c-8655f5469286", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
1cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't...None2023-01-10T23:31:21NoneNoneNone51fbd870-6072-4c32-9e37-928756227f2f
2cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone49475ead-203a-411f-9eae-7fe050621f27
3cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone96a58ab3-fdff-4ece-9640-c0ab65c92337
4cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone61cf64e3-4933-4e55-8e6b-1b4fc9282aea
5cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone906758f8-daee-4711-af96-9bc5a2084d3d
6cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone72732687-50c5-4ffd-aa36-d82a2e8a468a
7cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone73b38310-e53e-451f-90f8-e387812fa408
8cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts...None2023-01-10T23:31:27NoneNoneNone6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0
9cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't...None2023-01-10T23:31:27NoneNoneNone83f18dfd-29e6-47e1-bdb5-4039c2a09918
\n", - "
" - ], - "text/plain": [ - " algo item_name \\\n", - "1 cnmf Sue_2x_3000_40_-46 \n", - "2 cnmf Sue_2x_3000_40_-46 \n", - "3 cnmf Sue_2x_3000_40_-46 \n", - "4 cnmf Sue_2x_3000_40_-46 \n", - "5 cnmf Sue_2x_3000_40_-46 \n", - "6 cnmf Sue_2x_3000_40_-46 \n", - "7 cnmf Sue_2x_3000_40_-46 \n", - "8 cnmf Sue_2x_3000_40_-46 \n", - "9 cnmf Sue_2x_3000_40_-46 \n", - "\n", - " input_movie_path \\\n", - "1 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "2 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "3 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "4 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "5 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "6 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "7 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "8 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "9 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "\n", - " params \\\n", - "1 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't... \n", - "2 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "3 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "4 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "5 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "6 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "7 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "8 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "9 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "\n", - " outputs added_time ran_time algo_duration comments \\\n", - "1 None 2023-01-10T23:31:21 None None None \n", - "2 None 2023-01-10T23:31:27 None None None \n", - "3 None 2023-01-10T23:31:27 None None None \n", - "4 None 2023-01-10T23:31:27 None None None \n", - "5 None 2023-01-10T23:31:27 None None None \n", - "6 None 2023-01-10T23:31:27 None None None \n", - "7 None 2023-01-10T23:31:27 None None None \n", - "8 None 2023-01-10T23:31:27 None None None \n", - "9 None 2023-01-10T23:31:27 None None None \n", - "\n", - " uuid \n", - "1 51fbd870-6072-4c32-9e37-928756227f2f \n", - "2 49475ead-203a-411f-9eae-7fe050621f27 \n", - "3 96a58ab3-fdff-4ece-9640-c0ab65c92337 \n", - "4 61cf64e3-4933-4e55-8e6b-1b4fc9282aea \n", - "5 906758f8-daee-4711-af96-9bc5a2084d3d \n", - "6 72732687-50c5-4ffd-aa36-d82a2e8a468a \n", - "7 73b38310-e53e-451f-90f8-e387812fa408 \n", - "8 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0 \n", - "9 83f18dfd-29e6-47e1-bdb5-4039c2a09918 " - ] - }, - "execution_count": 43, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df[\n", " (df[\"algo\"] == \"cnmf\") & # algo\n", @@ -2452,242 +1159,14 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": null, "id": "0f0110b6-4367-46c0-86a1-9c985c6ea91e", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
1cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't...{'mean-projection-path': 51fbd870-6072-4c32-9e37-928756227f2f/51fbd870-6072-4c32-9e37-928756227f2f_mean_projection.n...2023-01-10T23:31:212023-01-10T23:37:1719.71 secNone51fbd870-6072-4c32-9e37-928756227f2f
2cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts...{'mean-projection-path': 49475ead-203a-411f-9eae-7fe050621f27/49475ead-203a-411f-9eae-7fe050621f27_mean_projection.n...2023-01-10T23:31:272023-01-10T23:37:4120.79 secNone49475ead-203a-411f-9eae-7fe050621f27
3cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't...{'mean-projection-path': 96a58ab3-fdff-4ece-9640-c0ab65c92337/96a58ab3-fdff-4ece-9640-c0ab65c92337_mean_projection.n...2023-01-10T23:31:272023-01-10T23:38:0721.46 secNone96a58ab3-fdff-4ece-9640-c0ab65c92337
4cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts...{'mean-projection-path': 61cf64e3-4933-4e55-8e6b-1b4fc9282aea/61cf64e3-4933-4e55-8e6b-1b4fc9282aea_mean_projection.n...2023-01-10T23:31:272023-01-10T23:38:3322.7 secNone61cf64e3-4933-4e55-8e6b-1b4fc9282aea
5cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't...{'mean-projection-path': 906758f8-daee-4711-af96-9bc5a2084d3d/906758f8-daee-4711-af96-9bc5a2084d3d_mean_projection.n...2023-01-10T23:31:272023-01-10T23:39:0223.9 secNone906758f8-daee-4711-af96-9bc5a2084d3d
6cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts...{'mean-projection-path': 72732687-50c5-4ffd-aa36-d82a2e8a468a/72732687-50c5-4ffd-aa36-d82a2e8a468a_mean_projection.n...2023-01-10T23:31:272023-01-10T23:39:2822.45 secNone72732687-50c5-4ffd-aa36-d82a2e8a468a
7cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't...{'mean-projection-path': 73b38310-e53e-451f-90f8-e387812fa408/73b38310-e53e-451f-90f8-e387812fa408_mean_projection.n...2023-01-10T23:31:272023-01-10T23:39:5421.84 secNone73b38310-e53e-451f-90f8-e387812fa408
8cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts...{'mean-projection-path': 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0/6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0_mean_projection.n...2023-01-10T23:31:272023-01-10T23:40:2424.52 secNone6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0
9cnmfSue_2x_3000_40_-46b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't...{'mean-projection-path': 83f18dfd-29e6-47e1-bdb5-4039c2a09918/83f18dfd-29e6-47e1-bdb5-4039c2a09918_mean_projection.n...2023-01-10T23:31:272023-01-10T23:40:5525.38 secNone83f18dfd-29e6-47e1-bdb5-4039c2a09918
\n", - "
" - ], - "text/plain": [ - " algo item_name \\\n", - "1 cnmf Sue_2x_3000_40_-46 \n", - "2 cnmf Sue_2x_3000_40_-46 \n", - "3 cnmf Sue_2x_3000_40_-46 \n", - "4 cnmf Sue_2x_3000_40_-46 \n", - "5 cnmf Sue_2x_3000_40_-46 \n", - "6 cnmf Sue_2x_3000_40_-46 \n", - "7 cnmf Sue_2x_3000_40_-46 \n", - "8 cnmf Sue_2x_3000_40_-46 \n", - "9 cnmf Sue_2x_3000_40_-46 \n", - "\n", - " input_movie_path \\\n", - "1 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "2 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "3 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "4 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "5 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "6 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "7 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "8 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "9 b4aa1ac6-73cf-441a-8eda-dc10b9de25e4/b4aa1ac6-73cf-441a-8eda-dc10b9de25e4-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", - "\n", - " params \\\n", - "1 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't... \n", - "2 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "3 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "4 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 'ts... \n", - "5 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (6, 6), 'ssub': 1, 't... \n", - "6 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "7 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "8 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.8, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 'ts... \n", - "9 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.95, 'rf': 15, 'stride': 6, 'K': 8, 'gSig': (8, 8), 'ssub': 1, 't... \n", - "\n", - " outputs \\\n", - "1 {'mean-projection-path': 51fbd870-6072-4c32-9e37-928756227f2f/51fbd870-6072-4c32-9e37-928756227f2f_mean_projection.n... \n", - "2 {'mean-projection-path': 49475ead-203a-411f-9eae-7fe050621f27/49475ead-203a-411f-9eae-7fe050621f27_mean_projection.n... \n", - "3 {'mean-projection-path': 96a58ab3-fdff-4ece-9640-c0ab65c92337/96a58ab3-fdff-4ece-9640-c0ab65c92337_mean_projection.n... \n", - "4 {'mean-projection-path': 61cf64e3-4933-4e55-8e6b-1b4fc9282aea/61cf64e3-4933-4e55-8e6b-1b4fc9282aea_mean_projection.n... \n", - "5 {'mean-projection-path': 906758f8-daee-4711-af96-9bc5a2084d3d/906758f8-daee-4711-af96-9bc5a2084d3d_mean_projection.n... \n", - "6 {'mean-projection-path': 72732687-50c5-4ffd-aa36-d82a2e8a468a/72732687-50c5-4ffd-aa36-d82a2e8a468a_mean_projection.n... \n", - "7 {'mean-projection-path': 73b38310-e53e-451f-90f8-e387812fa408/73b38310-e53e-451f-90f8-e387812fa408_mean_projection.n... \n", - "8 {'mean-projection-path': 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0/6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0_mean_projection.n... \n", - "9 {'mean-projection-path': 83f18dfd-29e6-47e1-bdb5-4039c2a09918/83f18dfd-29e6-47e1-bdb5-4039c2a09918_mean_projection.n... \n", - "\n", - " added_time ran_time algo_duration comments \\\n", - "1 2023-01-10T23:31:21 2023-01-10T23:37:17 19.71 sec None \n", - "2 2023-01-10T23:31:27 2023-01-10T23:37:41 20.79 sec None \n", - "3 2023-01-10T23:31:27 2023-01-10T23:38:07 21.46 sec None \n", - "4 2023-01-10T23:31:27 2023-01-10T23:38:33 22.7 sec None \n", - "5 2023-01-10T23:31:27 2023-01-10T23:39:02 23.9 sec None \n", - "6 2023-01-10T23:31:27 2023-01-10T23:39:28 22.45 sec None \n", - "7 2023-01-10T23:31:27 2023-01-10T23:39:54 21.84 sec None \n", - "8 2023-01-10T23:31:27 2023-01-10T23:40:24 24.52 sec None \n", - "9 2023-01-10T23:31:27 2023-01-10T23:40:55 25.38 sec None \n", - "\n", - " uuid \n", - "1 51fbd870-6072-4c32-9e37-928756227f2f \n", - "2 49475ead-203a-411f-9eae-7fe050621f27 \n", - "3 96a58ab3-fdff-4ece-9640-c0ab65c92337 \n", - "4 61cf64e3-4933-4e55-8e6b-1b4fc9282aea \n", - "5 906758f8-daee-4711-af96-9bc5a2084d3d \n", - "6 72732687-50c5-4ffd-aa36-d82a2e8a468a \n", - "7 73b38310-e53e-451f-90f8-e387812fa408 \n", - "8 6b8e19a9-fec6-4025-9e3e-2cec4e2fa4c0 \n", - "9 83f18dfd-29e6-47e1-bdb5-4039c2a09918 " - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df = df.caiman.reload_from_disk()\n", "df[df[\"algo\"] == \"cnmf\"]" @@ -2695,34 +1174,14 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": null, "id": "a8668f23-6abd-4bb8-a5ab-3c367caef688", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "1 True\n", - "2 True\n", - "3 True\n", - "4 True\n", - "5 True\n", - "6 True\n", - "7 True\n", - "8 True\n", - "9 True\n", - "Name: outputs, dtype: bool" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# see which batch items completed succcessfully\n", "df[df[\"algo\"] == \"cnmf\"][\"outputs\"].apply(lambda x: x[\"success\"])" @@ -2753,7 +1212,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.5" + "version": "3.11.3" } }, "nbformat": 4, From a4a62e9fbc0bac0792a09b013ed4d591c25e0fcd Mon Sep 17 00:00:00 2001 From: Kushal Kolar Date: Sun, 27 Aug 2023 02:57:09 +0100 Subject: [PATCH 2/3] minor change to nb comment just to trigger CI rebuild --- notebooks/mcorr_cnmf.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/mcorr_cnmf.ipynb b/notebooks/mcorr_cnmf.ipynb index dc74b35..8087b3d 100644 --- a/notebooks/mcorr_cnmf.ipynb +++ b/notebooks/mcorr_cnmf.ipynb @@ -62,7 +62,7 @@ }, "source": [ "# Paths\n", - "These are the only variables you will need to modify in this demo notebook. You will need to set the paths according to your own `caiman_data` dir path\n", + "These are the only variables you will need to modify in this demo notebook. You will need to set the paths according to your own `caiman_data` dir path.\n", "\n", "Explanation:\n", "\n", From e258d98670a6e2f5e46ad8e7ee11b96202e7a235 Mon Sep 17 00:00:00 2001 From: Caitlin Lewis Date: Sun, 27 Aug 2023 08:27:10 -0400 Subject: [PATCH 3/3] notebooks working --- notebooks/cnmf_viz.ipynb | 458 +++++++++++++++++++++++++++++++++---- notebooks/mcorr_cnmf.ipynb | 6 +- 2 files changed, 421 insertions(+), 43 deletions(-) diff --git a/notebooks/cnmf_viz.ipynb b/notebooks/cnmf_viz.ipynb index dd01863..76bdfd8 100644 --- a/notebooks/cnmf_viz.ipynb +++ b/notebooks/cnmf_viz.ipynb @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "222bf36f-45e9-4408-800b-aaaa843d748d", "metadata": { "pycharm": { @@ -20,7 +20,20 @@ }, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-08-27 08:25:07.009889: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n", + "2023-08-27 08:25:07.011353: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n", + "2023-08-27 08:25:07.040762: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n", + "2023-08-27 08:25:07.041781: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", + "To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", + "2023-08-27 08:25:07.516931: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n" + ] + } + ], "source": [ "from mesmerize_core import *\n", "import numpy as np\n", @@ -37,7 +50,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "468afef4-7a36-4c2c-adb4-20bfd785b786", "metadata": { "pycharm": { @@ -52,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "82f6922d-c042-4ecd-bed7-560705d247f4", "metadata": {}, "outputs": [], @@ -70,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "b6f3f3ed-29f0-4831-816b-7fe05119734a", "metadata": { "pycharm": { @@ -80,7 +93,7 @@ "outputs": [], "source": [ "# for this demo set this dir as the path to your `caiman_data` dir\n", - "set_parent_raw_data_path(\"/home/kushal/caiman_data/\")\n", + "set_parent_raw_data_path(\"/home/caitlin/caiman_data/\")\n", "\n", "# batch path\n", "batch_path = get_parent_raw_data_path().joinpath(\"mesmerize-batch/batch.pickle\")" @@ -96,14 +109,109 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "ba62939e-4584-44b8-8b84-df6c63b52187", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
algoitem_nameinput_movie_pathparamsoutputsadded_timeran_timealgo_durationcommentsuuid
0mcorrSue_2x_3000_40_-46example_movies/Sue_2x_3000_40_-46.tif{'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':...{'mean-projection-path': 812018a1-4796-4179-8796-e6bdd1b4b7ba/812018a1-4796-4179-8796-e6bdd1b4b7ba_mean_projection.n...2023-08-27T08:21:332023-08-27T08:22:0618.72 secNone812018a1-4796-4179-8796-e6bdd1b4b7ba
1cnmfSue_2x_3000_40_-46812018a1-4796-4179-8796-e6bdd1b4b7ba/812018a1-4796-4179-8796-e6bdd1b4b7ba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1...{'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't...{'mean-projection-path': 7abbd91e-819e-4125-a257-e7ed6a1029d2/7abbd91e-819e-4125-a257-e7ed6a1029d2_mean_projection.n...2023-08-27T08:22:582023-08-27T08:23:4829.61 secNone7abbd91e-819e-4125-a257-e7ed6a1029d2
\n", + "
" + ], + "text/plain": [ + " algo item_name \\\n", + "0 mcorr Sue_2x_3000_40_-46 \n", + "1 cnmf Sue_2x_3000_40_-46 \n", + "\n", + " input_movie_path \\\n", + "0 example_movies/Sue_2x_3000_40_-46.tif \n", + "1 812018a1-4796-4179-8796-e6bdd1b4b7ba/812018a1-4796-4179-8796-e6bdd1b4b7ba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1... \n", + "\n", + " params \\\n", + "0 {'main': {'max_shifts': (24, 24), 'strides': (48, 48), 'overlaps': (24, 24), 'max_deviation_rigid': 3, 'border_nan':... \n", + "1 {'main': {'fr': 30, 'p': 1, 'nb': 2, 'merge_thr': 0.85, 'rf': 15, 'stride': 6, 'K': 4, 'gSig': (4, 4), 'ssub': 1, 't... \n", + "\n", + " outputs \\\n", + "0 {'mean-projection-path': 812018a1-4796-4179-8796-e6bdd1b4b7ba/812018a1-4796-4179-8796-e6bdd1b4b7ba_mean_projection.n... \n", + "1 {'mean-projection-path': 7abbd91e-819e-4125-a257-e7ed6a1029d2/7abbd91e-819e-4125-a257-e7ed6a1029d2_mean_projection.n... \n", + "\n", + " added_time ran_time algo_duration comments \\\n", + "0 2023-08-27T08:21:33 2023-08-27T08:22:06 18.72 sec None \n", + "1 2023-08-27T08:22:58 2023-08-27T08:23:48 29.61 sec None \n", + "\n", + " uuid \n", + "0 812018a1-4796-4179-8796-e6bdd1b4b7ba \n", + "1 7abbd91e-819e-4125-a257-e7ed6a1029d2 " + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "df = load_batch(batch_path)\n", "df" @@ -125,14 +233,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "91132418-82f8-4853-bd77-084a0b5e2915", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decode mmap filename /home/caitlin/caiman_data/mesmerize-batch/812018a1-4796-4179-8796-e6bdd1b4b7ba/812018a1-4796-4179-8796-e6bdd1b4b7ba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n" + ] + } + ], "source": [ "# You can change this to plot the outputs for different batch items\n", "index = 1\n", @@ -176,7 +292,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "8f61a04d-8c27-4aa1-9955-3190a528dee0", "metadata": {}, "outputs": [], @@ -188,10 +304,64 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "133fe390-988c-465f-a26f-552ac81d26ea", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "561dbf47030348b08b043ed877b2a130", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "RFBOutputContext()" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0\n", + "\n", + "/home/caitlin/venvs/mescore/lib/python3.9/site-packages/fastplotlib/graphics/_features/_base.py:34: UserWarning: converting float64 array to float32\n", + " warn(f\"converting {array.dtype} array to float32\")\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "aa3c14cb72fc4261bc04c6f7a97b901c", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "RFBOutputContext()" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "820cc234e8284ed5b953093ca3d3ce6e", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(VBox(children=(JupyterWgpuCanvas(), HBox(children=(Button(icon='expand-arrows-alt', layout=Layo…" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# for the image data and contours\n", "iw_cnmf = fpl.ImageWidget(cnmf_movie, vmin_vmax_sliders=True, cmap=\"gnuplot2\")\n", @@ -232,7 +402,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "9d69932b-ea97-4af1-a27f-46649a6b1c9a", "metadata": {}, "outputs": [], @@ -251,7 +421,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "2d4dc4b4-acc6-40fd-b1d5-542106c21540", "metadata": {}, "outputs": [], @@ -281,10 +451,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "1633e5b1-fca2-4e21-a55d-a45a2f482c54", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/caitlin/venvs/mescore/lib/python3.9/site-packages/fastplotlib/graphics/_features/_base.py:143: UserWarning: Event handler Graphics> is already registered.\n", + " warn(f\"Event handler {handler} is already registered.\")\n" + ] + } + ], "source": [ "# so we can view them one by one, first hide all of them\n", "temporal_graphic[:].present = False\n", @@ -321,7 +501,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "51102b50-e146-4c25-94ee-4a532cf4a27b", "metadata": { "pycharm": { @@ -350,14 +530,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "9294d10b-4d09-467e-b9f3-63ef7b55b766", "metadata": { "pycharm": { "name": "#%%\n" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "LazyArrayRCM @0x7f4093e83640\n", + "LazyArray for reconstructed movie, i.e. A ⊗ C\n", + "Frames are computed only upon indexing\n", + "shape [frames, x, y]: (3000, 170, 170)\n", + "n_components: 155" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# reconstructed movie, A * C\n", "rcm = df.iloc[index].cnmf.get_rcm()\n", @@ -374,20 +569,42 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "6cf04c45-f1ba-4fe5-b4c8-95ba9e6d0a2e", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(170, 170)" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "rcm[100].shape" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "f35fd885-bf63-4df2-9eed-7c4d24bf9cb1", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(3000, 170, 170)" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "rcm.shape" ] @@ -404,10 +621,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "f3f708fe-e3d5-4daa-94d4-ab52f40b0817", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "0.6936" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "rcm.nbytes_gb" ] @@ -422,20 +650,69 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "id": "2d1d4b79-8d42-4284-806a-4ed93ab54259", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "1732.921847733555" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "rcm.max" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "id": "66a293c3-9c0e-477c-ab30-bc476352656e", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d1fec8dd4ebe45e0ad70ec484d6a326c", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "RFBOutputContext()" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/caitlin/venvs/mescore/lib/python3.9/site-packages/fastplotlib/graphics/_features/_base.py:34: UserWarning: converting float64 array to float32\n", + " warn(f\"converting {array.dtype} array to float32\")\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "25466abfd457454b953e7db0fdf2c276", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(JupyterWgpuCanvas(), HBox(children=(Button(icon='expand-arrows-alt', layout=Layout(width='auto'…" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "gp = fpl.GridPlot((2, 2), controllers=\"sync\")\n", "\n", @@ -447,7 +724,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "id": "889817d7-a4a3-4a60-8087-fe6f13f165d1", "metadata": {}, "outputs": [], @@ -465,10 +742,59 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "id": "ba8f33fe-a170-45cb-8e89-623194117446", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decode mmap filename /home/caitlin/caiman_data/mesmerize-batch/812018a1-4796-4179-8796-e6bdd1b4b7ba/812018a1-4796-4179-8796-e6bdd1b4b7ba-Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000.mmap\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "fd80ad6fa797433da59253891eb04221", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "RFBOutputContext()" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/caitlin/venvs/mescore/lib/python3.9/site-packages/fastplotlib/graphics/_features/_base.py:34: UserWarning: converting float64 array to float32\n", + " warn(f\"converting {array.dtype} array to float32\")\n", + "/home/caitlin/repos/mesmerize-core/mesmerize_core/arrays/_cnmf.py:250: UserWarning: min and max not yet implemented for LazyArrayResiduals. Using first frame of raw movie\n", + " warn(\"min and max not yet implemented for LazyArrayResiduals. \"\n", + "/home/caitlin/repos/mesmerize-core/mesmerize_core/arrays/_cnmf.py:256: UserWarning: min and max not yet implemented for LazyArrayResiduals. Using first frame of raw movie\n", + " warn(\"min and max not yet implemented for LazyArrayResiduals. \"\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "1789bf93f9dc4a23ab8963e80250eb00", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(VBox(children=(JupyterWgpuCanvas(), HBox(children=(Button(icon='expand-arrows-alt', layout=Layo…" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "rcb = df.iloc[index].cnmf.get_rcb()\n", "residuals = df.iloc[index].cnmf.get_residuals()\n", @@ -490,7 +816,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "id": "cb3b4e92-6f4b-4538-aeae-3a8d11115fe7", "metadata": {}, "outputs": [], @@ -502,7 +828,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "id": "d7a8185a-5a82-43ae-8a08-fb9aba8972ff", "metadata": {}, "outputs": [], @@ -514,7 +840,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "id": "3da3f01e-aae4-4525-99d1-f0ec8a03277e", "metadata": {}, "outputs": [], @@ -534,7 +860,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "id": "69359b5b-aa25-4e3a-96ca-93440f82944c", "metadata": {}, "outputs": [], @@ -554,10 +880,62 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "id": "477fb129-4453-4fa6-ae29-7dc3ba08568b", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "e092fb2bb6034c74988e05ca7bb30727", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "RFBOutputContext()" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/caitlin/venvs/mescore/lib/python3.9/site-packages/fastplotlib/graphics/_features/_base.py:34: UserWarning: converting float64 array to float32\n", + " warn(f\"converting {array.dtype} array to float32\")\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "a54730d962364dd88c865faf8bc87813", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "RFBOutputContext()" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "b16dd26026a245629cff15e8afd6e33f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(VBox(children=(JupyterWgpuCanvas(), HBox(children=(Button(icon='expand-arrows-alt', layout=Layo…" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# 1 row, 3 columns, sync the first 2 subplots plots\n", "cnmf_grid_more = fpl.GridPlot((1, 3), controllers=[[0, 0, 1]], names=[[\"movie\", \"rcm\", \"temporal\"]])\n", @@ -731,7 +1109,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.9.2" } }, "nbformat": 4, diff --git a/notebooks/mcorr_cnmf.ipynb b/notebooks/mcorr_cnmf.ipynb index 8087b3d..fd4d86e 100644 --- a/notebooks/mcorr_cnmf.ipynb +++ b/notebooks/mcorr_cnmf.ipynb @@ -97,7 +97,7 @@ "outputs": [], "source": [ "# for this demo set this dir as the path to your `caiman_data` dir\n", - "set_parent_raw_data_path(\"/home/kushal/caiman_data/\")" + "set_parent_raw_data_path(\"/home/caitlin/caiman_data/\")" ] }, { @@ -592,7 +592,7 @@ "metadata": {}, "source": [ "# Visualization using `fastplotlib`\n", - "You will need `fastplotlib` installed for this, see https://github.com/kushalkolar/fastplotlib" + "You will need `fastplotlib` installed for this, see https://github.com/fastplotlib/fastplotlib" ] }, { @@ -1212,7 +1212,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.9.2" } }, "nbformat": 4,