Index: trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc	(revision 5587)
+++ trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc	(revision 5588)
@@ -51,4 +51,13 @@
 //  In case of odd numbers, the window will be modified.
 //
+//
+//  Call: SetOffsetFromWindow() to adjust the positionning of the extraction
+//  window w.r.t. the peak search window. An fOffsetFromWindow of 0 means that
+//  the starting slice of the extraction window is equal to the starting slice
+//  of the maximizing peak search window. fOffsetFromWindow equal to 1 (default)
+//  means that the extraction window starts one slice earlier than the peak 
+//  search window result. It is recommanded to always use a smaller peak search
+//  window than the extraction window.
+//
 //  Defaults are:
 //
@@ -57,4 +66,5 @@
 //   fPeakSearchWindowSize = fgPeakSearchWindowSize = 4
 //   fLoGainPeakShift      = fgLoGainPeakShift      = 0
+//   fOffsetFromWindow     = fgOffsetFromWindow     = 1
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -293,5 +303,5 @@
 	{
 	  max = sum;
-	  startslice = p-ptr;
+	  startslice = p-ptr+1;
 	}
     }
