Skip to content
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

modelPreprocessMovie NormCorre bug #120

Open
Antorithms opened this issue Jan 21, 2023 · 9 comments
Open

modelPreprocessMovie NormCorre bug #120

Antorithms opened this issue Jan 21, 2023 · 9 comments

Comments

@Antorithms
Copy link

Hi Biafra,
When trying to use NormCorre from the modelPreprocessMovie function in the gui, I run in the error below.
I guess it must be related to me not having run getNoRMCorreParams, but I am not sure..

Thanks again for your help,
Anto

`Getting NoRMCorre params...
@@@@@@@
Unable to resolve the name 'normcorre.NoRMCorreSetParms'.

Error in ciapkg.motion_correction.getNoRMCorreParams (line 75)
optsNC = normcorre.NoRMCorreSetParms(...

Error in ciapkg.motion_correction.turboregMovie/turboregMovieParallel (line 602)
optsNoRMCorre = ciapkg.motion_correction.getNoRMCorreParams(size(inputMovieCropped),'guiDisplay',0);

Error in ciapkg.motion_correction.turboregMovie (line 377)
turboregMovieParallel();

Error in ciapkg.api.turboregMovie (line 10)
[inputMovie, ResultsOutOriginal] = ciapkg.motion_correction.turboregMovie(inputMovie,'passArgs', varargin);

Error in ciatah/modelPreprocessMovieFunction/subfxn_turboregInputMovie (line 2019)
[thisMovie(:,:,movieSubset), ResultsOutOriginal{iterationNo}{thisSet}] = turboregMovie(thisMovie(:,:,movieSubset),'options',ioptions);

Error in ciatah/modelPreprocessMovieFunction (line 906)
subfxn_turboregInputMovie();

Error in ciatah/modelPreprocessMovie (line 42)
obj.modelPreprocessMovieFunction('folderListPath',folderListInfo,'fileFilterRegexp',options.fileFilterRegexp,'datasetName',options.datasetName,'frameList',[]);

Error in ciatah/runPipeline (line 209)
obj.(thisFxn{1});

Error in ciatah/display (line 6)
obj.runPipeline;
@@@@@@@
@@@@@@@
Unable to resolve the name 'normcorre.normcorre_batch'.

Error in ciapkg.motion_correction.turboregMovie/turboregMovieParallel (line 610)
[~,ResultsOut,template2] = normcorre.normcorre_batch(...

Error in ciapkg.motion_correction.turboregMovie (line 377)
turboregMovieParallel();

Error in ciapkg.api.turboregMovie (line 10)
[inputMovie, ResultsOutOriginal] = ciapkg.motion_correction.turboregMovie(inputMovie,'passArgs', varargin);

Error in ciatah/modelPreprocessMovieFunction/subfxn_turboregInputMovie (line 2019)
[thisMovie(:,:,movieSubset), ResultsOutOriginal{iterationNo}{thisSet}] = turboregMovie(thisMovie(:,:,movieSubset),'options',ioptions);

Error in ciatah/modelPreprocessMovieFunction (line 906)
subfxn_turboregInputMovie();

Error in ciatah/modelPreprocessMovie (line 42)
obj.modelPreprocessMovieFunction('folderListPath',folderListInfo,'fileFilterRegexp',options.fileFilterRegexp,'datasetName',options.datasetName,'frameList',[]);

Error in ciatah/runPipeline (line 209)
obj.(thisFxn{1});

Error in ciatah/display (line 6)`

@bahanonu
Copy link
Owner

Glad to help, what is the output when you run normcorre.NoRMCorreSetParms('d1',512,'d2',512) from the command window?

@Antorithms
Copy link
Author

Hi Biafra,
I get Unable to resolve the name 'normcorre.NoRMCorreSetParms'.

@bahanonu
Copy link
Owner

Seems my packaged version of normcorre (https://github.com/bahanonu/NoRMCorre) might either not be downloaded or in the path (should under _external_programs\normcorre). Can use ciapkg.io.loadDependencies; on the command line then ciapkg.loadBatchFxns;.

@Antorithms
Copy link
Author

Thanks! I thought just cloning the repo would actually also download NormCorre automatically in external programs and this led to me not checking. Sorry about that.
Trying to run it now I get this error.

Template initialization complete.  Now registering all the frames with new template. 
4415 out of 4415 frames registered, iteration 1 out of 1..
Elapsed time is 131.539202 seconds.
Elapsed time is 131.706235 seconds.
registering frames...
@@@@@@@
Error using mat2cell
Input arguments, D1 through D4, must sum to each dimension of the input matrix size, [7  10   1   2].

Error in normcorre.apply_shifts (line 229)
                parfor ii = 1:lY 

Error in ciapkg.motion_correction.turboregMovie/registerMovie (line 656)
				inputMovie = normcorre.apply_shifts(inputMovie,ResultsOut,optsNC,bound/2,bound/2); % apply the shifts to the removed percentile

Error in ciapkg.motion_correction.turboregMovie (line 446)
	registerMovie();

Error in ciapkg.api.turboregMovie (line 10)
	[inputMovie, ResultsOutOriginal] = ciapkg.motion_correction.turboregMovie(inputMovie,'passArgs', varargin);

Error in ciatah/modelPreprocessMovieFunction/subfxn_turboregInputMovie (line 2019)
				[thisMovie(:,:,movieSubset), ResultsOutOriginal{iterationNo}{thisSet}] = turboregMovie(thisMovie(:,:,movieSubset),'options',ioptions);

Error in ciatah/modelPreprocessMovieFunction (line 906)
									subfxn_turboregInputMovie();

Error in ciatah/modelPreprocessMovie (line 42)
	obj.modelPreprocessMovieFunction('folderListPath',folderListInfo,'fileFilterRegexp',options.fileFilterRegexp,'datasetName',options.datasetName,'frameList',[]);

Error in ciatah/runPipeline (line 209)
				obj.(thisFxn{1});

Error in ciatah/display (line 6)
	obj.runPipeline;
@@@@@@@

@bahanonu
Copy link
Owner

What are the dimensions of the movie? And could you send a screenshot of the normcorre settings you used along with the _preprocess.log file in the processing_info?

@bahanonu
Copy link
Owner

Also, if you want to send me an email with a link to an example movie, I can take a look on my end and get back.

@Antorithms
Copy link
Author

Hi Biafra,
Here the log and the settings from the ModelPreprocessMovie gui. Frame dimensions are 400 640 and n of frames is around 35000.
Maybe relevant is that i manage to run preprocessing with the same video and turboreg.
Thanks a lot for your help.
Anto

20230125_132040_preprocess.log
image

@dprotter
Copy link

was there any resolution here? I am running into the same error.

@Antorithms
Copy link
Author

Not yet! Will post on this issue once solution is available

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