IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 25, 2007, 3:20:29 PM (19 years ago)
Author:
magnier
Message:

incorporating updates from eam_02_branch (cached models, pmPSF FITS IO)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPSFtry.c

    r12949 r13034  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-04-21 19:47:14 $
     7 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-04-26 01:20:29 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9999{
    100100    bool status;
    101     float x;
    102     float y;
    103101    int Next = 0;
    104102    int Npsf = 0;
     
    120118            return NULL;
    121119        }
    122         x = source->peak->x;
    123         y = source->peak->y;
    124 
    125         // set temporary object mask and fit object
     120
     121        // set object mask to define valid pixels
     122        psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, RADIUS, "OR", PM_MASK_MARK);
     123
    126124        // fit model as EXT, not PSF
    127 
    128         psImageKeepCircle (source->mask, x, y, RADIUS, "OR", PM_MASK_MARK);
    129125        status = pmSourceFitModel (source, source->modelEXT, PM_SOURCE_FIT_EXT);
    130         psImageKeepCircle (source->mask, x, y, RADIUS, "AND", PS_NOT_U8(PM_MASK_MARK));
    131126
    132127        // exclude the poor fits
     
    158153        source->modelPSF = pmModelFromPSF (source->modelEXT, psfTry->psf);
    159154        source->modelPSF->radiusFit = RADIUS;
    160         x = source->peak->x;
    161         y = source->peak->y;
    162 
    163         // set the mask and fit the PSF model
    164         psImageKeepCircle (source->mask, x, y, RADIUS, "OR", PM_MASK_MARK);
     155
     156        // set object mask to define valid pixels
     157        psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, RADIUS, "OR", PM_MASK_MARK);
     158
     159        // fit the PSF model to the source
    165160        status = pmSourceFitModel (source, source->modelPSF, PM_SOURCE_FIT_PSF);
    166         psImageKeepCircle (source->mask, x, y, RADIUS, "AND", PS_NOT_U8(PM_MASK_MARK));
    167161
    168162        // skip poor fits
Note: See TracChangeset for help on using the changeset viewer.