[med-svn] [SCM] aghermann branch, master, updated. 99b1d5a023eee9df74b0e0d6f894516fc79435ad

Andrei Zavada johnhommer at gmail.com
Sun Jul 7 23:03:43 UTC 2013


The following commit has been merged in the master branch:
commit d0ee785877a653d3a3216d69afc274dbaa3e41c0
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Fri May 24 18:13:16 2013 +0300

    move freq_bands from SExpDesignUI over to CExpDesign, have TBands declared in own header

diff --git a/src/aghermann/expdesign/loadsave.cc b/src/aghermann/expdesign/loadsave.cc
index f55165e..917f0e6 100644
--- a/src/aghermann/expdesign/loadsave.cc
+++ b/src/aghermann/expdesign/loadsave.cc
@@ -65,27 +65,42 @@ load_settings()
 		return -1;
 	}
 
+	try {
+		for ( size_t i = metrics::TBand::delta; i < metrics::TBand::TBand_total; ++i ) {
+			auto& A = conf.lookup(string("Band.")+FreqBandNames[i]);
+			float	f0 = A[0],
+				f1 = A[1];
+			if ( f0 < f1 ) {
+				freq_bands[i][0] = f0;
+				freq_bands[i][1] = f1;
+			} else
+				fprintf( stderr, "agh::SExpDesign::load_settings(): Invalid Band range\n");
+		}
+	} catch (...) {
+		fprintf( stderr, "agh::SExpDesign::load_settings(): Something is wrong with section Band\n");
+	}
+
 	try { ctl_params0.check(); }
 	catch (...) {
 		ctl_params0.reset();
-		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid ctl params; assigned defaults\n");
+		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid ctl params\n");
 	}
 
 	if ( tunables0.check() ) {
 		tunables0.set_defaults();
-		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid tunables; assigned defaults\n");
+		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid tunables\n");
 	}
 
 	try { fft_params.check(); }
 	catch (invalid_argument ex) {
 		fft_params.reset();
-		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid fft params (%s); assigned defaults\n", ex.what());
+		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid fft params (%s)\n", ex.what());
 	}
 
 	try { mc_params.check(); }
 	catch (invalid_argument ex) {
 		mc_params.reset();
-		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid mc params (%s); assigned defaults\n", ex.what());
+		fprintf( stderr, "agh::CExpDesign::load_settings(): Invalid mc params (%s)\n", ex.what());
 	}
 
 	return 0;
@@ -107,11 +122,15 @@ save_settings()
 	confval::put( config_keys_s, conf);
 	confval::put( config_keys_z, conf);
 
-      // only save _agh_basic_tunables_
+	// only save _agh_basic_tunables_
 	for ( size_t t = 0; t < ach::TTunable::_basic_tunables; ++t )
 		confval::put( conf, string("tunable.") + ach::tunable_name(t),
 			      forward_list<double> {tunables0[t], tlo[t], thi[t], tstep[t]});
 
+	for ( unsigned i = metrics::TBand::delta; i < metrics::TBand::TBand_total; ++i )
+		confval::put( conf, string("Band.") + FreqBandNames[i],
+			      forward_list<double> {freq_bands[i][0], freq_bands[i][1]});
+
 	conf.writeFile( EXPD_FILENAME);
 
 	return 0;
diff --git a/src/aghermann/expdesign/primaries.cc b/src/aghermann/expdesign/primaries.cc
index 8ddb29c..c966908 100644
--- a/src/aghermann/expdesign/primaries.cc
+++ b/src/aghermann/expdesign/primaries.cc
@@ -29,6 +29,21 @@ using namespace std;
 
 using agh::confval::SValidator;
 
+const char
+	*const agh::CExpDesign::FreqBandNames[metrics::TBand::TBand_total] = {
+	"Delta", "Theta", "Alpha", "Beta", "Gamma",
+};
+
+double
+agh::CExpDesign::freq_bands[metrics::TBand::TBand_total][2] = {
+	{  1.5,  4.0 },
+	{  4.0,  8.0 },
+	{  8.0, 12.0 },
+	{ 15.0, 30.0 },
+	{ 30.0, 40.0 },
+};
+
+
 agh::CExpDesign::
 CExpDesign (const string& session_dir_,
 	    TMsmtCollectProgressIndicatorFun progress_fun)
diff --git a/src/aghermann/expdesign/primaries.hh b/src/aghermann/expdesign/primaries.hh
index a6b3ddc..c969b92 100644
--- a/src/aghermann/expdesign/primaries.hh
+++ b/src/aghermann/expdesign/primaries.hh
@@ -25,7 +25,9 @@
 #include "common/config-validate.hh"
 #include "common/subject_id.hh"
 #include "sigproc/winfun.hh"
+#include "aghermann/metrics/bands.hh"
 #include "aghermann/model/achermann.hh"
+
 #include "recording.hh"
 #include "forward-decls.hh"
 
@@ -449,6 +451,11 @@ class CExpDesign {
 		af_dampen_window_type;
 	double	af_dampen_factor;
 
+	static double
+		freq_bands[metrics::TBand::TBand_total][2];
+	static const char
+		*const FreqBandNames[metrics::TBand::TBand_total];
+
 	ach::STunableSet<ach::TTRole::d>	tstep;
 	ach::STunableSet<ach::TTRole::l>	tlo;
 	ach::STunableSet<ach::TTRole::u>	thi;
diff --git a/src/aghermann/metrics/Makefile.am b/src/aghermann/metrics/Makefile.am
index df4449c..39ea799 100644
--- a/src/aghermann/metrics/Makefile.am
+++ b/src/aghermann/metrics/Makefile.am
@@ -7,6 +7,7 @@ noinst_LIBRARIES := \
 	liba.a
 liba_a_SOURCES := \
 	forward-decls.hh \
+	bands.hh \
 	page-metrics-base.hh \
 	page-metrics-base.cc \
 	psd.cc \
@@ -23,6 +24,7 @@ liba_a_SOURCES := \
 if DO_PCH
 BUILT_SOURCES := \
 	forward-decls.hh.gch \
+	bands.hh.gch \
 	page-metrics-base.hh.gch \
 	psd.hh.gch \
 	swu.hh.gch \
diff --git a/src/aghermann/metrics/bands.hh b/src/aghermann/metrics/bands.hh
new file mode 100644
index 0000000..6873c31
--- /dev/null
+++ b/src/aghermann/metrics/bands.hh
@@ -0,0 +1,41 @@
+/*
+ *       File name:  aghermann/metrics/bands.hh
+ *         Project:  Aghermann
+ *          Author:  Andrei Zavada <johnhommer at gmail.com>
+ *
+ * Initial version:  2013-05-24
+ *
+ *         Purpose:  Bands enum
+ *                   (actual range values are in agh::CExpDesign::freq_bands)
+ *
+ *         License:  GPL
+ */
+
+#ifndef _METRICS_BANDS_H
+#define _METRICS_BANDS_H
+
+#if HAVE_CONFIG_H && !defined(VERSION)
+#  include "config.h"
+#endif
+
+using namespace std;
+
+namespace metrics {
+
+enum TBand {
+	delta,
+	theta,
+	alpha,
+	beta,
+	gamma,
+	TBand_total,
+};
+
+} // namespace metrics
+
+#endif // _METRICS_BANDS_H
+
+// Local Variables:
+// Mode: c++
+// indent-tabs-mode: 8
+// End:
diff --git a/src/aghermann/metrics/psd.hh b/src/aghermann/metrics/psd.hh
index deb11f2..c5d9559 100644
--- a/src/aghermann/metrics/psd.hh
+++ b/src/aghermann/metrics/psd.hh
@@ -33,16 +33,6 @@ namespace metrics {
 namespace psd {
 
 
-// this is an odd bit never used in libagh
-enum TBand {
-	delta,
-	theta,
-	alpha,
-	beta,
-	gamma,
-	TBand_total,
-};
-
 enum TFFTWPlanType {
 	estimate,
 	measure,
diff --git a/src/aghermann/ui/mw/construct.cc b/src/aghermann/ui/mw/construct.cc
index 468642a..55a7cbb 100644
--- a/src/aghermann/ui/mw/construct.cc
+++ b/src/aghermann/ui/mw/construct.cc
@@ -10,6 +10,7 @@
  */
 
 
+#include "aghermann/metrics/bands.hh"
 #include "aghermann/ui/ui.hh"
 #include "widgets.hh"
 #include "mw_cb.hh"
@@ -357,16 +358,16 @@ SExpDesignUIWidgets ()
 		throw runtime_error ("Failed to construct widgets");
 
       // --------- Bands
-	if ( !(eBand[metrics::psd::TBand::delta][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandDeltaFrom")) ||
-	     !(eBand[metrics::psd::TBand::delta][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandDeltaUpto")) ||
-	     !(eBand[metrics::psd::TBand::theta][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandThetaFrom")) ||
-	     !(eBand[metrics::psd::TBand::theta][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandThetaUpto")) ||
-	     !(eBand[metrics::psd::TBand::alpha][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandAlphaFrom")) ||
-	     !(eBand[metrics::psd::TBand::alpha][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandAlphaUpto")) ||
-	     !(eBand[metrics::psd::TBand::beta ][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandBetaFrom" )) ||
-	     !(eBand[metrics::psd::TBand::beta ][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandBetaUpto" )) ||
-	     !(eBand[metrics::psd::TBand::gamma][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandGammaFrom")) ||
-	     !(eBand[metrics::psd::TBand::gamma][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandGammaUpto")) )
+	if ( !(eBand[metrics::TBand::delta][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandDeltaFrom")) ||
+	     !(eBand[metrics::TBand::delta][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandDeltaUpto")) ||
+	     !(eBand[metrics::TBand::theta][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandThetaFrom")) ||
+	     !(eBand[metrics::TBand::theta][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandThetaUpto")) ||
+	     !(eBand[metrics::TBand::alpha][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandAlphaFrom")) ||
+	     !(eBand[metrics::TBand::alpha][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandAlphaUpto")) ||
+	     !(eBand[metrics::TBand::beta ][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandBetaFrom" )) ||
+	     !(eBand[metrics::TBand::beta ][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandBetaUpto" )) ||
+	     !(eBand[metrics::TBand::gamma][0]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandGammaFrom")) ||
+	     !(eBand[metrics::TBand::gamma][1]   = (GtkSpinButton*)gtk_builder_get_object( builder, "eBandGammaUpto")) )
 		throw runtime_error ("Failed to construct widgets");
 
       // --------- Misc
diff --git a/src/aghermann/ui/mw/loadsave.cc b/src/aghermann/ui/mw/loadsave.cc
index 265271d..c5b0ecb 100644
--- a/src/aghermann/ui/mw/loadsave.cc
+++ b/src/aghermann/ui/mw/loadsave.cc
@@ -110,20 +110,6 @@ load_settings()
 				fprintf( stderr, "SExpDesignUI::load_settings(): Something is wrong with Color.%s in %s\n", p.first, CONF_FILE);
 			}
 		}
-
-		try {
-			for ( size_t i = metrics::psd::TBand::delta; i < metrics::psd::TBand::TBand_total; ++i ) {
-				auto& A = conf.lookup(string("Band.")+FreqBandNames[i]);
-				float	f0 = A[0],
-					f1 = A[1];
-				if ( f0 < f1 ) {
-					gtk_spin_button_set_value( eBand[i][0], freq_bands[i][0] = f0);
-					gtk_spin_button_set_value( eBand[i][1], freq_bands[i][1] = f1);
-				}
-			}
-		} catch (...) {
-			fprintf( stderr, "SExpDesignUI::load_settings(): Something is wrong with section Band in %s\n", CONF_FILE);
-		}
 	} catch (...) {
 		fprintf( stderr, "SExpDesignUI::load_settings(): Something is wrong with %s\n", CONF_FILE);
 	}
@@ -191,10 +177,6 @@ save_settings()
 			      forward_list<double> {C.clr.red, C.clr.green, C.clr.blue, C.clr.alpha});
 	}
 
-	for ( unsigned i = metrics::psd::TBand::delta; i < metrics::psd::TBand::TBand_total; ++i )
-		agh::confval::put( conf, string("Band.") + FreqBandNames[i],
-			      forward_list<double> {freq_bands[i][0], freq_bands[i][1]});
-
 	conf.writeFile( CONF_FILE);
 
 	return 0;
diff --git a/src/aghermann/ui/mw/mw.cc b/src/aghermann/ui/mw/mw.cc
index 70b7d9d..4806019 100644
--- a/src/aghermann/ui/mw/mw.cc
+++ b/src/aghermann/ui/mw/mw.cc
@@ -17,6 +17,7 @@
 #include "common/config-validate.hh"
 #include "aghermann/metrics/page-metrics-base.hh"
 #include "aghermann/metrics/mc-artifacts.hh"
+#include "aghermann/metrics/bands.hh"
 #include "aghermann/expdesign/primaries.hh"
 #include "aghermann/model/beersma.hh"
 #include "aghermann/ui/misc.hh"
@@ -113,11 +114,6 @@ subject_presentation_by_csubject( const agh::CSubject& j)
 
 
 
-const char
-	*const aghui::SExpDesignUI::FreqBandNames[metrics::psd::TBand::TBand_total] = {
-	"Delta", "Theta", "Alpha", "Beta", "Gamma",
-};
-
 const array<unsigned, 4>
 	aghui::SExpDesignUI::FFTPageSizeValues = {{4, 20, 30, 60}};
 const array<double, 3>
@@ -155,13 +151,6 @@ SExpDesignUI (aghui::SSessionChooser *parent,
 	ext_score_codes ({
 		{{" -0"}, {"1"}, {"2"}, {"3"}, {"4"}, {"6Rr8"}, {"Ww5"}}
 	}),
-	freq_bands {
-		{  1.5,  4.0 },
-		{  4.0,  8.0 },
-		{  8.0, 12.0 },
-		{ 15.0, 30.0 },
-		{ 30.0, 40.0 },
-	},
 	profile_scale_psd (0.),
 	profile_scale_swu (0.),
 	profile_scale_mc (0.),
@@ -258,9 +247,9 @@ SExpDesignUI (aghui::SSessionChooser *parent,
 	W_V1.reg( eUltradianCycleDetectionAccuracy, &uc_accuracy_factor);
 	for ( size_t i = 0; i < sigfile::SPage::TScore::TScore_total; ++i )
 		W_V1.reg( eScoreCode[i], &ext_score_codes[i]);
-	for ( size_t i = 0; i < metrics::psd::TBand::TBand_total; ++i ) {
-		W_V1.reg( eBand[i][0], &freq_bands[i][0]);
-		W_V1.reg( eBand[i][1], &freq_bands[i][1]);
+	for ( size_t i = 0; i < metrics::TBand::TBand_total; ++i ) {
+		W_V1.reg( eBand[i][0], &ED->freq_bands[i][0]);
+		W_V1.reg( eBand[i][1], &ED->freq_bands[i][1]);
 	}
 	W_V1.reg( eDAMsmtPPH, (int*)&tl_pph);
 	W_V1.reg( eDAMsmtTLHeight, (int*)&tl_height);
@@ -305,6 +294,11 @@ SExpDesignUI (aghui::SSessionChooser *parent,
 		W_Vtunables.reg( eTunable[t][3], &ED->tstep     [t]);
 	}
 
+	// for ( size_t i = metrics::psd::TBand::delta; i < metrics::psd::TBand::TBand_total; ++i ) {
+	// 	gtk_spin_button_set_value( eBand[i][0], ED->freq_bands[i][0]);
+	// 	gtk_spin_button_set_value( eBand[i][1], ED->freq_bands[i][1]);
+	// }
+
 	populate( true);
 
 	// set check and radio menuitems in global menu
diff --git a/src/aghermann/ui/mw/mw.hh b/src/aghermann/ui/mw/mw.hh
index b688349..542ca1d 100644
--- a/src/aghermann/ui/mw/mw.hh
+++ b/src/aghermann/ui/mw/mw.hh
@@ -255,8 +255,6 @@ class SExpDesignUI
 	sigfile::CHypnogram::TCustomScoreCodes
 		ext_score_codes;
 
-	double	freq_bands[metrics::psd::TBand::TBand_total][2];
-
 	// scales
 	double	profile_scale_psd,
 		profile_scale_swu,
@@ -371,8 +369,6 @@ class SExpDesignUI
 		FFTPageSizeValues;
 	static const array<double, 3>
 		FFTBinSizeValues;
-	static const char
-		*const FreqBandNames[metrics::psd::TBand::TBand_total];
 };
 
 
diff --git a/src/aghermann/ui/mw/widgets.hh b/src/aghermann/ui/mw/widgets.hh
index dd07522..decaa87 100644
--- a/src/aghermann/ui/mw/widgets.hh
+++ b/src/aghermann/ui/mw/widgets.hh
@@ -15,7 +15,7 @@
 #include <map>
 #include <gtk/gtk.h>
 #include "libsigfile/page.hh" // for various enums
-#include "aghermann/metrics/psd.hh"
+#include "aghermann/metrics/bands.hh"
 #include "aghermann/model/achermann-tunable.hh"
 #include "aghermann/ui/ui.hh"  // for SManagedColor
 
@@ -197,7 +197,7 @@ struct SExpDesignUIWidgets {
 		*jFreqFrom,
 		*jFreqWidth;
 	GtkSpinButton
-		*eBand[metrics::psd::TBand_total][2];
+		*eBand[metrics::TBand_total][2];
 	GtkEntry
 		*eBrowseCommand;
 
@@ -378,7 +378,7 @@ struct SExpDesignUIWidgets {
 			return (TColour)((unsigned)s + (unsigned)TColour::score_none);
 		}
 	static TColour
-	band2colour( metrics::psd::TBand b)
+	band2colour( metrics::TBand b)
 		{
 			return (TColour)((unsigned)b + (unsigned)TColour::band_delta);
 		}
diff --git a/src/aghermann/ui/sf/channel.cc b/src/aghermann/ui/sf/channel.cc
index ab44dc6..ed9782a 100644
--- a/src/aghermann/ui/sf/channel.cc
+++ b/src/aghermann/ui/sf/channel.cc
@@ -15,6 +15,7 @@
 #include "common/lang.hh"
 #include "common/config-validate.hh"
 #include "sigproc/exstrom.hh"
+#include "aghermann/metrics/bands.hh"
 #include "aghermann/ui/globals.hh"
 
 #include "sf.hh"
@@ -123,8 +124,8 @@ SChannel (agh::CRecording& r,
 
 	      // power in bands
 		size_t n_bands = 0;
-		while ( n_bands != metrics::psd::TBand::TBand_total )
-			if ( _p._p.freq_bands[n_bands][0] >= spectrum_upper_freq )
+		while ( n_bands != metrics::TBand::TBand_total )
+			if ( _p._p.ED->freq_bands[n_bands][0] >= spectrum_upper_freq )
 				break;
 			else
 				++n_bands;
@@ -142,7 +143,7 @@ SChannel (agh::CRecording& r,
 	      // delta comes first, calibrate display scale against it
 		//update_profile_display_scales();
 		// don't: interchannel_gap is rubbish yet
-		psd.focused_band = metrics::psd::TBand::delta;
+		psd.focused_band = metrics::TBand::delta;
 
 	} else if ( schannel().type() == sigfile::SChannel::TType::emg )
 		get_raw_profile();
@@ -230,8 +231,8 @@ get_psd_in_bands()
 		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	_from = _p._p.ED->freq_bands[b][0],
+				_upto = _p._p.ED->freq_bands[b][1];
 			auto tmp = crecording.psd_profile.course( _from, _upto);
 			psd.course_in_bands[b] =
 				sigproc::interpolate( xi, 3600/_p.pagesize(),
@@ -240,8 +241,8 @@ get_psd_in_bands()
 		}
 	} else
 		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	_from = _p._p.ED->freq_bands[b][0],
+				_upto = _p._p.ED->freq_bands[b][1];
 			psd.course_in_bands[b] =
 				crecording.psd_profile.course( _from, _upto);
 		}
diff --git a/src/aghermann/ui/sf/montage-overlays.cc b/src/aghermann/ui/sf/montage-overlays.cc
index d887bba..6c61305 100644
--- a/src/aghermann/ui/sf/montage-overlays.cc
+++ b/src/aghermann/ui/sf/montage-overlays.cc
@@ -12,6 +12,7 @@
 #include <cairo/cairo-svg.h>
 
 #include "common/lang.hh"
+#include "aghermann/metrics/bands.hh"
 #include "aghermann/ui/misc.hh"
 
 #include "sf.hh"
@@ -40,9 +41,9 @@ draw_overlays( cairo_t* cr,
 		guint i;
 
 		if ( draw_psd_bands ) {
-			for ( size_t b = metrics::psd::TBand::delta; b <= psd.uppermost_band; ++b ) {
+			for ( size_t b = metrics::TBand::delta; b <= psd.uppermost_band; ++b ) {
 				auto& P = psd.course_in_bands[b];
-				_p._p.CwB[SExpDesignUI::band2colour((metrics::psd::TBand)b)].set_source_rgba( cr, .5);
+				_p._p.CwB[SExpDesignUI::band2colour((metrics::TBand)b)].set_source_rgba( cr, .5);
 				double zero = 0.5 / P.size() * _p.da_wd;
 				cairo_move_to( cr, zero,
 					       - P[0] * psd.display_scale + pbot);
@@ -59,11 +60,12 @@ draw_overlays( cairo_t* cr,
 				if ( b == psd.focused_band ) {
 					cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
 					snprintf_buf( "%s %g–%g",
-						      _p._p.FreqBandNames[(unsigned)b],
-						      _p._p.freq_bands[(unsigned)b][0], _p._p.freq_bands[(unsigned)b][1]);
+						      _p._p.ED->FreqBandNames[(unsigned)b],
+						      _p._p.ED->freq_bands[(unsigned)b][0],
+						      _p._p.ED->freq_bands[(unsigned)b][1]);
 				} else {
 					cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
-					snprintf_buf( "%s", _p._p.FreqBandNames[(unsigned)b]);
+					snprintf_buf( "%s", _p._p.ED->FreqBandNames[(unsigned)b]);
 				}
 				cairo_move_to( cr, _p.da_wd - 170,
 					       ptop + psd.uppermost_band*12 - 12*(unsigned)b + 12);
diff --git a/src/aghermann/ui/sf/montage_cb.cc b/src/aghermann/ui/sf/montage_cb.cc
index 35b4164..019b1d2 100644
--- a/src/aghermann/ui/sf/montage_cb.cc
+++ b/src/aghermann/ui/sf/montage_cb.cc
@@ -376,7 +376,7 @@ daSFMontage_scroll_event_cb(
 			switch ( event->direction ) {
 			case GDK_SCROLL_DOWN:
 				if ( Ch->draw_psd_bands ) {
-					if ( Ch->psd.focused_band > metrics::psd::TBand::delta ) {
+					if ( Ch->psd.focused_band > metrics::TBand::delta ) {
 						--Ch->psd.focused_band;
 						if ( Ch->autoscale_profile )
 							Ch->update_profile_display_scales();
diff --git a/src/aghermann/ui/sf/sf.cc b/src/aghermann/ui/sf/sf.cc
index 1deb8d9..fda00b1 100644
--- a/src/aghermann/ui/sf/sf.cc
+++ b/src/aghermann/ui/sf/sf.cc
@@ -13,6 +13,7 @@
 
 #include "common/config-validate.hh"
 #include "common/fs.hh"
+#include "aghermann/metrics/bands.hh"
 #include "aghermann/ui/misc.hh"
 
 #include "sf.hh"
@@ -179,7 +180,7 @@ SScoringFacility (agh::CSubject& J,
 			if ( not isfinite(h.psd.display_scale) )
 				h.psd.display_scale =
 					agh::alg::calibrate_display_scale(
-						h.psd.course_in_bands[metrics::psd::TBand::delta],
+						h.psd.course_in_bands[metrics::TBand::delta],
 						h.psd.course.size(),
 						interchannel_gap / 4);
 			agh::alg::ensure_within( h.psd.display_scale, 1e-9, 1e9);
diff --git a/src/aghermann/ui/sf/sf.hh b/src/aghermann/ui/sf/sf.hh
index a93bc48..f1409ab 100644
--- a/src/aghermann/ui/sf/sf.hh
+++ b/src/aghermann/ui/sf/sf.hh
@@ -153,7 +153,7 @@ class SScoringFacility
 				course;
 			double	from, upto;
 			double	display_scale; // saved via libconfig, requiring it to be double
-			array<valarray<TFloat>, metrics::psd::TBand::TBand_total>
+			array<valarray<TFloat>, metrics::TBand::TBand_total>
 				course_in_bands;
 			size_t	focused_band,
 				uppermost_band;

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list