IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5603


Ignore:
Timestamp:
Nov 25, 2005, 4:48:02 PM (21 years ago)
Author:
magnier
Message:

fixed formatting, fixed psImageCountPixelMask usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel8_b1/psModules/src/objects/pmObjects.c

    r5255 r5603  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-10-10 19:53:40 $
     8 *  @version $Revision: 1.2.6.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-11-26 02:48:02 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    769769    for (psS32 row = 0; row < source->pixels->numRows ; row++) {
    770770        for (psS32 col = 0; col < source->pixels->numCols ; col++) {
    771             if ((source->mask != NULL) && (source->mask->data.U8[row][col]))
     771            if ((source->mask != NULL) && (source->mask->data.U8[row][col])) {
    772772                continue;
     773            }
    773774
    774775            psF32 xDiff = col + source->pixels->col0 - xPeak;
     
    777778            // XXX EAM : calculate xDiff, yDiff up front;
    778779            //           radius is just a function of (xDiff, yDiff)
    779             if (!VALID_RADIUS(xDiff, yDiff, R2))
     780            if (!VALID_RADIUS(xDiff, yDiff, R2)) {
    780781                continue;
     782            }
    781783
    782784            psF32 pDiff = source->pixels->data.F32[row][col] - sky;
     
    784786            // XXX EAM : check for valid S/N in pixel
    785787            // XXX EAM : should this limit be user-defined?
    786             if (pDiff / sqrt(source->weight->data.F32[row][col]) < 1)
     788            if (pDiff / sqrt(source->weight->data.F32[row][col]) < 1) {
    787789                continue;
     790            }
    788791
    789792            Sum += pDiff;
     
    10651068    int Ncr      = 0;
    10661069    int Nsatstar = 0;
     1070    psRegion allArray = psRegionSet (0, 0, 0, 0);
    10671071
    10681072    psVector *starsn = psVectorAlloc (sources->n, PS_TYPE_F32);
     
    10961100
    10971101        // XXX EAM : can we use the value of SATURATE if mask is NULL?
    1098         //
    1099         // XXX: Must verify this region (the region argument was added to psImageCountPixelMask()
    1100         // after EAM wrote this code.
    1101         //
    1102         psRegion tmpRegion = psRegionSet(0, tmpSrc->mask->numCols, 0, tmpSrc->mask->numRows);
    1103         int Nsatpix = psImageCountPixelMask(tmpSrc->mask, tmpRegion, PSPHOT_MASK_SATURATED);
     1102        int Nsatpix = psImageCountPixelMask (tmpSrc->mask, allArray, PSPHOT_MASK_SATURATED);
    11041103
    11051104        // saturated star (size consistent with PSF or larger)
     
    17591758                ymodel = modelFunc (NULL, model->params, coord);
    17601759
    1761                 // this test enhances the weight based on deviation from the model flux
     1760                // this test modifies the weight based on deviation from the model flux
    17621761                Ro = 1.0 + fabs (y->data.F32[tmpCnt] - ymodel) / sqrt(PS_SQR(ymodel - So) + PS_SQR(So));
    17631762
    1764                 // psMinimizeLMChi2_EAM takes wt = 1/dY^2
     1763                // psMinimizeLMChi2 takes wt = 1/dY^2
    17651764                if (source->weight->data.F32[i][j] == 0) {
    17661765                    yErr->data.F32[tmpCnt] = 0.0;
Note: See TracChangeset for help on using the changeset viewer.