- Timestamp:
- Sep 19, 2014, 4:05:27 PM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
psModules/src/objects (modified) (1 prop)
-
psModules/src/objects/pmPSFtryMakePSF.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/psModules/src/objects
- Property svn:ignore
-
old new 15 15 pmSourceIO_CMF_PS1_SV1.c 16 16 pmSourceIO_CMF_PS1_SV2.c 17 pmSourceIO_CMF_PS1_SV3.c 18 pmSourceIO_CMF_PS1_SV4.c 17 19 pmSourceIO_CMF_PS1_DV1.c 18 20 pmSourceIO_CMF_PS1_DV2.c 19 21 pmSourceIO_CMF_PS1_DV3.c 22 pmSourceIO_CMF_PS1_DV4.c 20 23
-
- Property svn:ignore
-
branches/eam_branches/ps2-tc3-20130727/psModules/src/objects/pmPSFtryMakePSF.c
r36680 r37403 28 28 #include "pmMoments.h" 29 29 #include "pmModelFuncs.h" 30 #include "pmModelClass.h" 30 31 #include "pmModel.h" 31 32 #include "pmModelUtils.h" 32 #include "pmModelClass.h"33 33 #include "pmSourceMasks.h" 34 34 #include "pmSourceExtendedPars.h" … … 212 212 assert (source->modelEXT); // all unmasked sources should have modelEXT 213 213 214 bool useReff = pmModelUseReff (source->modelEXT->type);214 bool useReff = source->modelEXT->class->useReff; 215 215 psEllipsePol pol = pmPSF_ModelToFit (source->modelEXT->params->data.F32, useReff); 216 216 … … 218 218 e1->data.F32[i] = pol.e1; 219 219 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); 220 242 } 221 243
Note:
See TracChangeset
for help on using the changeset viewer.
