- 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/psphotDeblendSatstars.c
r34416 r34570 544 544 float logRdel = 0.1; 545 545 546 float Xc = source->satstar->Xo - source->pixels->col0 - 0.5; 547 float Yc = source->satstar->Yo - source->pixels->row0 - 0.5; 548 psVector *logRmodel = source->satstar->logRmodel; 549 psVector *logFmodel = source->satstar->logFmodel; 546 pmSourceSatstar *satstar = source->satstar ? source->satstar : (source->parent ? source->parent->satstar : NULL); 547 psAssert (satstar, "null satstar"); 548 float Xc = satstar->Xo - source->pixels->col0 - 0.5; 549 float Yc = satstar->Yo - source->pixels->row0 - 0.5; 550 psVector *logRmodel = satstar->logRmodel; 551 psVector *logFmodel = satstar->logFmodel; 550 552 551 553 for (int iy = 0; iy < source->pixels->numRows; iy++) { … … 1048 1050 } 1049 1051 1052 // the return state indicates if any sources were actually subtracted 1050 1053 bool psphotAddOrSubSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int fileIndex, psMetadata *recipe, bool add) { 1051 1054 1052 1055 bool status; 1056 bool modified = false; 1053 1057 1054 1058 psTimerStart ("psphot.deblend.sat"); … … 1065 1069 1066 1070 psArray *sources = detections->allSources; 1067 psAssert (sources, "missing sources?"); 1071 // if no work to do, should just return false 1072 if (!sources) return false; 1068 1073 1069 1074 if (!sources->n) { 1070 1075 psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping satstar blend"); 1071 return true;1076 return false; 1072 1077 } 1073 1078 … … 1082 1087 if (!(source->mode2 & PM_SOURCE_MODE2_SATSTAR_PROFILE)) continue; 1083 1088 1089 // tell the calling function that we modified the image 1090 modified = true; 1091 1084 1092 if (!psphotSatstarProfileOp (source, maskVal, 1.0, 0, add)) continue; 1085 1093 } 1086 1094 1087 1095 psLogMsg ("psphot", PS_LOG_DETAIL, "satstar op: %f sec\n", psTimerMark ("psphot.deblend.sat")); 1088 return true;1096 return modified; 1089 1097 } 1090 1098
Note:
See TracChangeset
for help on using the changeset viewer.
