From 18a4244c5ffbd429a5be8c014dede850180a2625 Mon Sep 17 00:00:00 2001 From: mnavarretem Date: Wed, 16 Nov 2022 11:28:41 -0600 Subject: [PATCH] Update subversion Fix bug for plotting in the validation GUI --- Auxiliar-GUI/p_HFOAnalysisTool.m | 116 +++++++++++++++++-------------- p_RippleLab.m | 2 +- 2 files changed, 64 insertions(+), 54 deletions(-) diff --git a/Auxiliar-GUI/p_HFOAnalysisTool.m b/Auxiliar-GUI/p_HFOAnalysisTool.m index e14c814..9680b65 100644 --- a/Auxiliar-GUI/p_HFOAnalysisTool.m +++ b/Auxiliar-GUI/p_HFOAnalysisTool.m @@ -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 @@ -73,6 +74,7 @@ function p_HFOAnalysisTool() st_Line.FilterEvent = []; st_Line.PowerSpect = []; st_Line.TFImage = []; +st_Line.Spectrogram = []; %% [Variable] - HFO Info - @@ -462,7 +464,6 @@ function p_HFOAnalysisTool() 'YTickLabel',[]); linkaxes([st_hAxes.Signal,st_hAxes.Filtered,st_hAxes.TimeFreq],'x') - %% [Controls] (Cursors) @@ -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 --- @@ -1377,6 +1330,9 @@ function f_DisplayProcess(~,~) % Plot Lines f_LinesBuild() + % Plot Cursors + f_PlotCursors() + % Set Time Freq f_ScalogramSet() @@ -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:... @@ -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:... @@ -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 %:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/p_RippleLab.m b/p_RippleLab.m index 314c610..8b401b4 100644 --- a/p_RippleLab.m +++ b/p_RippleLab.m @@ -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