Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 6904)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 6905)
@@ -21,4 +21,20 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2005/04/01 Thomas Bretz
+
+   * mbadpixels/MBadPixelsCalc.cc:
+     - switched on bad pixel detection for a pedestal level
+       which is more than 5 times the variance
+
+   * mfbase/MF.cc:
+     - when fixing the "Inverted" bit in ReadEnv don't print a 
+       message on the screen
+
+   * mhflux/MHAlpha.cc:
+     - plot correct errors
+     - do not plot the point if its significance is not greater 1
+
+
 
  2005/03/29 Markus Gaug
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 6904)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 6905)
@@ -25,4 +25,6 @@
    - wobble mode can now be switched on from the data-set
 
+   - switched on bad pixel detection for a pedestal level
+     which is more than 5 times the variance
 
 
Index: /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc	(revision 6904)
+++ /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc	(revision 6905)
@@ -88,5 +88,5 @@
 //
 MBadPixelsCalc::MBadPixelsCalc(const char *name, const char *title)
-    : fPedestalLevel(3), fPedestalLevelVariance(-1), fNamePedPhotCam("MPedPhotCam")
+    : fPedestalLevel(3), fPedestalLevelVariance(5), fNamePedPhotCam("MPedPhotCam")
 {
     fName  = name  ? name  : gsDefName.Data();
Index: /trunk/MagicSoft/Mars/mfbase/MF.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfbase/MF.cc	(revision 6904)
+++ /trunk/MagicSoft/Mars/mfbase/MF.cc	(revision 6905)
@@ -547,6 +547,6 @@
     // and double-inversion is no inversion
     if (IsEnvDefined(env, prefix, "Inverted", print))
-        if (GetEnvValue(env, prefix, "Inverted", print)==kTRUE)
-            fF->SetInverted(kFALSE);
+        if (GetEnvValue(env, prefix, "Inverted", kFALSE)==kTRUE)
+            SetInverted(kFALSE);
 
     return kTRUE;
Index: /trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhflux/MHAlpha.cc	(revision 6904)
+++ /trunk/MagicSoft/Mars/mhflux/MHAlpha.cc	(revision 6905)
@@ -197,6 +197,9 @@
         if (fit.FitEnergy(fHAlpha, fOffData, i))
         {
-            fHEnergy.SetBinContent(i, fit.GetEventsExcess());
-            fHEnergy.SetBinError(i, fit.GetEventsExcess()*0.2);
+            if (fit.GetSignificance()>1)
+            {
+                fHEnergy.SetBinContent(i, fit.GetEventsExcess());
+                fHEnergy.SetBinError(i, fit.GetEventsExcess()/fit.GetSignificance());
+            }
         }
     }
@@ -216,6 +219,9 @@
         if (fit.FitTheta(fHAlpha, fOffData, i))
         {
-            fHTheta.SetBinContent(i, fit.GetEventsExcess());
-            fHTheta.SetBinError(i, fit.GetEventsExcess()*0.2);
+            if (fit.GetSignificance()>1)
+            {
+                fHTheta.SetBinContent(i, fit.GetEventsExcess());
+                fHTheta.SetBinError(i, fit.GetEventsExcess()/fit.GetSignificance());
+            }
         }
     }
@@ -425,5 +431,5 @@
     //
     fHTime.SetBinContent(n+1, fit.GetEventsExcess());
-    fHTime.SetBinError(n+1, fit.GetEventsExcess()*0.1);
+    fHTime.SetBinError(n+1, fit.GetEventsExcess()/fit.GetSignificance());
 
     *fLog << all << *fTimeEffOn << ": " << fit.GetEventsExcess() << endl;
