Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7375)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7376)
@@ -54,4 +54,11 @@
    * resources/calibration.rc:
      - new file
+
+   * mbadpixels/MBadPixelsTreat.[h,cc]:
+     - implemented a new treatment of "no-signal". If a pixel
+       presumably contains no signal as detected by the arrival time
+       interpolation its interpolated signal is overwritten with
+       a gaus. The gaus mean and rms are taken from the corresponding
+       MPedPhotCams
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 7375)
+++ trunk/MagicSoft/Mars/NEWS	(revision 7376)
@@ -27,4 +27,15 @@
      treatment was buggy! As neighbor pixels to interpolate the 
      arrival times always the pixels 0 to 5 were taken)
+
+   - callisto: In addition to the new treatment of arrival times the
+     decision of the treatment whether a pixel contains shower
+     information or not is used to improve the signal interpolation
+     further. Previously interpolated pixels showed a non-zero signal
+     do the peak searching signal extractors. Having a signal pixel
+     beside raised the signal above the cleaning level. Thus the
+     pixel survived cleaning to often but with a too low mean signal.
+     By replacing empty pixels with a gaus (mean and rms from the
+     corresponding Area entries in MPedPhotCam) this effect can
+     be supressed.
 
    - callisto: The status "unmapped" (for pixel which cannot be interpolated)
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc	(revision 7375)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc	(revision 7376)
@@ -49,5 +49,10 @@
 //   SetProcessPedestalRun: process the pedestals once per run/file
 //   SetProcessPedestalEvt: process the pedestal once per event
-//   SetProcessTimes:       also do some rough interpolation of the arrival time
+//   SetProcessTimes:       do interpolation of the arrival time
+//
+// If the arrival time treatment is switched on and "MPedPhotFromExtractor"
+// and "MPedPhotFromExtractorRndm" are found the pixel is filled with
+// a random gaus calculated from these two MPedPhotCams in the case
+// the pixels is detected as background.
 //
 //
@@ -101,5 +106,6 @@
 //
 MBadPixelsTreat::MBadPixelsTreat(const char *name, const char *title)
-  : fFlags(0), fNumMinNeighbors(3)
+    : fGeomCam(0), fEvt(0), fBadPixels(0), fPedPhot1(0), fPedPhot2(0),
+    fFlags(0), fNumMinNeighbors(3)
 {
     fName  = name  ? name  : gsDefName.Data();
@@ -197,4 +203,14 @@
     }
 
+    if (IsProcessTimes())
+    {
+        fPedPhot1 = (MPedPhotCam*)pList->FindObject("MPedPhotFromExtractor",     "MPedPhotCam");
+        fPedPhot2 = (MPedPhotCam*)pList->FindObject("MPedPhotFromExtractorRndm", "MPedPhotCam");
+
+        *fLog << inf << "Additional no-signal-interpolation switched ";
+        *fLog << (fPedPhot1 && fPedPhot2 ? "on" : "off");
+        *fLog << "." << endl;
+    }
+
     if (IsProcessPedestalEvt())
         *fLog << inf << "Processing Pedestals once per event..." << endl;
@@ -475,5 +491,15 @@
         // to the shower.
         if (cnt2<=2)
+        {
             sum2 = gRandom->Uniform(max-min)+min; // FIXME? Set Seed value?
+            if (fPedPhot1 && fPedPhot2)
+            {
+                const Int_t    aidx = gpix.GetAidx();
+                const Double_t mean = fPedPhot1->GetArea(aidx).GetMean();
+                const Double_t rms  = fPedPhot2->GetArea(aidx).GetRms();
+                const Double_t phe  = gRandom->Gaus(mean, rms);
+                (*fEvt)[i].SetNumPhotons(phe);
+            }
+        }
         else
             sum2 /= cnt2*2;
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h	(revision 7375)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h	(revision 7376)
@@ -17,4 +17,8 @@
     MSignalCam    *fEvt;       //!
     MBadPixelsCam *fBadPixels; //!
+
+    MPedPhotCam   *fPedPhot1;  //! Pedestal from extractor used for "no-signal" in InterpolateTimes
+    MPedPhotCam   *fPedPhot2;  //! Pedestal from extractor used for "no-signal" in InterpolateTimes
+
 
     TList fPedPhotCams;
