Changeset 31654
- Timestamp:
- Jun 21, 2011, 6:18:28 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110505/psModules/src/objects
- Files:
-
- 3 edited
-
pmSourceMasks.h (modified) (1 diff)
-
pmSourcePhotometry.c (modified) (2 diffs)
-
pmSourcePhotometry.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110505/psModules/src/objects/pmSourceMasks.h
r31451 r31654 53 53 54 54 PM_SOURCE_MODE2_PASS1_SRC = 0x00000080, ///< source detected in first pass analysis 55 56 PM_SOURCE_MODE2_HAS_BRIGHTER_NEIGHBOR = 0x00000100, ///< peak is not the brightest in its footprint 57 PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_1 = 0x00000200, ///< flux_n / (r^2 flux_p) > 1 58 PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_10 = 0x00000400, ///< flux_n / (r^2 flux_p) > 10 55 59 } pmSourceMode2; 56 60 -
branches/eam_branches/ipp-20110505/psModules/src/objects/pmSourcePhotometry.c
r31459 r31654 191 191 } 192 192 193 pmSourceNeighborFlags (source); 194 193 195 // measure the aperture magnitude, if (SN > AP_MIN_SN) 194 196 if (!isfinite(SN)) { … … 264 266 265 267 */ 268 269 bool pmSourceNeighborFlags (pmSource *source) { 270 271 return false; 272 273 // source must have a peak to have a footprint 274 if (!source) return false; 275 if (!source->peak) return false; 276 if (!source->peak->footprint) return false; 277 if (!source->peak->footprint->peaks) return false; 278 if (!source->peak->footprint->peaks->n) return false; 279 280 // find the brightest peak (first peak) 281 pmPeak *brightPeak = source->peak->footprint->peaks->data[0]; 282 283 // are we the brightest peak? 284 if (source->peak == brightPeak) return true; 285 286 // if not, raise a flag: 287 source->mode2 |= PM_SOURCE_MODE2_HAS_BRIGHTER_NEIGHBOR; 288 289 // but, this is a common situation. more interesting is if the ratio flux_n / (r^2 flux_o) is large 290 291 float radius2 = PS_SQR(source->peak->xf - brightPeak->xf) + PS_SQR(source->peak->yf - brightPeak->yf); 292 293 float ratio = brightPeak->rawFlux / (source->peak->rawFlux * radius2); 294 295 if (ratio > 1) { 296 source->mode2 |= PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_1; 297 } 298 299 if (ratio > 10) { 300 source->mode2 |= PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_10; 301 } 302 303 return true; 304 } 266 305 267 306 // return source model magnitude -
branches/eam_branches/ipp-20110505/psModules/src/objects/pmSourcePhotometry.h
r31451 r31654 79 79 double pmSourceModelWeight(const pmSource *Mi, int term, const bool unweighted_sum, const float covarFactor, psImageMaskType maskVal); 80 80 81 bool pmSourceNeighborFlags (pmSource *source); 82 81 83 // retire these: 82 84 // double pmSourceCrossProduct(const pmSource *Mi, const pmSource *Mj, const bool unweighted_sum);
Note:
See TracChangeset
for help on using the changeset viewer.
