flatironinstitute / flatironinstitute/CaImAn-MATLAB

Porblem with normcorre: Index in position 3 is invalid. Array indices must be positive integers or logical values.

Open
#114 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MATLAB
Stars
261
Forks
152
PR merge metrics
No merged PRs in 30d

Description

- **Describe the issue that you are experiencing**
Hello, I have a problem during a first phase (motion correction). At some point it gives me an error as below. I have all my h5 and shifts files in my folder at this point. When I continue with the analysis, I have another error at downsampling. When I continue, it turns out that the whole program analyzes just 30 of my 38 files, just like some of them are broken, which seems highly unlikely, as they are just cut out from the whole movie; this analysis worked for the data from another mouse that was processed identically.

- **Copy error log below**
Index in position 3 is invalid. Array indices must be positive integers or logical values.

Error in normcorre_batch_even (line 269)
mem_buffer(otherdims{:},rem_mem-lY+1:rem_mem) = cast(Mf,data_type);

Error in run_pipeline (line 36)
[M,shifts,template,options_mc,col_shift] = normcorre_batch_even(fullname,options_mc,template);

**The second error:**
Error using run_pipeline (line 85)
Cannot index into 'Y' because indices cannot be empty.

Error using uiimport (line 74)
Cannot open the Import Wizard on a file while the Import Wizard is open.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with normcorre_batch_even at line 269 and run_pipeline at lines 36 and 85, then reproduce the first error using the affected H5 and shifts files. Compare the failing input with the 30 successfully analyzed files and verify motion correction and downsampling handle all 38 files without indexing errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.