IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2011, 1:12:39 PM (15 years ago)
Author:
eugene
Message:

use the smoothed image for footprint culling; use a more stringent culling for saturated stars; more tweaks to get sat stars to be fitted; various updates to psphotStack; unify psphotImageLoop varients; be a bit careful about number of stars in a PSF clump

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

  • trunk/psphot/src/psphotGuessModels.c

    r30038 r31154  
    160160        pmSource *source = sources->data[i];
    161161
     162        if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) {
     163            fprintf (stderr, "moment failure\n");
     164        }
     165
    162166        // this is used to mark sources for which the model is measured. We check later that
    163167        // all are used.
     
    172176
    173177        // the guess central intensity comes from the peak:
    174         float Io = source->peak->flux;
     178        float Io = source->peak->rawFlux;
     179        if (!isfinite(Io) && source->moments) {
     180          Io = source->moments->Peak;
     181        }
    175182
    176183        // We have two options to get a guess for the object position: the position from the
     
    178185        // moments
    179186
    180 # if (1)
    181         bool useMoments = true;
    182 # else
    183         bool useMoments = false;
    184         useMoments = (source->mode & PM_SOURCE_MODE_SATSTAR);  // we only want to try if SATSTAR is set, but..
    185 # endif
    186 
    187         useMoments = (useMoments && source->moments);          // can't if there are no moments
    188         useMoments = (useMoments && source->moments->nPixels); // can't if the moments were not measured
    189         useMoments = (useMoments && !(source->mode && PM_SOURCE_MODE_MOMENTS_FAILURE)); // can't if the moments failed...
     187        bool useMoments = pmSourcePositionUseMoments(source);
    190188
    191189        float Xo, Yo;
     
    198196        }
    199197
     198        if (source->mode & PM_SOURCE_MODE_SATSTAR) {
     199            fprintf (stderr, "satstar: %f,%f vs %f,%f : %c\n",
     200                     source->moments->Mx, source->moments->My,
     201                     source->peak->xf, source->peak->yf,
     202                     (useMoments ? 'T' : 'F'));
     203        }
     204
    200205        // set PSF parameters for this model (apply 2D shape model to coordinates Xo, Yo)
    201206        pmModel *modelPSF = pmModelFromPSFforXY(psf, Xo, Yo, Io);
Note: See TracChangeset for help on using the changeset viewer.