Changeset 3829 for trunk/MagicSoft


Ignore:
Timestamp:
04/25/04 01:55:22 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3825 r3829  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2004/04/25: Abelardo Moralejo
     22
     23   * mbadpixels/MBadPixelsTreat.cc
     24     - Change in line 204:    if ((*fBadPixels)[i].IsBad()) by
     25       if ((*fBadPixels)[j].IsBad())   The way it was done, it never
     26       worked, because the check on whether the neighbour pixels
     27       were OK was performed on the same pixel to be treated (i), which
     28       is obviously not OK. The same problem fixed in the interpolation
     29       of pedestals. Amazingly, this error would have shown up in any
     30       test of the class.... I assume it must have been commited
     31       completely untested.
     32
     33     - In InterpolateSignal: moved division of summed charge over
     34       number of pixels : put it after the check of the number of
     35       valid neighbours to avoid division by 0.
    2136
    2237
     
    2641     - fixed a bug in the ReInit() for the number of average events in
    2742       each area index and sector
    28 
    2943
    3044
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc

    r3802 r3829  
    201201            // Do not use blind neighbors
    202202            //
    203             if ((*fBadPixels)[i].IsBad())
     203            if ((*fBadPixels)[nidx].IsBad())
    204204                continue;
    205205
     
    225225        }
    226226
    227         //
    228         // Now the mean is calculated and the values rescaled back
    229         // to the pixel area
    230         //
    231         nphot[i] /= (num*ratio);
    232         perr[i]   = TMath::Sqrt(perr[i]/(num*ratio));
    233  
    234227        // Check if there are enough neighbors to calculate the mean
    235228        // If not, unmap the pixel. The maximum number of blind neighbors
     
    241234        }
    242235
     236        //
     237        // Now the mean is calculated and the values rescaled back
     238        // to the pixel area
     239        //
     240        nphot[i] /= (num*ratio);
     241        perr[i]   = TMath::Sqrt(perr[i]/(num*ratio));
     242 
    243243        pix->Set(nphot[i], perr[i]);
    244244    }
     
    299299            // Do not use blind neighbors
    300300            //
    301             if ((*fBadPixels)[i].IsBad())
     301            if ((*fBadPixels)[nidx].IsBad())
    302302                continue;
    303303
Note: See TracChangeset for help on using the changeset viewer.