[med-svn] [SCM] aghermann branch, master, updated. 9c95ea59282c4fc6ef7eb192072500f9d0659fc3
Andrei Zavada
johnhommer at gmail.com
Tue Jan 8 00:24:56 UTC 2013
The following commit has been merged in the master branch:
commit 90de430ab61aa904c00580446194bbe6435c7301
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Tue Jan 8 00:26:01 2013 +0200
sigproc::CPattern takes band-pass instead of low-pass
Change things accordingly all the way up to SF::CFindDialog
diff --git a/data/sf.glade b/data/sf.glade
index 6a29f66..f28249b 100644
--- a/data/sf.glade
+++ b/data/sf.glade
@@ -591,43 +591,49 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <object class="GtkAdjustment" id="jPatternEnvTightness">
+ <object class="GtkAdjustment" id="jPatternBandPassFrom">
+ <property name="upper">8</property>
+ <property name="value">0.25</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="jPatternBandPassOrder">
<property name="lower">1</property>
- <property name="upper">20</property>
+ <property name="upper">5</property>
<property name="value">1</property>
<property name="step_increment">1</property>
- <property name="page_increment">5</property>
+ <property name="page_increment">10</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>
+ <object class="GtkAdjustment" id="jPatternBandPassUpto">
+ <property name="upper">100</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="jPatternLPDZCDFSigma">
+ <object class="GtkAdjustment" id="jPatternDZCDFSigma">
<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">
+ <object class="GtkAdjustment" id="jPatternDZCDFSmooth">
<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">
+ <object class="GtkAdjustment" id="jPatternDZCDFStep">
<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">
+ <object class="GtkAdjustment" id="jPatternEnvTightness">
<property name="lower">1</property>
- <property name="upper">5</property>
+ <property name="upper">20</property>
<property name="value">1</property>
<property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="jPatternStrictnessA">
<property name="lower">0.01</property>
@@ -1558,540 +1564,833 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox6">
+ <object class="GtkBox" id="box9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">8</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkTable" id="table26">
+ <object class="GtkBox" id="box11">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">12</property>
- <property name="n_columns">3</property>
- <property name="row_spacing">5</property>
- <child>
- <object class="GtkSpinButton" id="ePatternDZCDFSigma">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternLPDZCDFSigma</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternFilterCutoff">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternLPCutoff</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label175">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Cutoff:</property>
- </object>
- <packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label176">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Sigma:</property>
- </object>
- <packing>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
<child>
- <object class="GtkLabel" id="label177">
+ <object class="GtkLabel" id="label45">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">5</property>
- <property name="label" translatable="yes">Hz</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label178">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label179">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Order:</property>
- </object>
- <packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternFilterOrder">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternLPOrder</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label180">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Find pattern</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ <attribute name="scale" value="1.1000000000000001"/>
+ </attributes>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label181">
+ <object class="GtkHBox" id="cPatternLabelBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Derivative ZC density</b></property>
- <property name="use_markup">True</property>
+ <child>
+ <object class="GtkButton" id="bPatternDiscard">
+ <property name="label" translatable="yes">Dis_card</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">half</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="bPatternSave">
+ <property name="label" translatable="yes">_Save</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">half</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="ePatternList">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="right_attach">3</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label182">
+ <object class="GtkLabel" id="label46">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Low-pass filter</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label183">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Step:</property>
- </object>
- <packing>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternDZCDFStep">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternLPDZCDFStep</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
+ <property name="label" translatable="yes"> in channel </property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ <attribute name="scale" value="1.1000000000000001"/>
+ </attributes>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label184">
+ <object class="GtkComboBox" id="ePatternChannel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">sec</property>
+ <property name="halign">end</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">5</property>
+ <property name="spacing">8</property>
<child>
- <object class="GtkLabel" id="label185">
+ <object class="GtkTable" id="table26">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Envelope</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label186">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Tightness:</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternEnvTightness">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternEnvTightness</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label187">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">points</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkHSeparator" id="hseparator8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- <property name="y_padding">8</property>
- </packing>
- </child>
- <child>
- <object class="GtkHSeparator" id="hseparator9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- <property name="y_padding">8</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label188">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Smooth:</property>
- </object>
- <packing>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternDZCDFSmooth">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternLPDZCDFSmooth</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label189">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">points</property>
+ <property name="n_rows">13</property>
+ <property name="n_columns">3</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <object class="GtkSpinButton" id="ePatternDZCDFSigma">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternDZCDFSigma</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternBandPassFrom">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternBandPassFrom</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label175">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Between:</property>
+ </object>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label176">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Sigma:</property>
+ </object>
+ <packing>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label178">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label179">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Order:</property>
+ </object>
+ <packing>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternBandPassOrder">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternBandPassOrder</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label180">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label181">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes"><b>Derivative ZC density</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label182">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes"><b>Target frequency</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label183">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Step:</property>
+ </object>
+ <packing>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternDZCDFStep">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternDZCDFStep</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label184">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">sec</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label185">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes"><b>Envelope</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label186">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Tightness:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternEnvTightness">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternEnvTightness</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label187">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">points</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="y_padding">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="y_padding">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label188">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Smooth:</property>
+ </object>
+ <packing>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternDZCDFSmooth">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternDZCDFSmooth</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label189">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">points</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label44">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">and </property>
+ </object>
+ <packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternBandPassUpto">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternBandPassUpto</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label177">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">Hz</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">2</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSeparator" id="separator1">
+ <object class="GtkVBox" id="vbox9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="valign">end</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="vpPatternSelection">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport" id="vpPatternSelectioni">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="resize_mode">queue</property>
+ <child>
+ <object class="GtkDrawingArea" id="daPatternSelection">
+ <property name="visible">True</property>
+ <property name="app_paintable">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lPatternSimilarity">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="right_attach">3</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="padding">2</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
- <object class="GtkHBox" id="cPatternLabelBox">
+ <object class="GtkTable" id="table27">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label191">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Envelope</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">a:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternParameterA">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternStrictnessA</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label192">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Course (LP filter)</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">b:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
<child>
- <object class="GtkButton" id="bPatternDiscard">
- <property name="label" translatable="yes">Dis_card</property>
+ <object class="GtkSpinButton" id="ePatternParameterB">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">half</property>
- <property name="use_underline">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternStrictnessB</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="bPatternSave">
- <property name="label" translatable="yes">_Save</property>
+ <object class="GtkLabel" id="label193">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Deriv. zerocrossing density</property>
+ <property name="xalign">1</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">c:</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="ePatternParameterC">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">half</property>
- <property name="use_underline">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jPatternStrictnessC</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="ePatternList">
+ <object class="GtkLabel" id="label194">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="tooltip_markup" translatable="yes">Higher values mean looser fit criteria
+on individual parameters: <b>a</b> for <i>Envelope</i>,
+<b>b</b> for <i>Target frequency</i>, and <b>c</b> for <i>Derivative ZC density</i>.</property>
+ <property name="xalign">0</property>
+ <property name="yalign">1</property>
+ <property name="label" translatable="yes"><b>Strictness:</b></property>
+ <property name="use_markup">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">3</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="vpPatternSelection">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
<child>
- <object class="GtkViewport" id="vpPatternSelectioni">
+ <object class="GtkSeparator" id="separator3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="resize_mode">queue</property>
- <child>
- <object class="GtkDrawingArea" id="daPatternSelection">
- <property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="can_focus">False</property>
- <property name="events">GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
- </object>
- </child>
+ <property name="valign">end</property>
</object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="padding">2</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPatternSimilarity">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- </object>
- <packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
@@ -2099,185 +2398,6 @@
</child>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table27">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="n_rows">6</property>
- <property name="n_columns">2</property>
- <property name="row_spacing">5</property>
- <child>
- <object class="GtkLabel" id="label191">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Envelope</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">a:</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternParameterA">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternStrictnessA</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label192">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Course (LP filter)</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">b:</property>
- </object>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternParameterB">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternStrictnessB</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label193">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Deriv. zerocrossing density</property>
- <property name="xalign">1</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">c:</property>
- </object>
- <packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="ePatternParameterC">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jPatternStrictnessC</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label194">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Higher values mean looser fit criteria
-on individual parameters: <b>a</b> for <i>Envelope</i>,
-<b>b</b> for <i>Low-pass filter</i>, and <b>c</b> for <i>Derivative ZC density</i>.</property>
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="label" translatable="yes"><b>Strictness:</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="ePatternChannel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSeparator" id="separator3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">end</property>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- </object>
- <packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
@@ -2291,9 +2411,6 @@ on individual parameters: <b>a</b> for <i>Envelope</i>,
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkSeparator" id="separator18">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -2303,7 +2420,7 @@ on individual parameters: <b>a</b> for <i>Envelope</i>,
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -3006,15 +3123,15 @@ on individual parameters: <b>a</b> for <i>Envelope</i>,
</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>
@@ -3023,15 +3140,15 @@ on individual parameters: <b>a</b> for <i>Envelope</i>,
</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>
@@ -3266,18 +3383,17 @@ on individual parameters: <b>a</b> for <i>Envelope</i>,
</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>
@@ -3287,17 +3403,18 @@ on individual parameters: <b>a</b> for <i>Envelope</i>,
</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>
@@ -4166,6 +4283,7 @@ skew: 𝑔(𝑢) = 𝑢2</property>
<property name="label" translatable="yes">fafa</property>
<attributes>
<attribute name="weight" value="bold"/>
+ <attribute name="scale" value="1.1000000000000001"/>
</attributes>
</object>
<packing>
diff --git a/src/sigproc/sigproc.cc b/src/sigproc/sigproc.cc
index 9d4371e..a87e821 100644
--- a/src/sigproc/sigproc.cc
+++ b/src/sigproc/sigproc.cc
@@ -23,7 +23,8 @@ using namespace std;
template void sigproc::smooth( valarray<TFloat>&, size_t);
template void sigproc::normalize( valarray<TFloat>&);
template valarray<TFloat> sigproc::derivative( const valarray<TFloat>&);
-template size_t sigproc::envelope( const valarray<TFloat>&, size_t, size_t, double, valarray<TFloat>*, valarray<TFloat>*, vector<size_t>*, vector<size_t>*);
+template size_t sigproc::envelope( const valarray<float>&, size_t, size_t, double, valarray<float>*, valarray<float>*, vector<size_t>*, vector<size_t>*);
+template size_t sigproc::envelope( const valarray<double>&, size_t, size_t, double, valarray<double>*, valarray<double>*, vector<size_t>*, vector<size_t>*);
template valarray<TFloat> sigproc::dzcdf( const valarray<TFloat>&, size_t, float, float, size_t);
template sigproc::CPattern<TFloat>::CPattern( const valarray<TFloat>&, size_t, size_t, size_t, const SPatternParamPack&, float, float, float);
template size_t sigproc::CPattern<TFloat>::find( const valarray<TFloat>&, const valarray<TFloat>&, const valarray<TFloat>&, ssize_t, int);
diff --git a/src/sigproc/sigproc.hh b/src/sigproc/sigproc.hh
index 67393cc..b875fb8 100644
--- a/src/sigproc/sigproc.hh
+++ b/src/sigproc/sigproc.hh
@@ -93,7 +93,7 @@ size_t
envelope( const valarray<T>& in,
size_t dh, // tightness
size_t samplerate,
- float dt,
+ double dt,
valarray<T>* env_lp = nullptr, // return interpolated
valarray<T>* env_up = nullptr, // return vector of points
vector<size_t> *mini_p = nullptr,
@@ -277,9 +277,12 @@ struct SCachedBandPassCourse
+
+
struct SPatternParamPack {
int bwf_order;
- double bwf_cutoff;
+ double bwf_ffrom,
+ bwf_fupto;
double dzcdf_step,
dzcdf_sigma;
int dzcdf_smooth,
@@ -287,7 +290,8 @@ struct SPatternParamPack {
bool operator==( const SPatternParamPack& rv) const // cannot be defaulted!
{
return bwf_order == rv.bwf_order &&
- bwf_cutoff == rv.bwf_cutoff &&
+ bwf_ffrom == rv.bwf_ffrom &&
+ bwf_fupto == rv.bwf_fupto &&
dzcdf_step == rv.dzcdf_step &&
dzcdf_sigma == rv.dzcdf_sigma &&
dzcdf_smooth == rv.dzcdf_smooth &&
diff --git a/src/sigproc/sigproc.ii b/src/sigproc/sigproc.ii
index d3879e8..c937bd0 100644
--- a/src/sigproc/sigproc.ii
+++ b/src/sigproc/sigproc.ii
@@ -13,7 +13,9 @@
extern template void smooth( valarray<TFloat>&, size_t);
extern template void normalize( valarray<TFloat>&);
extern template valarray<TFloat> derivative( const valarray<TFloat>&);
-extern template size_t envelope( const valarray<TFloat>&, size_t, size_t, float, valarray<TFloat>*, valarray<TFloat>*, vector<size_t>*, vector<size_t>*);
+// this one is used for both T = float and double
+extern template size_t envelope( const valarray<float>&, size_t, size_t, double, valarray<float>*, valarray<float>*, vector<size_t>*, vector<size_t>*);
+extern template size_t envelope( const valarray<double>&, size_t, size_t, double, valarray<double>*, valarray<double>*, vector<size_t>*, vector<size_t>*);
extern template valarray<TFloat> dzcdf( const valarray<TFloat>&, size_t, float, float, size_t);
extern template CPattern<TFloat>::CPattern( const valarray<TFloat>&, size_t, size_t, size_t, const SPatternParamPack&, float, float, float);
extern template size_t CPattern<TFloat>::find( const valarray<TFloat>&, const valarray<TFloat>&, const valarray<TFloat>&, ssize_t, int);
@@ -220,9 +222,10 @@ CPattern (const valarray<T>& pattern,
if ( context_before + context_after >= pattern.size() )
throw invalid_argument ("pattern.size too small");
course =
- exstrom::low_pass(
+ exstrom::band_pass(
pattern, samplerate,
- params.bwf_cutoff, params.bwf_order, true);
+ params.bwf_ffrom, params.bwf_fupto,
+ params.bwf_order, true);
valarray<T> env_u, env_l;
envelope( pattern, params.env_tightness, samplerate,
@@ -231,9 +234,8 @@ CPattern (const valarray<T>& pattern,
breadth.resize( env_u.size());
breadth = env_u - env_l;
- dzcd =
- dzcdf( pattern, samplerate,
- params.dzcdf_step, params.dzcdf_sigma, params.dzcdf_smooth);
+ dzcd = dzcdf( pattern, samplerate,
+ params.dzcdf_step, params.dzcdf_sigma, params.dzcdf_smooth);
}
@@ -297,8 +299,9 @@ find( const valarray<T>& signal,
{
// low-pass signal being searched, too
valarray<T> fcourse =
- exstrom::low_pass( signal, samplerate,
- params.bwf_cutoff, params.bwf_order, true);
+ exstrom::band_pass( signal, samplerate,
+ params.bwf_ffrom, params.bwf_fupto,
+ params.bwf_order, true);
// prepare for comparison by other criteria:
// signal envelope and breadth
diff --git a/src/ui/sf/sf-channel.cc b/src/ui/sf/sf-channel.cc
index 5492ca4..f5d2cfd 100644
--- a/src/ui/sf/sf-channel.cc
+++ b/src/ui/sf/sf-channel.cc
@@ -30,10 +30,15 @@ SChannel( agh::CRecording& r,
: name (r.channel()),
type (r.signal_type()),
crecording (r),
+ _h (r.F().channel_id(name)),
filters (r.F().filters(name)),
annotations (r.F().annotations(name)),
artifacts (r.F().artifacts(name)),
_p (parent),
+ signal_lowpass (signal_filtered, samplerate()),
+ signal_bandpass (signal_filtered, samplerate()),
+ signal_envelope (signal_filtered, samplerate()),
+ signal_dzcdf (signal_filtered, samplerate()),
zeroy (y0),
// let them be read or recalculated
signal_display_scale( NAN),
@@ -91,8 +96,7 @@ SChannel( agh::CRecording& r,
selection_start_time (0.),
selection_end_time (0.),
selection_start (0),
- selection_end (0),
- _h (crecording.F().channel_id(name))
+ selection_end (0)
{
get_signal_original();
get_signal_filtered();
@@ -175,51 +179,12 @@ get_signal_filtered()
{
signal_filtered =
crecording.F().get_signal_filtered( name);
- // signal_filtered_resampled =
- // sigproc::resample( signal_filtered, 0, signal_filtered.size(),
- // signal_filtered.size() / spp());
// filtered is already zeromean as shipped
+ drop_cached_signal_properties();
}
-void
-aghui::SScoringFacility::SChannel::
-compute_lowpass( float _cutoff, unsigned _order)
-{
- if ( signal_lowpass.data.size() == 0 ||
- signal_lowpass.cutoff != _cutoff || signal_lowpass.order != _order )
- signal_lowpass.data =
- exstrom::low_pass( signal_filtered, samplerate(),
- signal_lowpass.cutoff = _cutoff,
- signal_lowpass.order = _order, true);
-}
-
-
-void
-aghui::SScoringFacility::SChannel::
-compute_tightness( unsigned _tightness)
-{
- if ( signal_envelope.lower.size() == 0 ||
- signal_envelope.tightness != _tightness )
- sigproc::envelope( signal_filtered,
- signal_envelope.tightness = _tightness, samplerate(),
- 1./samplerate(),
- &signal_envelope.lower,
- &signal_envelope.upper); // don't need anchor points, nor their count
-}
-void
-aghui::SScoringFacility::SChannel::
-compute_dzcdf( float _step, float _sigma, unsigned _smooth)
-{
- if ( signal_dzcdf.data.size() == 0 ||
- signal_dzcdf.step != _step || signal_dzcdf.sigma != _sigma || signal_dzcdf.smooth != _smooth )
- signal_dzcdf.data =
- sigproc::dzcdf<TFloat>( signal_filtered, samplerate(),
- signal_dzcdf.step = _step,
- signal_dzcdf.sigma = _sigma,
- signal_dzcdf.smooth = _smooth);
-}
diff --git a/src/ui/sf/sf-construct.cc b/src/ui/sf/sf-construct.cc
index 408ca2f..5a7400a 100644
--- a/src/ui/sf/sf-construct.cc
+++ b/src/ui/sf/sf-construct.cc
@@ -382,8 +382,9 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
!AGH_GBGETOBJ (GtkButton, bPatternSave) ||
!AGH_GBGETOBJ (GtkButton, bPatternDiscard) ||
!AGH_GBGETOBJ (GtkSpinButton, ePatternEnvTightness) ||
- !AGH_GBGETOBJ (GtkSpinButton, ePatternFilterOrder) ||
- !AGH_GBGETOBJ (GtkSpinButton, ePatternFilterCutoff) ||
+ !AGH_GBGETOBJ (GtkSpinButton, ePatternBandPassOrder) ||
+ !AGH_GBGETOBJ (GtkSpinButton, ePatternBandPassFrom) ||
+ !AGH_GBGETOBJ (GtkSpinButton, ePatternBandPassUpto) ||
!AGH_GBGETOBJ (GtkSpinButton, ePatternDZCDFStep) ||
!AGH_GBGETOBJ (GtkSpinButton, ePatternDZCDFSigma) ||
!AGH_GBGETOBJ (GtkSpinButton, ePatternDZCDFSmooth) ||
@@ -421,10 +422,13 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
g_signal_connect( ePatternEnvTightness, "value-changed",
G_CALLBACK (ePattern_any_value_changed_cb),
this);
- g_signal_connect( ePatternFilterCutoff, "value-changed",
+ g_signal_connect( ePatternBandPassFrom, "value-changed",
G_CALLBACK (ePattern_any_value_changed_cb),
this);
- g_signal_connect( ePatternFilterOrder, "value-changed",
+ g_signal_connect( ePatternBandPassUpto, "value-changed",
+ G_CALLBACK (ePattern_any_value_changed_cb),
+ this);
+ g_signal_connect( ePatternBandPassOrder, "value-changed",
G_CALLBACK (ePattern_any_value_changed_cb),
this);
g_signal_connect( ePatternDZCDFStep, "value-changed",
diff --git a/src/ui/sf/sf-montage.cc b/src/ui/sf/sf-montage.cc
index f22cfa2..34bff40 100644
--- a/src/ui/sf/sf-montage.cc
+++ b/src/ui/sf/sf-montage.cc
@@ -254,7 +254,7 @@ draw_page( cairo_t *cr,
if ( selection_end - selection_start > 5 ) { // don't mark end if selection is too short
// signal properties
- auto& Pp = _p.find_dialog.params;
+ auto& Pp = _p.find_dialog.Pp;
if ( draw_selection_envelope ) {
valarray<TFloat>
selection {(draw_filtered_signal
@@ -288,12 +288,11 @@ draw_page( cairo_t *cr,
? signal_filtered
: signal_original)[ slice (selection_start,
selection_end - selection_start,
- 1) ]};
- valarray<TFloat>
+ 1) ]},
course
- = exstrom::low_pass(
- selection, samplerate(),
- Pp.bwf_cutoff, Pp.bwf_order, true);
+ = exstrom::band_pass(
+ selection, samplerate(),
+ Pp.bwf_ffrom, Pp.bwf_fupto, Pp.bwf_order, true);
cairo_set_source_rgba( cr, 0.3, 0.3, 0.3, .5);
cairo_set_line_width( cr, 3.);
diff --git a/src/ui/sf/sf-patterns.cc b/src/ui/sf/sf-patterns.cc
index 73ab9e3..3cd4ffd 100644
--- a/src/ui/sf/sf-patterns.cc
+++ b/src/ui/sf/sf-patterns.cc
@@ -21,8 +21,8 @@ using namespace std;
aghui::SScoringFacility::SFindDialog::
SFindDialog (SScoringFacility& parent)
- : params {2, 1.5, .1, .5, 3, 2},
- params_saved {(unsigned short)-1},
+ : Pp {2, 0., 1.5, .1, .5, 3, 2},
+ Pp2 {(unsigned short)-1},
tolerance_a (.2),
tolerance_b (.4),
tolerance_c (.6),
@@ -32,12 +32,13 @@ SFindDialog (SScoringFacility& parent)
draw_details (true),
_p (parent)
{
- W_V.reg( _p.ePatternEnvTightness, ¶ms.env_tightness);
- W_V.reg( _p.ePatternFilterOrder, ¶ms.bwf_order);
- W_V.reg( _p.ePatternFilterCutoff, ¶ms.bwf_cutoff);
- W_V.reg( _p.ePatternDZCDFStep, ¶ms.dzcdf_step);
- W_V.reg( _p.ePatternDZCDFSigma, ¶ms.dzcdf_sigma);
- W_V.reg( _p.ePatternDZCDFSmooth, ¶ms.dzcdf_smooth);
+ W_V.reg( _p.ePatternEnvTightness, &Pp.env_tightness);
+ W_V.reg( _p.ePatternBandPassOrder, &Pp.bwf_order);
+ W_V.reg( _p.ePatternBandPassFrom, &Pp.bwf_ffrom);
+ W_V.reg( _p.ePatternBandPassUpto, &Pp.bwf_fupto);
+ W_V.reg( _p.ePatternDZCDFStep, &Pp.dzcdf_step);
+ W_V.reg( _p.ePatternDZCDFSigma, &Pp.dzcdf_sigma);
+ W_V.reg( _p.ePatternDZCDFSmooth, &Pp.dzcdf_smooth);
W_V.reg( _p.ePatternParameterA, &tolerance_a);
W_V.reg( _p.ePatternParameterB, &tolerance_b);
W_V.reg( _p.ePatternParameterC, &tolerance_c);
@@ -110,7 +111,7 @@ draw( cairo_t *cr)
size_t run = pattern_size_essential();
// snippet
- cairo_set_source_rgb( cr, 0.1, 0.1, 0.1);
+ cairo_set_source_rgb( cr, 0., 0., 0.);
cairo_set_line_width( cr, .8);
aghui::cairo_draw_signal( cr, pattern, 0, pattern.size(),
da_wd, 0, da_ht/3, display_scale);
@@ -142,7 +143,7 @@ draw( cairo_t *cr)
dzcdf;
// envelope
{
- if ( sigproc::envelope( pattern, params.env_tightness, samplerate,
+ if ( sigproc::envelope( pattern, Pp.env_tightness, samplerate,
1./samplerate,
&env_l, &env_u) == 0 ) {
aghui::cairo_put_banner( cr, da_wd, da_ht, "Selection is too short");
@@ -151,7 +152,7 @@ draw( cairo_t *cr)
}
enable_controls( true);
- cairo_set_source_rgba( cr, 1, 1, 1, .5);
+ _p._p.CwB[SExpDesignUI::TColour::sf_selection].set_source_rgba_contrasting( cr, .3);
aghui::cairo_draw_signal( cr, env_u, 0, env_u.size(),
da_wd, 0, da_ht/3, display_scale);
aghui::cairo_draw_signal( cr, env_l, 0, env_l.size(),
@@ -161,10 +162,16 @@ draw( cairo_t *cr)
cairo_stroke( cr);
}
- // low-pass filter
+ // target frequency
{
- course = exstrom::low_pass( pattern, samplerate,
- params.bwf_cutoff, params.bwf_order, true);
+ if ( Pp.bwf_ffrom >= Pp.bwf_fupto ) {
+ aghui::cairo_put_banner( cr, da_wd, da_ht, "Bad band-pass range");
+ enable_controls( false);
+ goto out;
+ }
+ course = exstrom::band_pass(
+ pattern, samplerate,
+ Pp.bwf_ffrom, Pp.bwf_fupto, Pp.bwf_order, true);
cairo_set_source_rgba( cr, 0.3, 0.3, 0.3, .5);
cairo_set_line_width( cr, 3.);
@@ -180,7 +187,7 @@ draw( cairo_t *cr)
enable_controls( false);
goto out;
}
- if ( params.dzcdf_step * 10 > pattern_length() ) { // require at least 10 dzcdf points
+ if ( Pp.dzcdf_step * 10 > pattern_length() ) { // require at least 10 dzcdf points
aghui::cairo_put_banner( cr, da_wd, da_ht, "Selection is too short");
enable_controls( false);
goto out;
@@ -188,7 +195,7 @@ draw( cairo_t *cr)
enable_controls( true);
dzcdf = sigproc::dzcdf( pattern, samplerate,
- params.dzcdf_step, params.dzcdf_sigma, params.dzcdf_smooth);
+ Pp.dzcdf_step, Pp.dzcdf_sigma, Pp.dzcdf_smooth);
float dzcdf_display_scale = da_ht/4. / dzcdf.max();
cairo_set_source_rgba( cr, 0.3, 0.3, 0.99, .8);
@@ -262,30 +269,33 @@ load_pattern( const char *label, bool do_globally)
if ( fd ) {
size_t full_sample;
if ( fscanf( fd,
- "%u %u %lg %lg %lg %u %lg %lg %lg\n"
- "%zu %zu %zu %zu\n",
- ¶ms.env_tightness,
- ¶ms.bwf_order, ¶ms.bwf_cutoff,
- ¶ms.dzcdf_step, ¶ms.dzcdf_sigma, ¶ms.dzcdf_smooth,
+ "%u %u %lg %lg %lg %lg %u %lg %lg %lg\n"
+ "%zu %zu %zu %zu\n"
+ "--DATA--\n",
+ &Pp.env_tightness,
+ &Pp.bwf_order, &Pp.bwf_ffrom, &Pp.bwf_fupto,
+ &Pp.dzcdf_step, &Pp.dzcdf_sigma, &Pp.dzcdf_smooth,
&tolerance_a, &tolerance_b, &tolerance_c,
- &samplerate, &full_sample, &context_before, &context_after) == 13 ) {
+ &samplerate, &full_sample, &context_before, &context_after) == 14 ) {
pattern.resize( full_sample);
for ( size_t i = 0; i < full_sample; ++i ) {
double tmp;
if ( fscanf( fd, "%la", &tmp) != 1 ) {
- fprintf( stderr, "SScoringFacility::SFindDialog::load_pattern(): short read at sample %zu from %s\n", i, __buf__);
+ fprintf( stderr, "load_pattern(): short read at sample %zu from %s; "
+ "Removing file\n", i, __buf__);
pattern.resize( 0);
- break;
+ fclose( fd);
+ unlink( __buf__);
+ enumerate_patterns_to_combo();
+ return;
} else
pattern[i] = tmp;
}
if ( samplerate != field_channel->samplerate() ) {
- pop_ok_message( (GtkWindow*)_p.wPattern,
- "Sample rate mismatch",
- "Loaded pattern has samplerate different from the current samplerate (%zu vs %zu); it will be resampled now.",
- samplerate, field_channel->samplerate());
+ printf( "Loaded pattern has samplerate different from the current samplerate (%zu vs %zu); it will be resampled now.",
+ samplerate, field_channel->samplerate());
double fac = (double)field_channel->samplerate() / samplerate;
pattern =
sigproc::resample( pattern, 0, full_sample,
@@ -298,10 +308,22 @@ load_pattern( const char *label, bool do_globally)
W_V.up();
set_pattern_da_width( full_sample / field_channel->spp());
- } else
+
+ } else {
pattern.resize( 0);
+ fprintf( stderr, "load_pattern(): corrupted %s; "
+ "Removing file\n", __buf__);
+ pattern.resize( 0);
+ unlink( __buf__);
+ enumerate_patterns_to_combo();
+ }
fclose( fd);
+
+ } else {
+ fprintf( stderr, "load_pattern(): failed to open %s; "
+ "Removing file\n", __buf__);
+ unlink( __buf__);
}
}
@@ -327,10 +349,11 @@ save_pattern( const char *label, bool do_globally)
FILE *fd = fopen( __buf__, "w");
if ( fd ) {
fprintf( fd,
- "%u %u %g %g %g %u %g %g %g\n"
- "%zu %zu %zu %zu\n",
- params.env_tightness, params.bwf_order, params.bwf_cutoff,
- params.dzcdf_step, params.dzcdf_sigma, params.dzcdf_smooth, tolerance_a, tolerance_b, tolerance_c,
+ "%u %u %g %g %g %g %u %g %g %g\n"
+ "%zu %zu %zu %zu\n"
+ "--DATA--\n",
+ Pp.env_tightness, Pp.bwf_order, Pp.bwf_ffrom, Pp.bwf_fupto,
+ Pp.dzcdf_step, Pp.dzcdf_sigma, Pp.dzcdf_smooth, tolerance_a, tolerance_b, tolerance_c,
samplerate, pattern.size(), context_before, context_after);
for ( size_t i = 0; i < pattern.size(); ++i )
fprintf( fd, "%a\n", (double)pattern[i]);
@@ -361,24 +384,19 @@ aghui::SScoringFacility::SFindDialog::
search( ssize_t from)
{
if ( field_channel && pattern.size() > 0 ) {
- if ( !(params == params_saved) || field_channel != field_channel_saved) {
- field_channel->compute_lowpass( params.bwf_cutoff, params.bwf_order);
- field_channel->compute_tightness( params.env_tightness);
- field_channel->compute_dzcdf( params.dzcdf_step, params.dzcdf_sigma, params.dzcdf_smooth);
- params_saved = params;
+ if ( !(Pp == Pp2) || field_channel != field_channel_saved) {
+ Pp2 = Pp;
field_channel_saved = field_channel;
}
cpattern = new sigproc::CPattern<TFloat>
(pattern, context_before, context_after,
field_channel->samplerate(),
- params,
+ Pp,
tolerance_a, tolerance_b, tolerance_c);
last_find = cpattern->find(
- field_channel->signal_lowpass.data,
- valarray<TFloat>
- (field_channel->signal_envelope.upper
- - field_channel->signal_envelope.lower),
- field_channel->signal_dzcdf.data,
+ field_channel->signal_bandpass( Pp.bwf_ffrom, Pp.bwf_fupto, Pp.bwf_order),
+ field_channel->signal_envelope.breadth( Pp.env_tightness),
+ field_channel->signal_dzcdf( Pp.dzcdf_step, Pp.dzcdf_sigma, Pp.dzcdf_smooth),
from, increment);
match_a = cpattern->match_a;
match_b = cpattern->match_b;
diff --git a/src/ui/sf/sf-widgets.hh b/src/ui/sf/sf-widgets.hh
index 6852d9b..748bc3c 100644
--- a/src/ui/sf/sf-widgets.hh
+++ b/src/ui/sf/sf-widgets.hh
@@ -190,11 +190,10 @@ struct SScoringFacilityWidgets {
*bPatternFindNext, *bPatternFindPrevious,
*bPatternSave, *bPatternDiscard;
GtkSpinButton
- *ePatternEnvTightness, *ePatternFilterCutoff,
- *ePatternFilterOrder, *ePatternDZCDFStep,
- *ePatternDZCDFSigma, *ePatternDZCDFSmooth,
- *ePatternParameterA, *ePatternParameterB,
- *ePatternParameterC;
+ *ePatternEnvTightness,
+ *ePatternBandPassFrom, *ePatternBandPassUpto, *ePatternBandPassOrder,
+ *ePatternDZCDFStep, *ePatternDZCDFSigma, *ePatternDZCDFSmooth,
+ *ePatternParameterA, *ePatternParameterB, *ePatternParameterC;
GtkHBox
*cPatternLabelBox;
GtkLabel
diff --git a/src/ui/sf/sf.hh b/src/ui/sf/sf.hh
index 3455572..dab323b 100644
--- a/src/ui/sf/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -23,6 +23,7 @@
#include "common/alg.hh"
#include "common/config-validate.hh"
#include "sigproc/winfun.hh"
+#include "sigproc/sigproc.hh"
#include "metrics/phasic-events.hh"
#include "expdesign/primaries.hh"
#include "ica/ica.hh"
@@ -81,6 +82,7 @@ class SScoringFacility
agh::CRecording&
crecording;
+ int _h;
sigfile::SFilterPack&
filters;
list<sigfile::SAnnotation>&
@@ -116,43 +118,22 @@ class SScoringFacility
in_annotations( double time) const;
// signal metrics
- struct SSFLowPassCourse {
- float cutoff;
- unsigned
- order;
- valarray<TFloat>
- data;
- TFloat& operator[]( size_t i);
- };
- SSFLowPassCourse
+ sigproc::SCachedLowPassCourse<TFloat>
signal_lowpass;
- void compute_lowpass( float _cutoff, unsigned _order);
-
- struct SSFEnvelope {
- unsigned
- tightness;
- valarray<TFloat>
- upper,
- lower;
- float breadth( size_t i) const;
- valarray<TFloat> breadth() const;
- };
- SSFEnvelope
+ sigproc::SCachedBandPassCourse<TFloat>
+ signal_bandpass;
+ sigproc::SCachedEnvelope<TFloat>
signal_envelope;
- void compute_tightness( unsigned _tightness);
-
- struct SSFDzcdf {
- float step,
- sigma;
- unsigned
- smooth;
- valarray<TFloat>
- data;
- TFloat& operator[]( size_t i);
- };
- SSFDzcdf
+ sigproc::SCachedDzcdf<TFloat>
signal_dzcdf;
- void compute_dzcdf( float _step, float _sigma, unsigned _smooth);
+ void
+ drop_cached_signal_properties()
+ {
+ signal_lowpass.drop();
+ signal_bandpass.drop();
+ signal_envelope.drop();
+ signal_dzcdf.drop();
+ }
// profiles
// psd
@@ -287,10 +268,7 @@ class SScoringFacility
GtkMenuItem
*menu_item_when_hidden;
- protected:
- int _h;
- public:
// comprehensive draw
void draw_for_montage( const char *fname, int width, int height); // to a file
void draw_for_montage( cairo_t*); // to montage
@@ -497,7 +475,7 @@ class SScoringFacility
public:
void draw_hypnogram( cairo_t*);
void draw_score_stats() const;
- void draw_current_pos( double x) const;
+ void draw_current_pos( double) const;
void queue_redraw_all() const;
void do_score_forward( char score_ch);
@@ -517,8 +495,8 @@ class SScoringFacility
// own copies of parent's same
sigproc::SPatternParamPack
- params,
- params_saved;
+ Pp,
+ Pp2;
double tolerance_a,
tolerance_b,
@@ -729,30 +707,6 @@ SScoringFacility::SChannel::n_samples() const
return signal_filtered.size();
}
-inline TFloat&
-SScoringFacility::SChannel::SSFLowPassCourse::operator[]( size_t i)
-{
- return data[i];
-}
-
-
-inline float
-SScoringFacility::SChannel::SSFEnvelope::breadth( size_t i) const
-{
- return upper[i] - lower[i];
-}
-
-inline valarray<TFloat>
-SScoringFacility::SChannel::SSFEnvelope::breadth() const
-{
- return upper - lower;
-}
-
-inline TFloat&
-SScoringFacility::SChannel::SSFDzcdf::operator[]( size_t i)
-{
- return data[i];
-}
inline bool
SScoringFacility::SChannel::operator<( const SChannel& rv) const
--
Sleep experiment manager
More information about the debian-med-commit
mailing list