Skip to content

Commit

Permalink
Online filters: Removed mirror option + disabled matrix filter by def…
Browse files Browse the repository at this point in the history
…ault
  • Loading branch information
ftadel committed Jun 25, 2019
1 parent 7c2b00b commit be1cadd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion doc/license.html
Expand Up @@ -3,7 +3,7 @@

</head>
<body alink="#fff000" link="#fff000" vlink="#fff000">
<!-- LICENCE_START -->Version: 3.190620 (20-Jun-2019)<br>
<!-- LICENCE_START -->Version: 3.190625 (25-Jun-2019)<br>
<span style="font-style: italic;">COPYRIGHT &copy; 2000-2019
USC &amp; McGill University.<br>
</span>
Expand Down
2 changes: 1 addition & 1 deletion doc/version.txt
@@ -1,2 +1,2 @@
% Brainstorm
% v. 3.190620 (20-Jun-2019)
% v. 3.190625 (25-Jun-2019)
3 changes: 2 additions & 1 deletion toolbox/core/bst_memory.m
Expand Up @@ -889,7 +889,8 @@ function LoadRecordingsMatrix(iDS)
isLowPass = GlobalData.VisualizationFilters.LowPassEnabled;
isHighPass = GlobalData.VisualizationFilters.HighPassEnabled;
isSinRemoval = GlobalData.VisualizationFilters.SinRemovalEnabled;
isMirror = GlobalData.VisualizationFilters.MirrorEnabled;
% isMirror = GlobalData.VisualizationFilters.MirrorEnabled;
isMirror = 0;
% Get time vector
nTime = size(F,2);
% Band-pass filter is active: apply it (only if real recordings => ignore time averages)
Expand Down
26 changes: 13 additions & 13 deletions toolbox/gui/panel_filter.m
Expand Up @@ -22,7 +22,7 @@
% For more information type "brainstorm license" at command prompt.
% =============================================================================@
%
% Authors: Francois Tadel, 2008-2017
% Authors: Francois Tadel, 2008-2019

eval(macro_method);
end
Expand Down Expand Up @@ -74,9 +74,9 @@
jTextSinRem.setEnabled(0);
jLabelSinRem = gui_component('label', jPanelFilter, [], ' Hz');
% === MIRROR ===
jCheckMirror = gui_component('checkbox', jPanelFilter, 'br', 'Mirror signal before filtering', [], [], @CheckMirror_Callback);
% jCheckMirror = gui_component('checkbox', jPanelFilter, 'br', 'Mirror signal before filtering', [], [], @CheckMirror_Callback);
% === FILTER SOURCES ===
jCheckFullSources = gui_component('checkbox', jPanelFilter, 'br', 'Filter full source files', [], [], @CheckFullSources_Callback);
jCheckFullSources = gui_component('checkbox', jPanelFilter, 'br', 'Filter all results', [], [], @CheckFullSources_Callback);
jPanelTop.add(jPanelFilter, BorderLayout.CENTER);

% Create the BstPanel object that is returned by the function
Expand All @@ -92,7 +92,7 @@
'jCheckSinRem', jCheckSinRem, ...
'jTextSinRem', jTextSinRem, ...
'jLabelSinRem', jLabelSinRem, ...
'jCheckMirror', jCheckMirror, ...
... 'jCheckMirror', jCheckMirror, ...
'jCheckFullSources', jCheckFullSources));


Expand Down Expand Up @@ -120,14 +120,14 @@ function CheckSinRemoval_Callback(varargin)
UpdatePanel();
ApplyFilters();
end
% ===== MIRROR CHECK BOX =====
function CheckMirror_Callback(varargin)
global GlobalData;
GlobalData.VisualizationFilters.MirrorEnabled = jCheckMirror.isSelected();
if GlobalData.VisualizationFilters.SinRemovalEnabled || GlobalData.VisualizationFilters.LowPassEnabled || GlobalData.VisualizationFilters.HighPassEnabled
ApplyFilters();
end
end
% % ===== MIRROR CHECK BOX =====
% function CheckMirror_Callback(varargin)
% global GlobalData;
% GlobalData.VisualizationFilters.MirrorEnabled = jCheckMirror.isSelected();
% if GlobalData.VisualizationFilters.SinRemovalEnabled || GlobalData.VisualizationFilters.LowPassEnabled || GlobalData.VisualizationFilters.HighPassEnabled
% ApplyFilters();
% end
% end
% ===== FULL SOURCES CHECKBOX =====
function CheckFullSources_Callback(varargin)
global GlobalData;
Expand Down Expand Up @@ -231,7 +231,7 @@ function UpdatePanel()
ctrl.jCheckHighpass.setSelected(Filters.HighPassEnabled);
ctrl.jCheckLowpass.setSelected(Filters.LowPassEnabled);
ctrl.jCheckSinRem.setSelected(Filters.SinRemovalEnabled);
ctrl.jCheckMirror.setSelected(Filters.MirrorEnabled);
% ctrl.jCheckMirror.setSelected(Filters.MirrorEnabled);
ctrl.jCheckFullSources.setSelected(Filters.FullSourcesEnabled);
% Change tab color
if (Filters.HighPassEnabled || Filters.LowPassEnabled || (Filters.SinRemovalEnabled && ~isempty(Filters.SinRemovalValue)))
Expand Down
6 changes: 4 additions & 2 deletions toolbox/gui/view_matrix.m
Expand Up @@ -31,7 +31,9 @@
% For more information type "brainstorm license" at command prompt.
% =============================================================================@
%
% Authors: Francois Tadel, 2010-2015
% Authors: Francois Tadel, 2010-2019

global GlobalData;

% ===== READ INPUTS =====
% Read matrix file
Expand Down Expand Up @@ -70,7 +72,7 @@
Value = sMat.Value;
Std = sMat.Std;
% Apply online filters
if (size(Value,2) > 50)
if (size(Value,2) > 50) && GlobalData.VisualizationFilters.FullSourcesEnabled
sfreq = 1 ./ (sMat.Time(2) - sMat.Time(1));
Value = bst_memory('FilterLoadedData', Value, sfreq);
end
Expand Down

0 comments on commit be1cadd

Please sign in to comment.