-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNMF notebook update #1075
CNMF notebook update #1075
Conversation
demos/notebooks/demo_pipeline.ipynb
Outdated
@@ -4,7 +4,8 @@ | |||
"cell_type": "markdown", | |||
"metadata": {}, | |||
"source": [ | |||
"<html><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><style type=\"text/css\">ol</style></head><body class=\"c5\"><p class=\"c0 c4\"><span class=\"c3\"></span></p><p class=\"c2 title\" id=\"h.rrbabt268i6e\"><h1>CaImAn’s Demo pipeline</h1></p><p class=\"c0\"><span class=\"c3\">This notebook will help to demonstrate the process of CaImAn and how it uses different functions to denoise, deconvolve and demix neurons from a two-photon Calcium Imaging dataset. The demo shows how to construct the `params`, `MotionCorrect` and `cnmf` objects and call the relevant functions. You can also run a large part of the pipeline with a single method (`cnmf.fit_file`). See inside for details.\n", | |||
"# CNMF demo pipeline\n", | |||
"This notebook will help to demonstrate the process of CaImAn and how it uses different functions to denoise, deconvolve and demix neurons from a two-photon Calcium Imaging dataset. The demo shows how to construct the `params`, `MotionCorrect` and `cnmf` objects and call the relevant functions. You can also run a large part of the pipeline with a single method (`cnmf.fit_file`). See inside for details.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably change the wording to avoid the potentially confusing future tense here.
"This notebook demonstrates the process of using Caiman and how it uses different functions..."
Thoughts:
This might be better done in a different nb entirely. I will eventually make a visualization for this in the mesmerize demo nbs, but it just uses the
Might be more organized in a separate nb?
Also a dedicate notebook with a longer discussion on this would be really useful. We could use some of the ideas from Peter Rupretch too. |
Thanks Kushal yes probably shouldn't go down the rabbit hole with this, but was just thinking of adding a tad more explanation for the component evaluation step than is already there. Should probably be a separate notebook for a deep dive (that could easily be a very long notebook).
Yes definitely I shouldn't aim to go deep with any of this the nb would take too long to make.
Yes, as before I should clarify I don't want to go deep, just a bit more than is done now (which is effectively nothing). I just remember finishing the notebooks and being like...wait did deconvolution happen yet? I'd like it to give an accurate gloss that makes users feel like they've got the basic pipeline explained, but leave the details to "auxilliary" notebooks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some phrasing/typo things
demos/notebooks/demo_pipeline.ipynb
Outdated
@@ -187,11 +187,9 @@ | |||
"metadata": {}, | |||
"source": [ | |||
"## Setting up parameters\n", | |||
"While there are many parameters used in CaImAn for the different steps in the pipeline, you only have to think about a few of them in each step, which we will discuss below. \n", | |||
"Parameters are defined in a standalone parameters object. We create this object by passing parameters as a single dictionary to the `CNMFParams` class below. The parameters *not* explicitly defined in the dictionary will assume default values. A paramter object (let's call it `parameters`) is effectively a collection of dictionaries that each contains parameters relevant to different settings. Some related to the dataset in general (`parameters.data`), while most are relaed to particular aspects of the workflow such as motion correction (`parameters.motion`), component extraction (`parameters.spatial` and `parameters.temporal`), quality evaluation (`parameters.quality`), and others. \n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "A parameter object"
demos/notebooks/demo_pipeline.ipynb
Outdated
@@ -187,11 +187,9 @@ | |||
"metadata": {}, | |||
"source": [ | |||
"## Setting up parameters\n", | |||
"While there are many parameters used in CaImAn for the different steps in the pipeline, you only have to think about a few of them in each step, which we will discuss below. \n", | |||
"Parameters are defined in a standalone parameters object. We create this object by passing parameters as a single dictionary to the `CNMFParams` class below. The parameters *not* explicitly defined in the dictionary will assume default values. A paramter object (let's call it `parameters`) is effectively a collection of dictionaries that each contains parameters relevant to different settings. Some related to the dataset in general (`parameters.data`), while most are relaed to particular aspects of the workflow such as motion correction (`parameters.motion`), component extraction (`parameters.spatial` and `parameters.temporal`), quality evaluation (`parameters.quality`), and others. \n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"that each contains" -> "each containing"
demos/notebooks/demo_pipeline.ipynb
Outdated
@@ -187,11 +187,9 @@ | |||
"metadata": {}, | |||
"source": [ | |||
"## Setting up parameters\n", | |||
"While there are many parameters used in CaImAn for the different steps in the pipeline, you only have to think about a few of them in each step, which we will discuss below. \n", | |||
"Parameters are defined in a standalone parameters object. We create this object by passing parameters as a single dictionary to the `CNMFParams` class below. The parameters *not* explicitly defined in the dictionary will assume default values. A paramter object (let's call it `parameters`) is effectively a collection of dictionaries that each contains parameters relevant to different settings. Some related to the dataset in general (`parameters.data`), while most are relaed to particular aspects of the workflow such as motion correction (`parameters.motion`), component extraction (`parameters.spatial` and `parameters.temporal`), quality evaluation (`parameters.quality`), and others. \n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Some are related"
demos/notebooks/demo_pipeline.ipynb
Outdated
@@ -187,11 +187,9 @@ | |||
"metadata": {}, | |||
"source": [ | |||
"## Setting up parameters\n", | |||
"While there are many parameters used in CaImAn for the different steps in the pipeline, you only have to think about a few of them in each step, which we will discuss below. \n", | |||
"Parameters are defined in a standalone parameters object. We create this object by passing parameters as a single dictionary to the `CNMFParams` class below. The parameters *not* explicitly defined in the dictionary will assume default values. A paramter object (let's call it `parameters`) is effectively a collection of dictionaries that each contains parameters relevant to different settings. Some related to the dataset in general (`parameters.data`), while most are relaed to particular aspects of the workflow such as motion correction (`parameters.motion`), component extraction (`parameters.spatial` and `parameters.temporal`), quality evaluation (`parameters.quality`), and others. \n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "while most are related"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Pat, changes made!
demos/notebooks/demo_pipeline.ipynb
Outdated
"## Select files for processing\n", | ||
"Many acquisition systems break up data from a single session across multiple files. This demo shows how to work with lists of filepaths that represent multiple movies from the same recording session. While this demo works with `tif` files, Caiman can handle movies in multiple common formats such as:\n", | ||
"\n", | ||
" tiff, hdf5, nwb, avi, zarr, h5, npz, n5\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hdf5 and h5 should not both be in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to hdf5/h5
99dd986
to
a15d837
Compare
Realized I had branched from main not dev, so fixed that. No need for re-review all these commits they are repeats. :) |
Note not quite done -- need to update links (it still mentions appendices in a couple of places), and I want to decrease verbosity in a couple of places. |
Will look at the merge conflict. Not sure what is up with that. |
Merge conflicts handled, review comments absorbed. |
caiman/cluster.py
Outdated
backend | ||
One of: | ||
'multiprocessing' - Use multiprocessing library | ||
'ipyparallel' - Use ipyparallel instead (better on Windows?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, is this related to the requirement to have an if __name__ == "__main__"
on windows?
In interests of letting good be the enemy of the perfect, and letting user feedback guide development, I think we should merge into dev unless there are major problems. I see this as useful step forward for initial users over previous iteration. Could add stuff on deconvolution, but I don't understand it very well so I'm not going to try right now. Plan to go through CNMFE this week with similar course-toothed comb. |
Description
Updating CNMF demo notebook. This isn't a fix, but part of roadmap to revitalize all the major notebooks to include more explanation and generally increasing accessibility to the code base. This is part of:
Aims
This is a work in progress, will add more here as I work through it, but main goals for now: