Skip to content

Commit

Permalink
Update subversion
Browse files Browse the repository at this point in the history
Fix bug for plotting in the validation GUI
  • Loading branch information
mnavarretem committed Nov 16, 2022
1 parent b6761e9 commit 18a4244
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 54 deletions.
116 changes: 63 additions & 53 deletions Auxiliar-GUI/p_HFOAnalysisTool.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
% mnavarretem@gmail.com
%
% Copyright (C) 2015, Miguel Navarrete
% $Version: 0.19.8$ || $Date: 2019/08/20 09:15$
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -73,6 +74,7 @@ function p_HFOAnalysisTool()
st_Line.FilterEvent = [];
st_Line.PowerSpect = [];
st_Line.TFImage = [];
st_Line.Spectrogram = [];

%% [Variable] - HFO Info -

Expand Down Expand Up @@ -462,7 +464,6 @@ function p_HFOAnalysisTool()
'YTickLabel',[]);

linkaxes([st_hAxes.Signal,st_hAxes.Filtered,st_hAxes.TimeFreq],'x')


%% [Controls] (Cursors)

Expand All @@ -487,56 +488,8 @@ function p_HFOAnalysisTool()
'FaceColor',st_Cursors.s_ColorCur2,...
'EdgeColor','none',...
'ButtonDownFcn',@f_CursorClick);

st_Cursors.v_hCurLine1(1) = line(...
'Xdata',[st_Cursors.s_PosCur1 ...
st_Cursors.s_PosCur1],...
'Ydata',get(st_hAxes.Signal,'YLim'),...
'Parent',st_hAxes.Signal,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur1);

st_Cursors.v_hCurLine2(1) = line(...
'Xdata',[st_Cursors.s_PosCur2 ...
st_Cursors.s_PosCur2],...
'Ydata',get(st_hAxes.Signal,'YLim'),...
'Parent',st_hAxes.Signal,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur2);


st_Cursors.v_hCurLine1(2) = line(...
'Xdata',[st_Cursors.s_PosCur1 ...
st_Cursors.s_PosCur1],...
'Ydata',get(st_hAxes.Filtered,'YLim'),...
'Parent',st_hAxes.Filtered,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur1);

st_Cursors.v_hCurLine2(2) = line(...
'Xdata',[st_Cursors.s_PosCur2 ...
st_Cursors.s_PosCur2],...
'Ydata',get(st_hAxes.Filtered,'YLim'),...
'Parent',st_hAxes.Filtered,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur2);


st_Cursors.v_hCurLine1(3) = line(...
'Xdata',[st_Cursors.s_PosCur1 ...
st_Cursors.s_PosCur1],...
'Ydata',get(st_hAxes.TimeFreq,'YLim'),...
'Parent',st_hAxes.TimeFreq,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur1);

st_Cursors.v_hCurLine2(3) = line(...
'Xdata',[st_Cursors.s_PosCur2 ...
st_Cursors.s_PosCur2],...
'Ydata',get(st_hAxes.TimeFreq,'YLim'),...
'Parent',st_hAxes.TimeFreq,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur2);
%plot cursors
f_PlotCursors()

%% [Controls] (Info Panel)
% --- Labels ---
Expand Down Expand Up @@ -1377,6 +1330,9 @@ function f_DisplayProcess(~,~)
% Plot Lines
f_LinesBuild()

% Plot Cursors
f_PlotCursors()

% Set Time Freq
f_ScalogramSet()

Expand Down Expand Up @@ -1558,7 +1514,7 @@ function f_LinesBuild()
f_AxeSetYLims()

% Set Original Signal Interval
cla(st_hAxes.Signal)
st_Line.SignalWind = line(...
'Xdata',st_EvInfo.v_TimeAxe(...
st_EvControl.s_PosIni:...
Expand Down Expand Up @@ -1586,6 +1542,8 @@ function f_LinesBuild()
'Color',v_EventColor);
end

% Set Original Filtered Interval
cla(st_hAxes.Filtered)
st_Line.FilterWind = line(...
'Xdata',st_EvInfo.v_TimeAxe(...
st_EvControl.s_PosIni:...
Expand Down Expand Up @@ -1759,7 +1717,59 @@ function f_LinesDelete()
delete(st_Line.Spectrogram)
end
end

%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
function f_PlotCursors()

st_Cursors.v_hCurLine1(1) = line(...
'Xdata',[st_Cursors.s_PosCur1 ...
st_Cursors.s_PosCur1],...
'Ydata',get(st_hAxes.Signal,'YLim'),...
'Parent',st_hAxes.Signal,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur1);

st_Cursors.v_hCurLine2(1) = line(...
'Xdata',[st_Cursors.s_PosCur2 ...
st_Cursors.s_PosCur2],...
'Ydata',get(st_hAxes.Signal,'YLim'),...
'Parent',st_hAxes.Signal,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur2);


st_Cursors.v_hCurLine1(2) = line(...
'Xdata',[st_Cursors.s_PosCur1 ...
st_Cursors.s_PosCur1],...
'Ydata',get(st_hAxes.Filtered,'YLim'),...
'Parent',st_hAxes.Filtered,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur1);

st_Cursors.v_hCurLine2(2) = line(...
'Xdata',[st_Cursors.s_PosCur2 ...
st_Cursors.s_PosCur2],...
'Ydata',get(st_hAxes.Filtered,'YLim'),...
'Parent',st_hAxes.Filtered,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur2);


st_Cursors.v_hCurLine1(3) = line(...
'Xdata',[st_Cursors.s_PosCur1 ...
st_Cursors.s_PosCur1],...
'Ydata',get(st_hAxes.TimeFreq,'YLim'),...
'Parent',st_hAxes.TimeFreq,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur1);

st_Cursors.v_hCurLine2(3) = line(...
'Xdata',[st_Cursors.s_PosCur2 ...
st_Cursors.s_PosCur2],...
'Ydata',get(st_hAxes.TimeFreq,'YLim'),...
'Parent',st_hAxes.TimeFreq,...
'LineWidth',1,...
'Color',st_Cursors.s_ColorCur2);
end
%% [Functions] Selection Functions
% In this section are indicated the nested functions for change the event
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand Down
2 changes: 1 addition & 1 deletion p_RippleLab.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
% UNIVERSIDAD DE LOS ANDES
% Colombia, 2012
% mnavarretem@gmail.com
% $Version: 0.3$ || $Date: 2013/07/13 16:23$
% $Version: 0.19.8$ || $Date: 2019/08/20 09:15$
% This file is part of the HFO-EEG project.
%
% Copyright (C) 2015, Miguel Navarrete
Expand Down

0 comments on commit 18a4244

Please sign in to comment.