Changeset 34246
- Timestamp:
- Jul 31, 2012, 11:47:07 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120627/psModules
- Files:
-
- 6 edited
-
. (modified) (1 prop)
-
src/config/pmConfig.c (modified) (1 diff)
-
src/imcombine/pmStack.c (modified) (2 diffs)
-
src/objects/pmFootprintCullPeaks.c (modified) (2 diffs)
-
src/objects/pmFootprintFind.c (modified) (4 diffs)
-
src/objects/pmPSFtryMakePSF.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120627/psModules
- Property svn:mergeinfo changed
/trunk/psModules merged: 34150,34156,34198-34199,34234
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120627/psModules/src/config/pmConfig.c
r30636 r34246 685 685 } else { 686 686 char *end = NULL; // Pointer to end of consumed string 687 seed = strto ll(argv[argNum], &end, 0);687 seed = strtoull(argv[argNum], &end, 0); 688 688 if (strlen(end) > 0) { 689 689 psError(PM_ERR_CONFIG, true, "Unable to read random number generator seed: %s", -
branches/eam_branches/ipp-20120627/psModules/src/imcombine/pmStack.c
r31721 r34246 357 357 sumWeight += weights->data.F32[i]; 358 358 if (variances) { 359 sumVarianceWeight += variances->data.F32[i] * PS_SQR(weights->data.F32[i]); 359 // sumVarianceWeight += variances->data.F32[i] * PS_SQR(weights->data.F32[i]); 360 sumVarianceWeight += 1 / variances->data.F32[i]; 360 361 } 361 362 if (exps) { … … 372 373 *mean = sumValueWeight / sumWeight; 373 374 if (var) { 374 *var = sumVarianceWeight / PS_SQR(sumWeight); 375 //*var = sumVarianceWeight / PS_SQR(sumWeight); 376 *var = 1 / sumVarianceWeight; 375 377 } 376 378 if (exp) { -
branches/eam_branches/ipp-20120627/psModules/src/objects/pmFootprintCullPeaks.c
r33578 r34246 118 118 threshbounds->data.F32[i] = 0.25*beta2*PS_SQR(i) + min_threshold; 119 119 } 120 #if (0) 120 121 if (threshbounds->data.F32[threshbounds->n-1] > maxFlux) { 121 122 psWarning ("upper limit: %f does not include max flux: %f", 122 123 threshbounds->data.F32[threshbounds->n-1], maxFlux); 123 124 } 125 #endif 124 126 psHistogram *threshist = psHistogramAllocGeneric(threshbounds); 125 127 … … 195 197 psImageInit(idImg, 0); 196 198 pmSetFootprintArrayIDsForImage(idImg, myFP, true); 197 199 198 200 // check which footprints contain already-accepted (brighter) peaks 199 201 // (we can give up if/when we found a peak for all footprints) -
branches/eam_branches/ipp-20120627/psModules/src/objects/pmFootprintFind.c
r29004 r34246 24 24 25 25 // XXX EAM : why use WSPAN in here rather than pmSpan? 26 // XXX WES : can't use pmSpan because does not have an id 26 27 typedef struct { /* run-length code for part of object*/ 27 28 int id; /* ID for object */ … … 114 115 115 116 in_span = 0; /* not in a span */ 117 int id_last_connection = 0; 116 118 for (j = 0; j < numCols; j++) { 117 119 double pixVal = floatImg->data.F32[i][j]; // Value of pixel 120 // If pixVal is less than threshold and we are working on a, span end it. 118 121 if (pixVal < threshold) { 122 // below threshold. If in a span close it out 119 123 if (in_span) { 120 124 if(nspan >= size_spans) { … … 130 134 131 135 in_span = 0; 136 id_last_connection = 0; 132 137 } 133 138 } else { /* a pixel to fix */ 139 // Above theshold. There are 5 choices for the id of this pixel based on whether they are 140 // part of a span (non-zero) 141 // This diagram shows the priority which we check 142 // 143 // col 144 // j-1 j j+1 145 // row i 1 5 146 // row i + 1 2 3 4 147 // 148 // In case 4 we have a pixel that is not connected to the left are connecting with 149 // an existing span so need to identify whether it is connected 150 // to the same footprint as the current span (if we are in one) 134 151 if(idc[j - 1] != 0) { 135 152 id = idc[j - 1]; … … 157 174 * Do we need to merge ID numbers? If so, make suitable entries in aliases[] 158 175 */ 159 if(idp[j + 1] != 0 && idp[j + 1] != id) { 160 aliases[resolve_alias(aliases, idp[j + 1])] = 161 resolve_alias(aliases, id); 162 163 idc[j] = id = idp[j + 1]; 176 if (idp[j + 1] != 0 && idp[j + 1] != id && idp[j + 1] != id_last_connection) { 177 int resolved_lower_right = resolve_alias(aliases, idp[j + 1]); 178 int resolved_current = resolve_alias(aliases, id); 179 aliases[resolved_lower_right] = resolved_current; 180 181 // now we choose the id to continue to use to set pixels in the current span. 182 // We choose the higher value because future alias resolutions will be faster 183 // since the alias chain goes from lower ids to higher. This is about 4 times 184 // faster for complex footprints. 185 if (resolved_current <= idp[j + 1]) { 186 idc[j] = id = idp[j + 1]; 187 id_last_connection = 0; 188 } else { 189 idc[j] = id = resolved_current; 190 id_last_connection = idp[j + 1]; 191 } 164 192 } 165 193 } -
branches/eam_branches/ipp-20120627/psModules/src/objects/pmPSFtryMakePSF.c
r34085 r34246 138 138 } 139 139 if (trend->mode == PM_TREND_MAP) { 140 // p_psImagePrint (2, trend->map->map, "param N Before"); // XXX TEST:141 140 psImageMapRepair (trend->map->map); 142 // p_psImagePrint (2, trend->map->map, "param N After"); // XXX TEST:143 141 } 144 142 } … … 246 244 return true; 247 245 } 246 if (trend->mode == PM_TREND_MAP) { 247 psImageMapRepair (trend->map->map); 248 } 248 249 249 250 # if (PS_TRACE_ON) … … 268 269 return true; 269 270 } 271 if (trend->mode == PM_TREND_MAP) { 272 psImageMapRepair (trend->map->map); 273 } 274 270 275 # if (PS_TRACE_ON) 271 276 mean = psStatsGetValue (trend->stats, meanOption); … … 285 290 return true; 286 291 } 292 if (trend->mode == PM_TREND_MAP) { 293 psImageMapRepair (trend->map->map); 294 } 295 287 296 # if (PS_TRACE_ON) 288 297 mean = psStatsGetValue (trend->stats, meanOption);
Note:
See TracChangeset
for help on using the changeset viewer.
