- Timestamp:
- Oct 24, 2012, 3:56:18 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120905/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905/psphot
- Property svn:mergeinfo changed
/trunk/psphot merged: 34492-34493,34528,34540,34542,34559-34560
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/psphot/src
- Property svn:mergeinfo changed
/trunk/psphot/src merged: 34492-34493,34528,34540,34542,34559-34560
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/psphot/src/psphotSourceMatch.c
r34354 r34570 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.
