IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 15, 2006, 8:23:13 AM (20 years ago)
Author:
magnier
Message:

changed FLT,GALAXY to EXT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel9_p0/psModules/src/objects/pmPSFtry.c

    r5985 r5992  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.3.4.2 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-01-14 07:02:53 $
     7 *  @version $Revision: 1.3.4.3 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-01-15 18:23:13 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333    psFree (test->psf);
    3434    psFree (test->sources);
    35     psFree (test->modelFLT);
     35    psFree (test->modelEXT);
    3636    psFree (test->modelPSF);
    3737    psFree (test->metric);
     
    5353    test->psf      = pmPSFAlloc (type);
    5454    test->sources  = psMemIncrRefCounter(sources);
    55     test->modelFLT = psArrayAlloc (sources->n);
     55    test->modelEXT = psArrayAlloc (sources->n);
    5656    test->modelPSF = psArrayAlloc (sources->n);
    5757    test->metric   = psVectorAlloc (sources->n, PS_TYPE_F64);
     
    5959    test->mask     = psVectorAlloc (sources->n, PS_TYPE_U8);
    6060
    61     for (int i = 0; i < test->modelFLT->n; i++) {
     61    for (int i = 0; i < test->modelEXT->n; i++) {
    6262        test->mask->data.U8[i]  = 0;
    63         test->modelFLT->data[i] = NULL;
     63        test->modelEXT->data[i] = NULL;
    6464        test->modelPSF->data[i] = NULL;
    6565        test->metric->data.F64[i] = 0;
     
    8787    float x;
    8888    float y;
    89     int Nflt = 0;
     89    int Next = 0;
    9090    int Npsf = 0;
    9191
     
    102102
    103103        // set temporary object mask and fit object
    104         // fit model as FLT, not PSF
     104        // fit model as EXT, not PSF
    105105        psImageKeepCircle (source->mask, x, y, RADIUS, "OR", PSPHOT_MASK_MARKED);
    106106        status = pmSourceFitModel (source, model, false);
     
    109109        // exclude the poor fits
    110110        if (!status) {
    111             psfTry->mask->data.U8[i] = PSFTRY_MASK_FLT_FAIL;
     111            psfTry->mask->data.U8[i] = PSFTRY_MASK_EXT_FAIL;
    112112            psFree (model);
    113113            continue;
    114114        }
    115         psfTry->modelFLT->data[i] = model;
    116         Nflt ++;
    117     }
    118     psLogMsg ("psphot.psftry", 4, "fit flt:   %f sec for %d sources\n", psTimerMark ("fit"), sources->n);
    119     psTrace ("psphot.psftry", 3, "keeping %d of %d PSF candidates (FLT)\n", Nflt, sources->n);
     115        psfTry->modelEXT->data[i] = model;
     116        Next ++;
     117    }
     118    psLogMsg ("psphot.psftry", 4, "fit ext:   %f sec for %d sources\n", psTimerMark ("fit"), sources->n);
     119    psTrace ("psphot.psftry", 3, "keeping %d of %d PSF candidates (EXT)\n", Next, sources->n);
    120120
    121121    // stage 2: construct a psf (pmPSF) from this collection of model fits
    122     pmPSFFromModels (psfTry->psf, psfTry->modelFLT, psfTry->mask);
     122    pmPSFFromModels (psfTry->psf, psfTry->modelEXT, psfTry->mask);
    123123
    124124    // stage 3: refit with fixed shape parameters
     
    130130
    131131        pmSource *source = psfTry->sources->data[i];
    132         pmModel  *modelFLT = psfTry->modelFLT->data[i];
     132        pmModel  *modelEXT = psfTry->modelEXT->data[i];
    133133
    134134        // set shape for this model based on PSF
    135         pmModel *modelPSF = pmModelFromPSF (modelFLT, psfTry->psf);
     135        pmModel *modelPSF = pmModelFromPSF (modelEXT, psfTry->psf);
    136136        x = source->peak->x;
    137137        y = source->peak->y;
Note: See TracChangeset for help on using the changeset viewer.