IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 14, 2010, 9:01:22 AM (15 years ago)
Author:
eugene
Message:

update to use modified psImageMapFit APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/psModules/src/objects/pmPSFtryModel.c

    r29004 r30029  
    136136
    137137        // stage 2: construct a psf (pmPSF) from this collection of model fits, including the 2D variation
    138         if (!pmPSFtryMakePSF (psfTry)) {
     138        bool goodFit = false;
     139        if (!pmPSFtryMakePSF (&goodFit, psfTry)) {
    139140            psError(PS_ERR_UNKNOWN, false, "failed to construct a psf model from collection of sources");
    140141            psFree(psfTry);
    141142            return NULL;
    142143        }
     144        if (!goodFit) {
     145            psWarning ("poor psf fit for order %d, skipping\n", i);
     146            continue;
     147        }
    143148
    144149        // stage 3: refit with fixed shape parameters, measure pmPSFtry->metric
     
    169174    }
    170175    psFree (srcMask);
     176
     177    if (!minPSF) {
     178        psError(PS_ERR_UNKNOWN, false, "failed to construct a valid psf model from the sources");
     179        psFree(psfTry);
     180        return NULL;
     181    }
    171182
    172183    // keep the ones matching the min systematic error:
Note: See TracChangeset for help on using the changeset viewer.