[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461
Andrei Zavada
johnhommer at gmail.com
Fri Nov 16 00:50:26 UTC 2012
The following commit has been merged in the master branch:
commit 0414997b975c03c5ca7fdb888869b23ab6474697
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Mon Oct 22 02:37:31 2012 +0300
WIP
diff --git a/configure.ac b/configure.ac
index 618ac10..544059a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -202,7 +202,6 @@ AC_OUTPUT([
data/Makefile
data/aghermann.desktop
data/edfhed-gtk.desktop
- data/dialogs.glade
doc/Makefile
doc/org/Makefile
doc/org/aghermann.org
diff --git a/data/.gitignore b/data/.gitignore
index e053cd4..47d823e 100644
--- a/data/.gitignore
+++ b/data/.gitignore
@@ -1,3 +1,2 @@
*.desktop
-dialogs.glade
aghermann.gresource
diff --git a/data/dialogs.glade.in b/data/dialogs.glade
similarity index 84%
rename from data/dialogs.glade.in
rename to data/dialogs.glade
index 0467e8c..c79aa36 100644
--- a/data/dialogs.glade.in
+++ b/data/dialogs.glade
@@ -42,6 +42,26 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="jHighPassCutoff">
+ <property name="upper">100</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jHighPassOrder">
+ <property name="upper">5</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jLowPassCutoff">
+ <property name="upper">100</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jLowPassOrder">
+ <property name="upper">5</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkAdjustment" id="jMsmtMCF0">
<property name="lower">0.5</property>
<property name="upper">20</property>
@@ -174,6 +194,23 @@
</row>
</data>
</object>
+ <object class="GtkListStore" id="mNotchFilter">
+ <columns>
+ <!-- column-name type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">none</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">at 50 Hz</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">at 60 Hz</col>
+ </row>
+ </data>
+ </object>
<object class="GtkListStore" id="mScoringPageSize">
<columns>
<!-- column-name PageSize -->
@@ -1670,6 +1707,368 @@ GPL-2+</property>
<action-widget response="-5">bGlobalADOK</action-widget>
</action-widgets>
</object>
+ <object class="GtkDialog" id="wGlobalFilters">
+ <property name="can_focus">False</property>
+ <property name="border_width">10</property>
+ <property name="title" translatable="yes">Global filters</property>
+ <property name="modal">True</property>
+ <property name="window_position">mouse</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <signal name="close" handler="gtk_widget_hide" swapped="no"/>
+ <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
+ <signal name="response" handler="gtk_widget_hide" swapped="no"/>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="bFilterCancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="bGlobalFiltersOK">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <accelerator key="Return" signal="activate"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">6</property>
+ <property name="n_columns">5</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eGlobalFiltersLowPassCutoff">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">True</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jLowPassCutoff</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eGlobalFiltersHighPassCutoff">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">If both cutoffs are >0, use band-pass</property>
+ <property name="tooltip_text" translatable="yes">If both cutoffs are >0, use band-pass</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">True</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jHighPassCutoff</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">10</property>
+ <property name="label" translatable="yes">Low pass:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">10</property>
+ <property name="label" translatable="yes">High pass:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Hz</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Hz</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">10</property>
+ <property name="label" translatable="yes">Order:</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eGlobalFiltersLowPassOrder">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">True</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jLowPassOrder</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label30">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">10</property>
+ <property name="label" translatable="yes">Order:</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eGlobalFiltersHighPassOrder">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">A value of 0 disables filter</property>
+ <property name="tooltip_text" translatable="yes">A value of 0 disables filter</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">True</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jHighPassOrder</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lFilterCaption">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b><big>Global filters</big></b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">5</property>
+ <property name="y_options">GTK_SHRINK</property>
+ <property name="y_padding">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">10</property>
+ <property name="label" translatable="yes">Notch filter:</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eGlobalFiltersNotchFilter">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">5</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator19">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
+ </object>
+ <packing>
+ <property name="right_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">5</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">bFilterCancel</action-widget>
+ <action-widget response="-5">bGlobalFiltersOK</action-widget>
+ </action-widgets>
+ </object>
<object class="GtkDialog" id="wMontageDefaults">
<property name="can_focus">False</property>
<property name="border_width">10</property>
@@ -1838,40 +2237,6 @@ GPL-2+</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="eMontageDefaultsOverride">
- <property name="label" translatable="yes">Over_ride</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label23">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">If already exists, </property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<placeholder/>
</child>
<child>
@@ -1921,7 +2286,21 @@ GPL-2+</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="bMDApply">
+ <object class="GtkButton" id="bGlobalMontageClearAll">
+ <property name="label" translatable="yes">Clea_r all</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="bGlobalMontageOK">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1933,7 +2312,7 @@ GPL-2+</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -1948,7 +2327,8 @@ GPL-2+</property>
</child>
<action-widgets>
<action-widget response="-6">button5</action-widget>
- <action-widget response="-5">bMDApply</action-widget>
+ <action-widget response="1">bGlobalMontageClearAll</action-widget>
+ <action-widget response="-5">bGlobalMontageOK</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="wScanLog">
diff --git a/data/main.glade b/data/main.glade
index 47b45d2..7da5a19 100644
--- a/data/main.glade
+++ b/data/main.glade
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkImage" id="image7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">reload</property>
+ </object>
<object class="GtkMenu" id="iiSubjectTimeline">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -76,11 +81,6 @@
</object>
</child>
</object>
- <object class="GtkImage" id="image7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">reload</property>
- </object>
<object class="GtkAdjustment" id="jArtifDampFactor">
<property name="upper">1</property>
<property name="value">0.94999999999999996</property>
@@ -669,57 +669,41 @@ rm */*/*/.*.{psd,mc}</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkMenuItem" id="iExpGloballyDetectArtifacts">
- <property name="visible">True</property>
+ <object class="GtkMenuItem" id="iMontageSetDefaults">
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Detect _artifacts...</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Set montage _defaults...</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
- <object class="GtkMenuItem" id="iExpBasicSADetectUltradianCycles">
+ <object class="GtkMenuItem" id="iExpGloballySetFilters">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Detect NREM-REM _cycle</property>
+ <property name="label" translatable="yes">Set _filter...</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
- <object class="GtkMenuItem" id="iExpGloballySetFilters">
+ <object class="GtkSeparatorMenuItem" id="menuitem10">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Set _filter...</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iExpGloballyDetectArtifacts">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Detect _artifacts...</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
- <object class="GtkMenuItem" id="menuitem5">
+ <object class="GtkMenuItem" id="iExpBasicSADetectUltradianCycles">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="valign">center</property>
- <property name="label" translatable="yes">_Montage</property>
+ <property name="label" translatable="yes">Detect NREM-REM _cycle</property>
<property name="use_underline">True</property>
- <child type="submenu">
- <object class="GtkMenu" id="menu2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="iMontageSetDefaults">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Set _defaults...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iMontageResetAll">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Reset all</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
- </child>
</object>
</child>
</object>
@@ -1550,30 +1534,6 @@ rm */*/*/.*.{psd,mc}</property>
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<object class="GtkFrame" id="fFreqConventionalRanges">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -6742,6 +6702,18 @@ EEG microcontinuity algorithm. Read more <a href="http://johnhommer.com/acade
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child>
diff --git a/data/sf.glade b/data/sf.glade
index 64a53b6..c440609 100644
--- a/data/sf.glade
+++ b/data/sf.glade
@@ -29,7 +29,6 @@
<property name="page_increment">1</property>
</object>
<object class="GtkAdjustment" id="jLowPassOrder">
- <property name="lower">1</property>
<property name="upper">5</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
@@ -40,76 +39,6 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <object class="GtkAdjustment" id="jPatternEnvTightness">
- <property name="lower">1</property>
- <property name="upper">20</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="jPatternLPCutoff">
- <property name="lower">0.25</property>
- <property name="upper">8</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jPatternLPDZCDFSigma">
- <property name="lower">0.01</property>
- <property name="upper">10</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jPatternLPDZCDFSmooth">
- <property name="upper">12</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">3</property>
- </object>
- <object class="GtkAdjustment" id="jPatternLPDZCDFStep">
- <property name="lower">0.10000000000000001</property>
- <property name="upper">5</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jPatternLPOrder">
- <property name="lower">1</property>
- <property name="upper">5</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jPatternStrictnessA">
- <property name="lower">0.01</property>
- <property name="upper">100</property>
- <property name="value">0.0099999997764825821</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jPatternStrictnessB">
- <property name="lower">0.01</property>
- <property name="upper">100</property>
- <property name="value">0.01</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jPatternStrictnessC">
- <property name="lower">0.10000000000000001</property>
- <property name="upper">100</property>
- <property name="value">0.10000000000000001</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jPhaseDiffBandwidth">
- <property name="lower">0.25</property>
- <property name="upper">2</property>
- <property name="step_increment">0.25</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jPhaseDiffFrom">
- <property name="upper">100</property>
- <property name="step_increment">0.25</property>
- <property name="page_increment">1</property>
- </object>
<object class="GtkAdjustment" id="jSFADBackpolate">
<property name="upper">1</property>
<property name="value">0.5</property>
@@ -196,6 +125,76 @@
<property name="step_increment">0.5</property>
<property name="page_increment">2</property>
</object>
+ <object class="GtkAdjustment" id="jPatternEnvTightness">
+ <property name="lower">1</property>
+ <property name="upper">20</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">5</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternLPCutoff">
+ <property name="lower">0.25</property>
+ <property name="upper">8</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternLPDZCDFSigma">
+ <property name="lower">0.01</property>
+ <property name="upper">10</property>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternLPDZCDFSmooth">
+ <property name="upper">12</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">3</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternLPDZCDFStep">
+ <property name="lower">0.10000000000000001</property>
+ <property name="upper">5</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternLPOrder">
+ <property name="lower">1</property>
+ <property name="upper">5</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternStrictnessA">
+ <property name="lower">0.01</property>
+ <property name="upper">100</property>
+ <property name="value">0.0099999997764825821</property>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternStrictnessB">
+ <property name="lower">0.01</property>
+ <property name="upper">100</property>
+ <property name="value">0.01</property>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternStrictnessC">
+ <property name="lower">0.10000000000000001</property>
+ <property name="upper">100</property>
+ <property name="value">0.10000000000000001</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jPhaseDiffBandwidth">
+ <property name="lower">0.25</property>
+ <property name="upper">2</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jPhaseDiffFrom">
+ <property name="upper">100</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
<object class="GtkAdjustment" id="jSFICAEigVecFirst">
<property name="lower">1</property>
<property name="upper">100</property>
@@ -261,6 +260,23 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkListStore" id="mFilteNotchFilter">
+ <columns>
+ <!-- column-name type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">none</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">at 50 Hz</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">at 60 Hz</col>
+ </row>
+ </data>
+ </object>
<object class="GtkListStore" id="mFilterNotchFilter">
<columns>
<!-- column-name type -->
@@ -1377,7 +1393,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
- <property name="model">mFilterNotchFilter</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -2924,15 +2939,15 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="bScoreClear">
- <property name="label" translatable="yes">⌫</property>
+ <object class="GtkButton" id="bScoreWake">
+ <property name="label" translatable="yes">☺</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_markup" translatable="yes">Clear (<b>q</b>)</property>
+ <property name="tooltip_markup" translatable="yes">Wake (<b>w</b>)</property>
<property name="valign">center</property>
<property name="focus_on_click">False</property>
- <accelerator key="q" signal="activate"/>
+ <accelerator key="w" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
@@ -2941,15 +2956,15 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="bScoreWake">
- <property name="label" translatable="yes">☺</property>
+ <object class="GtkButton" id="bScoreClear">
+ <property name="label" translatable="yes">⌫</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_markup" translatable="yes">Wake (<b>w</b>)</property>
+ <property name="tooltip_markup" translatable="yes">Clear (<b>q</b>)</property>
<property name="valign">center</property>
<property name="focus_on_click">False</property>
- <accelerator key="w" signal="activate"/>
+ <accelerator key="q" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
@@ -3184,18 +3199,17 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="bSFShowFindDialog">
- <property name="label" translatable="yes">_Find</property>
+ <object class="GtkToggleButton" id="bSFShowPhaseDiffDialog">
+ <property name="label" translatable="yes">Δφ</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Find/manage patterns (<b>F3</b>)</property>
- <property name="tooltip_text" translatable="yes">Find/manage patterns (F3)</property>
+ <property name="tooltip_markup" translatable="yes">Interchannel signal shift (<b>F4</b>)</property>
+ <property name="tooltip_text" translatable="yes">Interchannel signal shift (F4)</property>
<property name="valign">center</property>
- <property name="use_underline">True</property>
<property name="focus_on_click">False</property>
- <accelerator key="F3" signal="activate"/>
+ <accelerator key="F4" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
@@ -3205,17 +3219,18 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="bSFShowPhaseDiffDialog">
- <property name="label" translatable="yes">Δφ</property>
+ <object class="GtkToggleButton" id="bSFShowFindDialog">
+ <property name="label" translatable="yes">_Find</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Interchannel signal shift (<b>F4</b>)</property>
- <property name="tooltip_text" translatable="yes">Interchannel signal shift (F4)</property>
+ <property name="tooltip_markup" translatable="yes">Find/manage patterns (<b>F3</b>)</property>
+ <property name="tooltip_text" translatable="yes">Find/manage patterns (F3)</property>
<property name="valign">center</property>
+ <property name="use_underline">True</property>
<property name="focus_on_click">False</property>
- <accelerator key="F4" signal="activate"/>
+ <accelerator key="F3" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/libsigfile/edf.hh b/src/libsigfile/edf.hh
index 927a2e6..822f4d9 100644
--- a/src/libsigfile/edf.hh
+++ b/src/libsigfile/edf.hh
@@ -200,6 +200,16 @@ class CEDFFile
{
return (*this)[h].artifacts;
}
+ const SArtifacts&
+ artifacts( int h) const
+ {
+ return (*this)[h].artifacts;
+ }
+ const SArtifacts&
+ artifacts( const char* h) const
+ {
+ return (*this)[h].artifacts;
+ }
// filters
SFilterPack&
@@ -212,6 +222,16 @@ class CEDFFile
{
return (*this)[h].filters;
}
+ const SFilterPack&
+ filters( int h) const
+ {
+ return (*this)[h].filters;
+ }
+ const SFilterPack&
+ filters( const char* h) const
+ {
+ return (*this)[h].filters;
+ }
// signal data extractors
diff --git a/src/libsigfile/edf.ii b/src/libsigfile/edf.ii
index e2a177d..6e39a99 100644
--- a/src/libsigfile/edf.ii
+++ b/src/libsigfile/edf.ii
@@ -116,20 +116,24 @@ get_region_filtered_( Th h,
}
// filters
- if ( H.filters.low_pass_cutoff > 0. && H.filters.high_pass_cutoff > 0. ) {
- auto tmp (exstrom::band_pass( recp, this_samplerate,
- H.filters.high_pass_cutoff, H.filters.low_pass_cutoff,
- H.filters.low_pass_order, true));
+ if ( H.filters.low_pass_cutoff > 0. && H.filters.high_pass_cutoff > 0. &&
+ H.filters.low_pass_order > 0 && H.filters.high_pass_order > 0 ) {
+ auto tmp (exstrom::band_pass(
+ recp, this_samplerate,
+ H.filters.high_pass_cutoff, H.filters.low_pass_cutoff,
+ H.filters.low_pass_order, true));
recp = tmp;
} else {
- if ( H.filters.low_pass_cutoff > 0. ) {
- auto tmp (exstrom::low_pass( recp, this_samplerate,
- H.filters.low_pass_cutoff, H.filters.low_pass_order, true));
+ if ( H.filters.low_pass_cutoff > 0. && H.filters.low_pass_order > 0 ) {
+ auto tmp (exstrom::low_pass(
+ recp, this_samplerate,
+ H.filters.low_pass_cutoff, H.filters.low_pass_order, true));
recp = tmp;
}
- if ( H.filters.high_pass_cutoff > 0. ) {
- auto tmp (exstrom::high_pass( recp, this_samplerate,
- H.filters.high_pass_cutoff, H.filters.high_pass_order, true));
+ if ( H.filters.high_pass_cutoff > 0. && H.filters.high_pass_order > 0 ) {
+ auto tmp (exstrom::high_pass(
+ recp, this_samplerate,
+ H.filters.high_pass_cutoff, H.filters.high_pass_order, true));
recp = tmp;
}
}
diff --git a/src/libsigfile/mc.cc b/src/libsigfile/mc.cc
index e1345a1..6808f24 100644
--- a/src/libsigfile/mc.cc
+++ b/src/libsigfile/mc.cc
@@ -102,7 +102,7 @@ sigfile::CBinnedMC::
compute( const SMCParamSet& req_params,
bool force)
{
- auto req_signature = _using_F.artifacts( _using_sig_no).dirty_signature();
+ auto req_signature = _using_F.dirty_signature( _using_sig_no);
if ( have_data()
&& not force
&& (*this) == req_params
diff --git a/src/libsigfile/psd.cc b/src/libsigfile/psd.cc
index 6e7930f..c755cf0 100644
--- a/src/libsigfile/psd.cc
+++ b/src/libsigfile/psd.cc
@@ -128,7 +128,7 @@ compute( const SFFTParamSet& req_params,
bool force)
{
// check if we have it already
- auto req_signature = _using_F.artifacts( _using_sig_no).dirty_signature();
+ auto req_signature = _using_F.dirty_signature( _using_sig_no);
if ( have_data()
&& not force
&& (*this) == req_params
@@ -216,7 +216,9 @@ compute( const SFFTParamSet& req_params,
static fftw_plan fft_plan = NULL;
static size_t saved_spp = 0;
+#ifdef _OPENMP
#pragma omp single
+#endif
{
// if ( fft_plan == nullptr ) {
//#if defined(HAVE_LIBFFTW3_OMP) && defined(_OPENMP)
diff --git a/src/libsigfile/source-base.cc b/src/libsigfile/source-base.cc
index b9a0c5c..d409840 100644
--- a/src/libsigfile/source-base.cc
+++ b/src/libsigfile/source-base.cc
@@ -105,6 +105,18 @@ dirty_signature() const
}
+unsigned long
+sigfile::SFilterPack::
+dirty_signature() const
+{
+ DEF_UNIQUE_CHARP (tmp);
+ assert (asprintf( &tmp, "%g%d%g%d%d",
+ low_pass_cutoff, low_pass_order, high_pass_cutoff, high_pass_order, (int)notch_filter));
+ return hash<std::string>() (tmp);
+}
+
+
+
diff --git a/src/libsigfile/source-base.hh b/src/libsigfile/source-base.hh
index 5b3c47f..1cf7c0d 100644
--- a/src/libsigfile/source-base.hh
+++ b/src/libsigfile/source-base.hh
@@ -145,7 +145,7 @@ struct SFilterPack {
notch_filter != SFilterPack::TNotchFilter::none;
}
- float high_pass_cutoff,
+ double high_pass_cutoff,
low_pass_cutoff;
unsigned
high_pass_order,
@@ -156,6 +156,8 @@ struct SFilterPack {
};
TNotchFilter
notch_filter;
+
+ unsigned long dirty_signature() const;
};
@@ -169,8 +171,7 @@ class CSource_base {
int _status;
int _flags;
public:
- CSource_base() = delete;
- CSource_base( const CSource_base&) = delete;
+ DELETE_DEFAULT_METHODS (CSource_base);
CSource_base( const string& fname, int flags = 0)
: _filename (fname),
_status (0),
@@ -228,12 +229,27 @@ class CSource_base {
artifacts( const char*) = 0;
virtual SArtifacts&
artifacts( int) = 0;
+ virtual const SArtifacts&
+ artifacts( const char*) const = 0;
+ virtual const SArtifacts&
+ artifacts( int) const = 0;
// filters
virtual SFilterPack&
filters( const char*) = 0;
virtual SFilterPack&
filters( int) = 0;
+ virtual const SFilterPack&
+ filters( const char*) const = 0;
+ virtual const SFilterPack&
+ filters( int) const = 0;
+
+ template <typename T>
+ unsigned long
+ dirty_signature( T id) const
+ {
+ return artifacts(id).dirty_signature() + filters(id).dirty_signature();
+ }
// setters
virtual int set_subject( const char*) = 0;
diff --git a/src/libsigfile/source.hh b/src/libsigfile/source.hh
index 8397e38..edb86c0 100644
--- a/src/libsigfile/source.hh
+++ b/src/libsigfile/source.hh
@@ -141,7 +141,6 @@ class CSource
template <typename T>
SArtifacts&
artifacts( T h) { return _obj->artifacts(h); }
-
template <typename T>
const SArtifacts&
artifacts( T h) const { return _obj->artifacts(h); }
@@ -150,11 +149,13 @@ class CSource
template <typename T>
SFilterPack&
filters( T h) { return _obj->filters(h); }
-
template <typename T>
const SFilterPack&
filters( T h) const { return _obj->filters(h); }
+ template <typename T>
+ unsigned long
+ dirty_signature( T h) const { return _obj->dirty_signature(h); }
// setters
int set_subject( const char* s)
diff --git a/src/ui/ed-construct.cc b/src/ui/ed-construct.cc
index c578c75..2427863 100644
--- a/src/ui/ed-construct.cc
+++ b/src/ui/ed-construct.cc
@@ -652,9 +652,10 @@ SExpDesignUIWidgets ()
gtk_widget_override_font( (GtkWidget*)lEdfImportFileInfo, font_desc);
g_object_set( lEdfImportFileInfo,
- "tabs", pango_tab_array_new_with_positions( 2, TRUE,
- PANGO_TAB_LEFT, 130,
- PANGO_TAB_LEFT, 190),
+ "tabs", pango_tab_array_new_with_positions(
+ 2, TRUE,
+ PANGO_TAB_LEFT, 130,
+ PANGO_TAB_LEFT, 190),
NULL);
g_signal_connect( eEdfImportGroupEntry,
@@ -667,7 +668,7 @@ SExpDesignUIWidgets ()
"changed", (GCallback)check_gtk_entry_nonempty_cb,
this);
- // ------- wEdfImport
+ // ------- wSubjectDetails
if ( !AGH_GBGETOBJ (GtkDialog, wSubjectDetails) ||
!AGH_GBGETOBJ (GtkEntry, eSubjectDetailsName) ||
!AGH_GBGETOBJ (GtkSpinButton, eSubjectDetailsAge) ||
@@ -693,11 +694,30 @@ SExpDesignUIWidgets ()
!AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowPSD) ||
!AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowPSDSpectrum) ||
!AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowMC) ||
- !AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowEMG) ||
- !AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsOverride) )
+ !AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowEMG) )
+ throw runtime_error ("Failed to construct widgets");
+
+ // ------------- wGlobalFilters
+ if ( !AGH_GBGETOBJ (GtkDialog, wGlobalFilters) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersHighPassCutoff) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersLowPassCutoff) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersHighPassOrder) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersLowPassOrder) ||
+ !AGH_GBGETOBJ (GtkComboBox, eGlobalFiltersNotchFilter) ||
+ !AGH_GBGETOBJ (GtkListStore, mNotchFilter) )
throw runtime_error ("Failed to construct widgets");
- // ----------- annotations
+ gtk_combo_box_set_model( eGlobalFiltersNotchFilter,
+ (GtkTreeModel*)mNotchFilter);
+ gtk_combo_box_set_id_column( eGlobalFiltersNotchFilter, 0);
+ renderer = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start( (GtkCellLayout*)eGlobalFiltersNotchFilter, renderer, FALSE);
+ gtk_cell_layout_set_attributes( (GtkCellLayout*)eGlobalFiltersNotchFilter, renderer,
+ "text", 0,
+ NULL);
+ gtk_combo_box_set_active( eGlobalFiltersNotchFilter, 0);
+
+ // ----------- wGlobalAnnotations
if ( !AGH_GBGETOBJ (GtkDialog, wGlobalAnnotations) ||
!AGH_GBGETOBJ (GtkTreeView, tvGlobalAnnotations) )
throw runtime_error ("Failed to construct widgets");
@@ -731,7 +751,7 @@ SExpDesignUIWidgets ()
gtk_tree_view_append_column( tvGlobalAnnotations,
gtk_tree_view_column_new());
- // ------------- artifact detection profiles
+ // ------------- wGlobalArtifactDetection
if ( !AGH_GBGETOBJ (GtkDialog, wGlobalArtifactDetection) ||
!AGH_GBGETOBJ (GtkComboBox, eGlobalADProfiles) ||
!AGH_GBGETOBJ (GtkCheckButton, eGlobalADKeepExisting) ||
diff --git a/src/ui/ed-measurements.cc b/src/ui/ed-measurements.cc
index 2f17ed3..4cbafd9 100644
--- a/src/ui/ed-measurements.cc
+++ b/src/ui/ed-measurements.cc
@@ -48,7 +48,6 @@ void
aghui::SExpDesignUI::SSubjectPresentation::
draw_timeline( const char *fname) const
{
-#ifdef CAIRO_HAS_SVG_SURFACE
cairo_surface_t *cs =
cairo_svg_surface_create( fname,
timeline_width() + tl_left_margin() + tl_right_margin(),
@@ -57,7 +56,6 @@ draw_timeline( const char *fname) const
draw_timeline( cr);
cairo_destroy( cr);
cairo_surface_destroy( cs);
-#endif
}
diff --git a/src/ui/ed-widgets.hh b/src/ui/ed-widgets.hh
index f64278c..8c50305 100644
--- a/src/ui/ed-widgets.hh
+++ b/src/ui/ed-widgets.hh
@@ -41,6 +41,7 @@ struct SExpDesignUIWidgets {
*builder;
// storage
+ // dynamic
GtkListStore
*mSessions,
*mEEGChannels,
@@ -50,16 +51,14 @@ struct SExpDesignUIWidgets {
*mGlobalAnnotations,
*mSimulations;
- gulong wMainWindow_delete_event_cb_handler_id,
- eMsmtSession_changed_cb_handler_id,
- eMsmtChannel_changed_cb_handler_id;
-
+ // static
GtkListStore
*mScoringPageSize,
*mFFTParamsPageSize,
*mFFTParamsBinSize,
*mFFTParamsWindowType,
- *mMsmtProfileType;
+ *mMsmtProfileType,
+ *mNotchFilter;
static const auto
msimulations_visibility_switch_col = 14,
msimulations_modref_col = msimulations_visibility_switch_col + 1;
@@ -69,6 +68,10 @@ struct SExpDesignUIWidgets {
static const char* const mannotations_column_names[];
// misc
+ gulong wMainWindow_delete_event_cb_handler_id,
+ eMsmtSession_changed_cb_handler_id,
+ eMsmtChannel_changed_cb_handler_id;
+
PangoFontDescription
*monofont;
@@ -152,17 +155,13 @@ struct SExpDesignUIWidgets {
*eFFTParamsPageSize,
*eFFTParamsBinSize,
*eArtifDampenWindowType;
- GtkListStore
- *mNotchFilter;
GtkEntry
*eScoreCode[sigfile::SPage::TScore::_total];
GtkSpinButton
*eArtifDampenFactor,
-
*eMCParamBandWidth,
*eMCParamIIRBackpolate,
*eMCParamMCGain,
-
*eDAMsmtPPH,
*eDAMsmtTLHeight,
*eDAPageHeight,
@@ -299,8 +298,7 @@ struct SExpDesignUIWidgets {
*eMontageDefaultsShowPSD,
*eMontageDefaultsShowPSDSpectrum,
*eMontageDefaultsShowMC,
- *eMontageDefaultsShowEMG,
- *eMontageDefaultsOverride;
+ *eMontageDefaultsShowEMG;
// global artifact detection
GtkDialog
@@ -315,8 +313,11 @@ struct SExpDesignUIWidgets {
// global filters
GtkDialog
*wGlobalFilters;
- GtkButton
- *bGlobalFiltersOK;
+ GtkSpinButton
+ *eGlobalFiltersLowPassCutoff, *eGlobalFiltersHighPassCutoff,
+ *eGlobalFiltersLowPassOrder, *eGlobalFiltersHighPassOrder;
+ GtkComboBox
+ *eGlobalFiltersNotchFilter;
// colours
enum TColour {
diff --git a/src/ui/ed_cb.cc b/src/ui/ed_cb.cc
index 5d37865..4cfffd9 100644
--- a/src/ui/ed_cb.cc
+++ b/src/ui/ed_cb.cc
@@ -212,6 +212,10 @@ iExpGloballyDetectArtifacts_activate_cb( GtkMenuItem*, gpointer userdata)
throw runtime_error ("Fix AD dialog response?");
}
+ forward_list<aghui::SBusyBlock*> bbl;
+ for ( auto& SFp : ED.open_scoring_facilities )
+ bbl.push_front( new aghui::SBusyBlock (SFp->wScoringFacility));
+
ED.ED -> for_all_recordings( F, G, filter);
for ( auto& SF : ED.open_scoring_facilities ) {
@@ -220,7 +224,11 @@ iExpGloballyDetectArtifacts_activate_cb( GtkMenuItem*, gpointer userdata)
H.get_signal_filtered();
SF->queue_redraw_all();
}
+
ED.populate_1();
+
+ for ( auto& bb : bbl )
+ delete bb;
}
void
@@ -245,14 +253,56 @@ iMontageSetDefaults_activate_cb( GtkMenuItem*, gpointer userdata)
FAFA;
}
+
+
void
iExpGloballySetFilters_activate_cb( GtkMenuItem*, gpointer userdata)
{
auto& ED = *(SExpDesignUI*)userdata;
+ int LPO, HPO, NF;
+ double LPC, HPC;
+ aghui::SUIVarCollection W_V;
+ W_V.reg( ED.eGlobalFiltersLowPassCutoff, &LPC);
+ W_V.reg( ED.eGlobalFiltersLowPassOrder, &LPO);
+ W_V.reg( ED.eGlobalFiltersHighPassCutoff, &HPC);
+ W_V.reg( ED.eGlobalFiltersHighPassOrder, &HPO);
+ W_V.reg( ED.eGlobalFiltersNotchFilter, &NF);
+
if ( GTK_RESPONSE_OK ==
- gtk_dialog_run( ED.wGlobalFilters) )
+ gtk_dialog_run( ED.wGlobalFilters) ) {
+ FAFA;
+ forward_list<aghui::SBusyBlock*> bbl;
+ for ( auto& SFp : ED.open_scoring_facilities )
+ bbl.push_front( new aghui::SBusyBlock (SFp->wScoringFacility));
+ FAFA;
+ W_V.down();
FAFA;
+ for ( auto &G : ED.ED->groups )
+ for ( auto &J : G.second )
+ for ( auto &D : J.measurements )
+ for ( auto &E : D.second.episodes )
+ for ( auto &F : E.sources )
+ for ( auto &H : F.channel_list() ) {
+ auto& ff = F.filters(H.c_str());
+ ff.low_pass_cutoff = LPC;
+ ff.low_pass_order = LPO;
+ ff.high_pass_cutoff = HPC;
+ ff.high_pass_order = HPO;
+ ff.notch_filter = (sigfile::SFilterPack::TNotchFilter)NF;
+ }
+ ED.ED->sync();
+
+ for ( auto& SF : ED.open_scoring_facilities ) {
+ for ( auto& H : SF->channels )
+ if ( H.type == sigfile::SChannel::TType::eeg )
+ H.get_signal_filtered();
+ SF->queue_redraw_all();
+ }
+ ED.populate_1();
+ for ( auto& bb : bbl )
+ delete bb;
+ }
}
void
@@ -267,41 +317,6 @@ bGlobalMontageResetAll_clicked_cb( GtkButton*, gpointer userdata)
}
-inline namespace {
-void
-set_all_filters( agh::CExpDesign& ED, sigfile::SFilterPack::TNotchFilter value)
-{
- for ( auto &G : ED.groups )
- for ( auto &J : G.second )
- for ( auto &D : J.measurements )
- for ( auto &E : D.second.episodes )
- for ( auto &F : E.sources )
- for ( auto &H : F.channel_list() )
- F.filters(H.c_str()).notch_filter = value;
- ED.sync();
-}
-} // namespace
-
-void
-iMontageNotchNone_activate_cb( GtkMenuItem*, gpointer userdata)
-{
- auto& ED = *(SExpDesignUI*)userdata;
- set_all_filters( *ED.ED, sigfile::SFilterPack::TNotchFilter::none);
-}
-
-void
-iMontageNotch50Hz_activate_cb( GtkMenuItem*, gpointer userdata)
-{
- auto& ED = *(SExpDesignUI*)userdata;
- set_all_filters( *ED.ED, sigfile::SFilterPack::TNotchFilter::at50Hz);
-}
-
-void
-iMontageNotch60Hz_activate_cb( GtkMenuItem*, gpointer userdata)
-{
- auto& ED = *(SExpDesignUI*)userdata;
- set_all_filters( *ED.ED, sigfile::SFilterPack::TNotchFilter::at60Hz);
-}
void
iHelpAbout_activate_cb( GtkMenuItem*, gpointer userdata)
diff --git a/src/ui/ed_cb.hh b/src/ui/ed_cb.hh
index 42b66e9..981926c 100644
--- a/src/ui/ed_cb.hh
+++ b/src/ui/ed_cb.hh
@@ -29,15 +29,16 @@ void iExpPurgeComputed_activate_cb( GtkMenuItem*, gpointer);
void iExpAnnotations_activate_cb( GtkMenuItem*, gpointer);
void iExpBasicSADetectUltradianCycles_activate_cb( GtkMenuItem*, gpointer);
void iExpGloballyDetectArtifacts_activate_cb( GtkMenuItem*, gpointer);
-void eGlobalADProfiles_changed_cb( GtkComboBox*, gpointer);
void iExpGloballySetFilters_activate_cb( GtkMenuItem*, gpointer);
void iExpClose_activate_cb( GtkMenuItem*, gpointer);
void iExpQuit_activate_cb( GtkMenuItem*, gpointer);
void iMontageSetDefaults_activate_cb( GtkMenuItem*, gpointer);
-void bGlobalMontageResetAll_clicked_cb( GtkButton*, gpointer);
void iHelpAbout_activate_cb( GtkMenuItem*, gpointer);
void iHelpUsage_activate_cb( GtkMenuItem*, gpointer);
+void eGlobalADProfiles_changed_cb( GtkComboBox*, gpointer);
+void bGlobalMontageResetAll_clicked_cb( GtkButton*, gpointer);
+
void bDownload_clicked_cb( GtkButton*, gpointer);
void bScanTree_clicked_cb( GtkButton*, gpointer);
diff --git a/src/ui/sf-construct.cc b/src/ui/sf-construct.cc
index a237aed..5095c1d 100644
--- a/src/ui/sf-construct.cc
+++ b/src/ui/sf-construct.cc
@@ -728,19 +728,19 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
// aghui::SScoringFacility::SFiltersDialog::
// ------- wFilter
- if ( !(AGH_GBGETOBJ (GtkDialog, wFilters)) ||
- !(AGH_GBGETOBJ (GtkLabel, lFilterCaption)) ||
- !(AGH_GBGETOBJ (GtkSpinButton, eFilterLowPassCutoff)) ||
- !(AGH_GBGETOBJ (GtkSpinButton, eFilterHighPassCutoff)) ||
- !(AGH_GBGETOBJ (GtkSpinButton, eFilterLowPassOrder)) ||
- !(AGH_GBGETOBJ (GtkSpinButton, eFilterHighPassOrder)) ||
- !(AGH_GBGETOBJ (GtkComboBox, eFilterNotchFilter)) ||
- !(AGH_GBGETOBJ (GtkListStore, mFilterNotchFilter)) ||
- !(AGH_GBGETOBJ (GtkButton, bFilterOK)) )
+ if ( !AGH_GBGETOBJ (GtkDialog, wFilters) ||
+ !AGH_GBGETOBJ (GtkLabel, lFilterCaption) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eFilterLowPassCutoff) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eFilterLowPassOrder) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eFilterHighPassCutoff) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eFilterHighPassOrder) ||
+ !AGH_GBGETOBJ (GtkComboBox, eFilterNotchFilter) ||
+ !AGH_GBGETOBJ (GtkListStore, mFilterNotchFilter) ||
+ !AGH_GBGETOBJ (GtkButton, bFilterOK) )
throw runtime_error ("Failed to construct SF widgets");
gtk_combo_box_set_model( eFilterNotchFilter,
- (GtkTreeModel*)mFilterNotchFilter);
+ (GtkTreeModel*)mFilterNotchFilter); // can't reuse _p.mNotchFilter
gtk_combo_box_set_id_column( eFilterNotchFilter, 0);
renderer = gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start( (GtkCellLayout*)eFilterNotchFilter, renderer, FALSE);
diff --git a/src/ui/sf-filter_cb.cc b/src/ui/sf-filter_cb.cc
index 1b84bea..b729189 100644
--- a/src/ui/sf-filter_cb.cc
+++ b/src/ui/sf-filter_cb.cc
@@ -27,34 +27,21 @@ iSFPageFilter_activate_cb( GtkMenuItem *menuitem, gpointer userdata)
auto& SF = *(SScoringFacility*)userdata;
auto& FD = SF.filters_dialog;
auto& H = *SF.using_channel;
- gtk_spin_button_set_value( FD._p.eFilterLowPassCutoff,
- SF.using_channel->filters.low_pass_cutoff);
- gtk_spin_button_set_value( FD._p.eFilterLowPassOrder,
- SF.using_channel->filters.low_pass_order);
- gtk_spin_button_set_value( FD._p.eFilterHighPassCutoff,
- SF.using_channel->filters.high_pass_cutoff);
- gtk_spin_button_set_value( FD._p.eFilterHighPassOrder,
- SF.using_channel->filters.high_pass_order);
- gtk_combo_box_set_active( FD._p.eFilterNotchFilter,
- (int)SF.using_channel->filters.notch_filter);
+ aghui::SUIVarCollection WV;
+ WV.reg( FD._p.eFilterLowPassCutoff, &H.filters.low_pass_cutoff);
+ WV.reg( FD._p.eFilterLowPassOrder, (int*)&H.filters.low_pass_order);
+ WV.reg( FD._p.eFilterHighPassCutoff, &H.filters.high_pass_cutoff);
+ WV.reg( FD._p.eFilterHighPassOrder, (int*)&H.filters.high_pass_order);
+ WV.reg( FD._p.eFilterNotchFilter, (int*)&H.filters.notch_filter);
+ WV.up();
snprintf_buf( "<big>Filters for channel <b>%s</b></big>", SF.using_channel->name);
gtk_label_set_markup( FD._p.lFilterCaption,
__buf__);
if ( gtk_dialog_run( FD._p.wFilters) == GTK_RESPONSE_OK ) {
- H.filters.high_pass_cutoff
- = roundf( gtk_spin_button_get_value( FD._p.eFilterHighPassCutoff)*10) / 10;
- H.filters.low_pass_cutoff
- = roundf( gtk_spin_button_get_value( FD._p.eFilterLowPassCutoff)*10) / 10;
- H.filters.high_pass_order
- = roundf( gtk_spin_button_get_value( FD._p.eFilterHighPassOrder)*10) / 10;
- H.filters.low_pass_order
- = roundf( gtk_spin_button_get_value( FD._p.eFilterLowPassOrder)*10) / 10;
- H.filters.notch_filter =
- (sigfile::SFilterPack::TNotchFilter)gtk_combo_box_get_active( FD._p.eFilterNotchFilter);
-
- SF.using_channel->get_signal_filtered();
+ WV.down();
+ H.get_signal_filtered();
if ( H.type == sigfile::SChannel::TType::eeg ) {
H.get_psd_course( true); // force redo fft due to it not keeping track of filters yet
--
Sleep experiment manager
More information about the debian-med-commit
mailing list