Skip to content

Commit

Permalink
add notes to demo nbs
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalkolar committed Nov 5, 2023
1 parent a175d04 commit fdf8aba
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 12 deletions.
53 changes: 52 additions & 1 deletion notebooks/cnmfe.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "3f25bdda-7790-454c-aafb-bbee6f9ab9cd",
"metadata": {},
"source": [
"# Running this notebook\n",
"\n",
"**The visualizations in this notebook will run in [jupyter lab](https://github.com/jupyterlab/jupyterlab#installation), not jupyter notebook. Google colab is not supported either. VS Code notebooks _might_ work but that has not been tested.** See the fastplotlib supported frameworks for more info: https://github.com/fastplotlib/fastplotlib/#supported-frameworks "
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -28,6 +38,46 @@
"from mesmerize_viz import *"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2e1fb091-b86c-45c3-a59d-995a7ef28cc1",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from mesmerize_core.caiman_extensions.cnmf import cnmf_cache"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e174dd7d-a1ed-43ec-a0c0-cda1e1ee81b3",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"if os.name == \"nt\":\n",
" # disable the cache on windows, this will be automatic in a future version\n",
" cnmf_cache.set_maxsize(0)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1ff12d10-980d-454a-a023-e593243a0709",
"metadata": {},
"outputs": [],
"source": [
"# Mac users!\n",
"# temporary patch for Mac, won't be necessary in next release\n",
"# Thanks Ryan Ly for the PR! :D I need to dig into it more before merging\n",
"# conda_prefix_1_str = os.environ['CONDA_PREFIX'].replace(os.path.join(' ', 'envs', 'mescore')[1:], '')\n",
"# os.environ['CONDA_PREFIX_1'] = conda_prefix_1_str"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -37,6 +87,7 @@
},
"outputs": [],
"source": [
"# This is just a pandas table display formatting option\n",
"pd.options.display.max_colwidth = 120"
]
},
Expand Down Expand Up @@ -1231,7 +1282,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.11.2"
}
},
"nbformat": 4,
Expand Down
25 changes: 14 additions & 11 deletions notebooks/mcorr_cnmf.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "3f221a4a-8930-4fbf-85a1-aaa6b959bf54",
"metadata": {},
"source": [
"# Running this notebook\n",
"\n",
"**The visualizations in this notebook will run in [jupyter lab](https://github.com/jupyterlab/jupyterlab#installation), not jupyter notebook. Google colab is not supported either. VS Code notebooks _might_ work but that has not been tested.** See the fastplotlib supported frameworks for more info: https://github.com/fastplotlib/fastplotlib/#supported-frameworks "
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -18,10 +28,10 @@
"import numpy as np\n",
"import pandas as pd\n",
"from matplotlib import pyplot as plt\n",
"import fastplotlib as fpl\n",
"\n",
"import mesmerize_core as mc\n",
"import mesmerize_viz\n",
"import fastplotlib as fpl"
"import mesmerize_viz"
]
},
{
Expand Down Expand Up @@ -64,21 +74,14 @@
"# os.environ['CONDA_PREFIX_1'] = conda_prefix_1_str"
]
},
{
"cell_type": "markdown",
"id": "c646c333-1306-4043-b5aa-3cb63fd9966f",
"metadata": {},
"source": [
"**You will need `mesmerize-viz` installed for the visualizations**"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d8e11779-e36d-42d6-a885-8a527742195b",
"metadata": {},
"outputs": [],
"source": [
"# This is just a pandas table display formatting option\n",
"pd.options.display.max_colwidth = 120"
]
},
Expand Down Expand Up @@ -1837,7 +1840,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.11.2"
}
},
"nbformat": 4,
Expand Down

0 comments on commit fdf8aba

Please sign in to comment.