IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29459


Ignore:
Timestamp:
Oct 17, 2010, 9:23:37 AM (16 years ago)
Author:
eugene
Message:

clipped mean or robust mean for psf size distribution?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c

    r29347 r29459  
    219219
    220220    // model the distribution as a mean or median value and a systematic error from that value:
    221     psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);
     221    // psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);   
     222    psStats *stats = psStatsAlloc(PS_STAT_CLIPPED_MEAN);   
    222223    psVectorStats (stats, Ap, NULL, NULL, 0);
    223224
    224225    psVector *dAp = psVectorAlloc (Ap->n, PS_TYPE_F32);
    225226    for (int i = 0; i < Ap->n; i++) {
    226         dAp->data.F32[i] = Ap->data.F32[i] - stats->robustMedian;
    227     }
    228 
    229     options->ApResid = stats->robustMedian;
    230     options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0.05);
     227        dAp->data.F32[i] = Ap->data.F32[i] - stats->clippedMean;
     228    }
     229
     230    options->ApResid = stats->clippedMean;
     231    options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0.1);
    231232    // XXX this is quite arbitrary...
    232233    if (!isfinite(options->ApSysErr)) options->ApSysErr = 0.01;
     
    361362
    362363        // set nSigma to include both systematic and poisson error terms
     364        // XXX need to handle NAN psfMag and apMag (ie, skip?)
    363365        // XXX the 'poisson error' contribution for size is probably wrong...
    364366        // XXX add in a hard floor on the Ap Sys Err (to be a bit generous)
Note: See TracChangeset for help on using the changeset viewer.