Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
added "del Y" in line 527 to free up memory before recreating stack when calling np.stack(), so movie is not loaded twice on memory.
Description
When dealing with large movies, I always had an out of memory error in caiman.motion_correction.apply_shifts_movie.
Turns out here the movie is loaded twice onto the RAM when calling np.stack()
I deleted the movie loaded in Y inside the function before the m_reg stack is created.
Before this fix, movie took twice RAM space when running caiman.motion_correction.apply_shifts_movie
The code has been tested.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
Branching
All PRs should be made against the dev branch. The main branch is not often merged back to dev.
If you want to get your PR out to the world faster (urgent bugfix), poke pgunn to cut a release; this will get it onto github and into conda faster
Has your PR been tested?
If you're fixing a bug or introducing a new feature it is recommended you run the tests by typing
caimanmanager test
and
caimanmanager demotest
prior to submitting your pull request.
Please describe any additional tests that you ran to verify your changes. If they are fast you can also
include them in the folder 'caiman/tests/and name themtest_***.py` so they can be included in our lists of tests.
added "del Y" in line 527 to free up memory before recreating stack when calling np.stack(), so movie is not loaded twice on memory.
Description
When dealing with large movies, I always had an out of memory error in caiman.motion_correction.apply_shifts_movie. Turns out here the movie is loaded twice onto the RAM when calling np.stack() I deleted the movie loaded in Y inside the function before the m_reg stack is created. Before this fix, movie took twice RAM space when running caiman.motion_correction.apply_shifts_movie The code has been tested.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Branching
Has your PR been tested?
If you're fixing a bug or introducing a new feature it is recommended you run the tests by typing
caimanmanager test
and
caimanmanager demotest
prior to submitting your pull request.
Please describe any additional tests that you ran to verify your changes. If they are fast you can also include them in the folder 'caiman/tests/
and name them
test_***.py` so they can be included in our lists of tests.