Skip to content

index -900 is out of bounds for axis 0 with size 100 #919

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

Closed
MarziyehPourmousavi opened this issue Sep 30, 2021 · 2 comments
Closed

index -900 is out of bounds for axis 0 with size 100 #919

MarziyehPourmousavi opened this issue Sep 30, 2021 · 2 comments

Comments

@MarziyehPourmousavi
Copy link

For better support, please use the template below to submit your issue. When your issue gets resolved please remember to close it.

Sometimes errors while running CNMF occur during parallel processing which prevents the log to provide a meaningful error message. Please reproduce your error with setting dview=None.

If you need to upgrade CaImAn follow the instructions given in the documentation.

  • Tell us a bit about your setup:
  1. Operating system (Linux/macOS/Windows):

  2. Python version (3.x):

  3. Working environment (Python IDE/Jupyter Notebook/other):

  4. Which of the demo scripts you're using for your analysis (if applicable):

  5. CaImAn version*:

  6. CaImAn installation process (pip install ./pip install -e ./conda):

*You can get the CaImAn version by creating a params object and then typing params.data['caiman_version']. If the field doesn't exist, type N/A and consider upgrading)

Traceback (most recent call last):

File "C:\Users\TANDIS\caiman_data\demos\general\demo_pipeline.py", line 276, in
main()

File "C:\Users\TANDIS\caiman_data\demos\general\demo_pipeline.py", line 208, in main
Cns = local_correlations_movie_offline(mc.mmap_file[0],

File "c:\users\tandis\caiman\caiman\summary_images.py", line 773, in local_correlations_movie_offline
parallel_result = dview.map_async(local_correlations_movie_parallel, params).get(4294967)

File "C:\Users\TANDIS\anaconda3\lib\multiprocessing\pool.py", line 771, in get
raise self._value

File "C:\Users\TANDIS\anaconda3\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))

File "C:\Users\TANDIS\anaconda3\lib\multiprocessing\pool.py", line 48, in mapstar
return list(map(*args))

File "c:\users\tandis\caiman\caiman\summary_images.py", line 784, in local_correlations_movie_parallel
mv = cm.load(mv_name, subindices=idx, in_memory=True)

File "c:\users\tandis\caiman\caiman\base\movies.py", line 1715, in load
images = images[subindices]

File "C:\Users\TANDIS\anaconda3\lib\site-packages\numpy\core\memmap.py", line 331, in getitem
res = super(memmap, self).getitem(index)

IndexError: index -900 is out of bounds for axis 0 with size 100

@j-friedrich
Copy link
Contributor

When you call local_correlations_movie_offline the argument window must be smaller or equal than the total number of frames. You seem to have 100 frames but use window=1000.

@pgunn
Copy link
Member

pgunn commented Oct 1, 2021

@j-friedrich We might want to consider checking for this and raising an exception if the user tries to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants