[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461

Andrei Zavada johnhommer at gmail.com
Fri Nov 16 00:50:50 UTC 2012


The following commit has been merged in the master branch:
commit 7baf9b8fd2f0ebcece8fcb5292878a25f008d808
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Sat Nov 10 12:54:21 2012 +0200

    psd.cc: don't apply windowing function twice (oops, sorry!)

diff --git a/src/metrics/psd.cc b/src/metrics/psd.cc
index 41cf09a..a4e8fe9 100644
--- a/src/metrics/psd.cc
+++ b/src/metrics/psd.cc
@@ -194,18 +194,6 @@ compute( const SFFTParamSet& req_params,
       // 2. zero-mean and detrend
 	// zero-mean already done in CEDFFile::get_signal_filtered()
 
-      // 3. apply windowing function
-	{
-	      // (a) create a static vector of multipliers
-		valarray<double>
-			W (spp);
-		for ( size_t i = 0; i < spp; ++i )
-			W[i] = sigproc::winf[(size_t)welch_window_type]( i, spp);
-
-	      // (b) apply it page by page
-		for ( size_t p = 0; p < pages(); ++p )
-			S[ slice(p * spp, 1 * spp, 1) ] *= W;
-	}
       // 4. obtain power spectrum
 	// prepare
 

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list