- Timestamp:
- Dec 6, 2012, 6:32:19 PM (14 years ago)
- Location:
- branches/czw_branch/20120906/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot (added) merged: 34408-34409,34415-34416,34428,34466,34565,34570,34575,34735,34747
- Property svn:mergeinfo changed
-
branches/czw_branch/20120906/psphot/src
- Property svn:mergeinfo changed
-
branches/czw_branch/20120906/psphot/src/psphotSourceMatch.c
r34354 r34772 559 559 } 560 560 561 bool psphot DropBadMatchedSources (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects) {561 bool psphotFilterMatchedSources (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects) { 562 562 563 563 bool status = false; 564 564 565 psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Drop BadMatched Sources ---");565 psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Filter Matched Sources ---"); 566 566 567 567 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); … … 615 615 psFree(dropped); 616 616 617 // find the "best" Mrf from the detected sources. 618 // Currently we use the smallest positive value 619 for (int i=0; i< objects->n; i++) { 620 pmPhotObj *obj = objects->data[i]; 621 622 float minMrf = 1000.; 623 bool hasMatched = false; 624 for (int j = 0; j < obj->sources->n; j++) { 625 pmSource *source = obj->sources->data[j]; 626 if (source->mode2 & PM_SOURCE_MODE2_MATCHED) { 627 hasMatched = true; 628 continue; 629 } 630 float Mrf = source->moments->Mrf; 631 if (isfinite(Mrf) && Mrf < minMrf && Mrf > 0) { 632 minMrf = Mrf; 633 } 634 } 635 636 if (!hasMatched || minMrf > 120.) { 637 continue; 638 } 639 640 // set Mrf for matched sources to the value found above 641 for (int j = 0; j < obj->sources->n; j++) { 642 pmSource *source = obj->sources->data[j]; 643 if (source->mode2 & PM_SOURCE_MODE2_MATCHED) { 644 source->moments->Mrf = minMrf; 645 } 646 } 647 } 648 617 649 return true; 618 650 }
Note:
See TracChangeset
for help on using the changeset viewer.
