Index: /trunk/MagicSoft/Mars/macros/pointspreadfunction.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/pointspreadfunction.C	(revision 3113)
+++ /trunk/MagicSoft/Mars/macros/pointspreadfunction.C	(revision 3114)
@@ -51,5 +51,5 @@
 //______________________________________________________________________________
 //
-// Function use for Minuit to do the fit
+// Function used by Minuit to do the fit
 //
 void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
@@ -80,5 +80,5 @@
 //______________________________________________________________________________
 //
-// The 2D gaussian fucntion use to fit the spot of the star
+// The 2D gaussian fucntion used to fit the spot of the star
 //
 Double_t func(float x,float y,Double_t *par)
@@ -136,4 +136,5 @@
     
     const Float_t conv4mm2deg = geomcam.GetConvMm2Deg();
+
 	 
     if (clname != "NULL")
@@ -288,6 +289,6 @@
 
     //
-    // Using the first dc meausrement we search the star and we define the area to be fitted
-    // around 3 rings of neightbords around the peak of the star.
+    // Using the first dc measurement we search the pixels which contains the star and define
+    // an area to be fitted by Minuit which is 3 rings of neightbords around the peak of the star.
     // 
 
@@ -362,9 +363,5 @@
    
     for(Int_t swpixel=1; swpixel<numPixels; swpixel++)
-    {
-//		cout << "isPixelsFitted[" << swpixel << "] ";
-//		cout << (Int_t)isPixelsFitted[swpixel] << endl;
 	curr[swpixel] = (Float_t)isPixelsFitted[swpixel]; 
-    }
     
 /*    MHCamera display0(geomcam);
@@ -411,9 +408,6 @@
 	    step[i] = TMath::Abs(vstart[i]/sqrt(2));
 	else
-	    step[i] = 1;
-
-	cout << "DGB vstat[" << i << "] " << vstart[i] << " step[" << i << "] " << step[i] <<endl;
+	    step[i] = uplimit[i]/2;
     }
-//    cout << endl;
   
     gMinuit->mnparm(0, "max", vstart[0], step[0], lowlimit[0], uplimit[0],ierflg);
@@ -424,10 +418,8 @@
 
     while (tlist.Process() && numLines < maxNumLines)
-	{
-//        curr.Print();
+    {
 
 	for (Int_t swpixel=1; swpixel<577; swpixel++)
 	{
-//	    cout << swpixel << '\t' << curr[swpixel] << '\t' << geomcam[swpixel].GetX() << '\t' << geomcam[swpixel].GetY() << endl;
 	    
 	    x[swpixel] = geomcam[swpixel].GetX()*conv4mm2deg;
@@ -480,5 +472,4 @@
 	    display.SetCamContent(curr);
 	    gPad->cd(1);
-//	ellipse.DrawEllipse(xmean,ymean,TMath::Abs(xsigma),TMath::Abs(ysigma),0,360,0);
 	    ellipse.SetX1(xmean/conv4mm2deg);
 	    ellipse.SetY1(ymean/conv4mm2deg);
@@ -489,12 +480,4 @@
 	    gPad->Update();
 
-/*	if (numLines%10==0)
-	{
-	    char imagepath[60];
-	    sprintf(&imagepath,"/home/Javi/mnt_users/Data/CaCo/img/ZetaTau_%04d.gif",numLines/10);
-	    cout << imagepath << endl;
-	    gPad->SaveAs(imagepath);
-	}
-*/
 	    // Remove the comments if you want to go through the file
 	    //event-by-event:
@@ -673,6 +656,4 @@
 
     c1->cd(5);
-
-//    TCanvas *sigmacanvas = new TCanvas("sigmacanvas","Point Spread Funtion RMS",100,10,800,600);
 
     TMath math;
