IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 17, 2014, 12:30:45 PM (12 years ago)
Author:
eugene
Message:

merge changes (from past YEAR) into trunk

Location:
branches/eam_branches/ipp-ops-20130712/psModules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-ops-20130712/psModules

    • Property svn:mergeinfo deleted
  • branches/eam_branches/ipp-ops-20130712/psModules/src/objects

    • Property svn:ignore
      •  

        old new  
        1212pmSourceIO_CMF_PS1_V1.v1.c
        1313pmSourceIO_CMF_PS1_V4.c
         14pmSourceIO_CMF_PS1_V5.c
        1415pmSourceIO_CMF_PS1_SV1.c
        1516pmSourceIO_CMF_PS1_SV2.c
         17pmSourceIO_CMF_PS1_SV3.c
        1618pmSourceIO_CMF_PS1_DV1.c
        1719pmSourceIO_CMF_PS1_DV2.c
        1820pmSourceIO_CMF_PS1_DV3.c
        19 
         21pmSourceIO_CMF_PS1_DV4.c
  • branches/eam_branches/ipp-ops-20130712/psModules/src/objects/pmPSFtryMakePSF.c

    r35768 r37066  
    2828#include "pmMoments.h"
    2929#include "pmModelFuncs.h"
     30#include "pmModelClass.h"
    3031#include "pmModel.h"
    3132#include "pmModelUtils.h"
    32 #include "pmModelClass.h"
    3333#include "pmSourceMasks.h"
    3434#include "pmSourceExtendedPars.h"
    3535#include "pmSourceDiffStats.h"
    3636#include "pmSourceSatstar.h"
     37#include "pmSourceLensing.h"
    3738#include "pmSource.h"
    3839#include "pmSourceFitModel.h"
     
    211212        assert (source->modelEXT); // all unmasked sources should have modelEXT
    212213
    213         bool useReff = pmModelUseReff (source->modelEXT->type);
     214        bool useReff = source->modelEXT->class->useReff;
    214215        psEllipsePol pol = pmPSF_ModelToFit (source->modelEXT->params->data.F32, useReff);
    215216
     
    217218        e1->data.F32[i] = pol.e1;
    218219        e2->data.F32[i] = pol.e2;
     220    }
     221
     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);
    219242    }
    220243
Note: See TracChangeset for help on using the changeset viewer.