[med-svn] [SCM] aghermann branch, master, updated. c0bd21ca8eb529ade7e0c7aad22951a308a8dc8f
Andrei Zavada
johnhommer at gmail.com
Wed May 1 00:09:39 UTC 2013
The following commit has been merged in the master branch:
commit 218cebd35ab82b444f0ed8b96c01726aab715f62
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Sat Apr 27 01:08:15 2013 +0300
eradicate separate emg_display_scale, use signal_display_scale instead
diff --git a/src/ui/sf/channel.cc b/src/ui/sf/channel.cc
index d463860..ae9d237 100644
--- a/src/ui/sf/channel.cc
+++ b/src/ui/sf/channel.cc
@@ -96,7 +96,6 @@ SChannel (agh::CRecording& r,
SValidator<double>( string("h")+to_string(seq) + ".psd_display_scale", &psd.display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
SValidator<double>( string("h")+to_string(seq) + ".swu_display_scale", &swu.display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
SValidator<double>( string("h")+to_string(seq) + ".mc_display_scale", &mc.display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
- SValidator<double>( string("h")+to_string(seq) + ".emg_display_scale", &emg_display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
}),
marquee_start (0.),
marquee_end (0.),
@@ -151,7 +150,7 @@ SChannel (agh::CRecording& r,
// let it be so to avoid libconfig::readFile throwing exceptions
psd.display_scale = mc.display_scale = swu.display_scale =
- emg_display_scale = DBL_MIN;
+ DBL_MIN;
percent_dirty = calculate_dirty_percent();
}
@@ -360,12 +359,6 @@ update_profile_display_scales()
swu.course,
swu.course.size(),
_p.interchannel_gap/2.);
-
- emg_display_scale =
- agh::alg::calibrate_display_scale(
- raw_profile,
- raw_profile.size(),
- _p.interchannel_gap/2.);
}
diff --git a/src/ui/sf/montage-overlays.cc b/src/ui/sf/montage-overlays.cc
index a860701..4858143 100644
--- a/src/ui/sf/montage-overlays.cc
+++ b/src/ui/sf/montage-overlays.cc
@@ -309,7 +309,7 @@ draw_overlays( cairo_t* cr,
aghui::cairo_draw_envelope(
cr,
raw_profile, 0, raw_profile.size(),
- _p.da_wd, 0., pbot - EMGProfileHeight/2, emg_display_scale);
+ _p.da_wd, 0., pbot - EMGProfileHeight/2, signal_display_scale/2.); // half-signal scale, looks ok?
cairo_stroke( cr);
cairo_pattern_destroy( cp);
}
diff --git a/src/ui/sf/montage.cc b/src/ui/sf/montage.cc
index ce882df..4dc263a 100644
--- a/src/ui/sf/montage.cc
+++ b/src/ui/sf/montage.cc
@@ -163,7 +163,6 @@ expand_by_factor( const double fac)
H.signal_display_scale *= fac;
H.psd.display_scale *= fac;
H.mc.display_scale *= fac;
- H.emg_display_scale *= fac;
H.zeroy *= fac;
}
interchannel_gap *= fac;
diff --git a/src/ui/sf/montage_cb.cc b/src/ui/sf/montage_cb.cc
index e5109ce..83da511 100644
--- a/src/ui/sf/montage_cb.cc
+++ b/src/ui/sf/montage_cb.cc
@@ -421,13 +421,11 @@ daSFMontage_scroll_event_cb(
Ch->psd.display_scale /= SF._p.scroll_factor;
Ch->swu.display_scale /= SF._p.scroll_factor;
Ch->mc.display_scale /= SF._p.scroll_factor;
- Ch->emg_display_scale /= SF._p.scroll_factor;
break;
case GDK_SCROLL_UP:
Ch->psd.display_scale *= SF._p.scroll_factor;
Ch->swu.display_scale *= SF._p.scroll_factor;
Ch->mc.display_scale *= SF._p.scroll_factor;
- Ch->emg_display_scale *= SF._p.scroll_factor;
break;
case GDK_SCROLL_LEFT:
if ( SF.cur_vpage() > 0 )
@@ -448,7 +446,7 @@ daSFMontage_scroll_event_cb(
H.swu.display_scale = Ch->swu.display_scale;
} else if ( Ch->type == sigfile::SChannel::TType::emg &&
H.type == sigfile::SChannel::TType::emg )
- H.emg_display_scale = Ch->emg_display_scale;
+ H.signal_display_scale = Ch->signal_display_scale;
}
gtk_widget_queue_draw( wid);
}
diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index 8cfbb63..fe2a7af 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -196,15 +196,6 @@ SScoringFacility (agh::CSubject& J,
h.swu.course.size(),
interchannel_gap / 4);
agh::alg::ensure_within( h.swu.display_scale, 1e-9, 1e9);
-
- } else if ( h.type == sigfile::SChannel::TType::emg ) {
- if ( not isfinite(h.emg_display_scale) )
- h.emg_display_scale =
- agh::alg::calibrate_display_scale(
- h.raw_profile,
- h.raw_profile.size(),
- interchannel_gap / 4);
- agh::alg::value_within( h.emg_display_scale, 1e-9, 1e9);
}
h._put_selection();
diff --git a/src/ui/sf/sf.hh b/src/ui/sf/sf.hh
index ac60163..608b811 100644
--- a/src/ui/sf/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -194,9 +194,6 @@ class SScoringFacility
raw_profile;
void get_raw_profile();
- // emg
- double emg_display_scale;
-
// region
void mark_region_as_artifact( bool do_mark);
void mark_region_as_annotation( const string&, sigfile::SAnnotation::TType);
--
Sleep experiment manager
More information about the debian-med-commit
mailing list