[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461
Andrei Zavada
johnhommer at gmail.com
Fri Nov 16 00:50:53 UTC 2012
The following commit has been merged in the master branch:
commit 16eda3e8aaebb771ea37646a3d5494d1b6a77cf6
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Sat Nov 10 21:16:56 2012 +0200
groundwork for SWUpswing metric
diff --git a/.gitignore b/.gitignore
index f113b58..ff27d20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,7 +30,7 @@ Makefile.in
*.gch
cscope.*
TAGS
-
+*.tar.bz2
NewExperiment
doc/html
diff --git a/data/dialogs.glade b/data/dialogs.glade
index e0e268d..896e04b 100644
--- a/data/dialogs.glade
+++ b/data/dialogs.glade
@@ -321,14 +321,14 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="label5">
+ <object class="GtkLabel" id="lVersion">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="xalign">0</property>
<property name="xpad">5</property>
<property name="ypad">15</property>
- <property name="label" translatable="yes"><b><big><big>Aghermann 0.7.4</big> Karadag</big></b>
+ <property name="label" translatable="yes"><b><big><big>Aghermann 0.8.0 RC</big></big></b>
<a href="http://johnhommer.com/academic/code/aghermann">johnhommer.com/academic/code/aghermann</a></property>
<property name="use_markup">True</property>
</object>
diff --git a/data/main.glade b/data/main.glade
index c433714..2857274 100644
--- a/data/main.glade
+++ b/data/main.glade
@@ -487,6 +487,9 @@
<col id="0" translatable="yes">PSD</col>
</row>
<row>
+ <col id="0" translatable="yes">SWU</col>
+ </row>
+ <row>
<col id="0" translatable="yes">uCont</col>
</row>
</data>
@@ -1034,6 +1037,51 @@ rm */*/*/.*.{psd,mc}</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox" id="cMsmtProfileParams3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lMsmtPSDInfo2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="xpad">5</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -1042,6 +1090,20 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
+ <object class="GtkSeparator" id="separator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="orientation">vertical</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">3</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkToggleButton" id="eMsmtProfileAutoscale">
<property name="label" translatable="yes"> _Autoscale </property>
<property name="visible">True</property>
@@ -1056,7 +1118,7 @@ rm */*/*/.*.{psd,mc}</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -1073,20 +1135,21 @@ rm */*/*/.*.{psd,mc}</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">end</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">3</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -1166,7 +1229,7 @@ rm */*/*/.*.{psd,mc}</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
</object>
@@ -1193,9 +1256,6 @@ rm */*/*/.*.{psd,mc}</property>
<child>
<placeholder/>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -1449,30 +1509,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>
@@ -6708,6 +6744,18 @@ dragging individual signals with <i>Alt</i>.</small></property
<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 5ce370c..fcdc50a 100644
--- a/data/sf.glade
+++ b/data/sf.glade
@@ -1,92 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <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="jPageNo">
- <property name="lower">1</property>
- <property name="upper">99999</property>
- <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="GtkMenu" id="iiSFAccept">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -99,293 +13,67 @@
</object>
</child>
</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="jSFADBackpolate">
- <property name="upper">1</property>
- <property name="value">0.5</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">0.10000000000000001</property>
- </object>
- <object class="GtkAdjustment" id="jSFADBandwidth">
- <property name="lower">0.5</property>
- <property name="upper">4</property>
- <property name="value">1.5</property>
- <property name="step_increment">0.25</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jSFADEvalue">
- <property name="lower">0.10000000000000001</property>
- <property name="upper">40</property>
- <property name="value">4</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jSFADF0">
- <property name="lower">0.5</property>
- <property name="upper">8</property>
- <property name="value">1</property>
- <property name="step_increment">0.25</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jSFADFc">
- <property name="lower">1</property>
- <property name="upper">12</property>
- <property name="value">1.8</property>
- <property name="step_increment">0.25</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jSFADHistBins">
- <property name="lower">80</property>
- <property name="upper">9000</property>
- <property name="value">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jSFADHistRangeMax">
- <property name="upper">100</property>
- <property name="value">20</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jSFADHistRangeMin">
- <property name="lower">-100</property>
- <property name="value">-10</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jSFADLowerThr">
- <property name="lower">-30</property>
- <property name="upper">-1</property>
- <property name="value">-9</property>
- <property name="step_increment">0.5</property>
- <property name="page_increment">2</property>
- </object>
- <object class="GtkAdjustment" id="jSFADMCGain">
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="value">10</property>
- <property name="step_increment">0.5</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="jSFADScope">
- <property name="lower">1</property>
- <property name="upper">60</property>
- <property name="value">4</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jSFADSmoothSide">
- <property name="upper">8</property>
- <property name="step_increment">1</property>
- <property name="page_increment">2</property>
- </object>
- <object class="GtkAdjustment" id="jSFADUpperThr">
- <property name="lower">1</property>
- <property name="upper">30</property>
- <property name="value">9</property>
- <property name="step_increment">0.5</property>
- <property name="page_increment">2</property>
- </object>
- <object class="GtkAdjustment" id="jSFICAEigVecFirst">
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">1</property>
+ <object class="GtkMenu" id="iiSFAnnotationsToRemove">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
- <object class="GtkAdjustment" id="jSFICAEigVecLast">
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <object class="GtkMenu" id="iiSFICAPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkRadioMenuItem" id="iSFICAPageMarkICEOGArtifact">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">E_OG artifacts</property>
+ <property name="use_underline">True</property>
+ <property name="draw_as_radio">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="iSFICAPageMarkICEMGArtifact">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">E_MG artifacts</property>
+ <property name="use_underline">True</property>
+ <property name="draw_as_radio">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="iSFICAPageMarkICECGArtifact">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">E_CG artifacts</property>
+ <property name="use_underline">True</property>
+ <property name="draw_as_radio">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="iSFICAPageMarkICOtherArtifact">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Other _artifacts</property>
+ <property name="use_underline">True</property>
+ <property name="draw_as_radio">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="iSFICAPageMarkICClean">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Cle_an</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_as_radio">True</property>
+ </object>
+ </child>
</object>
- <object class="GtkAdjustment" id="jSFICAMaxIterations">
- <property name="lower">10</property>
- <property name="upper">10000</property>
- <property name="value">1000</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jSFICANofICs">
- <property name="lower">1</property>
- <property name="upper">20</property>
- <property name="value">5</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="jSFICASampleSizePercent">
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="value">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="jSFICAa1">
- <property name="upper">10</property>
- <property name="value">1</property>
- <property name="step_increment">0.010000003501772881</property>
- <property name="page_increment">0.10000000000000001</property>
- </object>
- <object class="GtkAdjustment" id="jSFICAa2">
- <property name="upper">10</property>
- <property name="value">1</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">0.10000000000000001</property>
- </object>
- <object class="GtkAdjustment" id="jSFICAepsilon">
- <property name="lower">1.0000000000000001e-05</property>
- <property name="upper">0.01</property>
- <property name="value">0.0001</property>
- <property name="step_increment">0.0001</property>
- <property name="page_increment">0.001</property>
- </object>
- <object class="GtkAdjustment" id="jSFICAmu">
- <property name="upper">10</property>
- <property name="value">1</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">0.10000000000000001</property>
- </object>
- <object class="GtkAdjustment" id="jSFPDSmooth">
- <property name="upper">12</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkListStore" id="mFilterNotchFilter">
- <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="GtkMenu" id="mSFAnnotationsToRemove">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <object class="GtkListStore" id="mSFICAApproach">
- <columns>
- <!-- column-name type -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">SYMM</col>
- </row>
- <row>
- <col id="0" translatable="yes">DEFL</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="mSFICANonlinearity">
- <columns>
- <!-- column-name type -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">pow3</col>
- </row>
- <row>
- <col id="0" translatable="yes">tanh</col>
- </row>
- <row>
- <col id="0" translatable="yes">gauss</col>
- </row>
- <row>
- <col id="0" translatable="yes">skew</col>
- </row>
- </data>
- </object>
- <object class="GtkMenu" id="mSFICAPage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkRadioMenuItem" id="iSFICAPageMarkICEOGArtifact">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">E_OG artifacts</property>
- <property name="use_underline">True</property>
- <property name="draw_as_radio">True</property>
- </object>
- </child>
- <child>
- <object class="GtkRadioMenuItem" id="iSFICAPageMarkICEMGArtifact">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">E_MG artifacts</property>
- <property name="use_underline">True</property>
- <property name="draw_as_radio">True</property>
- </object>
- </child>
- <child>
- <object class="GtkRadioMenuItem" id="iSFICAPageMarkICECGArtifact">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">E_CG artifacts</property>
- <property name="use_underline">True</property>
- <property name="draw_as_radio">True</property>
- </object>
- </child>
- <child>
- <object class="GtkRadioMenuItem" id="iSFICAPageMarkICOtherArtifact">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Other _artifacts</property>
- <property name="use_underline">True</property>
- <property name="draw_as_radio">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkRadioMenuItem" id="iSFICAPageMarkICClean">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Cle_an</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_as_radio">True</property>
- </object>
- </child>
- </object>
- <object class="GtkListStore" id="mSFICARemixMode">
- <columns>
- <!-- column-name mode -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Punch</col>
- </row>
- <row>
- <col id="0" translatable="yes">Map</col>
- </row>
- </data>
- </object>
- <object class="GtkMenu" id="mSFPage">
+ <object class="GtkMenu" id="iiSFPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -512,7 +200,7 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="mSFPageAnnotation">
+ <object class="GtkMenuItem" id="iiSFPageAnnotation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Annotation</property>
@@ -616,214 +304,554 @@
</object>
</child>
<child>
- <object class="GtkCheckMenuItem" id="iSFPageDrawPSDProfile">
+ <object class="GtkMenuItem" id="iiSFPageProfiles">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Profiles</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="menu5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageDrawPSDProfile">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_PSD profile</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageDrawPSDSpectrum">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">PSD spectr_um</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageDrawSWUProfile">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_SWU profile</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageDrawMCProfile">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">µ_Continuity profile</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem122">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageDrawEMGProfile">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">E_MG profile</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkMenu" id="iiSFPageHidden">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <object class="GtkMenu" id="iiSFPageSelection">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="iSFPageSelectionMarkArtifact">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Mark an artifact</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFPageSelectionClearArtifact">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_PSD profile</property>
+ <property name="label" translatable="yes">_Clear artifacts in selection</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
- <object class="GtkCheckMenuItem" id="iSFPageDrawPSDSpectrum">
+ <object class="GtkMenuItem" id="iSFPageSelectionAnnotate">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">PSD spectr_um</property>
+ <property name="label" translatable="yes">_Annotate...</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
- <object class="GtkCheckMenuItem" id="iSFPageDrawEMGProfile">
+ <object class="GtkSeparatorMenuItem" id="menuitem1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFPageSelectionFindPattern">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">E_MG profile</property>
+ <property name="label" translatable="yes">_Find this pattern...</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
- <object class="GtkCheckMenuItem" id="iSFPageDrawMCProfile">
+ <object class="GtkSeparatorMenuItem" id="menuitem6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageSelectionDrawCourse">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">µ_Continuity profile</property>
+ <property name="label" translatable="yes">Draw _LP course</property>
<property name="use_underline">True</property>
</object>
</child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageSelectionDrawEnvelope">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Draw en_velope</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPageSelectionDrawDzxdf">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Draw d_Zx density</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ <object class="GtkMenu" id="iiSFPower">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPowerDrawBands">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">(Click2)</property>
+ <property name="label" translatable="yes">Draw _Bands</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPowerSmooth">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">S_mooth</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="iSFPowerAutoscale">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Autoscale</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFPowerUseThisScale">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Set scale to current</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFPowerExportRange">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Export frequency range</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFPowerExportAll">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">E_xport entire PSD</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ <object class="GtkMenu" id="iiSFScore">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="iSFScoreAssist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Assist</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFScoreClear">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Clear</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFScoreImport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Import</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="iSFScoreExport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Export</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </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="jPageNo">
+ <property name="lower">1</property>
+ <property name="upper">99999</property>
+ <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>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">0.10000000000000001</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADBandwidth">
+ <property name="lower">0.5</property>
+ <property name="upper">4</property>
+ <property name="value">1.5</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADEvalue">
+ <property name="lower">0.10000000000000001</property>
+ <property name="upper">40</property>
+ <property name="value">4</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADF0">
+ <property name="lower">0.5</property>
+ <property name="upper">8</property>
+ <property name="value">1</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADFc">
+ <property name="lower">1</property>
+ <property name="upper">12</property>
+ <property name="value">1.8</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADHistBins">
+ <property name="lower">80</property>
+ <property name="upper">9000</property>
+ <property name="value">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADHistRangeMax">
+ <property name="upper">100</property>
+ <property name="value">20</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADHistRangeMin">
+ <property name="lower">-100</property>
+ <property name="value">-10</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADLowerThr">
+ <property name="lower">-30</property>
+ <property name="upper">-1</property>
+ <property name="value">-9</property>
+ <property name="step_increment">0.5</property>
+ <property name="page_increment">2</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADMCGain">
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="value">10</property>
+ <property name="step_increment">0.5</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADScope">
+ <property name="lower">1</property>
+ <property name="upper">60</property>
+ <property name="value">4</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADSmoothSide">
+ <property name="upper">8</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">2</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFADUpperThr">
+ <property name="lower">1</property>
+ <property name="upper">30</property>
+ <property name="value">9</property>
+ <property name="step_increment">0.5</property>
+ <property name="page_increment">2</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICAEigVecFirst">
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICAEigVecLast">
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICAMaxIterations">
+ <property name="lower">10</property>
+ <property name="upper">10000</property>
+ <property name="value">1000</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICANofICs">
+ <property name="lower">1</property>
+ <property name="upper">20</property>
+ <property name="value">5</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">5</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICASampleSizePercent">
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="value">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICAa1">
+ <property name="upper">10</property>
+ <property name="value">1</property>
+ <property name="step_increment">0.010000003501772881</property>
+ <property name="page_increment">0.10000000000000001</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICAa2">
+ <property name="upper">10</property>
+ <property name="value">1</property>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">0.10000000000000001</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICAepsilon">
+ <property name="lower">1.0000000000000001e-05</property>
+ <property name="upper">0.01</property>
+ <property name="value">0.0001</property>
+ <property name="step_increment">0.0001</property>
+ <property name="page_increment">0.001</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFICAmu">
+ <property name="upper">10</property>
+ <property name="value">1</property>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">0.10000000000000001</property>
+ </object>
+ <object class="GtkAdjustment" id="jSFPDSmooth">
+ <property name="upper">12</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="mFilterNotchFilter">
+ <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="GtkMenu" id="mSFPageHidden">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <object class="GtkMenu" id="mSFPageSelection">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="iSFPageSelectionMarkArtifact">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Mark an artifact</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFPageSelectionClearArtifact">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Clear artifacts in selection</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFPageSelectionAnnotate">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Annotate...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFPageSelectionFindPattern">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Find this pattern...</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="iSFPageSelectionDrawCourse">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Draw _LP course</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="iSFPageSelectionDrawEnvelope">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Draw en_velope</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="iSFPageSelectionDrawDzxdf">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Draw d_Zx density</property>
- <property name="use_underline">True</property>
- </object>
- </child>
+ <object class="GtkListStore" id="mSFICAApproach">
+ <columns>
+ <!-- column-name type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">SYMM</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">DEFL</col>
+ </row>
+ </data>
</object>
- <object class="GtkMenu" id="mSFPower">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkCheckMenuItem" id="iSFPowerDrawBands">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">(Click2)</property>
- <property name="label" translatable="yes">Draw _Bands</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="iSFPowerSmooth">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">S_mooth</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="iSFPowerAutoscale">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Autoscale</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFPowerUseThisScale">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Set scale to current</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFPowerExportRange">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Export frequency range</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFPowerExportAll">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">E_xport entire PSD</property>
- <property name="use_underline">True</property>
- </object>
- </child>
+ <object class="GtkListStore" id="mSFICANonlinearity">
+ <columns>
+ <!-- column-name type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">pow3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">tanh</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">gauss</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">skew</col>
+ </row>
+ </data>
</object>
- <object class="GtkMenu" id="mSFScore">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="iSFScoreAssist">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Assist</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFScoreClear">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Clear</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFScoreImport">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Import</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="iSFScoreExport">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Export</property>
- <property name="use_underline">True</property>
- </object>
- </child>
+ <object class="GtkListStore" id="mSFICARemixMode">
+ <columns>
+ <!-- column-name mode -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Punch</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Map</col>
+ </row>
+ </data>
</object>
<object class="GtkListStore" id="mScoringPageSize">
<columns>
@@ -2953,15 +2981,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>
@@ -2970,15 +2998,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>
@@ -3213,17 +3241,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>
@@ -3233,18 +3262,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>
diff --git a/src/expdesign/primaries-tree-scanner.cc b/src/expdesign/primaries-tree-scanner.cc
index dfec6ea..99c5160 100644
--- a/src/expdesign/primaries-tree-scanner.cc
+++ b/src/expdesign/primaries-tree-scanner.cc
@@ -43,8 +43,9 @@ agh::CExpDesign::TMsmtCollectProgressIndicatorFun
int
agh::CSubject::SEpisodeSequence::
add_one( sigfile::CSource&& Fmc,
- const metrics::psd::SFFTParamSet& fft_params,
- const metrics::mc::SMCParamSet& mc_params,
+ const metrics::psd::SPPack& fft_params,
+ const metrics::swu::SPPack& swu_params,
+ const metrics::mc::SPPack& mc_params,
float max_hours_apart)
{
auto Ei = find( episodes.begin(), episodes.end(),
@@ -67,7 +68,7 @@ add_one( sigfile::CSource&& Fmc,
printf( "CSubject::SEpisodeSequence::add_one( \"%s\")\n",
Fmc.filename());
- episodes.emplace_back( move(Fmc), fft_params, mc_params);
+ episodes.emplace_back( move(Fmc), fft_params, swu_params, mc_params);
episodes.sort();
} else { // same as SEpisode() but done on an existing one
@@ -81,7 +82,7 @@ add_one( sigfile::CSource&& Fmc,
auto HH = F.channel_list();
int h = 0;
for ( auto &H : HH )
- Ei->recordings.insert( {H, {F, h++, fft_params, mc_params}});
+ Ei->recordings.insert( {H, {F, h++, fft_params, swu_params, mc_params}});
// no new episode added: don't sort
}
@@ -194,7 +195,7 @@ register_intree_source( sigfile::CSource&& F,
// printf( "\nCExpDesign::register_intree_source( file: \"%s\", J: \"%s\", E: \"%s\", D: \"%s\")\n",
// F.filename(), F.subject(), F.episode(), F.session());
switch ( J->measurements[F.session()].add_one(
- move(F), fft_params, mc_params) ) { // this will do it
+ move(F), fft_params, swu_params, mc_params) ) { // this will do it
case AGH_EPSEQADD_OVERLAP:
log_message( "%s: not added as it overlaps with existing episodes\n",
F.filename());
@@ -352,8 +353,9 @@ compute_profiles()
TRecordingOpFun F =
[&]( CRecording& R)
{
- R.CBinnedPower::compute();
- R.CBinnedMC::compute();
+ R.metrics::psd::CProfile::compute();
+ R.metrics::swu::CProfile::compute();
+ R.metrics::mc::CProfile::compute();
};
TRecordingReportFun G =
[&]( const CJGroup&, const CSubject&, const string&, const CSubject::SEpisode&, const CRecording& R,
diff --git a/src/expdesign/primaries.cc b/src/expdesign/primaries.cc
index 2f2b159..5f65150 100644
--- a/src/expdesign/primaries.cc
+++ b/src/expdesign/primaries.cc
@@ -226,7 +226,7 @@ for_all_modruns( const TModelRunOpFun& F, const TModelRunReportFun& report, cons
vector<tuple<CJGroup*,
CSubject*,
const string*,
- const metrics::TMetricType*,
+ const metrics::TType*,
const string*,
const pair<float,float>*,
ach::CModelRun*>> v;
@@ -437,8 +437,9 @@ agh::CSubject::
agh::CSubject::SEpisode::
SEpisode (sigfile::CSource&& F_,
- const metrics::psd::SFFTParamSet& fft_params,
- const metrics::mc::SMCParamSet& mc_params)
+ const metrics::psd::SPPack& fft_params,
+ const metrics::swu::SPPack& swu_params,
+ const metrics::mc::SPPack& mc_params)
{
// move it in place
sources.emplace_back( move(F_));
@@ -447,9 +448,8 @@ SEpisode (sigfile::CSource&& F_,
printf( "CSubject::SEpisode::SEpisode( \"%s\"): %s\n",
F.filename(), agh::str::join(HH, ", ").c_str());
int h = 0;
- for ( auto& H : HH ) {
- recordings.insert( {H, {F, h++, fft_params, mc_params}});
- }
+ for ( auto& H : HH )
+ recordings.insert( {H, {F, h++, fft_params, swu_params, mc_params}});
}
diff --git a/src/expdesign/primaries.hh b/src/expdesign/primaries.hh
index f26427e..65334e2 100644
--- a/src/expdesign/primaries.hh
+++ b/src/expdesign/primaries.hh
@@ -84,8 +84,9 @@ class CSubject {
recordings; // one per channel, naturally
SEpisode (sigfile::CSource&& Fmc,
- const metrics::psd::SFFTParamSet& fft_params,
- const metrics::mc::SMCParamSet& ucont_params);
+ const metrics::psd::SPPack&,
+ const metrics::swu::SPPack&,
+ const metrics::mc::SPPack&);
const char*
name() const
@@ -189,12 +190,13 @@ class CSubject {
// existing one (add F to its sources)
int
add_one( sigfile::CSource&&,
- const metrics::psd::SFFTParamSet&,
- const metrics::mc::SMCParamSet&,
+ const metrics::psd::SPPack&,
+ const metrics::swu::SPPack&,
+ const metrics::mc::SPPack&,
float max_hours_apart = 7*24.);
// simulations rather belong here
- typedef map<metrics::TMetricType,
+ typedef map<metrics::TType,
map<string, // channel
map< pair<float, float>, // frequency range
ach::CModelRun>>>
@@ -348,7 +350,7 @@ class CExpDesign {
// model runs
int setup_modrun( const char* j, const char* d, const char* h,
- metrics::TMetricType,
+ metrics::TType,
float freq_from, float freq_upto,
ach::CModelRun**);
void remove_all_modruns();
@@ -410,7 +412,7 @@ class CExpDesign {
typedef function<void(const CJGroup&,
const CSubject&,
const string&,
- const metrics::TMetricType&,
+ const metrics::TType&,
const string&,
const pair<float,float>&,
const ach::CModelRun&,
@@ -423,9 +425,11 @@ class CExpDesign {
// inventory
int num_threads;
- metrics::psd::SFFTParamSet
+ metrics::psd::SPPack
fft_params;
- metrics::mc::SMCParamSet
+ metrics::swu::SPPack
+ swu_params;
+ metrics::mc::SPPack
mc_params;
sigproc::TWinType // such a fussy
af_dampen_window_type;
diff --git a/src/expdesign/recording.cc b/src/expdesign/recording.cc
index d268304..a958039 100644
--- a/src/expdesign/recording.cc
+++ b/src/expdesign/recording.cc
@@ -21,11 +21,13 @@ using namespace std;
agh::CRecording::
CRecording (sigfile::CSource& F, int sig_no,
- const metrics::psd::SFFTParamSet& fft_params,
- const metrics::mc::SMCParamSet& mc_params)
- : CBinnedPower (F, sig_no, fft_params),
- CBinnedMC (F, sig_no, mc_params,
- fft_params.pagesize),
+ const metrics::psd::SPPack& fft_params,
+ const metrics::swu::SPPack& swu_params,
+ const metrics::mc::SPPack& mc_params)
+ : metrics::psd::CProfile (F, sig_no, fft_params),
+ metrics::swu::CProfile (F, sig_no, swu_params),
+ metrics::mc::CProfile (F, sig_no, mc_params,
+ fft_params.pagesize),
uc_params {NAN, NAN, NAN, NAN},
_status (0), // not computed
_source (F), _sig_no (sig_no)
@@ -89,7 +91,7 @@ CSCourse (CSubject& J, const string& d, const sigfile::SChannel& h,
if ( Mi == _mm_list.begin() ) {
_0at = F.start_time();
- _pagesize = M.SFFTParamSet::pagesize;
+ _pagesize = M.metrics::psd::SPPack::pagesize;
_pages_in_bed = 0;
} else
if ( _pagesize != F.pagesize() ) {
@@ -150,7 +152,7 @@ CSCourse (CRecording& M,
_mm_list.push_back( &M);
_0at = M.F().start_time();
- _pagesize = M.SFFTParamSet::pagesize;
+ _pagesize = M.metrics::psd::SPPack::pagesize;
_pages_in_bed = 0;
int pa = (size_t)difftime( M.F().start_time(), _0at) / _pagesize,
diff --git a/src/expdesign/recording.hh b/src/expdesign/recording.hh
index f4e4962..ea47f21 100644
--- a/src/expdesign/recording.hh
+++ b/src/expdesign/recording.hh
@@ -16,6 +16,7 @@
#include "libsigfile/source.hh"
#include "metrics/psd.hh"
+#include "metrics/swu.hh"
#include "metrics/mc.hh"
#include "model/beersma.hh"
#include "expdesign/forward-decls.hh"
@@ -25,8 +26,9 @@ namespace agh {
using namespace std;
class CRecording
- : public metrics::psd::CBinnedPower,
- public metrics::mc::CBinnedMC {
+ : public metrics::psd::CProfile,
+ public metrics::swu::CProfile,
+ public metrics::mc::CProfile {
friend class CExpDesign;
@@ -35,8 +37,9 @@ class CRecording
public:
CRecording (sigfile::CSource& F, int sig_no,
- const metrics::psd::SFFTParamSet&,
- const metrics::mc::SMCParamSet&);
+ const metrics::psd::SPPack&,
+ const metrics::swu::SPPack&,
+ const metrics::mc::SPPack&);
const char* subject() const { return _source.subject(); }
const char* session() const { return _source.session(); }
@@ -77,7 +80,7 @@ class CRecording
// this one damn identical in two bases
size_t pagesize() const
{
- return ((metrics::psd::CBinnedPower*)this) -> metrics::CPageMetrics_base::pagesize();
+ return ((metrics::psd::CProfile*)this) -> metrics::CProfile_base::pagesize();
}
size_t total_pages() const
@@ -95,7 +98,7 @@ class CRecording
template <typename T>
valarray<T>
- course( metrics::TMetricType metric,
+ course( metrics::TType metric,
double freq_from, double freq_upto) const;
bool have_uc_determined() const
@@ -120,7 +123,7 @@ class CRecording
struct SSCourseParamSet {
- metrics::TMetricType
+ metrics::TType
_profile_type;
double _freq_from,
_freq_upto;
@@ -145,7 +148,7 @@ class CSCourse
}
void create_timeline();
- metrics::TMetricType profile_type() const
+ metrics::TType profile_type() const
{ return _profile_type; }
double freq_from() const { return _freq_from; }
double freq_upto() const { return _freq_upto; }
@@ -243,18 +246,22 @@ class CSCourse
template <typename T>
valarray<T>
CRecording::
-course( metrics::TMetricType metric,
+course( metrics::TType metric,
double freq_from, double freq_upto) const
{
+ using namespace metrics;
switch ( metric ) {
- case metrics::TMetricType::psd:
- return (((CBinnedPower*)this)->compute(),
- CBinnedPower::course<T>( freq_from, freq_upto));
- case metrics::TMetricType::mc:
- return (((CBinnedMC*)this)->compute(),
- CBinnedMC::course<T>(
+ case TType::psd:
+ return (((psd::CProfile*)this)->compute(),
+ psd::CProfile::course<T>( freq_from, freq_upto));
+ case TType::swu:
+ return (((swu::CProfile*)this)->compute(),
+ swu::CProfile::course<T>( freq_from, freq_upto));
+ case TType::mc:
+ return (((mc::CProfile*)this)->compute(),
+ mc::CProfile::course<T>(
min( (size_t)((freq_from) / bandwidth),
- CBinnedMC::bins()-1)));
+ mc::CProfile::bins()-1)));
default:
throw invalid_argument ("CRecording::course: bad metric");
}
diff --git a/src/metrics/Makefile.am b/src/metrics/Makefile.am
index 65a45ac..28fba7c 100644
--- a/src/metrics/Makefile.am
+++ b/src/metrics/Makefile.am
@@ -12,6 +12,8 @@ liba_a_SOURCES := \
page-metrics-base.cc \
psd.cc \
psd.hh \
+ swu.cc \
+ swu.hh \
mc.cc \
mc.hh \
mc-artifacts.cc \
@@ -22,6 +24,7 @@ BUILT_SOURCES := \
forward-decls.hh.gch \
page-metrics-base.hh \
psd.hh.gch \
+ swu.hh.gch \
mc.hh.gch \
mc-artifacts.hh.gch
%.hh.gch: %.hh
diff --git a/src/metrics/forward-decls.hh b/src/metrics/forward-decls.hh
index 3b053e9..739de8b 100644
--- a/src/metrics/forward-decls.hh
+++ b/src/metrics/forward-decls.hh
@@ -19,16 +19,23 @@ namespace metrics {
class CPageMetrics_base;
namespace psd {
-struct SFFTParamSet;
-class CBinnedPower;
+struct SPPack;
+class CProfile;
}
namespace mc {
-struct SMCParamSet;
-class CBinnedMC;
+struct SPPack;
+class CProfile;
struct SArtifactDetectionPP;
}
+namespace swu {
+struct SPPack;
+class CProfile;
+}
+
+
+
} // namespace metrics
#endif // _METRICS_FORWARD_DECLS_H
diff --git a/src/metrics/mc-artifacts.cc b/src/metrics/mc-artifacts.cc
index 06dff6d..29aaed0 100644
--- a/src/metrics/mc-artifacts.cc
+++ b/src/metrics/mc-artifacts.cc
@@ -31,7 +31,7 @@ detect_artifacts( const valarray<TFloat>& signal, size_t sr,
const SArtifactDetectionPP& P)
{
auto sssu
- = CBinnedMC::do_sssu_reduction(
+ = CProfile::do_sssu_reduction(
signal,
sr, P.scope,
P.mc_gain, P.iir_backpolate,
diff --git a/src/metrics/mc.cc b/src/metrics/mc.cc
index 80b4e2f..cabf020 100644
--- a/src/metrics/mc.cc
+++ b/src/metrics/mc.cc
@@ -23,7 +23,7 @@ using namespace std;
string
-metrics::mc::CBinnedMC::
+metrics::mc::CProfile::
fname_base() const
{
DEF_UNIQUE_CHARP (_);
@@ -47,7 +47,7 @@ heaviside( TFloat x)
void
-metrics::mc::SMCParamSet::
+metrics::mc::SPPack::
check( size_t) const
{
if ( mc_gain < 1.0 )
@@ -59,7 +59,7 @@ check( size_t) const
void
-metrics::mc::SMCParamSet::
+metrics::mc::SPPack::
reset()
{
scope = 30 / 6.; // 5 sec is close to 4 sec ('recommended')
@@ -75,25 +75,25 @@ reset()
-metrics::mc::CBinnedMC::
-CBinnedMC (const sigfile::CSource& F, int sig_no,
- const SMCParamSet ¶ms,
- size_t pagesize)
- : CPageMetrics_base (F, sig_no,
- pagesize, // acting 'pagesize' for CPageMetrics_base
- params.compute_n_bins(F.samplerate(sig_no))),
- SMCParamSet (params)
+metrics::mc::CProfile::
+CProfile (const sigfile::CSource& F, int sig_no,
+ const SPPack ¶ms,
+ size_t pagesize)
+ : CProfile_base (F, sig_no,
+ pagesize, // acting 'pagesize' for CPageMetrics_base
+ params.compute_n_bins(F.samplerate(sig_no))),
+ SPPack (params)
// *_filter's initialized at compute time
{
- SMCParamSet::check( pagesize); // throw if not ok
+ SPPack::check( pagesize); // throw if not ok
}
int
-metrics::mc::CBinnedMC::
-compute( const SMCParamSet& req_params,
+metrics::mc::CProfile::
+compute( const SPPack& req_params,
bool force)
{
auto req_signature = _using_F.dirty_signature( _using_sig_no);
@@ -124,7 +124,7 @@ compute( const SMCParamSet& req_params,
> 1);
// update signature
- *(SMCParamSet*)this = req_params;
+ *(SPPack*)this = req_params;
_signature = req_signature;
printf( "CBinnedMC::compute( %s, %s): %g sec (%zu pp @%zu + %zu sec last incomplete page), scope %g sec",
@@ -182,8 +182,8 @@ compute( const SMCParamSet& req_params,
-metrics::mc::CBinnedMC::TSSSU
-metrics::mc::CBinnedMC::
+metrics::mc::CProfile::TSSSU
+metrics::mc::CProfile::
do_sssu_reduction( const valarray<TFloat>& signal,
size_t samplerate, double scope,
double mc_gain, double iir_backpolate,
@@ -236,7 +236,7 @@ do_sssu_reduction( const valarray<TFloat>& signal,
int
-metrics::mc::CBinnedMC::
+metrics::mc::CProfile::
export_tsv( const string& fname) const
{
FILE *f = fopen( fname.c_str(), "w");
@@ -272,7 +272,7 @@ export_tsv( const string& fname) const
int
-metrics::mc::CBinnedMC::
+metrics::mc::CProfile::
export_tsv( size_t bin,
const string& fname) const
{
diff --git a/src/metrics/mc.hh b/src/metrics/mc.hh
index 98d5326..b1b19a0 100644
--- a/src/metrics/mc.hh
+++ b/src/metrics/mc.hh
@@ -30,7 +30,7 @@ namespace mc {
-struct SMCParamSet {
+struct SPPack {
double scope,
f0fc,//f0, // = 1.,
//fc, // = 1.8;
@@ -39,8 +39,8 @@ struct SMCParamSet {
mc_gain; // = 10.0; // Gain (DigiRange/PhysiRange) of MicroContinuity
size_t smooth_side;
- SMCParamSet& operator=( const SMCParamSet& rv) = default;
- bool operator==( const SMCParamSet& rv) const
+ SPPack& operator=( const SPPack& rv) = default;
+ bool operator==( const SPPack& rv) const
{
return scope == rv.scope &&
iir_backpolate == rv.iir_backpolate &&
@@ -53,14 +53,14 @@ struct SMCParamSet {
void reset();
size_t
- compute_n_bins( size_t) const // to match SFFTParamSet::compute_n_bins
+ compute_n_bins( size_t) const // to match psd::SPPack::compute_n_bins
{
return 5;
}
static constexpr double freq_from = .5;
- SMCParamSet( const SMCParamSet& rv) = default;
- SMCParamSet()
+ SPPack( const SPPack& rv) = default;
+ SPPack()
{
reset();
}
@@ -69,26 +69,26 @@ struct SMCParamSet {
-class CBinnedMC
- : public CPageMetrics_base,
- public SMCParamSet {
+class CProfile
+ : public CProfile_base,
+ public SPPack {
- CBinnedMC() = delete;
- void operator=( const CBinnedMC&) = delete;
+ CProfile() = delete;
+ void operator=( const CProfile&) = delete;
protected:
- CBinnedMC( const sigfile::CSource& F, int sig_no,
- const SMCParamSet ¶ms,
- size_t pagesize);
+ CProfile( const sigfile::CSource& F, int sig_no,
+ const SPPack ¶ms,
+ size_t pagesize);
public:
const char* method() const
{
- return metric_method( TMetricType::mc);
+ return metric_method( TType::mc);
}
int
- compute( const SMCParamSet& req_params,
+ compute( const SPPack& req_params,
bool force = false);
int
compute( bool force = false)
diff --git a/src/metrics/page-metrics-base.cc b/src/metrics/page-metrics-base.cc
index d55ecde..0a2dec8 100644
--- a/src/metrics/page-metrics-base.cc
+++ b/src/metrics/page-metrics-base.cc
@@ -17,7 +17,6 @@
#include <cstring>
#include <string>
#include <list>
-#include <array>
#include <numeric>
#include <valarray>
@@ -30,8 +29,8 @@
using namespace std;
-metrics::CPageMetrics_base::
-CPageMetrics_base (const sigfile::CSource& F, int sig_no,
+metrics::CProfile_base::
+CProfile_base (const sigfile::CSource& F, int sig_no,
size_t pagesize, size_t bins)
: _status (0),
_bins (bins),
@@ -44,14 +43,14 @@ CPageMetrics_base (const sigfile::CSource& F, int sig_no,
}
size_t
-metrics::CPageMetrics_base::
+metrics::CProfile_base::
samplerate() const
{
return _using_F.samplerate( _using_sig_no);
}
size_t
-metrics::CPageMetrics_base::
+metrics::CProfile_base::
pages() const
{
return _using_F.recording_time() / _pagesize;
@@ -60,7 +59,7 @@ pages() const
list<agh::alg::SSpan<size_t>>
-metrics::CPageMetrics_base::
+metrics::CProfile_base::
artifacts_in_samples() const
{
return _using_F.artifacts( _using_sig_no)();
@@ -68,7 +67,7 @@ artifacts_in_samples() const
list<agh::alg::SSpan<float>>
-metrics::CPageMetrics_base::
+metrics::CProfile_base::
artifacts_in_seconds() const
{
list<agh::alg::SSpan<float>> ret;
@@ -83,7 +82,7 @@ artifacts_in_seconds() const
int
-metrics::CPageMetrics_base::
+metrics::CProfile_base::
_mirror_enable( const char *fname)
{
int fd, retval = 0;
@@ -96,7 +95,7 @@ _mirror_enable( const char *fname)
int
-metrics::CPageMetrics_base::
+metrics::CProfile_base::
_mirror_back( const char *fname)
{
int fd = -1;
@@ -123,7 +122,7 @@ _mirror_back( const char *fname)
int
-metrics::CPageMetrics_base::
+metrics::CProfile_base::
export_tsv( const string& fname) const
{
FILE *f = fopen( fname.c_str(), "w");
diff --git a/src/metrics/page-metrics-base.hh b/src/metrics/page-metrics-base.hh
index 11f7d20..a71388a 100644
--- a/src/metrics/page-metrics-base.hh
+++ b/src/metrics/page-metrics-base.hh
@@ -30,17 +30,19 @@ using namespace std;
namespace metrics {
-enum class TMetricType { invalid, psd, mc };
+enum class TType { invalid, psd, mc, swu };
inline const char*
__attribute__ ((pure))
-metric_method( TMetricType t)
+metric_method( TType t)
{
switch ( t ) {
- case TMetricType::psd:
+ case TType::psd:
return "PSD";
- case TMetricType::mc:
+ case TType::mc:
return "Microcontinuity";
+ case TType::swu:
+ return "SW Upswing";
default:
return "(unknown metric)";
}
@@ -51,12 +53,12 @@ metric_method( TMetricType t)
// We better keep the internal storage as valarray<double> regardless
// of what TFloat today is, because the computed data are written/read
// to files (else, we'd need to mark files as holding double data, not float).
-class CPageMetrics_base {
+class CProfile_base {
protected:
- CPageMetrics_base (const sigfile::CSource& F, int sig_no,
- size_t pagesize, size_t bins);
- CPageMetrics_base (const CPageMetrics_base& rv) = default;
+ CProfile_base (const sigfile::CSource& F, int sig_no,
+ size_t pagesize, size_t bins);
+ CProfile_base (const CProfile_base& rv) = default;
public:
virtual const char* method() const = 0;
@@ -149,7 +151,7 @@ class CPageMetrics_base {
template <>
inline valarray<double>
-CPageMetrics_base::course() const
+CProfile_base::course() const
{
return _data;
}
@@ -157,7 +159,7 @@ CPageMetrics_base::course() const
template <>
inline valarray<float>
-CPageMetrics_base::course() const
+CProfile_base::course() const
{
valarray<float> coursef (_data.size());
for ( size_t i = 0; i < _data.size(); ++i )
@@ -168,7 +170,7 @@ CPageMetrics_base::course() const
template <>
inline valarray<double>
-CPageMetrics_base::course( size_t m) const
+CProfile_base::course( size_t m) const
{
return _data[ slice(m, pages(), _bins) ];
}
@@ -176,7 +178,7 @@ CPageMetrics_base::course( size_t m) const
template <>
inline valarray<float>
-CPageMetrics_base::course( size_t m) const
+CProfile_base::course( size_t m) const
{
valarray<double> course = _data[ slice(m, pages(), _bins) ];
valarray<float> coursef (0., course.size());
@@ -188,14 +190,14 @@ CPageMetrics_base::course( size_t m) const
template <>
inline valarray<double>
-CPageMetrics_base::spectrum( size_t p) const
+CProfile_base::spectrum( size_t p) const
{
return _data[ slice(p * _bins, _bins, 1) ];
}
template <>
inline valarray<float>
-CPageMetrics_base::spectrum( size_t p) const
+CProfile_base::spectrum( size_t p) const
{
valarray<double> dps = spectrum<double>(p);
valarray<float> ps (dps.size());
@@ -209,6 +211,7 @@ to_vad( valarray<double>&& rv)
{
return move(rv);
}
+
inline valarray<double>
to_vad( const valarray<float>& rv)
{
diff --git a/src/metrics/psd.cc b/src/metrics/psd.cc
index adb7023..ad5d057 100644
--- a/src/metrics/psd.cc
+++ b/src/metrics/psd.cc
@@ -35,7 +35,7 @@ using namespace std;
void
-metrics::psd::SFFTParamSet::
+metrics::psd::SPPack::
check() const
{
if ( pagesize != 4 && pagesize != 20 &&
@@ -50,7 +50,7 @@ check() const
}
void
-metrics::psd::SFFTParamSet::
+metrics::psd::SPPack::
reset()
{
pagesize = 30;
@@ -64,27 +64,27 @@ reset()
-metrics::psd::CBinnedPower::
-CBinnedPower (const sigfile::CSource& F, int sig_no,
- const SFFTParamSet &fft_params)
- : CPageMetrics_base (F, sig_no,
- fft_params.pagesize,
- fft_params.compute_n_bins(F.samplerate(sig_no))),
- SFFTParamSet (fft_params)
+metrics::psd::CProfile::
+CProfile (const sigfile::CSource& F, int sig_no,
+ const SPPack &fft_params)
+ : CProfile_base (F, sig_no,
+ fft_params.pagesize,
+ fft_params.compute_n_bins(F.samplerate(sig_no))),
+ SPPack (fft_params)
{
}
string
-metrics::psd::CBinnedPower::
+metrics::psd::CProfile::
fname_base() const
{
DEF_UNIQUE_CHARP (_);
assert (asprintf( &_,
"%s-%s-%zu-%c-%zu",
_using_F.filename(), _using_F.channel_by_id(_using_sig_no),
- SFFTParamSet::pagesize, //freq_trunc,
+ SPPack::pagesize, //freq_trunc,
'a'+(char)welch_window_type,
_signature) > 1);
string ret {_};
@@ -96,8 +96,8 @@ fname_base() const
int
-metrics::psd::CBinnedPower::
-compute( const SFFTParamSet& req_params,
+metrics::psd::CProfile::
+compute( const SPPack& req_params,
bool force)
{
// check if we have it already
@@ -133,7 +133,7 @@ compute( const SFFTParamSet& req_params,
> 1);
// update signature
- *(SFFTParamSet*)this = req_params;
+ *(SPPack*)this = req_params;
_signature = req_signature;
assert (asprintf( &new_mirror_fname,
"%s-%s-%zu-%g:%c-%zu.psd",
@@ -266,7 +266,7 @@ compute( const SFFTParamSet& req_params,
int
-metrics::psd::CBinnedPower::
+metrics::psd::CProfile::
export_tsv( const string& fname) const
{
FILE *f = fopen( fname.c_str(), "w");
@@ -304,7 +304,7 @@ export_tsv( const string& fname) const
int
-metrics::psd::CBinnedPower::
+metrics::psd::CProfile::
export_tsv( float from, float upto,
const string& fname) const
{
diff --git a/src/metrics/psd.hh b/src/metrics/psd.hh
index d092784..d8764de 100644
--- a/src/metrics/psd.hh
+++ b/src/metrics/psd.hh
@@ -6,7 +6,7 @@
*
* Initial version: 2010-04-28
*
- * Purpose: CBinnedPower and related stuff
+ * Purpose: CProfile and related stuff
*
* License: GPL
*/
@@ -32,9 +32,9 @@ namespace metrics {
namespace psd {
-struct SFFTParamSet {
- SFFTParamSet (const SFFTParamSet& rv) = default;
- SFFTParamSet ()
+struct SPPack {
+ SPPack (const SPPack& rv) = default;
+ SPPack ()
{
reset();
}
@@ -45,8 +45,8 @@ struct SFFTParamSet {
return (samplerate * pagesize + 1) / 2 / samplerate / binsize;
}
- SFFTParamSet& operator=( const SFFTParamSet& rv) = default;
- bool operator==( const SFFTParamSet& rv) const
+ SPPack& operator=( const SPPack& rv) = default;
+ bool operator==( const SPPack& rv) const
{
return pagesize == rv.pagesize &&
welch_window_type == rv.welch_window_type &&
@@ -78,18 +78,18 @@ enum TBand : unsigned short {
-class CBinnedPower
- : public CPageMetrics_base,
- public SFFTParamSet {
+class CProfile
+ : public CProfile_base,
+ public SPPack {
protected:
- CBinnedPower (const sigfile::CSource& F, int sig_no,
- const SFFTParamSet &fft_params);
+ CProfile (const sigfile::CSource& F, int sig_no,
+ const SPPack &fft_params);
public:
const char* method() const
{
- return metric_method( TMetricType::psd);
+ return metric_method( TType::psd);
}
// in a frequency range
@@ -100,12 +100,12 @@ class CBinnedPower
size_t bin_a = min( (size_t)(from / binsize), _bins),
bin_z = min( (size_t)(upto / binsize), _bins);
for ( size_t b = bin_a; b < bin_z; ++b )
- acc += CPageMetrics_base::course<T>(b);
+ acc += CProfile_base::course<T>(b);
return acc;
}
// obtain
- int compute( const SFFTParamSet& req_params,
+ int compute( const SPPack& req_params,
bool force = false);
void compute( bool force = false)
// possibly reuse that already obtained unless factors affecting signal or fft are different
diff --git a/src/metrics/swu.cc b/src/metrics/swu.cc
new file mode 100644
index 0000000..3c35d34
--- /dev/null
+++ b/src/metrics/swu.cc
@@ -0,0 +1,241 @@
+// ;-*-C++-*-
+/*
+ * File name: metrics/swu.cc
+ * Project: Aghermann
+ * Author: Andrei Zavada <johnhommer at gmail.com>
+ *
+ * Initial version: 2012-11-10
+ *
+ * Purpose: CBinnedSWU methods
+ *
+ * License: GPL
+ */
+
+
+#include <cassert>
+#include <unistd.h>
+
+#include "common/lang.hh"
+#include "common/fs.hh"
+#include "sigproc/sigproc.hh"
+#include "libsigfile/source.hh"
+#include "swu.hh"
+
+using namespace std;
+
+
+
+void
+metrics::swu::SPPack::
+check() const
+{
+ if ( pagesize != 4 && pagesize != 20 &&
+ pagesize != 30 && pagesize != 60 )
+ throw invalid_argument ("Invalid pagesize");
+
+ if ( binsize != .1 && binsize != .25 && binsize != .5 )
+ throw invalid_argument ("Invalid binsize");
+}
+
+void
+metrics::swu::SPPack::
+reset()
+{
+ pagesize = 30;
+ binsize = .25;
+}
+
+
+
+
+
+
+
+metrics::swu::CProfile::
+CProfile (const sigfile::CSource& F, int sig_no,
+ const SPPack ¶ms)
+ : CProfile_base (F, sig_no,
+ params.pagesize,
+ params.compute_n_bins(F.samplerate(sig_no))),
+ SPPack (params)
+{
+}
+
+
+
+string
+metrics::swu::CProfile::
+fname_base() const
+{
+ DEF_UNIQUE_CHARP (_);
+ assert (asprintf( &_,
+ "%s-%s-%zu-%zu",
+ _using_F.filename(), _using_F.channel_by_id(_using_sig_no),
+ SPPack::pagesize, //freq_trunc,
+ _signature) > 1);
+ string ret {_};
+ return ret;
+}
+
+
+
+
+
+int
+metrics::swu::CProfile::
+compute( const SPPack& req_params,
+ bool force)
+{
+ // check if we have it already
+ auto req_signature = _using_F.dirty_signature( _using_sig_no);
+ if ( have_data()
+ && not force
+ && (*this) == req_params
+ && _signature == req_signature )
+ return 0;
+
+ size_t sr = samplerate();
+ size_t spp = sr * _pagesize;
+ TFloat freq_max = (TFloat)(spp+1)/2 / sr;
+ _data.resize( pages() * _bins);
+ printf( "CBinnedSWU::compute( %s, %s): %g sec (%zu pp @%zu + %zu sec last incomplete page); bins/size/freq_max = %zu/%g/%g",
+ _using_F.filename(), _using_F.channel_by_id(_using_sig_no),
+ _using_F.recording_time(),
+ pages(), _pagesize, (size_t)_using_F.recording_time() - (pages() * _pagesize),
+ _bins, binsize, freq_max);
+
+ DEF_UNIQUE_CHARP (old_mirror_fname);
+ DEF_UNIQUE_CHARP (new_mirror_fname);
+
+ // insert a .
+ string basename_dot = agh::fs::make_fname_base (_using_F.filename(), "", true);
+
+ assert (asprintf( &old_mirror_fname,
+ "%s-%s-%zu-%g-%zu.psd",
+ basename_dot.c_str(),
+ _using_F.channel_by_id(_using_sig_no), _pagesize, binsize,
+ _signature)
+ > 1);
+
+ // update signature
+ *(SPPack*)this = req_params;
+ _signature = req_signature;
+ assert (asprintf( &new_mirror_fname,
+ "%s-%s-%zu-%g-%zu.psd",
+ basename_dot.c_str(),
+ _using_F.channel_by_id(_using_sig_no), _pagesize, binsize,
+ _signature)
+ > 1);
+
+ bool got_it = (_mirror_back( new_mirror_fname) == 0);
+
+ // remove previously saved power
+ if ( strcmp( old_mirror_fname, new_mirror_fname) )
+ if ( unlink( old_mirror_fname) ) {}
+
+ if ( got_it and not force ) {
+ printf( " (cached)\n");
+ _status |= TFlags::computed;
+ return 0;
+ }
+ printf( "\n");
+
+ // 0. get signal sample; always use double not TFloat
+ // so that saved power is usable irrespective of what TFloat is today
+ valarray<double> S = to_vad( _using_F.get_signal_filtered( _using_sig_no));
+
+ // 1. dampen samples marked as artifacts
+ // already done in get_signal_filtered()
+
+ // 2. zero-mean and detrend
+ // zero-mean already done in CEDFFile::get_signal_filtered()
+
+ // 4. obtain power spectrum
+ // prepare
+ for ( size_t p = 0; p < pages(); ++p ) {
+ nmth_bin(p, 0) =
+ sin(p * M_PI);
+ }
+
+ if ( _mirror_enable( new_mirror_fname) ) {}
+
+ _status |= TFlags::computed;
+ return 0;
+}
+
+
+
+
+
+
+
+
+
+int
+metrics::swu::CProfile::
+export_tsv( const string& fname) const
+{
+ FILE *f = fopen( fname.c_str(), "w");
+ if ( !f )
+ return -1;
+
+ size_t bin, p;
+ float bum = 0.;
+
+ auto sttm = _using_F.start_time();
+ char *asctime_ = asctime( localtime( &sttm));
+ fprintf( f, "## Subject: %s; Session: %s, Episode: %s recorded %.*s; Channel: %s\n"
+ "## Total spectral power course (%zu %zu-sec pages) up to %g Hz in bins of %g Hz\n"
+ "#Page\t",
+ _using_F.subject(), _using_F.session(), _using_F.episode(),
+ (int)strlen(asctime_)-1, asctime_,
+ _using_F.channel_by_id(_using_sig_no),
+ pages(), _pagesize, _bins*binsize, binsize);
+
+ for ( bin = 0; bin < _bins; ++bin, bum += binsize )
+ fprintf( f, "%g%c", bum, bin+1 == _bins ? '\n' : '\t');
+
+ for ( p = 0; p < pages(); ++p ) {
+ fprintf( f, "%zu", p);
+ for ( bin = 0; bin < _bins; ++bin )
+ fprintf( f, "\t%g", nmth_bin( p, bin));
+ fprintf( f, "\n");
+ }
+
+ fclose( f);
+ return 0;
+}
+
+
+
+
+int
+metrics::swu::CProfile::
+export_tsv( float from, float upto,
+ const string& fname) const
+{
+ FILE *f = fopen( fname.c_str(), "w");
+ if ( !f )
+ return -1;
+
+ auto sttm = _using_F.start_time();
+ char *asctime_ = asctime( localtime( &sttm));
+ fprintf( f, "PSD profile of\n"
+ "## Subject: %s; Session: %s, Episode: %s recorded %.*s; Channel: %s\n"
+ "## Course (%zu %zu-sec pages) in range %g-%g Hz\n",
+ _using_F.subject(), _using_F.session(), _using_F.episode(),
+ (int)strlen(asctime_)-1, asctime_,
+ _using_F.channel_by_id(_using_sig_no),
+ pages(), _pagesize, from, upto);
+
+ valarray<TFloat> crs = course<TFloat>( from, upto);
+ for ( size_t p = 0; p < pages(); ++p )
+ fprintf( f, "%zu\t%g\n", p, crs[p]);
+
+ fclose( f);
+ return 0;
+}
+
+
+
+// eof
diff --git a/src/metrics/psd.hh b/src/metrics/swu.hh
similarity index 56%
copy from src/metrics/psd.hh
copy to src/metrics/swu.hh
index d092784..2c4aadf 100644
--- a/src/metrics/psd.hh
+++ b/src/metrics/swu.hh
@@ -1,24 +1,23 @@
// ;-*-C++-*-
/*
- * File name: metrics/psd.hh
+ * File name: metrics/swu.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
*
- * Initial version: 2010-04-28
+ * Initial version: 2012-11-10
*
- * Purpose: CBinnedPower and related stuff
+ * Purpose: CBinnedSWU and related stuff
*
* License: GPL
*/
-#ifndef _METRICS_PSD_H
-#define _METRICS_PSD_H
+#ifndef _METRICS_SWU_H
+#define _METRICS_SWU_H
#include <string>
#include <list>
#include <valarray>
-#include "sigproc/sigproc.hh"
#include "forward-decls.hh"
#include "page-metrics-base.hh"
@@ -29,12 +28,13 @@
using namespace std;
namespace metrics {
-namespace psd {
+namespace swu {
-struct SFFTParamSet {
- SFFTParamSet (const SFFTParamSet& rv) = default;
- SFFTParamSet ()
+struct SPPack {
+
+ SPPack (const SPPack& rv) = default;
+ SPPack ()
{
reset();
}
@@ -45,51 +45,36 @@ struct SFFTParamSet {
return (samplerate * pagesize + 1) / 2 / samplerate / binsize;
}
- SFFTParamSet& operator=( const SFFTParamSet& rv) = default;
- bool operator==( const SFFTParamSet& rv) const
+ SPPack& operator=( const SPPack& rv) = default;
+ bool operator==( const SPPack& rv) const
{
return pagesize == rv.pagesize &&
- welch_window_type == rv.welch_window_type &&
binsize == rv.binsize;
}
void check() const; // throws if not ok
void reset();
size_t pagesize;
- sigproc::TWinType
- welch_window_type;
double binsize;
};
-// this is an odd bit never used in libagh
-enum TBand : unsigned short {
- delta,
- theta,
- alpha,
- beta,
- gamma,
- _total,
-};
-
-
-
-class CBinnedPower
- : public CPageMetrics_base,
- public SFFTParamSet {
+class CProfile
+ : public CProfile_base,
+ public SPPack {
protected:
- CBinnedPower (const sigfile::CSource& F, int sig_no,
- const SFFTParamSet &fft_params);
+ CProfile (const sigfile::CSource& F, int sig_no,
+ const SPPack &fft_params);
public:
const char* method() const
{
- return metric_method( TMetricType::psd);
+ return metric_method( TType::swu);
}
// in a frequency range
@@ -100,15 +85,14 @@ class CBinnedPower
size_t bin_a = min( (size_t)(from / binsize), _bins),
bin_z = min( (size_t)(upto / binsize), _bins);
for ( size_t b = bin_a; b < bin_z; ++b )
- acc += CPageMetrics_base::course<T>(b);
+ acc += CProfile_base::course<T>(b);
return acc;
}
// obtain
- int compute( const SFFTParamSet& req_params,
+ int compute( const SPPack& req_params,
bool force = false);
void compute( bool force = false)
- // possibly reuse that already obtained unless factors affecting signal or fft are different
{
compute( *this, force);
}
@@ -120,10 +104,10 @@ class CBinnedPower
const string& fname) const;
};
-} // namespace psd
+} // namespace swu
} // namespace metrics
-#endif // _METRICS_PSD_H
+#endif // _METRICS_SWU_H
// eof
diff --git a/src/model/achermann.cc b/src/model/achermann.cc
index 0e87770..290d6ab 100644
--- a/src/model/achermann.cc
+++ b/src/model/achermann.cc
@@ -83,7 +83,7 @@ operator==( const SControlParamSet &rv) const
int
agh::CExpDesign::
setup_modrun( const char* j, const char* d, const char* h,
- metrics::TMetricType metric_type,
+ metrics::TType metric_type,
float freq_from, float freq_upto,
agh::ach::CModelRun** Rpp)
{
@@ -123,7 +123,7 @@ setup_modrun( const char* j, const char* d, const char* h,
agh::ach::CModelRun::
CModelRun (CSubject& subject, const string& session, const sigfile::SChannel& channel,
- metrics::TMetricType metric_type,
+ metrics::TType metric_type,
double freq_from, double freq_upto,
const SControlParamSet& _ctl_params,
const STunableSetWithState& t0)
diff --git a/src/model/achermann.hh b/src/model/achermann.hh
index 450c211..9209b4a 100644
--- a/src/model/achermann.hh
+++ b/src/model/achermann.hh
@@ -89,7 +89,7 @@ class CModelRun
}
CModelRun (CModelRun&&);
CModelRun (CSubject&, const string& session, const sigfile::SChannel&,
- metrics::TMetricType,
+ metrics::TType,
double freq_from, double freq_upto,
const SControlParamSet&, const STunableSetWithState&);
diff --git a/src/model/assisted-score.cc b/src/model/assisted-score.cc
index 9c9c4b5..e88b84e 100644
--- a/src/model/assisted-score.cc
+++ b/src/model/assisted-score.cc
@@ -14,9 +14,9 @@
#include <forward_list>
#include <valarray>
-#include "../libsigfile/page.hh"
-#include "../libsigfile/source.hh"
-#include "../expdesign/primaries.hh"
+#include "libsigfile/page.hh"
+#include "libsigfile/source.hh"
+#include "expdesign/primaries.hh"
#include "beersma.hh"
@@ -28,16 +28,15 @@ assisted_score( agh::CSubject::SEpisode& E)
{
forward_list<agh::CRecording*> HH;
for ( auto &R : E.recordings )
- if ( R.second.CBinnedPower::have_data() )
+ if ( R.second.metrics::psd::CProfile::have_data() )
HH.push_front( &R.second);
-// printf( "assisted_score(): %d usable channels\n", HH.size());
forward_list<valarray<TFloat>>
courses_delta,
courses_theta;
for ( auto &H : HH ) {
- courses_delta.emplace_front( H->CBinnedPower::course<TFloat>( 2., 3.));
- courses_theta.emplace_front( H->CBinnedPower::course<TFloat>( 5., 8.));
+ courses_delta.emplace_front( H->metrics::psd::CProfile::course<TFloat>( 2., 3.));
+ courses_theta.emplace_front( H->metrics::psd::CProfile::course<TFloat>( 5., 8.));
}
auto& firstsource = E.sources.front();
diff --git a/src/model/beersma.hh b/src/model/beersma.hh
index 61bde7a..c00b971 100644
--- a/src/model/beersma.hh
+++ b/src/model/beersma.hh
@@ -45,7 +45,7 @@ struct SClassicFit {
};
struct SClassicFitCtl {
- metrics::TMetricType
+ metrics::TType
metric;
double freq_from,
freq_upto;
@@ -103,7 +103,7 @@ struct SUltradianCycleDetails {
struct SUltradianCycleCtl {
- metrics::TMetricType
+ metrics::TType
metric;
double freq_from,
freq_upto;
diff --git a/src/model/ultradian-cycle.cc b/src/model/ultradian-cycle.cc
index 1643a38..03352de 100644
--- a/src/model/ultradian-cycle.cc
+++ b/src/model/ultradian-cycle.cc
@@ -14,8 +14,8 @@
#include <gsl/gsl_siman.h>
#include <gsl/gsl_blas.h>
-#include "../common/globals.hh"
-#include "../expdesign/recording.hh"
+#include "common/globals.hh"
+#include "expdesign/recording.hh"
#include "beersma.hh"
using namespace std;
diff --git a/src/ui/mw/mw-construct.cc b/src/ui/mw/mw-construct.cc
index 5a27e5e..e59900d 100644
--- a/src/ui/mw/mw-construct.cc
+++ b/src/ui/mw/mw-construct.cc
@@ -208,7 +208,9 @@ SExpDesignUIWidgets ()
!AGH_GBGETOBJ (GtkAdjustment, jMsmtOpFreqFrom) ||
!AGH_GBGETOBJ (GtkAdjustment, jMsmtOpFreqWidth) ||
!AGH_GBGETOBJ (GtkBox, cMsmtMainToolbar) ||
+ !AGH_GBGETOBJ (GtkBox, cMsmtProfileParams1) ||
!AGH_GBGETOBJ (GtkBox, cMsmtProfileParams2) ||
+ !AGH_GBGETOBJ (GtkBox, cMsmtProfileParams3) ||
!AGH_GBGETOBJ (GtkBox, cMsmtProfileParamsContainer) )
throw runtime_error ("Failed to construct widgets");
diff --git a/src/ui/mw/mw-measurements.cc b/src/ui/mw/mw-measurements.cc
index cf960c2..75a03c5 100644
--- a/src/ui/mw/mw-measurements.cc
+++ b/src/ui/mw/mw-measurements.cc
@@ -117,9 +117,13 @@ draw_timeline( cairo_t *cr) const
tl_start_fixed_tm.tm_min = 0;
time_t tl_start_fixed = mktime( &tl_start_fixed_tm);
- auto scale = (_p._p.display_profile_type == metrics::TMetricType::psd)
- ? _p._p.profile_scale_psd
- : _p._p.profile_scale_mc;
+ double scale = 0.;
+ switch (_p._p.display_profile_type ) {
+ case metrics::TType::psd: scale = _p._p.profile_scale_psd; break;
+ case metrics::TType::swu: scale = _p._p.profile_scale_swu; break;
+ case metrics::TType::mc : scale = _p._p.profile_scale_mc; break;
+ default: break;
+ }
// profile
auto& episodes = csubject.measurements[*_p._p._AghDi].episodes;
diff --git a/src/ui/mw/mw-populate.cc b/src/ui/mw/mw-populate.cc
index 7a307ea..6714d71 100644
--- a/src/ui/mw/mw-populate.cc
+++ b/src/ui/mw/mw-populate.cc
@@ -98,16 +98,25 @@ populate( bool do_load)
gtk_combo_box_set_active( eGlobalADProfiles, 0);
switch ( display_profile_type ) {
- case metrics::TMetricType::psd:
+ case metrics::TType::psd:
gtk_combo_box_set_active( eMsmtProfileType, 0);
- gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams2, FALSE);
gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams1, TRUE);
+ gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams2, FALSE);
+ gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams3, FALSE);
gtk_widget_grab_focus( (GtkWidget*)eMsmtOpFreqFrom);
break;
- case metrics::TMetricType::mc:
+ case metrics::TType::swu:
gtk_combo_box_set_active( eMsmtProfileType, 1);
gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams1, FALSE);
gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams2, TRUE);
+ gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams3, FALSE);
+ gtk_widget_grab_focus( (GtkWidget*)eMsmtOpFreqFrom);
+ break;
+ case metrics::TType::mc:
+ gtk_combo_box_set_active( eMsmtProfileType, 2);
+ gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams1, FALSE);
+ gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams2, FALSE);
+ gtk_widget_set_visible( (GtkWidget*)cMsmtProfileParams3, TRUE);
break;
default:
// throw something
diff --git a/src/ui/mw/mw-simulations_cb.cc b/src/ui/mw/mw-simulations_cb.cc
index e4642ea..f711d9f 100644
--- a/src/ui/mw/mw-simulations_cb.cc
+++ b/src/ui/mw/mw-simulations_cb.cc
@@ -52,19 +52,26 @@ iSimulationsRunBatch_activate_cb( GtkMenuItem*, gpointer userdata)
// prevent inapplicable inputs when type == mc
switch ( ED.display_profile_type ) {
- case metrics::TMetricType::mc:
- gtk_spin_button_set_value( ED.eBatchSetupRangeWidth, ED.ED->mc_params.bandwidth);
- gtk_spin_button_set_value( ED.eBatchSetupRangeInc, ED.ED->mc_params.bandwidth);
- gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeWidth, FALSE);
- gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeInc, FALSE);
+ case metrics::TType::psd:
+ { auto bw = ED.operating_range_upto - ED.operating_range_from;
+ gtk_spin_button_set_value( ED.eBatchSetupRangeWidth, bw);
+ gtk_spin_button_set_value( ED.eBatchSetupRangeInc, bw);
+ } gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeWidth, TRUE);
+ gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeInc, TRUE);
break;
- case metrics::TMetricType::psd:
+ case metrics::TType::swu:
{ auto bw = ED.operating_range_upto - ED.operating_range_from;
gtk_spin_button_set_value( ED.eBatchSetupRangeWidth, bw);
gtk_spin_button_set_value( ED.eBatchSetupRangeInc, bw);
} gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeWidth, TRUE);
gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeInc, TRUE);
break;
+ case metrics::TType::mc:
+ gtk_spin_button_set_value( ED.eBatchSetupRangeWidth, ED.ED->mc_params.bandwidth);
+ gtk_spin_button_set_value( ED.eBatchSetupRangeInc, ED.ED->mc_params.bandwidth);
+ gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeWidth, FALSE);
+ gtk_widget_set_sensitive( (GtkWidget*)ED.eBatchSetupRangeInc, FALSE);
+ break;
default:
break;
}
@@ -106,7 +113,7 @@ iSimulationsRunBatch_activate_cb( GtkMenuItem*, gpointer userdata)
[&ED]( const CJGroup&,
const CSubject& J,
const string& D,
- const metrics::TMetricType& T,
+ const metrics::TType& T,
const string& H,
const pair<float,float>& Q,
const ach::CModelRun&,
diff --git a/src/ui/mw/mw-widgets.hh b/src/ui/mw/mw-widgets.hh
index 7475c51..081dfe4 100644
--- a/src/ui/mw/mw-widgets.hh
+++ b/src/ui/mw/mw-widgets.hh
@@ -111,7 +111,8 @@ struct SExpDesignUIWidgets {
GtkScaleButton
*eMsmtProfileSmooth;
GtkBox *cMsmtProfileParams1,
- *cMsmtProfileParams2;
+ *cMsmtProfileParams2,
+ *cMsmtProfileParams3;
GtkSpinButton
*eMsmtOpFreqFrom,
*eMsmtOpFreqWidth;
diff --git a/src/ui/mw/mw.cc b/src/ui/mw/mw.cc
index 500b176..78893de 100644
--- a/src/ui/mw/mw.cc
+++ b/src/ui/mw/mw.cc
@@ -119,7 +119,7 @@ SExpDesignUI (aghui::SSessionChooser *parent,
suppress_redraw (false),
dl_pid (-1),
close_this_SF_now (nullptr),
- display_profile_type (metrics::TMetricType::psd),
+ display_profile_type (metrics::TType::psd),
operating_range_from (2.),
operating_range_upto (3.),
uc_accuracy_factor (1.),
@@ -435,17 +435,25 @@ adjust_op_freq_spinbuttons()
suppress_redraw = true;
switch ( display_profile_type ) {
- case metrics::TMetricType::psd:
+ case metrics::TType::psd:
gtk_adjustment_set_step_increment( jMsmtOpFreqFrom, ED->fft_params.binsize);
gtk_adjustment_set_step_increment( jMsmtOpFreqWidth, ED->fft_params.binsize);
if ( not used_eeg_samplerates.empty() )
gtk_adjustment_set_upper(
jMsmtOpFreqFrom,
ED->fft_params.binsize * (ED->fft_params.compute_n_bins( used_eeg_samplerates.back()) - 1));
-
gtk_widget_set_sensitive( (GtkWidget*)eMsmtOpFreqWidth, TRUE);
break;
- case metrics::TMetricType::mc:
+ case metrics::TType::swu:
+ gtk_adjustment_set_step_increment( jMsmtOpFreqFrom, ED->swu_params.binsize);
+ gtk_adjustment_set_step_increment( jMsmtOpFreqWidth, ED->swu_params.binsize);
+ if ( not used_eeg_samplerates.empty() )
+ gtk_adjustment_set_upper(
+ jMsmtOpFreqFrom,
+ ED->swu_params.binsize * (ED->swu_params.compute_n_bins( used_eeg_samplerates.back()) - 1));
+ gtk_widget_set_sensitive( (GtkWidget*)eMsmtOpFreqWidth, TRUE);
+ break;
+ case metrics::TType::mc:
gtk_adjustment_set_step_increment( jMsmtOpFreqFrom, ED->mc_params.bandwidth);
gtk_spin_button_set_value( eMsmtOpFreqWidth, ED->mc_params.bandwidth);
if ( not used_eeg_samplerates.empty() )
@@ -453,7 +461,6 @@ adjust_op_freq_spinbuttons()
jMsmtOpFreqFrom,
ED->mc_params.freq_from
+ ED->mc_params.bandwidth * (ED->mc_params.compute_n_bins( used_eeg_samplerates.back()) - 1));
-
gtk_widget_set_sensitive( (GtkWidget*)eMsmtOpFreqWidth, FALSE);
break;
default:
@@ -480,10 +487,13 @@ calculate_profile_scale()
avg_profile_height /= valid_episodes;
switch ( display_profile_type ) {
- case metrics::TMetricType::psd:
+ case metrics::TType::psd:
profile_scale_psd = timeline_height / avg_profile_height * .3;
break;
- case metrics::TMetricType::mc:
+ case metrics::TType::swu:
+ profile_scale_swu = timeline_height / avg_profile_height * .3;
+ break;
+ case metrics::TType::mc:
profile_scale_mc = timeline_height / avg_profile_height * .3;
break;
default:
diff --git a/src/ui/mw/mw.hh b/src/ui/mw/mw.hh
index 5c35947..c8b0aaa 100644
--- a/src/ui/mw/mw.hh
+++ b/src/ui/mw/mw.hh
@@ -218,7 +218,7 @@ class SExpDesignUI
void save_artifact_detection_profiles() const;
// own variables aka saved settings
- metrics::TMetricType
+ metrics::TType
display_profile_type;
double operating_range_from,
operating_range_upto;
@@ -249,6 +249,7 @@ class SExpDesignUI
double freq_bands[metrics::psd::TBand::_total][2];
double profile_scale_psd,
+ profile_scale_swu,
profile_scale_mc;
void calculate_profile_scale();
bool autoscale;
@@ -288,7 +289,7 @@ class SExpDesignUI
// sigfile::SFFTParamSet
// fft_params_saved; // members not represented in widgets as is
- metrics::mc::SMCParamSet
+ metrics::mc::SPPack
mc_params_saved;
SUIVarCollection
W_V1,
diff --git a/src/ui/mw/mw_cb.cc b/src/ui/mw/mw_cb.cc
index 6b26ce3..e92dca8 100644
--- a/src/ui/mw/mw_cb.cc
+++ b/src/ui/mw/mw_cb.cc
@@ -411,12 +411,20 @@ eMsmtProfileType_changed_cb( GtkComboBox* b, gpointer userdata)
case 0:
gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams1, TRUE);
gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams2, FALSE);
- ED.display_profile_type = metrics::TMetricType::psd;
+ gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams3, FALSE);
+ ED.display_profile_type = metrics::TType::psd;
break;
case 1:
gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams1, FALSE);
gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams2, TRUE);
- ED.display_profile_type = metrics::TMetricType::mc;
+ gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams3, FALSE);
+ ED.display_profile_type = metrics::TType::swu;
+ break;
+ case 2:
+ gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams1, FALSE);
+ gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams2, FALSE);
+ gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParams3, TRUE);
+ ED.display_profile_type = metrics::TType::mc;
break;
}
diff --git a/src/ui/sf/sf-channel.cc b/src/ui/sf/sf-channel.cc
index 765801d..92aab02 100644
--- a/src/ui/sf/sf-channel.cc
+++ b/src/ui/sf/sf-channel.cc
@@ -60,6 +60,7 @@ SChannel( agh::CRecording& r,
confval::SValidator<bool>( string(1, seq) + ".draw_filtered_signal", &draw_filtered_signal),
confval::SValidator<bool>( string(1, seq) + ".draw_emg", &draw_emg),
confval::SValidator<bool>( string(1, seq) + ".draw_psd", &draw_psd),
+ confval::SValidator<bool>( string(1, seq) + ".draw_swu", &draw_swu),
confval::SValidator<bool>( string(1, seq) + ".draw_bands", &draw_bands),
confval::SValidator<bool>( string(1, seq) + ".draw_spectrum", &draw_spectrum),
confval::SValidator<bool>( string(1, seq) + ".draw_mc", &draw_mc),
@@ -97,10 +98,10 @@ SChannel( agh::CRecording& r,
psd.upto = _p._p.operating_range_upto;
get_psd_course( false);
// power spectrum (for the first page)
- spectrum_bins = last_spectrum_bin = crecording.CBinnedPower::bins();
+ spectrum_bins = last_spectrum_bin = crecording.metrics::psd::CProfile::bins();
get_spectrum( 0);
// will be reassigned in REDRAW_ALL
- spectrum_upper_freq = spectrum_bins * crecording.binsize;
+ spectrum_upper_freq = spectrum_bins * crecording.metrics::psd::SPPack::binsize;
// power in bands
size_t n_bands = 0;
@@ -112,8 +113,13 @@ SChannel( agh::CRecording& r,
psd.uppermost_band = (n_bands-1);
get_psd_in_bands( false);
+ // swu profile
+ swu.from = _p._p.operating_range_from;
+ swu.upto = _p._p.operating_range_upto;
+ get_swu_course( false);
+
// mc profile
- mc.bin = (_p._p.operating_range_from - metrics::mc::SMCParamSet::freq_from) / crecording.bandwidth;
+ mc.bin = (_p._p.operating_range_from - metrics::mc::SPPack::freq_from) / crecording.bandwidth;
get_mc_course( false);
// delta comes first, calibrate display scale against it
@@ -230,8 +236,8 @@ void
aghui::SScoringFacility::SChannel::
get_psd_course( bool force)
{
- auto tmp = (crecording.metrics::psd::CBinnedPower::compute( force),
- crecording.metrics::psd::CBinnedPower::course<TFloat>( psd.from, psd.upto));
+ auto tmp = (crecording.metrics::psd::CProfile::compute( force),
+ crecording.metrics::psd::CProfile::course<TFloat>( psd.from, psd.upto));
if ( resample_power ) {
auto xi = vector<size_t> (tmp.size());
for ( size_t i = 0; i < tmp.size(); ++i )
@@ -245,15 +251,15 @@ void
aghui::SScoringFacility::SChannel::
get_psd_in_bands( bool force)
{
- crecording.metrics::psd::CBinnedPower::compute( force);
+ crecording.metrics::psd::CProfile::compute( force);
if ( resample_power ) {
- auto xi = vector<size_t> (crecording.CBinnedPower::pages());
+ auto xi = vector<size_t> (crecording.metrics::psd::CProfile::pages());
for ( size_t i = 0; i < xi.size(); ++i )
xi[i] = i;
for ( size_t b = 0; b <= psd.uppermost_band; ++b ) {
auto _from = _p._p.freq_bands[b][0],
_upto = _p._p.freq_bands[b][1];
- auto tmp = crecording.metrics::psd::CBinnedPower::course<TFloat>( _from, _upto);
+ auto tmp = crecording.metrics::psd::CProfile::course<TFloat>( _from, _upto);
psd.course_in_bands[b] =
sigproc::interpolate( xi, 3600/_p.pagesize(),
tmp,
@@ -264,17 +270,33 @@ get_psd_in_bands( bool force)
auto _from = _p._p.freq_bands[b][0],
_upto = _p._p.freq_bands[b][1];
psd.course_in_bands[b] =
- crecording.metrics::psd::CBinnedPower::course<TFloat>( _from, _upto);
+ crecording.metrics::psd::CProfile::course<TFloat>( _from, _upto);
}
}
void
aghui::SScoringFacility::SChannel::
+get_swu_course( bool force)
+{
+ auto tmp = (crecording.metrics::swu::CProfile::compute( force),
+ crecording.metrics::swu::CProfile::course<TFloat>( swu.from, swu.upto));
+ if ( resample_power ) {
+ auto xi = vector<size_t> (tmp.size());
+ for ( size_t i = 0; i < tmp.size(); ++i )
+ xi[i] = i;
+ swu.course = sigproc::interpolate( xi, 3600/_p.pagesize(), tmp, 3./3600);
+ } else
+ swu.course = tmp;
+}
+
+
+void
+aghui::SScoringFacility::SChannel::
get_mc_course( bool force)
{
- auto tmp = (crecording.metrics::mc::CBinnedMC::compute( force),
- crecording.metrics::mc::CBinnedMC::course<TFloat>( mc.bin));
+ auto tmp = (crecording.metrics::mc::CProfile::compute( force),
+ crecording.metrics::mc::CProfile::course<TFloat>( mc.bin));
if ( resample_power ) {
auto xi = vector<size_t> (tmp.size());
for ( size_t i = 0; i < tmp.size(); ++i )
@@ -291,13 +313,13 @@ void
aghui::SScoringFacility::SChannel::
get_spectrum( size_t p)
{
- spectrum = crecording.metrics::psd::CBinnedPower::spectrum<TFloat>( p);
+ spectrum = crecording.metrics::psd::CProfile::spectrum<TFloat>( p);
}
void
aghui::SScoringFacility::SChannel::
get_spectrum()
{
- spectrum = crecording.metrics::psd::CBinnedPower::spectrum<TFloat>( _p.cur_page());
+ spectrum = crecording.metrics::psd::CProfile::spectrum<TFloat>( _p.cur_page());
}
@@ -504,7 +526,7 @@ _put_selection()
_p.artifact_detection_dialog.W_V.down();
auto& P = _p.artifact_detection_dialog.P;
auto sssu =
- metrics::mc::CBinnedMC::do_sssu_reduction(
+ metrics::mc::CProfile::do_sssu_reduction(
signal_filtered[ slice (selection_start, (selection_end - selection_start), 1) ],
samplerate(), (selection_end - selection_start) / samplerate(),
P.mc_gain, P.iir_backpolate,
diff --git a/src/ui/sf/sf-construct.cc b/src/ui/sf/sf-construct.cc
index 41450a2..3bf2e1f 100644
--- a/src/ui/sf/sf-construct.cc
+++ b/src/ui/sf/sf-construct.cc
@@ -307,13 +307,13 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
// ------- menus
if ( !(AGH_GBGETOBJ (GtkLabel, lSFOverChannel)) ||
- !(AGH_GBGETOBJ (GtkMenu, mSFPage)) ||
- !(AGH_GBGETOBJ (GtkMenu, mSFICAPage)) ||
- !(AGH_GBGETOBJ (GtkMenu, mSFPageSelection)) ||
- !(AGH_GBGETOBJ (GtkMenu, mSFPageAnnotation)) ||
- !(AGH_GBGETOBJ (GtkMenu, mSFPageHidden)) ||
- !(AGH_GBGETOBJ (GtkMenu, mSFPower)) ||
- !(AGH_GBGETOBJ (GtkMenu, mSFScore)) ||
+ !(AGH_GBGETOBJ (GtkMenu, iiSFPage)) ||
+ !(AGH_GBGETOBJ (GtkMenu, iiSFICAPage)) ||
+ !(AGH_GBGETOBJ (GtkMenu, iiSFPageSelection)) ||
+ !(AGH_GBGETOBJ (GtkMenu, iiSFPageAnnotation)) ||
+ !(AGH_GBGETOBJ (GtkMenu, iiSFPageHidden)) ||
+ !(AGH_GBGETOBJ (GtkMenu, iiSFPower)) ||
+ !(AGH_GBGETOBJ (GtkMenu, iiSFScore)) ||
!(AGH_GBGETOBJ (GtkCheckMenuItem, iSFPageShowOriginal)) ||
!(AGH_GBGETOBJ (GtkCheckMenuItem, iSFPageShowProcessed)) ||
@@ -322,6 +322,7 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
!(AGH_GBGETOBJ (GtkSeparatorMenuItem, iSFPageProfileItemsSeparator)) ||
!(AGH_GBGETOBJ (GtkCheckMenuItem, iSFPageDrawPSDProfile)) ||
!(AGH_GBGETOBJ (GtkCheckMenuItem, iSFPageDrawPSDSpectrum)) ||
+ !(AGH_GBGETOBJ (GtkCheckMenuItem, iSFPageDrawSWUProfile)) ||
!(AGH_GBGETOBJ (GtkCheckMenuItem, iSFPageDrawMCProfile)) ||
!(AGH_GBGETOBJ (GtkCheckMenuItem, iSFPageDrawEMGProfile)) ||
!(AGH_GBGETOBJ (GtkMenuItem, iSFPageFilter)) ||
@@ -361,7 +362,7 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
!(AGH_GBGETOBJ (GtkMenuItem, iSFScoreClear)) )
throw runtime_error ("Failed to construct SF widgets");
- gtk_menu_item_set_submenu( iSFPageHidden, (GtkWidget*)mSFPageHidden);
+ gtk_menu_item_set_submenu( iSFPageHidden, (GtkWidget*)iiSFPageHidden);
g_signal_connect( iSFPageShowOriginal, "toggled",
(GCallback)iSFPageShowOriginal_toggled_cb,
diff --git a/src/ui/sf/sf-hypnogram_cb.cc b/src/ui/sf/sf-hypnogram_cb.cc
index a41fad6..8435477 100644
--- a/src/ui/sf/sf-hypnogram_cb.cc
+++ b/src/ui/sf/sf-hypnogram_cb.cc
@@ -50,7 +50,7 @@ daSFHypnogram_button_press_event_cb( GtkWidget *wid, GdkEventButton *event, gpoi
gtk_widget_queue_draw( (GtkWidget*)SF.daSFHypnogram);
break;
case 3:
- gtk_menu_popup( SF.mSFScore,
+ gtk_menu_popup( SF.iiSFScore,
NULL, NULL, NULL, NULL, 3, event->time);
break;
}
diff --git a/src/ui/sf/sf-ica.cc b/src/ui/sf/sf-ica.cc
index 88750a7..98d9d1a 100644
--- a/src/ui/sf/sf-ica.cc
+++ b/src/ui/sf/sf-ica.cc
@@ -97,7 +97,7 @@ setup_ica()
g_signal_emit_by_name( eSFICARemixMode, "changed");
// populate mSFICAPage
- gtk_container_foreach( (GtkContainer*)mSFICAPage, (GtkCallback)gtk_widget_destroy, NULL);
+ gtk_container_foreach( (GtkContainer*)iiSFICAPage, (GtkCallback)gtk_widget_destroy, NULL);
GSList *group = NULL;
for ( auto &H : channels ) {
auto item = (GtkWidget*)gtk_radio_menu_item_new_with_label( group, H.name);
@@ -108,15 +108,15 @@ setup_ica()
g_signal_connect( (GObject*)item,
"activate", (GCallback)iSFICAPageMapIC_activate_cb,
this);
- gtk_container_add( (GtkContainer*)mSFICAPage, item);
+ gtk_container_add( (GtkContainer*)iiSFICAPage, item);
}
GtkWidget *another;
// add separator and a "(clean)" item
- gtk_container_add( (GtkContainer*)mSFICAPage,
+ gtk_container_add( (GtkContainer*)iiSFICAPage,
another = gtk_separator_menu_item_new());
g_object_set( (GObject*)another, "visible", TRUE, NULL);
- gtk_container_add( (GtkContainer*)mSFICAPage,
+ gtk_container_add( (GtkContainer*)iiSFICAPage,
another = gtk_radio_menu_item_new_with_label( group, ica_unmapped_menu_item_label));
g_object_set( (GObject*)another, "visible", TRUE, NULL);
g_signal_connect( (GObject*)another,
diff --git a/src/ui/sf/sf-montage.cc b/src/ui/sf/sf-montage.cc
index c304499..abf8237 100644
--- a/src/ui/sf/sf-montage.cc
+++ b/src/ui/sf/sf-montage.cc
@@ -695,7 +695,7 @@ draw_overlays( cairo_t* cr,
// spectrum
_p._p.CwB[SExpDesignUI::TColour::spectrum].set_source_rgba( cr, .8);
cairo_set_line_width( cr, 2);
- float factor = psd.display_scale / crecording.binsize;
+ float factor = psd.display_scale / crecording.metrics::psd::SPPack::binsize;
cairo_move_to( cr,
gx, gy + gh - (2 + spectrum[0] * factor));
for ( m = 1; m < last_spectrum_bin; ++m ) {
@@ -726,7 +726,7 @@ draw_overlays( cairo_t* cr,
cairo_set_font_size( cr, 8);
snprintf_buf( "%g Hz",
- last_spectrum_bin * crecording.binsize);
+ last_spectrum_bin * crecording.metrics::psd::SPPack::binsize);
// draw_spectrum_absolute ? 'A' : 'R');
cairo_text_extents( cr, __buf__, &extents);
cairo_move_to( cr,
diff --git a/src/ui/sf/sf-montage_cb.cc b/src/ui/sf/sf-montage_cb.cc
index 30eca74..6395d9f 100644
--- a/src/ui/sf/sf-montage_cb.cc
+++ b/src/ui/sf/sf-montage_cb.cc
@@ -81,10 +81,10 @@ daSFMontage_button_press_event_cb( GtkWidget *wid, GdkEventButton *event, gpoint
: aghui::SScoringFacility::ica_unmapped_menu_item_label;
SF.suppress_redraw = true;
gtk_container_foreach(
- (GtkContainer*)SF.mSFICAPage,
+ (GtkContainer*)SF.iiSFICAPage,
radio_item_setter, (gpointer)mapped);
SF.suppress_redraw = false;
- gtk_menu_popup( SF.mSFICAPage,
+ gtk_menu_popup( SF.iiSFICAPage,
NULL, NULL, NULL, NULL, 3, event->time);
}
return TRUE;
@@ -122,7 +122,7 @@ daSFMontage_button_press_event_cb( GtkWidget *wid, GdkEventButton *event, gpoint
break;
case 3:
Ch->update_power_check_menu_items();
- gtk_menu_popup( SF.mSFPower,
+ gtk_menu_popup( SF.iiSFPower,
NULL, NULL, NULL, NULL, 3, event->time);
break;
}
@@ -154,7 +154,7 @@ daSFMontage_button_press_event_cb( GtkWidget *wid, GdkEventButton *event, gpoint
case 3:
if ( (event->state & GDK_MOD1_MASK && SF.n_hidden > 0) ||
!(SF.n_hidden < (int)SF.channels.size()) )
- gtk_menu_popup( SF.mSFPageHidden,
+ gtk_menu_popup( SF.iiSFPageHidden,
NULL, NULL, NULL, NULL, 3, event->time);
else {
double cpos = SF.time_at_click( event->x);
@@ -164,13 +164,13 @@ daSFMontage_button_press_event_cb( GtkWidget *wid, GdkEventButton *event, gpoint
gtk_widget_set_visible( (GtkWidget*)SF.iSFPageHidden, SF.n_hidden > 0);
bool over_any =
not (SF.over_annotations = Ch->in_annotations( cpos)) . empty();
- gtk_widget_set_visible( (GtkWidget*)SF.mSFPageAnnotation, over_any);
+ gtk_widget_set_visible( (GtkWidget*)SF.iiSFPageAnnotation, over_any);
gtk_widget_set_visible( (GtkWidget*)SF.iSFPageAnnotationSeparator, over_any);
gtk_menu_popup( agh::alg::overlap(
Ch->selection_start_time, Ch->selection_end_time,
cpos, cpos)
- ? SF.mSFPageSelection
- : SF.mSFPage,
+ ? SF.iiSFPageSelection
+ : SF.iiSFPage,
NULL, NULL, NULL, NULL, 3, event->time);
}
break;
@@ -295,7 +295,7 @@ daSFMontage_button_release_event_cb( GtkWidget *wid, GdkEventButton *event, gpoi
Ch->put_selection( Ch->selection_start, Ch->selection_end);
gtk_widget_queue_draw( wid);
if ( fabs(SF.using_channel->marquee_mstart - SF.using_channel->marquee_mend) > 5 ) {
- gtk_menu_popup( SF.mSFPageSelection,
+ gtk_menu_popup( SF.iiSFPageSelection,
NULL, NULL, NULL, NULL, 3, event->time);
}
} else if ( Ch->type == sigfile::SChannel::TType::eeg &&
@@ -376,7 +376,7 @@ daSFMontage_scroll_event_cb( GtkWidget *wid, GdkEventScroll *event, gpointer use
}
} else {
auto& R = Ch->crecording;
- if ( Ch->psd.upto < R.binsize * R.CBinnedPower::bins() ) {
+ if ( Ch->psd.upto < R.metrics::psd::SPPack::binsize * R.metrics::psd::CProfile::bins() ) {
Ch->psd.from += .5;
Ch->psd.upto += .5;
Ch->get_psd_course( false);
@@ -403,8 +403,8 @@ daSFMontage_scroll_event_cb( GtkWidget *wid, GdkEventScroll *event, gpointer use
}
break;
case GDK_SCROLL_UP:
- if ( Ch->mc.bin < Ch->crecording.metrics::mc::SMCParamSet::compute_n_bins(
- Ch->crecording.metrics::mc::CBinnedMC::samplerate()) - 1 ) {
+ if ( Ch->mc.bin < Ch->crecording.metrics::mc::SPPack::compute_n_bins(
+ Ch->crecording.metrics::mc::CProfile::samplerate()) - 1 ) {
++Ch->mc.bin;
Ch->get_mc_course( false);
if ( Ch->autoscale_profile )
@@ -542,7 +542,7 @@ iSFPageHide_activate_cb( GtkMenuItem*, gpointer userdata)
g_signal_connect( (GObject*)item,
"activate", G_CALLBACK (iSFPageShowHidden_activate_cb),
&SF);
- gtk_container_add( (GtkContainer*)SF.mSFPageHidden,
+ gtk_container_add( (GtkContainer*)SF.iiSFPageHidden,
item);
++SF.n_hidden;
gtk_widget_queue_draw( (GtkWidget*)SF.daSFMontage);
@@ -927,21 +927,30 @@ iSFPowerExportRange_activate_cb( GtkMenuItem *menuitem, gpointer userdata)
string fname_base;
if ( SF.using_channel->draw_psd ) {
- fname_base = R.CBinnedPower::fname_base();
+ fname_base = R.metrics::psd::CProfile::fname_base();
snprintf_buf( "%s-psd_%g-%g.tsv",
fname_base.c_str(), SF.using_channel->psd.from, SF.using_channel->psd.upto);
- R.CBinnedPower::export_tsv(
+ R.metrics::psd::CProfile::export_tsv(
SF.using_channel->psd.from, SF.using_channel->psd.upto,
__buf__);
fname_base = __buf__; // recycle
}
+ if ( SF.using_channel->draw_swu ) {
+ fname_base = R.metrics::swu::CProfile::fname_base();
+ snprintf_buf( "%s-swu_%g-%g.tsv",
+ fname_base.c_str(), SF.using_channel->swu.from, SF.using_channel->swu.upto);
+ R.metrics::swu::CProfile::export_tsv(
+ SF.using_channel->swu.from, SF.using_channel->swu.upto,
+ __buf__);
+ fname_base = __buf__; // recycle
+ }
if ( SF.using_channel->draw_mc ) {
- fname_base = R.CBinnedMC::fname_base();
+ fname_base = R.metrics::mc::CProfile::fname_base();
snprintf_buf( "%s-mc_%g-%g.tsv",
fname_base.c_str(),
R.freq_from + R.bandwidth*(SF.using_channel->mc.bin),
R.freq_from + R.bandwidth*(SF.using_channel->mc.bin+1));
- R.CBinnedMC::export_tsv(
+ R.metrics::mc::CProfile::export_tsv(
SF.using_channel->mc.bin,
__buf__);
fname_base = __buf__;
@@ -959,18 +968,26 @@ iSFPowerExportAll_activate_cb( GtkMenuItem *menuitem, gpointer userdata)
string fname_base;
if ( SF.using_channel->draw_psd ) {
- fname_base = SF.using_channel->crecording.CBinnedPower::fname_base();
+ fname_base = SF.using_channel->crecording.metrics::psd::CProfile::fname_base();
snprintf_buf( "%s-psd.tsv",
fname_base.c_str());
- R.CBinnedPower::export_tsv(
+ R.metrics::psd::CProfile::export_tsv(
+ __buf__);
+ fname_base = __buf__; // recycle
+ }
+ if ( SF.using_channel->draw_swu ) {
+ fname_base = SF.using_channel->crecording.metrics::swu::CProfile::fname_base();
+ snprintf_buf( "%s-swu.tsv",
+ fname_base.c_str());
+ R.metrics::swu::CProfile::export_tsv(
__buf__);
fname_base = __buf__; // recycle
}
if ( SF.using_channel->draw_mc ) {
- fname_base = SF.using_channel->crecording.CBinnedMC::fname_base();
+ fname_base = SF.using_channel->crecording.metrics::mc::CProfile::fname_base();
snprintf_buf( "%s-mc.tsv",
fname_base.c_str());
- R.CBinnedMC::export_tsv(
+ R.metrics::mc::CProfile::export_tsv(
__buf__);
fname_base = __buf__;
}
diff --git a/src/ui/sf/sf-phasediff.cc b/src/ui/sf/sf-phasediff.cc
index 894563f..a155f9a 100644
--- a/src/ui/sf/sf-phasediff.cc
+++ b/src/ui/sf/sf-phasediff.cc
@@ -151,8 +151,8 @@ draw( cairo_t* cr, int wd, int ht)
// psd course in selected freq range
{
- auto C1 = channel1->crecording.metrics::psd::CBinnedPower::course<TFloat>( from, upto);
-// C2 = channel2->crecording.metrics::psd::CBinnedPower::course<TFloat>( from, upto) * display_scale + ht/2;
+ auto C1 = channel1->crecording.metrics::psd::CProfile::course<TFloat>( from, upto);
+// C2 = channel2->crecording.metrics::psd::CProfile::course<TFloat>( from, upto) * display_scale + ht/2;
ED.CwB[SExpDesignUI::TColour::profile_psd_sf].set_source_rgba( cr, .5);
auto scale =
diff --git a/src/ui/sf/sf-widgets.hh b/src/ui/sf/sf-widgets.hh
index 4a3a207..b6b248d 100644
--- a/src/ui/sf/sf-widgets.hh
+++ b/src/ui/sf/sf-widgets.hh
@@ -129,18 +129,19 @@ struct SScoringFacilityWidgets {
*lSFOverChannel;
// menus
GtkMenu
- *mSFPage,
- *mSFPageSelection,
- *mSFPageAnnotation,
- *mSFPageHidden,
- *mSFPower,
- *mSFScore,
- *mSFICAPage;
+ *iiSFPage,
+ *iiSFPageSelection,
+ *iiSFPageAnnotation,
+ *iiSFPageHidden,
+ *iiSFPower,
+ *iiSFScore,
+ *iiSFICAPage;
GtkCheckMenuItem
*iSFPageShowOriginal, *iSFPageShowProcessed,
*iSFPageUseResample, *iSFPageDrawZeroline,
*iSFPageDrawPSDProfile,
*iSFPageDrawPSDSpectrum,
+ *iSFPageDrawSWUProfile,
*iSFPageDrawMCProfile,
*iSFPageDrawEMGProfile,
*iSFPowerDrawBands,
diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index 48cc722..47b01b8 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -213,7 +213,7 @@ SScoringFacility (agh::CSubject& J,
g_signal_connect( (GObject*)item,
"activate", (GCallback)iSFPageShowHidden_activate_cb,
this);
- gtk_container_add( (GtkContainer*)mSFPageHidden,
+ gtk_container_add( (GtkContainer*)iiSFPageHidden,
item);
}
@@ -633,7 +633,7 @@ load_montage()
if ( h.type == sigfile::SChannel::TType::eeg )
h.draw_emg = false;
if ( h.type == sigfile::SChannel::TType::emg )
- h.draw_psd = h.draw_mc = false;
+ h.draw_psd = h.draw_swu = h.draw_mc = false;
}
// any additional checks
diff --git a/src/ui/sf/sf.hh b/src/ui/sf/sf.hh
index ffbab3c..ecdf85b 100644
--- a/src/ui/sf/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -166,6 +166,16 @@ class SScoringFacility
void get_psd_in_bands( bool force);
SProfilePSD
psd;
+ // swu
+ struct SProfileSWU {
+ valarray<TFloat>
+ course; // can possibly live outside in core, no?
+ double from, upto;
+ double display_scale; // saved via libconfig, requiring it to be double
+ };
+ void get_swu_course( bool force);
+ SProfileSWU
+ swu;
// mc
struct SProfileMC {
valarray<TFloat>
@@ -221,6 +231,7 @@ class SScoringFacility
zeromean_original,
zeromean_filtered,
draw_psd,
+ draw_swu,
draw_mc,
draw_emg,
draw_bands,
--
Sleep experiment manager
More information about the debian-med-commit
mailing list