[med-svn] [SCM] aghermann branch, master, updated. 551e213a23b59b71cba6a9c3a282d1b60e21b854
Andrei Zavada
johnhommer at gmail.com
Sun Apr 21 23:18:11 UTC 2013
The following commit has been merged in the master branch:
commit 0c434550d2db6af3707e46c24797c79e89070b2b
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Fri Apr 19 00:42:06 2013 +0300
fix CSubject::SAnnotation::page_span args and do same in edf.ii
diff --git a/src/expdesign/primaries.hh b/src/expdesign/primaries.hh
index 85e416b..d90798a 100644
--- a/src/expdesign/primaries.hh
+++ b/src/expdesign/primaries.hh
@@ -161,7 +161,7 @@ class CSubject : public SSubjectId {
agh::alg::SSpan<float>
page_span( size_t pagesize) const
{
- return span / (float)_source.samplerate(_h) / (float)pagesize;
+ return span / (float)pagesize;
}
};
list<SAnnotation>
diff --git a/src/libsigfile/edf.ii b/src/libsigfile/edf.ii
index 4d5807d..cdb778b 100644
--- a/src/libsigfile/edf.ii
+++ b/src/libsigfile/edf.ii
@@ -83,13 +83,13 @@ get_region_filtered_( Th h,
// artifacts
size_t this_samplerate = H.samples_per_record / data_record_size;
for ( auto &A : H.artifacts() ) {
- if ( unlikely (A.a >= smplz) )
+ if ( unlikely (this_samplerate * A.a >= smplz) )
break;
- size_t run = A.z - A.a,
+ size_t run = (A.z - A.a) * this_samplerate,
window = min( run, this_samplerate),
t;
- if ( unlikely (A.z > smplz) )
- run = smplz - A.a;
+ if ( unlikely (A.z * this_samplerate > smplz) )
+ run = smplz - A.a * this_samplerate;
valarray<TFloat>
W (run);
@@ -111,7 +111,7 @@ get_region_filtered_( Th h,
W[t] = (1 - sigproc::winf[(size_t)H.artifacts.dampen_window_type]( t, window));
// now gently apply the multiplier vector onto the artifacts
- recp[ slice(A.a, run, 1) ] *= (W * (TFloat)H.artifacts.factor);
+ recp[ slice(A.a * this_samplerate, run, 1) ] *= (W * (TFloat)H.artifacts.factor);
}
// filters
--
Sleep experiment manager
More information about the debian-med-commit
mailing list