flatironinstitute / CaImAn

Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
https://caiman.readthedocs.io
GNU General Public License v2.0
639 stars 370 forks source link

First time using python and CaImAn, basic questions #357

Closed UCLAmini-user closed 6 years ago

UCLAmini-user commented 6 years ago

Hi, I use the macOS, Python 3.6, and Jupyter Notebook. I'm planning on using the UCLA miniscope, so I'll get my recordings in .avi format. My current status is that I installed Anaconda and git cloned this CaImAn repository.

I'm totally new to Python itself let alone CaImAn, so I'm completely lost and have 2 questions to get started:

Question #1: I tried running 'demo_pipeline.ipynb' first, as suggested, an got an error while running the following code.

if fname[0] in ['Sue_2x_300040-46.tif','demoMovie.tif']: fname = [download_demo(fname[0])]

The error message was like this:

Exception: Cannot find the example_movies folder in your caiman_datadir - did you make one with caimanmanager.py?

I already processed 'caimanmanager.py install' in the terminal, so I can't find what the problem is. Is it just because I don't have a video file from an actual recording yet?

Question #2. If I were to get an .avi file with the UCLA miniscope, where should I place that file, and what python file would I have to run to do a full analysis (from motion correction to delta F/F)?

I know the questions will probably be very easy to most users, and I tried my best to solve it on my own the whole day but I just can't seem to be able to get to the next step. Huge thanks in advance to anyone who might help me out! I really appreciate it!

pgunn commented 6 years ago

Hi, Don't worry about not knowing things - asking questions is how people learn. If you don't know Python, fortunately you don't need to learn it to expert level to use Caiman well, although it is a good idea to learn it up to the level of being able to script with it reasonably because it will help you understand how to work with the code.

The README should cover this, but download_demo should be able to fetch a demo movie into the necessary directory for you. Can you send me the output of this from the terminal:

ls ~/caiman_data

UCLAmini-user commented 6 years ago

Thank you so much for your help! This is the output from the terminal for ls ~/caiman_data:

2018-08-24 9 07 55

Yes, I was expecting download_demo to fetch a demo movie from the 'example_movies' folder. But the error message says "Exception: Cannot find the example_movies folder in your caiman_datadir" for some unknown reason. Which is weird, because I have example_movies in the CaImAn folder!

2018-08-24 9 12 37

Or would you happen to know what caiman_datadir is?

pgunn commented 6 years ago

From the command prompt, can you do the following?

echo $CAIMAN_DATA

UCLAmini-user commented 6 years ago

I don't know how, but I got past this issue just now by re-installing everything. Thank you for all the trouble I really appreciate it! Thank you👍