IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5992


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

changed FLT,GALAXY to EXT

Location:
branches/eam_rel9_p0/psModules/src/objects
Files:
3 edited

Legend:

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

    r5958 r5992  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.5.4.1 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-01-10 04:46:03 $
     8 *  @version $Revision: 1.5.4.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-01-15 18:21:49 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7777    psFree(tmp->moments);
    7878    psFree(tmp->modelPSF);
    79     psFree(tmp->modelFLT);
     79    psFree(tmp->modelEXT);
    8080    psTrace(__func__, 4, "---- %s() end ----\n", __func__);
    8181}
     
    211211    // XXX EAM : i changed this to match pmModelEval above, but see
    212212    // XXX EAM   the note below in pmSourceContour
    213     psF32 oldValue = pmModelEval(source->modelFLT, source->pixels, subCol, subRow);
     213    psF32 oldValue = pmModelEval(source->modelEXT, source->pixels, subCol, subRow);
    214214    if (oldValue == level) {
    215215        psTrace(__func__, 4, "---- %s() end ----\n", __func__);
     
    233233
    234234    while (subCol != lastColumn) {
    235         psF32 newValue = pmModelEval(source->modelFLT, source->pixels, subCol, subRow);
     235        psF32 newValue = pmModelEval(source->modelEXT, source->pixels, subCol, subRow);
    236236        if (oldValue == level) {
    237237            psTrace(__func__, 4, "---- %s() end ----\n", __func__);
     
    312312    tmp->blends = NULL;
    313313    tmp->modelPSF = NULL;
    314     tmp->modelFLT = NULL;
     314    tmp->modelEXT = NULL;
    315315    tmp->type = PM_SOURCE_UNKNOWN;
    316316    tmp->mode = PM_SOURCE_DEFAULT;
     
    11631163
    11641164    int Nsat     = 0;
    1165     int Ngal     = 0;
     1165    int Next     = 0;
    11661166    int Nstar    = 0;
    11671167    int Npsf     = 0;
     
    12231223        }
    12241224
    1225         // likely unsaturated galaxy (too large to be stellar)
     1225        // likely unsaturated extended source (too large to be stellar)
    12261226        if ((sigX > (clump.X + 3*clump.dX)) || (sigY > (clump.Y + 3*clump.dY))) {
    1227             tmpSrc->type = PM_SOURCE_GALAXY;
     1227            tmpSrc->type = PM_SOURCE_EXTENDED;
    12281228            tmpSrc->mode = PM_SOURCE_DEFAULT;
    1229             Ngal ++;
     1229            Next ++;
    12301230            continue;
    12311231        }
     
    12611261    psTrace (".pmObjects.pmSourceRoughClass", 2, "Nstar:    %3d\n", Nstar);
    12621262    psTrace (".pmObjects.pmSourceRoughClass", 2, "Npsf:     %3d\n", Npsf);
    1263     psTrace (".pmObjects.pmSourceRoughClass", 2, "Ngal:     %3d\n", Ngal);
     1263    psTrace (".pmObjects.pmSourceRoughClass", 2, "Next:     %3d\n", Next);
    12641264    psTrace (".pmObjects.pmSourceRoughClass", 2, "Nsatstar: %3d\n", Nsatstar);
    12651265    psTrace (".pmObjects.pmSourceRoughClass", 2, "Nsat:     %3d\n", Nsat);
     
    14711471    PS_ASSERT_PTR_NON_NULL(source->peak, false);
    14721472    PS_ASSERT_PTR_NON_NULL(source->pixels, false);
    1473     PS_ASSERT_PTR_NON_NULL(source->modelFLT, false);
    1474     // XXX EAM : what is the purpose of modelPSF/modelFLT?
     1473    PS_ASSERT_PTR_NON_NULL(source->modelEXT, false);
     1474    // XXX EAM : what is the purpose of modelPSF/modelEXT?
    14751475
    14761476    //
     
    16411641                            PM_SOURCE_FIT_MODEL_TOLERANCE);
    16421642
    1643     // PSF model only fits first 4 parameters, FLT model fits all
     1643    // PSF model only fits first 4 parameters, EXT model fits all
    16441644    if (PSF) {
    16451645        paramMask = psVectorAlloc (params->n, PS_TYPE_U8);
  • 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;
  • branches/eam_rel9_p0/psModules/src/objects/pmPSFtry.h

    r5958 r5992  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.2.4.1 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-01-10 04:46:03 $
     8 *  @version $Revision: 1.2.4.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-01-15 18:23:13 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323 * being tests, and contains an element to store the resulting psf
    2424 * representation. In addition, this structure carries the complete collection of
    25  * FLT (floating parameter) and PSF (fixed parameter) model fits to each of the
    26  * sources modelFLT and modelPSF. It also contains a mask which is set by the
     25 * EXT (floating parameter) and PSF (fixed parameter) model fits to each of the
     26 * sources modelEXT and modelPSF. It also contains a mask which is set by the
    2727 * model fitting and psf fitting steps. For each model, the value of the quality
    2828 * metric is stored in the vector metric and the fitted instrumental magnitude is
     
    4848    pmPSF      *psf;                    ///< Add comment.
    4949    psArray    *sources;                ///< pointers to the original sources
    50     psArray    *modelFLT;               ///< model fits, floating parameters
     50    psArray    *modelEXT;               ///< model fits, floating parameters
    5151    psArray    *modelPSF;               ///< model fits, PSF parameters
    5252    psVector   *mask;                   ///< Add comment.
     
    6666    PSFTRY_MASK_CLEAR    = 0x00,        ///< Add comment.
    6767    PSFTRY_MASK_OUTLIER  = 0x01,        ///< 1: outlier in psf polynomial fit (provided by psPolynomials)
    68     PSFTRY_MASK_FLT_FAIL = 0x02,        ///< 2: flt model failed to converge
     68    PSFTRY_MASK_EXT_FAIL = 0x02,        ///< 2: ext model failed to converge
    6969    PSFTRY_MASK_PSF_FAIL = 0x04,        ///< 3: psf model failed to converge
    7070    PSFTRY_MASK_BAD_PHOT = 0x08,        ///< 4: invalid source photometry
Note: See TracChangeset for help on using the changeset viewer.