[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Wed Oct 27 18:44:03 CEST 2004


CVS commit by netterfield: 

BUG:
The power spectrum was not getting re-normalized, so the the units were
completely wrong.  This fixes the problem.  Units are now Yunits/sqrt(hz).


  M +3 -1      kstpsd.cpp   1.11


--- kdeextragear-2/kst/kst/kstpsd.cpp  #1.10:1.11
@@ -286,5 +286,7 @@ KstObject::UpdateType KstPSD::update(int
   _norm_factor = 1.0/(sqrt(double(_Freq)*double(_PSDLen))*double(n_subsets));
 
-  psd[0] *= _norm_factor;
+  for ( i_samp = 0; i_samp<_PSDLen; i_samp++ ) {
+    psd[i_samp] *= _norm_factor;
+  }
 
   if (_Freq <= 0.0) {





More information about the Kst mailing list