Index: /trunk/MagicSoft/Mars/macros/calibration.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/calibration.C	(revision 3904)
+++ /trunk/MagicSoft/Mars/macros/calibration.C	(revision 3905)
@@ -55,14 +55,25 @@
 //
 /////////////////////////////////////////////////////////////////////////////
-static const TString inpath = "/home/rootdata/Calib/2004_04_16/";
+//static const TString inpath = "/home/rootdata/Calib/2004_04_16/";
+static const TString inpath = "/mnt/Data/rootdata/CrabNebula/2003_12_01/";
+static const Int_t pedrun  = 3340;
+static const Int_t calrun1 = 3341;
+static const Int_t calrun2 = 0;
+/*
 static const Int_t pedrun  = 22265;
 static const Int_t calrun1 = 22300;
 static const Int_t calrun2 = 0;
-
+*/
 void calibration(const Int_t prun=pedrun, const Int_t crun1=calrun1, const Int_t crun2=calrun2)
 {
 
   MExtractFixedWindowPeakSearch extractor;
-  
+  extractor.SetRange(0,14,0,14);
+
+  /*
+  MExtractTimeSpline timeext;
+  timeext.SetRange(0,14,6,14);
+  */
+
   MRunIter pruns;
   MRunIter cruns;
@@ -74,14 +85,4 @@
   else
     cruns.AddRuns(crun1,crun2,inpath);
-
-  MCalibrationQECam qecam;
-  MBadPixelsCam     badcam;
-  MGeomCamMagic     geomcam;
-  MGeomApply        geomapl;
-  //
-  // If you want to exclude pixels from the beginning, read 
-  // an ascii-file with the corr. pixel numbers (see MBadPixelsCam)
-  //
-  //  badcam.AsciiRead("badpixels.dat");
 
   gStyle->SetOptStat(1);
@@ -96,5 +97,16 @@
   /************************************/
 
+  MCalibrationQECam qecam;
+  MBadPixelsCam     badcam;
+  MGeomCamMagic     geomcam;
+  MGeomApply        geomapl;
+  //
+  // If you want to exclude pixels from the beginning, read 
+  // an ascii-file with the corr. pixel numbers (see MBadPixelsCam)
+  //
+  //  badcam.AsciiRead("badpixels.dat");
+
   MJPedestal pedloop;
+  pedloop.SetExtractor(&extractor);
   pedloop.SetInput(&pruns);
   pedloop.SetDisplay(display);
@@ -117,12 +129,14 @@
   // calloop.SetDataCheckDisplay();
   // 
-  // For everything, you ever dreamed of, choose:
-  // calloop.SetFullDisplay();
+  // For everything, you have ever dreamed of, choose:
+  //  calloop.SetFullDisplay();
 
   //
   // If you want to calibrate the times as well, choose:
   //
-  //  calloop.SetRelTimeCalibration();
+  calloop.SetRelTimeCalibration();
   calloop.SetExtractor(&extractor);
+  //  calloop.SetArrivalTimeLevel(1);
+  //  calloop.SetTimeExtractor(&timeext);
   calloop.SetInput(&cruns);
   calloop.SetDisplay(display);
@@ -132,4 +146,10 @@
     return;
 
+  MCalibrationChargeCam &chargecam = calloop.GetCalibrationCam();
+  MLog juanlog;
+  juanlog.SetOutputFile("test.txt",1);
+  chargecam.SetLogStream(&juanlog);
+  chargecam.Print();
+  chargecam.SetLogStream(&gLog);
 
   /********************************************************************/
@@ -146,5 +166,4 @@
     return;
 
-
 }
 
Index: /trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3904)
+++ /trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3905)
@@ -361,6 +361,6 @@
         disp34.SetCamContent(fBadPixels,21);
     
-        disp30.SetYTitle("Time Offset [ns]");
-        disp31.SetYTitle("Timing resolution [ns]");
+        disp30.SetYTitle("Time Offset [FADC units]");
+        disp31.SetYTitle("Timing resolution [FADC units]");
         disp32.SetYTitle("P_{Time} [1]");
         disp33.SetYTitle("[1]");
