Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7574)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7575)
@@ -18,4 +18,9 @@
 
                                                  -*-*- END OF LINE -*-*-
+   * mcalib/MCalibrateData.cc:
+     - take the bad pixel information into account when calculating the
+       number of saturating pixels!
+
+
  2006/03/06 Thomas Bretz
 
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 7574)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 7575)
@@ -13,4 +13,9 @@
 
    - showplot: path inflation for ganymed files was broken
+
+   - callisto: Fixed an important bug. When the number of saturating pixels
+     were calculated the bad pixel information already available from the
+     calibration was ignored. This yields wrong values in case pixels
+     are broken and saturate all the time or randomly.
 
    - star: The time-evolution shown in the effective on-time plot now displays
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 7574)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 7575)
@@ -783,12 +783,15 @@
             const Float_t nphot    = signal                         * fCalibConsts  [pixidx];
             const Float_t nphotErr = TMath::Sqrt(TMath::Abs(nphot)) * fCalibFFactors[pixidx];
-            
+
             fCerPhotEvt->AddPixel(pixidx, nphot, nphotErr);
 
-            if (sig.GetNumHiGainSaturated() > 0)
-                numsathi++;
-
-            if (sig.GetNumLoGainSaturated() > 0)
-                numsatlo++;
+            if (!(*fBadPixels)[pixidx].IsUnsuitable())
+            {
+                if (sig.GetNumHiGainSaturated() > 0)
+                    numsathi++;
+
+                if (sig.GetNumLoGainSaturated() > 0)
+                    numsatlo++;
+            }
         } /* if (data) */
       
