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

Slow wave detection #4

Open
gDegano opened this issue Jan 9, 2017 · 0 comments
Open

Slow wave detection #4

gDegano opened this issue Jan 9, 2017 · 0 comments

Comments

@gDegano
Copy link

gDegano commented Jan 9, 2017

Good morning,
I'm Giulio Degano and I'm writing you because I'm getting a problem with the slow wave detector of FASST toolbox.
First of all when I open the GUI I cannot visualize the window 'Review all SWs' as you show in the manual. Secondly when I run the detection I'm getting this error:

`Error using file_array/subsasgn (line 28)
Reference to non-existent field "fnamedat".

Error in crc_save_spm (line 31)
new_Ds.data.fnamedat = [prefix name '.dat'];

Error in crc_extractSW (line 134)
SW = crc_save_spm(prefix,Ds,swdat);

Error in crc_SWS_detect (line 102)
[Ds,cleanSW]=crc_extractSW(Dss,handles.analyse,crcdef.stagesw,scorer);

Error in crc_sws_detection>pushbutton_OK_Callback (line 702)
D=crc_SWS_detect(handles);

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

Error in crc_sws_detection (line 51)
gui_mainfcn(gui_State, varargin{:});

Error while evaluating DestroyedObject Callback`

My first idea was that maybe I was having some issues with the conversion to Matlab structure in crc_save_spm, so I did this.

`new_Ds = struct(D);

%%%%%%%% MODIFIED!
new_Ds.data = struct(new_Ds.data);
%%%%%%%%

[kk1 name kk2] = fileparts(D.fname);
new_Ds.data.fnamedat = [prefix name '.dat'];

% remove scale field
if isfield(new_Ds.data,'scale')
new_Ds.data = rmfield(new_Ds.data,'scale');
end

if exist(fullfile(new_Ds.path,new_Ds.data.fnamedat),'file')
spm_unlink(fullfile(new_Ds.path,new_Ds.data.fnamedat))
disp(['!!! WARNING : EXISTING ' new_Ds.data.fnamedat ' FILE OVERWRITTEN !!!' ])
end
`
It kinda solve the problem for the detection of the 'complete file', but, as I expected, I received another problem for the detection on the stages scored 2 and 3:

`Error using file_array/subsref>access_fields (line 142)
Reference to non-existent field "fnamedat".

Error in file_array/subsref (line 17)
varargout = access_fields(obj,subs);

Error in crc_append_spm (line 26)
fpd_clean = fopen(fullfile(new_Ds.path, new_Ds.data.fnamedat), 'a'); % 'a'
append

Error in crc_extractSW (line 143)
SW = crc_append_spm(SW,swdat);

Error in crc_SWS_detect (line 96)
[Ds, cleanSW] =
crc_extractSW(Dss,handles.analyse,handles.stagesw,scorer);

Error in crc_sws_detection>pushbutton_OK_Callback (line 702)
D=crc_SWS_detect(handles);

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

Error in crc_sws_detection (line 51)
gui_mainfcn(gui_State, varargin{:});

Error while evaluating DestroyedObject Callback`

that is probably because of my modification.

Can you help me please?

Best regards
Giulio

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

1 participant