Commit 43368641 authored by tk11br's avatar tk11br
Browse files

Grading scaling changes for continous valued marks.

parent acc43a2f
......@@ -321,7 +321,7 @@ if ~isstr(data) % If NOT a 'noui' call or a callback from uicontrols
'mouse_data_front' 'datastd' 'normed' 'envelope' 'chaninfo' ...
'data_type' 'chan_marks_struct' 'time_marks_struct' ...
'marks_y_loc' 'inter_mark_int' 'inter_tag_int' ...
'marks_col_int' 'marks_col_alpha'},;
'marks_col_int' 'marks_col_alpha' },;
otherwise, error(['ve_eegplot: unrecognized option: ''' gfields{index} '''' ]);
end;
end;
......@@ -1317,7 +1317,9 @@ else
time_marks_offset=diff(ylims)*g.marks_y_loc;
% plot time_info flags.
cmap=[];
cmap=[];
g.scalingMin = zeros(1,length(g.time_marks_struct));
g.scalingVal = zeros(1,length(g.time_marks_struct));
j=0;
% loop through each time mark.
......@@ -1327,6 +1329,16 @@ else
cflags=double([g.time_marks_struct(tmi).flags(lowlim:highlim);g.time_marks_struct(tmi).flags(lowlim:highlim)]);
%cdat=cflags;
%scale the flag values from 0 to 1.
g.scalingMin(tmi) = min(g.time_marks_struct(tmi).flags);
g.scalingVal(tmi) = max(g.time_marks_struct(tmi).flags)-g.scalingMin(tmi);
if g.scalingVal(tmi) < 1;
g.scalingVal(tmi) = 1;
end
cflags=(cflags - g.scalingMin(tmi))/g.scalingVal(tmi);
set(figh,'UserData',g);
% scale values of flags according to marks_col_int.
cdat=g.marks_col_int*round(cflags/g.marks_col_int);
......
......@@ -50,7 +50,20 @@ end
EEG = eeg_checkset(EEG, 'eventconsistency');
% ve_edit maintains original and does everything for us.
EEG.marks.time_info = udf.time_marks_struct;
% % Iterate through each marking type
% for i=1:length(EEG.marks.time_info)
% % Read from the initial udf struct and multiply the scaling val and
% % store in EEG structure as intermediate
% EEG.marks.time_info(i).flags = udf.time_marks_struct(i).flags * udf.scalingVal(i);
% % Read from EEG struct and add the minimum back in and assign to EEG.
% EEG.marks.time_info(i).flags = EEG.marks.time_info(i).flags + udf.scalingMin(i);
% end
disp('wat');
%% HANDLE MANUAL SELECTION OF CHANNELS. UPDATE "manual" chan_info...
target_mark = '';
switch udf.data_type
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment