IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2007, 2:40:16 PM (19 years ago)
Author:
eugene
Message:

* updates from branch eam_branch_20070817

  • changed pmIsFoo to pmFooTest
  • changed pmModelGroup to pmModelClass
  • added offsets to pmSourceOp
  • changed pmModel.params_NEW to pmModel.params
  • use new APIs to define a pmModel from a pmPSF at X,Y (pmModelFromPSFforXY)
  • use pmModel member functions instead of _GetFunction functions
  • added modelParamsFromPSF for STRAIL and TEST1
  • move output psf model from readout->analysis to chip->analysis
File:
1 edited

Legend:

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

    r12792 r14655  
    1212    if (!(source->mode & PM_SOURCE_MODE_PSFSTAR)) continue;
    1313
    14     // XXX if a source is faint, it will not have moments measured.
    15     // it must be modelled as a PSF.  In this case, we need to use
    16     // the peak centroid to get the coordinates and get the peak flux
    17     // from the image?
    18 
    19     // use the source moments, etc to guess basic model parameters
    20     pmModel *modelEXT = pmSourceModelGuess (source, psf->type);
    21    
    22     // XXX put this in a function of its own..
    23     if (modelEXT == NULL) {
    24         psErrorClear (); // XXX need to clear the error from failing the model
    25         modelEXT = pmModelAlloc(psf->type);
    26         psF32 *PAR = modelEXT->params->data.F32;
    27         PAR[PM_PAR_SKY]  = 0;
    28         // XXX get this from the image pixels
    29         PAR[PM_PAR_I0]   = source->peak->flux;
    30         PAR[PM_PAR_XPOS] = source->peak->xf;
    31         PAR[PM_PAR_YPOS] = source->peak->yf;
     14    if (source->mode & PM_SOURCE_MODE_SATSTAR) {
     15        Xo = source->moments->x;
     16        Yo = source->moments->y;
     17        Io = source->peak->flux;
    3218    } else {
    33         // these valuse are set in pmSourceModelGuess, should this rule be in there as well?
    34         if (source->mode &  PM_SOURCE_MODE_SATSTAR) {
    35             modelEXT->params->data.F32[PM_PAR_XPOS] = source->moments->x;
    36             modelEXT->params->data.F32[PM_PAR_YPOS] = source->moments->y;
    37         } else {
    38             modelEXT->params->data.F32[PM_PAR_XPOS] = source->peak->xf;
    39             modelEXT->params->data.F32[PM_PAR_YPOS] = source->peak->yf;
    40         }
     19        Xo = source->peak->xf;
     20        Yo = source->peak->yf;
     21        Io = source->peak->flux;
    4122    }
    4223
    4324    // set PSF parameters for this model (apply 2D shape model)
    44     pmModel *modelPSF = pmModelFromPSF (modelEXT, psf);
    45     psFree (modelEXT);
     25    pmModel *modelPSF = pmModelFromPSFforXY (psf, Xo, Yo, Io);
    4626
    4727    // XXX need to define the guess flux?
Note: See TracChangeset for help on using the changeset viewer.