IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 5, 2014, 4:02:53 PM (12 years ago)
Author:
eugene
Message:

add some visualization and ability to dump data to pmVisual; clip extreme outliers from psf model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140423/psModules/src/objects/pmPSFtryMakePSF.c

    r36623 r36816  
    220220    }
    221221
     222    // weed out extreme e0 outliers here: find the median and exclude points not in the
     223    // range MEDIAN / 5 < e0 < 5 * MEDIAN
     224    {
     225      psStats *e0stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN);
     226      if (psVectorStats (e0stats, e0, NULL, srcMask, 0xff)) {
     227        float e0med = e0stats->sampleMedian;
     228   
     229        for (int i = 0; i < sources->n; i++) {
     230          // skip any masked sources (failed to fit one of the model steps or get a magnitude)
     231          if (srcMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) continue;
     232
     233          if (e0->data.F32[i] < 0.2*e0med) {
     234            srcMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = PSFTRY_MASK_OUTLIER;
     235          }
     236          if (e0->data.F32[i] > 5.0*e0med) {
     237            srcMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = PSFTRY_MASK_OUTLIER;
     238          }
     239        }
     240      }
     241      psFree (e0stats);
     242    }
     243
    222244    // we run 'clipIter' cycles clipping in each of x and y, with only one iteration each.
    223245    // This way, the parameters masked by one of the fits will be applied to the others
Note: See TracChangeset for help on using the changeset viewer.