csn-le / wave_clus

A fast and unsupervised algorithm for spike detection and sorting using wavelets and super-paramagnetic clustering
121 stars 65 forks source link

Saving error "-V6 option may not be used in combination with the -V7.3 option" #190

Closed GuthrieDyce closed 3 years ago

GuthrieDyce commented 3 years ago

Hello all,

I have recently encountered the following error while trying to save my progress in wave_clus.

"Error using save The -V6 option may not be used in combination with the -V7.3 option.

Error in wave_clus>save_clusters_button_Callback (line 587) eval(['save( ''' outfile ''',''' var_list '' ver ',''-v7.3'');']);

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in wave_clus (line 63) gui_mainfcn(gui_State, varargin{:});

Error while evaluating UIControl Callback"

I do not think I have ever seen this error before. Does anyone know why this occurs and how to fix it?

GuthrieDyce commented 3 years ago

Just a follow-up here. I thought I might have been trying to save too much information because I lowered my spike detection threshold too much, but I successfully saved sorted units from another channel containing more spikes.

ferchaure commented 3 years ago

You are right, the issue is related to the size of the file but the unusual error message appears for a bug on a catch trying to change the file format. You can download the new code and try again, and maybe it will work fine.

GuthrieDyce commented 3 years ago

I only recently re-downloaded the code. Has there been an update in the last couple of weeks which might have fixed this? If not, do you have any idea how many spikes one has to detect before this error is likely to start appearing? Many thanks, Guthrie

ferchaure commented 3 years ago

Has there been an update in the last couple of weeks which might have fixed this?

Yes, yesterday. Probably it fixes the issue.

GuthrieDyce commented 3 years ago

I have tried again with this same channel after re-downloading waveclus. The first time I tried to save my progress I got no error message but only a 5 kb "times[filename]" file was created. I tried to save again and got the following error: " Error using wave_clus('save_clusters_button_Callback',gcbo,[],guidata(gcbo),0) Error: Unexpected MATLAB expression.

Error in wave_clus>save_clusters_button_Callback (line 587) eval(['save( ''' outfile ''',''' var_list ''',''-v7.3'');']);

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in wave_clus (line 63) gui_mainfcn(gui_State, varargin{:});

Error while evaluating UIControl Callback " If I try loading [filename] while "times_[filename]" is in the same directory, I get the following error:

" Error using wave_clus>load_data_button_Callback (line 230) Less than 15 spikes detected

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in wave_clus (line 63) gui_mainfcn(gui_State, varargin{:});

Error using matlab.ui.internal.dialog.FileOpenChooser/doShowDialog (line 88) Error while evaluating UIControl Callback "

If I delete "times_[filename]" and reload [filename], I can load the data and sort it, but then I am back to the saving problem. I hope this helps.

ferchaure commented 3 years ago

ok, Can you try with the code I just update?

GuthrieDyce commented 3 years ago

I retried with the updated code, started sorting the data file from scratch and was able to successfully save! Thank you so much! I'm curious to know what the problem was now. Happy holidays!

ferchaure commented 3 years ago

Some .mat versions have limitations on the maximum size of the file. If the save fails the idea was to save in other format (a slower one) without that limitation. But I added a typo coding that exception .