IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6377


Ignore:
Timestamp:
Feb 7, 2006, 8:10:29 PM (20 years ago)
Author:
magnier
Message:

changed loop order in pmSourceFitModel to skip 0 weight pixels before creating coord
added psFree for params_min, params_max, beta_lim

File:
1 edited

Legend:

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

    r6287 r6377  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.5.4.5 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-02-01 22:24:05 $
     8 *  @version $Revision: 1.5.4.6 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-02-08 06:10:29 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7878    psFree(tmp->modelPSF);
    7979    psFree(tmp->modelEXT);
     80    psFree(tmp->blends);
    8081    psTrace(__func__, 4, "---- %s() end ----\n", __func__);
    8182}
     
    16361637    for (psS32 i = 0; i < source->pixels->numRows; i++) {
    16371638        for (psS32 j = 0; j < source->pixels->numCols; j++) {
     1639            // skip masked points
    16381640            if (source->mask->data.U8[i][j]) {
    16391641                continue;
    16401642            }
     1643            // skip zero-weight points
     1644            if (source->weight->data.F32[i][j] == 0) {
     1645                continue;
     1646            }
     1647
    16411648            psVector *coord = psVectorAlloc(2, PS_TYPE_F32);
    16421649
     
    16461653            x->data[nPix] = (psPtr *) coord;
    16471654            y->data.F32[nPix] = source->pixels->data.F32[i][j];
    1648 
    16491655            // psMinimizeLMChi2 takes wt = 1/dY^2
    1650             if (source->weight->data.F32[i][j] == 0) {
    1651                 continue;
    1652             }
    16531656            yErr->data.F32[nPix] = 1.0 / source->weight->data.F32[i][j];
    16541657            nPix++;
     
    17201723            dparams->data.F32[i] = delta->data.F64[i];
    17211724        }
     1725        psFree (delta);
    17221726    }
    17231727
     
    17461750    psFree(covar);
    17471751    psFree(paramMask);
     1752    psFree(params_min);
     1753    psFree(params_max);
     1754    psFree(beta_lim);
    17481755
    17491756    rc = (onPic && fitStatus);
Note: See TracChangeset for help on using the changeset viewer.