IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 29, 2011, 2:59:09 AM (15 years ago)
Author:
eugene
Message:

find the footprint saddles; iterative search for kron (in masked); add iterative search for kron (downweighting); add footprint based mask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110710/psphot/src/psphotExtendedSourceFits.c

    r32157 r32205  
    319319        psphotSetRadiusMomentsExact(&fitRadius, &windowRadius, readout, source, markVal);
    320320
    321         // Recalculate the source moments using the larger extended-source moments radius.  At
    322         // this stage, skip Gaussian windowing, and do not clip pixels by S/N.  Save the
    323         // psf-based moments for output
    324         psfMoments = *source->moments;
    325         if (!pmSourceMoments (source, windowRadius, 0.0, 0.0, 0.0, maskVal & PS_NOT_IMAGE_MASK(markVal))) {
    326             // subtract the best fit from the object, leave local sky
    327             fprintf (stderr, "skipping (2) %f, %f\n", source->peak->xf, source->peak->yf);
    328             *source->moments = psfMoments;
    329 
    330             // probably need to bump up the size for subtraction
    331             pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    332             // XXX raise an error flag of some kind
    333             continue;
    334         }
     321        // UPDATE : we have changed the moments calculation.  There is now an iteration within
     322        // psphotKronMasked to determine moments appropriate for a larger object.  The values
     323        // Mrf, KronFlux, and KronFluxErr are calculated for the iterated radius.  The other
     324        // values are left at the psf-based values.
    335325
    336326        // allocate the array to store the model fits
     
    338328            source->modelFits = psArrayAllocEmpty (models->list->n);
    339329        }
    340         // extFitPars are the non-parametric data measured for this model fit (moments, kron, etc)
    341         if (source->extFitPars == NULL) {
    342             source->extFitPars = psArrayAllocEmpty (models->list->n);
    343         }
     330
     331        // XXX deprecate?
     332        // XXX // extFitPars are the non-parametric data measured for this model fit (moments, kron, etc)
     333        // XXX if (source->extFitPars == NULL) {
     334        // XXX     source->extFitPars = psArrayAllocEmpty (models->list->n);
     335        // XXX }
    344336
    345337        // loop here over the models chosen for each source (exclude by S/N)
     
    405397          }
    406398
    407           pmSourceExtFitPars *extFitPars = pmSourceExtFitParsAlloc();
    408           extFitPars->Mxx = source->moments->Mxx;
    409           extFitPars->Mxy = source->moments->Mxy;
    410           extFitPars->Myy = source->moments->Myy;
    411           extFitPars->Mrf = source->moments->Mrf;
    412           extFitPars->Mrh = source->moments->Mrh;
    413           extFitPars->peakMag = (source->peak->rawFlux > 0) ? -2.5*log10(source->peak->rawFlux) : NAN;
     399          // XXX deprecate?
     400          // XXX pmSourceExtFitPars *extFitPars = pmSourceExtFitParsAlloc();
     401          // XXX extFitPars->Mxx = source->moments->Mxx;
     402          // XXX extFitPars->Mxy = source->moments->Mxy;
     403          // XXX extFitPars->Myy = source->moments->Myy;
     404          // XXX extFitPars->Mrf = source->moments->Mrf;
     405          // XXX extFitPars->Mrh = source->moments->Mrh;
     406          // XXX extFitPars->peakMag = (source->peak->rawFlux > 0) ? -2.5*log10(source->peak->rawFlux) : NAN;
    414407         
    415408          // save kron mag, but assign apMag & psfMag on output (not yet calculated)
    416           extFitPars->krMag = -2.5*log10(source->moments->KronFlux);
    417 
    418           psArrayAdd (source->extFitPars, 4, extFitPars);
    419           psFree (extFitPars);
     409          // XXX extFitPars->krMag = -2.5*log10(source->moments->KronFlux);
     410
     411          // psArrayAdd (source->extFitPars, 4, extFitPars);
     412          // psFree (extFitPars);
    420413
    421414          // test for fit quality / result
Note: See TracChangeset for help on using the changeset viewer.