[med-svn] [aghermann] 12/60: WIP
andrei zavada
hmmr-guest at alioth.debian.org
Mon Nov 4 23:49:53 UTC 2013
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to branch WIP
in repository aghermann.
commit 97cd542097b5fd9bdce5e29fc879d704aa412b38
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Tue Oct 8 02:28:13 2013 +0300
WIP
---
upstream/ChangeLog | 22 +++----
upstream/src/aghermann/rk1968/rk1968.cc | 75 +++++++++++++---------
upstream/src/aghermann/ui/sf/montage-overlays.cc | 4 ++
upstream/src/aghermann/ui/sf/montage.cc | 2 +
4 files changed, 59 insertions(+), 44 deletions(-)
diff --git a/upstream/ChangeLog b/upstream/ChangeLog
index 3a41e12..2f4dbef 100644
--- a/upstream/ChangeLog
+++ b/upstream/ChangeLog
@@ -1,16 +1,14 @@
v.0.9.2 (2013-xx-xx)
- * Separate upstream tree from various distribution-related files.
- * SF: trivial optimisation in pattern search.
- * SF: load patterns from symlinked files.
- * SF: don't blindly delete files in various pattern locations,
- just append ~ to their file names.
- * SF: fix jump to next/prev annotations.
- * Use subject ID in place of name if the latter is missing.
- * Properly handle various system/user/experiment/subject/session
- stored settings packs (patterns, rk1968, etc).
- * Incorporate edfhed.glade in aghermann.gresources.
- * SF: basic dialog for RK1968 scoring assistant parameters.
- * Get a reasonable logging facility (use -l file; "-" is stdout; default is /dev/null).
+ * Misc: Separate upstream tree from various distribution-related files.
+ * Misc: SF: trivial optimisation in pattern search.
+ * Fix: SF: load patterns from symlinked files.
+ * Fix: SF: don't blindly delete files in various pattern locations, just append ~ to their file names.
+ * Fix: SF: fix jump to next/prev annotations.
+ * Fix: Use subject ID in place of name if the latter is missing.
+ * New: Properly handle various system/user/experiment/subject/session stored settings packs (patterns, rk1968, etc).
+ * Misc: Incorporate edfhed.glade in aghermann.gresources.
+ * New: SF: basic dialog for RK1968 scoring assistant parameters.
+ * New: Get a reasonable logging facility (use -l file; "-" is stdout; default is /dev/null).
v.0.9.1.1 (2013-07-24)
* Fix 32-bit builds where sizeof(size_t) != sizeof(unsigned long).
diff --git a/upstream/src/aghermann/rk1968/rk1968.cc b/upstream/src/aghermann/rk1968/rk1968.cc
index b3a9ef8..c7d08fd 100644
--- a/upstream/src/aghermann/rk1968/rk1968.cc
+++ b/upstream/src/aghermann/rk1968/rk1968.cc
@@ -46,42 +46,52 @@ score( agh::SEpisode& E, size_t* n_pages_scored_p)
{
size_t n_pages_scored = 0;
- forward_list<agh::CRecording*> HH;
- for ( auto &R : E.recordings )
- if ( R.second.psd_profile.have_data() )
- HH.push_front( &R.second);
- if ( HH.empty() )
- return -1;
-
- forward_list<valarray<TFloat>>
- courses_delta,
- courses_theta;
- for ( auto &H : HH ) {
- courses_delta.emplace_front(
- H->psd_profile.course(
- agh::CExpDesign::freq_bands[metrics::TBand::delta][0],
- agh::CExpDesign::freq_bands[metrics::TBand::delta][1]));
- courses_theta.emplace_front(
- H->psd_profile.course(
- agh::CExpDesign::freq_bands[metrics::TBand::theta][0],
- agh::CExpDesign::freq_bands[metrics::TBand::theta][1]));
- }
-
- auto& firstsource = E.sources.front();
- for ( size_t p = 0; p < firstsource.n_pages(); ++p ) {
- auto Di = courses_delta.begin(),
- Ti = courses_theta.begin();
- int decision = 0;
- for ( ; Di != courses_delta.end(); ++Di, ++Ti ) {
- decision +=
- ( (*Di)[p] > (*Ti)[p] * Pp.nrem3_delta_theta_ratio );
+ // 1. delta/theta-based NREM3 detection
+ {
+ forward_list<agh::CRecording*> HH;
+ for ( auto &R : E.recordings )
+ if ( R.second.psd_profile.have_data() )
+ HH.push_front( &R.second);
+ if ( HH.empty() )
+ return -1;
+
+ forward_list<valarray<TFloat>>
+ courses_delta,
+ courses_theta;
+ for ( auto &H : HH ) {
+ courses_delta.emplace_front(
+ H->psd_profile.course(
+ agh::CExpDesign::freq_bands[metrics::TBand::delta][0],
+ agh::CExpDesign::freq_bands[metrics::TBand::delta][1]));
+ courses_theta.emplace_front(
+ H->psd_profile.course(
+ agh::CExpDesign::freq_bands[metrics::TBand::theta][0],
+ agh::CExpDesign::freq_bands[metrics::TBand::theta][1]));
}
- if ( decision > 0 ) {
- firstsource[p].mark( sigfile::SPage::TScore::nrem3);
- ++n_pages_scored;
+
+ auto& firstsource = E.sources.front();
+ for ( size_t p = 0; p < firstsource.n_pages(); ++p ) {
+ auto Di = courses_delta.begin(),
+ Ti = courses_theta.begin();
+ int decision = 0;
+ for ( ; Di != courses_delta.end(); ++Di, ++Ti ) {
+ decision +=
+ ( (*Di)[p] > (*Ti)[p] * Pp.nrem3_delta_theta_ratio );
+ }
+ if ( decision > 0 ) {
+ firstsource[p].mark( sigfile::SPage::TScore::nrem3);
+ ++n_pages_scored;
+ }
}
}
+ // 2. detect REM by EMG amplitude histogram peak shift
+ {
+ // (a) get a whole-episode EMG amplitude distribution
+
+ // (b)
+ }
+
if ( n_pages_scored_p )
*n_pages_scored_p = n_pages_scored;
@@ -91,6 +101,7 @@ score( agh::SEpisode& E, size_t* n_pages_scored_p)
+
// Local Variables:
// Mode: c++
// indent-tabs-mode: nil
diff --git a/upstream/src/aghermann/ui/sf/montage-overlays.cc b/upstream/src/aghermann/ui/sf/montage-overlays.cc
index f716fd5..26056cf 100644
--- a/upstream/src/aghermann/ui/sf/montage-overlays.cc
+++ b/upstream/src/aghermann/ui/sf/montage-overlays.cc
@@ -75,6 +75,7 @@ draw_overlays( cairo_t* cr,
cairo_show_text( cr, global::buf);
cairo_stroke( cr);
}
+
} else {
_p._p.CwB[SExpDesignUI::TColour::sf_profile_psd].set_source_rgba( cr, .5);
double zero = 0.5 / psd.course.size() * _p.da_wd;
@@ -314,6 +315,9 @@ draw_overlays( cairo_t* cr,
_p.da_wd, 0., pbot - EMGProfileHeight/2, signal_display_scale/2.); // half-signal scale, looks ok?
cairo_stroke( cr);
cairo_pattern_destroy( cp);
+
+ // histogram
+
}
if ( overlay )
diff --git a/upstream/src/aghermann/ui/sf/montage.cc b/upstream/src/aghermann/ui/sf/montage.cc
index 81f5708..6d95c67 100644
--- a/upstream/src/aghermann/ui/sf/montage.cc
+++ b/upstream/src/aghermann/ui/sf/montage.cc
@@ -401,6 +401,8 @@ draw_page( cairo_t *cr,
one_signal_drawn = true;
cairo_stroke( cr);
}
+
+
}
// waveform: signal_original
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list