JinghaoLu / MIN1PIPE

A MINiscope 1-photon-based Calcium Imaging Signal Extraction PIPEline.
GNU General Public License v3.0
56 stars 25 forks source link

An UndefinedFunction error was thrown on the workers for 'wdenoise' #49

Open aozgur360 opened 3 years ago

aozgur360 commented 3 years ago

Hi,

Thank you so much for sharing this code! I am trying to run the min1pipe.m using the demo_data.tif and reach this error near the end. Any ideas for how to fix this? Thank you!

Begin final computation of translation score computed score of frame #300/500 computed score of frame #150/500 computed score of frame #100/500 computed score of frame #50/500 computed score of frame #250/500 computed score of frame #200/500 computed score of frame #350/500 computed score of frame #400/500 computed score of frame #450/500 computed score of frame #500/500 Done frame reg, total time: 274.3644 seconds Warning: Ignoring the version specified. The version flag is not required when using the '-append' flag.

In min1pipe (line 115) Overwrite post registered .mat file (data)? (y/n)y Analyzing and transferring files to the workers ...done. Error using trace_clean (line 4) An UndefinedFunction error was thrown on the workers for 'wdenoise'. This might be because the file containing 'wdenoise' is not accessible on the workers. Use addAttachedFiles(pool, files) to specify the required files to be attached. See the documentation for 'parallel.Pool/addAttachedFiles' for more details.

Error in noise_suppress (line 59) datat = trace_clean(datat, Fs, tflag);

Error in min1pipe (line 126) m = noise_suppress(m, imaxy, Fsi_new, nflag, filename_reg_post);

Caused by: Undefined function 'wdenoise' for input arguments of type 'double'.

JinghaoLu commented 3 years ago

Thanks for the question. Please check if you installed wavelet toolbox. Please also check the other dependent toolboxes here.

aozgur360 commented 3 years ago

Thank you, I have all of the toolboxes installed that were mentioned, including wavelet toolbox. Not sure why I am getting this error

JinghaoLu commented 3 years ago

Well you can try typing "edit wdenoise" in the matlab command line and see if you can call that function without problem.

vetLiaing commented 2 years ago

I also have the same problem (UndefinedFunction error about wdenoise). I typed "edit wdenoise" and it said there is no wdenoise.m file. But I'm very sure I have the wavelet toolbox and I can found it in the toolbox folder. May be my Matlab can not found the wdenoise in wavelet toolbox, but why?

JinghaoLu commented 2 years ago

@vetLiaing Did you verify that the toolbox is in matlab path?

vetLiaing commented 2 years ago

All my toolboxs are in the root folder of matlab. I installed them at the same time I install matlab. I tried add the wavelet toolbox in to the path, but the problem is still happened.

JinghaoLu commented 2 years ago

@vetLiaing I found this: https://www.mathworks.com/matlabcentral/answers/5200-undefined-function-or-method-for-input-arguments-of-type-double

vetLiaing commented 2 years ago

I tried the earlier version of Min1pipe and it's no problem to run it. The new version might not be run well on old Matlab? (I'm using 2016b). but anyway I can process my video with Min1pipe. Thank you very much.

JinghaoLu commented 2 years ago

@vetLiaing please try not to use the previous version. And from the readme page of the MIN1PIPE repo you can see that the software recommendation is matlab 2017 and later, so combining the link I shared with you, you might have license issue on a older matlab.