IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2010, 11:02:04 AM (16 years ago)
Author:
eugene
Message:

measuring diff stats; adding diff stats and flux in output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20100225/psModules/src/objects/pmSource.c

    r26893 r27494  
    4646    psFree(tmp->maskView);
    4747    psFree(tmp->modelFlux);
    48     psFree(tmp->psfFlux);
     48    psFree(tmp->psfImage);
    4949    psFree(tmp->moments);
    5050    psFree(tmp->modelPSF);
     
    5252    psFree(tmp->modelFits);
    5353    psFree(tmp->extpars);
    54     psFree(tmp->blends);
     54    psFree(tmp->moments);
     55    psFree(tmp->diffStats);
    5556    psTrace("psModules.objects", 10, "---- end ----\n");
    5657}
     
    6869    psFree (source->maskView);
    6970    psFree (source->modelFlux);
    70     psFree (source->psfFlux);
     71    psFree (source->psfImage);
    7172
    7273    source->pixels = NULL;
     
    7576    source->maskView = NULL;
    7677    source->modelFlux = NULL;
    77     source->psfFlux = NULL;
     78    source->psfImage = NULL;
    7879    return;
    7980}
     
    103104    source->maskView = NULL;
    104105    source->modelFlux = NULL;
    105     source->psfFlux = NULL;
     106    source->psfImage = NULL;
    106107    source->moments = NULL;
    107108    source->blends = NULL;
     
    113114    source->tmpFlags = 0;
    114115    source->extpars = NULL;
     116    source->diffStats = NULL;
     117
    115118    source->region = psRegionSet(NAN, NAN, NAN, NAN);
    116119    psMemSetDeallocator(source, (psFreeFunc) sourceFree);
    117120
    118121    // default values are NAN
    119     source->psfMag = NAN;
     122    source->psfMag     = NAN;
     123    source->psfFlux    = NAN;
     124    source->psfFluxErr = NAN;
    120125    source->extMag = NAN;
    121126    source->errMag = NAN;
     
    259264        mySource->modelFlux = NULL;
    260265
    261         // drop the old psfFlux pixels and force the user to re-create
    262         psFree (mySource->psfFlux);
    263         mySource->psfFlux = NULL;
     266        // drop the old psfImage pixels and force the user to re-create
     267        psFree (mySource->psfImage);
     268        mySource->psfImage = NULL;
    264269    }
    265270    return extend;
     
    873878
    874879    // if we already have a cached image, re-use that memory
    875     source->psfFlux = psImageCopy (source->psfFlux, source->pixels, PS_TYPE_F32);
    876     psImageInit (source->psfFlux, 0.0);
     880    source->psfImage = psImageCopy (source->psfImage, source->pixels, PS_TYPE_F32);
     881    psImageInit (source->psfImage, 0.0);
    877882
    878883    // in some places (psphotEnsemble), we need a normalized version
    879884    // in others, we just want the model.  which is more commonly used?
    880     // psfFlux always has unity normalization (I0 = 1.0)
    881     pmModelAdd (source->psfFlux, source->maskObj, source->modelPSF, PM_MODEL_OP_FULL | PM_MODEL_OP_NORM, maskVal);
     885    // psfImage always has unity normalization (I0 = 1.0)
     886    pmModelAdd (source->psfImage, source->maskObj, source->modelPSF, PM_MODEL_OP_FULL | PM_MODEL_OP_NORM, maskVal);
    882887    return true;
    883888}
Note: See TracChangeset for help on using the changeset viewer.