IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 22, 2007, 3:47:28 AM (19 years ago)
Author:
eugene
Message:

fix compilation issues re pmTrend for psf parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070921/psModules/src/objects/pmPSFtry.c

    r14980 r14986  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.45.2.2 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-09-22 02:20:11 $
     7 *  @version $Revision: 1.45.2.3 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-09-22 13:47:28 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    139139
    140140    // stage 2: construct a psf (pmPSF) from this collection of model fits
    141     // XXX take 'applyWeights' from the psf options?
    142     if (!pmPSFFromPSFtry (psfTry, options->applyWeights)) {
     141    if (!pmPSFFromPSFtry (psfTry)) {
    143142        psError(PS_ERR_UNKNOWN, false, "failed to construct a psf model from collection of sources");
    144143        psFree(psfTry);
     
    339338/*****************************************************************************
    340339pmPSFFromPSFtry (psfTry): build a PSF model from a collection of
    341 source->modelEXT entires.  The PSF ignores the first 4 (independent) model
     340source->modelEXT entries.  The PSF ignores the first 4 (independent) model
    342341parameters and constructs a polynomial fit to the remaining as a function of
    343342image coordinate.
     
    345344Note: some of the array entries may be NULL (failed fits); ignore them.
    346345 *****************************************************************************/
    347 bool pmPSFFromPSFtry (pmPSFtry *psfTry, bool applyWeight)
     346bool pmPSFFromPSFtry (pmPSFtry *psfTry)
    348347{
    349348    pmPSF *psf = psfTry->psf;
     
    355354
    356355    psVector *dz = NULL;
    357     if (applyWeight) {
     356    if (psf->poissonErrorsParams) {
    358357        dz = psVectorAlloc (psfTry->sources->n, PS_TYPE_F32);
    359358    }
     
    420419    if (psTraceGetLevel("psModules.objects") >= 4) {
    421420        FILE *f = fopen ("pol.dat", "w");
    422         fprintf (f, "x y  :  e0obs e1obs e2obs  : e0fit e1fit e2fit : mask\n",
     421        fprintf (f, "# x y  :  e0obs e1obs e2obs  : e0fit e1fit e2fit : mask\n");
    423422        for (int i = 0; i < e0->n; i++) {
    424423            fprintf (f, "%f %f  :  %f %f %f  : %f %f %f  : %d\n",
     
    462461        // fit the collection of measured parameters to the PSF 2D model
    463462        // the mask is carried from previous steps and updated with this operation
    464         // the weight is either the flux error or NULL, depending on 'applyWeights'
     463        // the weight is either the flux error or NULL, depending on 'psf->poissonErrorParams'
    465464        if (!pmTrend2DFit (psf->params->data[i], psfTry->mask, 0xff, x, y, e0, NULL)) {
    466465            psError(PS_ERR_UNKNOWN, false, "failed to build psf model for parameter %d", i);
    467             psFree(stats);
    468466            psFree(x);
    469467            psFree(y);
     
    502500    }
    503501
    504     psFree (stats);
    505502    psFree (x);
    506503    psFree (y);
Note: See TracChangeset for help on using the changeset viewer.