Changeset 41814 for branches/eam_branches/ipp-dev-20210817/psModules
- Timestamp:
- Sep 27, 2021, 8:16:29 AM (5 years ago)
- Location:
- branches/eam_branches/ipp-dev-20210817/psModules/src/astrom
- Files:
-
- 2 edited
-
pmAstrometryObjects.c (modified) (4 diffs)
-
pmAstrometryObjects.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-dev-20210817/psModules/src/astrom/pmAstrometryObjects.c
r41813 r41814 340 340 psVector *yResGood = psVectorAllocEmpty (match->n, PS_TYPE_F32); 341 341 342 // we measure the stdev of the median residual in NxN bins. 343 // use only valid (not NAN) measurements 344 psVector *xPosValid = psVectorAllocEmpty (match->n, PS_TYPE_F32); 345 psVector *yPosValid = psVectorAllocEmpty (match->n, PS_TYPE_F32); 346 psVector *xResValid = psVectorAllocEmpty (match->n, PS_TYPE_F32); 347 psVector *yResValid = psVectorAllocEmpty (match->n, PS_TYPE_F32); 348 342 349 for (int i = 0; i < match->n; i++) { 343 350 if (mask->data.PS_TYPE_VECTOR_MASK_DATA[i]) continue; … … 345 352 pmAstromObj *rawStar = raw->data[pair->raw]; 346 353 if (!isfinite(rawStar->dMag)) continue; 354 355 bool isValid = true; 356 isValid = isValid & isfinite (xFit->data.F32[i]); 357 isValid = isValid & isfinite (yFit->data.F32[i]); 358 isValid = isValid & isfinite (xRes->data.F32[i]); 359 isValid = isValid & isfinite (yRes->data.F32[i]); 360 if (isValid) { 361 psVectorAppend (xPosValid, xFit->data.F32[i]); 362 psVectorAppend (yPosValid, yFit->data.F32[i]); 363 psVectorAppend (xResValid, xRes->data.F32[i]); 364 psVectorAppend (yResValid, yRes->data.F32[i]); 365 } 366 367 // for the systematic error, use only high S/N stars 347 368 if (rawStar->dMag > 0.02) continue; 348 369 … … 377 398 results->dYrange = pmAstromVectorRange (yResGood, 0.1, 0.9, results->yStats->clippedStdev); 378 399 379 results->dXstdev = pmAstrom2DSystematics (x Fit, yFit, xRes);380 results->dYstdev = pmAstrom2DSystematics (x Fit, yFit, yRes);381 } 382 383 psTrace ("psModules.astrom", 3, "dXsys: %f, dXrange: %f \n", results->dXsys, results->dXrange);384 psTrace ("psModules.astrom", 3, "dYsys: %f, dYrange: %f \n", results->dYsys, results->dYrange);400 results->dXstdev = pmAstrom2DSystematics (xPosValid, yPosValid, xResValid); 401 results->dYstdev = pmAstrom2DSystematics (xPosValid, yPosValid, yResValid); 402 } 403 404 psTrace ("psModules.astrom", 3, "dXsys: %f, dXrange: %f, dXstdev: %f\n", results->dXsys, results->dXrange, results->dXstdev); 405 psTrace ("psModules.astrom", 3, "dYsys: %f, dYrange: %f, dYstdev: %f\n", results->dYsys, results->dYrange, results->dYstdev); 385 406 386 407 psFree (xErr); … … 390 411 psFree (xResGood); 391 412 psFree (yResGood); 413 psFree (xPosValid); 414 psFree (yPosValid); 415 psFree (xResValid); 416 psFree (yResValid); 392 417 393 418 psFree (x); -
branches/eam_branches/ipp-dev-20210817/psModules/src/astrom/pmAstrometryObjects.h
r39926 r41814 102 102 double dXrange; ///< 10% - 90% range X residuals (unmasked, high S/N) 103 103 double dYrange; ///< 10% - 90% range Y residuals (unmasked, high S/N) 104 double dXstdev; ///< stdev of median residual in NxN bins 105 double dYstdev; ///< stdev of median residual in NxN bins 104 106 } 105 107 pmAstromFitResults;
Note:
See TracChangeset
for help on using the changeset viewer.
