Skip to content

Commit

Permalink
finish cnmfe viz
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalkolar committed Nov 8, 2023
1 parent 24a0bca commit 7cfc314
Showing 1 changed file with 41 additions and 25 deletions.
66 changes: 41 additions & 25 deletions notebooks/cnmfe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
"metadata": {},
"outputs": [],
"source": [
"viz_mcor.show()"
"viz_mcor.show(sidecar=True)"
]
},
{
Expand Down Expand Up @@ -754,6 +754,34 @@
"viz_mcor.image_widget.frame_apply = funcs"
]
},
{
"cell_type": "markdown",
"id": "956cfc23-f47b-4b4d-8416-538a4feadc38",
"metadata": {},
"source": [
"Same exact visualization widget as shown in the `mcorr_cnmf.ipynb` 2p demo, so the same level of customization applies. It's the same type of object."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e53b19ff-c5fc-45a9-9336-bbc27b3ddd5a",
"metadata": {},
"outputs": [],
"source": [
"viz_mcor.image_widget.cmap = \"gray\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2b962143-07ac-4097-ad75-c4799ff41a0f",
"metadata": {},
"outputs": [],
"source": [
"viz_mcor.close()"
]
},
{
"cell_type": "markdown",
"id": "9ad69731-e057-4ad7-acf7-dd61269ecd72",
Expand Down Expand Up @@ -784,8 +812,8 @@
"outputs": [],
"source": [
"# make a list of rows we want to keep using the uuids\n",
"rows_keep = [df.iloc[3].uuid]\n",
"rows_keep"
"# rows_keep = [df.iloc[3].uuid]\n",
"# rows_keep"
]
},
{
Expand All @@ -795,11 +823,11 @@
"metadata": {},
"outputs": [],
"source": [
"for i, row in df.iterrows():\n",
" if row.uuid not in rows_keep:\n",
" df.caiman.remove_item(row.uuid)\n",
"# for i, row in df.iterrows():\n",
"# if row.uuid not in rows_keep:\n",
"# df.caiman.remove_item(row.uuid)\n",
"\n",
"df"
"# df"
]
},
{
Expand Down Expand Up @@ -1154,18 +1182,6 @@
"# Visualize using `mesmerize-viz`"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "800ec0ae-d636-490d-9f3d-2d18cef3f671",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from mesmerize_viz import *"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -1175,7 +1191,7 @@
},
"outputs": [],
"source": [
"viz = df.cnmf.viz(\n",
"viz_cnmf = df.cnmf.viz(\n",
" image_data_options=[\"input\", \"rcm\"], # cnmfe does not support rcb and residuals yet\n",
")"
]
Expand All @@ -1189,15 +1205,15 @@
},
"outputs": [],
"source": [
"viz.show()"
"viz_cnmf.show(sidecar=True)"
]
},
{
"cell_type": "markdown",
"id": "5d36df25-2c1b-498b-9250-91b49fc3466a",
"metadata": {},
"source": [
"# This seemingly complex visualization is still customizable!\n",
"# This rich visualization is still customizable!\n",
"\n",
"Public attributes:\n",
"\n",
Expand Down Expand Up @@ -1229,7 +1245,7 @@
},
"outputs": [],
"source": [
"viz.image_widget"
"viz_cnmf.image_widget"
]
},
{
Expand All @@ -1245,7 +1261,7 @@
" 0: lambda frame: high_pass_filter_space(frame, (3, 3))\n",
"}\n",
"\n",
"viz.image_widget.frame_apply = funcs"
"viz_cnmf.image_widget.frame_apply = funcs"
]
},
{
Expand All @@ -1255,7 +1271,7 @@
"metadata": {},
"outputs": [],
"source": [
"viz.image_widget.cmap = \"gray\""
"viz_cnmf.image_widget.cmap = \"gray\""
]
},
{
Expand Down

0 comments on commit 7cfc314

Please sign in to comment.