Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7730)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7731)
@@ -23,4 +23,23 @@
    * mranforest/MRanTree.cc:
      - should be if(!Finite) instead of if(Finite)
+
+   * mhbase/MH3.cc:
+     - fixed a problem which arouse in root 4.04/02g namely that
+       is the draw-option is " " nothing is displayed. Therefore
+       all " " are removed before the histogram is drawn
+
+   * mhist/MHCamera.cc:
+     - when the azimuthal profile was produced the binning was optimized
+       with the OptimizeLimits. This doesn't make sense because it 
+       changed the alignment of the bins with the 60deg boundaries
+
+   * mreport/MReportStarguider.cc:
+     - fixed a typo in a comment and removed an obsolete one
+
+   * msignal/MExtractTimeAndCharge.cc:
+     - instead of setting the arrival time to a value at the border of
+       the meaningful range a random number is assigned in the case
+       of an arrival time extracted outside the fadc range. This
+       avoids possible unfortuante coincidences in arrival times.
 
 
Index: /trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 7730)
+++ /trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 7731)
@@ -579,4 +579,5 @@
     str.ReplaceAll("profx", "");
     str.ReplaceAll("profy", "");
+    str.ReplaceAll(" ", "");
 
     // FIXME: We may have to remove all our own options from str!
Index: /trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 7730)
+++ /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 7731)
@@ -798,11 +798,11 @@
     }
 
-    Double_t min = 0;
-    Double_t max = 360;
-
-    Int_t newbins=0;
-    THLimitsFinder::OptimizeLimits(nbins, newbins, min, max, kFALSE);
-
-    MBinning bins(nbins, min, max);
+    //Double_t min = 0;
+    //Double_t max = 360;
+
+    //Int_t newbins=0;
+    //THLimitsFinder::OptimizeLimits(nbins, newbins, min, max, kFALSE);
+
+    MBinning bins(nbins, 0, 360);
     bins.Apply(*h1);
 
Index: /trunk/MagicSoft/Mars/mreport/MReportStarguider.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportStarguider.cc	(revision 7730)
+++ /trunk/MagicSoft/Mars/mreport/MReportStarguider.cc	(revision 7731)
@@ -161,5 +161,5 @@
         (ver>=200603080))
     {          
-        // For the momment this are only placeholders....
+        // For the moment this are only placeholders....
         Float_t dx, dy;
         n=sscanf(str.Data(), "%f %f %n", &dx, &dy, &len);
@@ -176,5 +176,4 @@
     if (ver>=200605080)
     {
-        // For the momment this are only placeholders....
         fNumCorrelatedStars = fNumIdentifiedStars;
         n=sscanf(str.Data(), "%df %n", &fNumIdentifiedStars, &len);
Index: /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
===================================================================
--- /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 7730)
+++ /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 7731)
@@ -63,4 +63,6 @@
 #include "MExtractTimeAndCharge.h"
 
+#include <TRandom.h>
+
 #include "MLog.h"
 #include "MLogManip.h"
@@ -87,4 +89,5 @@
 const Float_t MExtractTimeAndCharge::fgLoGainStartShift = -3.5; 
 const Byte_t  MExtractTimeAndCharge::fgLoGainSwitch = 120; 
+
 // --------------------------------------------------------------------------
 //
@@ -197,8 +200,6 @@
       // Make sure that in cases the time couldn't be correctly determined
       // more meaningfull default values are assigned
-      if (timehi<0)
-          timehi = -1;
-      if (timehi>pixel.GetNumHiGainSamples())
-          timehi = pixel.GetNumHiGainSamples();
+      if (timehi<=0 || timehi>pixel.GetNumHiGainSamples())
+          timehi = gRandom->Uniform(pixel.GetNumHiGainSamples());
       
       Float_t sumlo =0., deltasumlo =-1.; // invalidate logain of MExtractedSignalPix
@@ -235,8 +236,6 @@
           // Make sure that in cases the time couldn't be correctly determined
           // more meaningfull default values are assigned
-          if (timelo<0)
-              timelo = -1;
-          if (timelo>pixel.GetNumLoGainSamples())
-              timelo = pixel.GetNumLoGainSamples();
+          if (timelo<=0 || timelo>pixel.GetNumLoGainSamples())
+              timelo = gRandom->Uniform(pixel.GetNumLoGainSamples());
       }
 
