IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 17, 2005, 10:26:59 AM (21 years ago)
Author:
eugene
Message:

clean up of small accounting bugs, adding the post-subtraction ApResid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotEnsemblePSF.c

    r5772 r5802  
    66    float x;
    77    float y;
    8     float Sky;
    98
    109    psTimerStart ("psphot");
     
    1413
    1514    float OUTER_RADIUS     = psMetadataLookupF32 (&status, config, "SKY_OUTER_RADIUS");
     15    float INNER_RADIUS     = psMetadataLookupF32 (&status, config, "SKY_INNER_RADIUS");
    1616    float PSF_FIT_NSIGMA   = psMetadataLookupF32 (&status, config, "PSF_FIT_NSIGMA");
    1717    float PSF_FIT_PADDING  = psMetadataLookupF32 (&status, config, "PSF_FIT_PADDING");
     
    3838        pmSource *otSource = pmSourceAlloc ();
    3939
     40        // really saturated stars should be re-measured for a better centroid
     41        // XXX EAM : move this to a 'clear satstar function'
     42        // XXX EAM : extend size of fit box around SATSTAR
     43        if (inSource->mode &  PM_SOURCE_SATSTAR) {
     44            status = pmSourceMoments (inSource, INNER_RADIUS);
     45        }
     46
    4047        // XXX EAM : add option to use FLT or PSF form
    4148        // use the source moments, etc to guess basic model parameters
    4249        pmModel *modelFLT = pmSourceModelGuess (inSource, psf->type);
     50        if (inSource->mode &  PM_SOURCE_SATSTAR) {
     51            modelFLT->params->data.F32[2] = inSource->moments->x;
     52            modelFLT->params->data.F32[3] = inSource->moments->y;
     53        }
     54        // XXX EAM : add option to peak-up on peak (for non-sat objects)
    4355
    4456        // set PSF parameters for this model
     
    6981        psImage *flux = otSource->pixels;
    7082        psImage *mask = otSource->mask;
    71 
    72         // XXX EAM : use these lines to fit to the peak
    73         // model->params->data.F32[2] = inSource->peak->x;
    74         // model->params->data.F32[3] = inSource->peak->y;
    75         // XXX EAM : better option: improve the peak with 2D poly fit 3x3
    7683
    7784        // set model to unit peak, zero sky (we assume sky is constant)
     
    136143
    137144        Fi->modelPSF = Mi->modelPSF;
     145
     146        // assign linearly-fitted normalization
    138147        Fi->modelPSF->params->data.F32[1] = norm->data.F32[i];
    139148
    140149        // subtract object
    141150        pmSourceSubModel (Fi->pixels, Fi->mask, Fi->modelPSF, false, false);
    142 
    143         Fi->modelPSF->params->data.F32[0] = Sky;
    144         // need to set this!
    145151    }
    146152
Note: See TracChangeset for help on using the changeset viewer.