Changeset 26596
- Timestamp:
- Jan 14, 2010, 10:21:12 AM (16 years ago)
- Location:
- branches/eam_branches/20091201/psphot/src
- Files:
-
- 9 edited
-
psphotFindDetections.c (modified) (1 diff)
-
psphotFindPeaks.c (modified) (1 diff)
-
psphotModelTest.c (modified) (1 diff)
-
psphotMomentsStudy.c (modified) (1 diff)
-
psphotPSFConvModel.c (modified) (1 diff)
-
psphotReadout.c (modified) (1 diff)
-
psphotReadoutMinimal.c (modified) (1 diff)
-
psphotSourceFits.c (modified) (1 diff)
-
psphotSourceStats.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/psphot/src/psphotFindDetections.c
r26540 r26596 53 53 psMetadataAddF32 (recipe, PS_LIST_TAIL, "PEAK_THRESHOLD", PS_META_REPLACE, "Peak Detection Threshold", threshold); 54 54 if (!detections->peaks) { 55 // No peaks found 55 // we only get a NULL peaks array due to a programming or config error. 56 // this will result in a failure. 57 psFree (detections); 58 psError (PSPHOT_ERR_CONFIG, false, "failed on peak search"); 56 59 return NULL; 57 60 } -
branches/eam_branches/20091201/psphot/src/psphotFindPeaks.c
r25755 r26596 13 13 psArray *peaks = pmPeaksInImage (significance, threshold); 14 14 if (peaks == NULL) { 15 // XXX should we be sending back an empty array instead of NULL? 16 // XXX this may also be due to a programming or config error 15 // we only get a NULL peaks array due to a programming or config error. 16 // this will result in a failure. 17 psError(PSPHOT_ERR_DATA, false, "no peaks found in this image"); 18 return NULL; 19 } 20 21 if (peaks->n == 0) { 17 22 // XXX do we need to set something in the readout->analysis to indicate that 18 23 // we tried and failed to find peaks (something in the header data) 19 psError(PSPHOT_ERR_DATA, false, "no peaks found in this image");20 return false;24 psLogMsg ("psphot", PS_LOG_INFO, "no peaks found in this image"); 25 return peaks; 21 26 } 22 27 -
branches/eam_branches/20091201/psphot/src/psphotModelTest.c
r24588 r26596 139 139 140 140 // get the source moments 141 status = pmSourceMoments (source, mRADIUS, 0.0, 1.0 );141 status = pmSourceMoments (source, mRADIUS, 0.0, 1.0, maskVal); 142 142 if (!status) psAbort("psSourceMoments error"); 143 143 source->peak->value = source->moments->Peak; -
branches/eam_branches/20091201/psphot/src/psphotMomentsStudy.c
r24585 r26596 148 148 pmSourceAdd(source, PM_MODEL_OP_FUNC, 0); 149 149 150 pmSourceMoments (source, 32.0, sigWindow, 0.0 );150 pmSourceMoments (source, 32.0, sigWindow, 0.0, 0xffff); 151 151 // fprintf (stderr, "sigOut : %f\n", sqrt(source->moments->Mxx)); 152 152 -
branches/eam_branches/20091201/psphot/src/psphotPSFConvModel.c
r25755 r26596 39 39 // adjust the pixels based on the footprint 40 40 float radius = psphotSetRadiusEXT (readout, source, markVal); 41 if (!pmSourceMoments (source, radius, 0.0, 0.0 )) return false;41 if (!pmSourceMoments (source, radius, 0.0, 0.0, maskVal)) return false; 42 42 43 43 // XXX test : modify the Io, SXX, SYY terms based on the psf SXX, SYY terms: -
branches/eam_branches/20091201/psphot/src/psphotReadout.c
r26542 r26596 76 76 pmDetections *detections = psphotFindDetections (NULL, readout, recipe); 77 77 if (!detections) { 78 // this only happens if we had an error in psphotFindDetections 79 psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis"); 80 return psphotReadoutCleanup (config, readout, recipe, detections, psf, NULL); 81 } 82 if (!detections->peaks->n) { 78 83 psLogMsg ("psphot", 3, "unable to find detections in this image"); 79 84 return psphotReadoutCleanup (config, readout, recipe, detections, psf, NULL); -
branches/eam_branches/20091201/psphot/src/psphotReadoutMinimal.c
r26542 r26596 51 51 detections = psphotFindDetections(detections, readout, recipe); 52 52 if (!detections) { 53 psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis"); 54 return psphotReadoutCleanup (config, readout, recipe, detections, psf, NULL); 55 } 56 if (!detections->peaks->n) { 53 57 psLogMsg ("psphot", 3, "unable to find detections in this image"); 54 58 return psphotReadoutCleanup (config, readout, recipe, detections, psf, NULL); -
branches/eam_branches/20091201/psphot/src/psphotSourceFits.c
r26507 r26596 235 235 // at this stage, skip Gaussian windowing, and do not clip pixels by S/N 236 236 // this uses the footprint to judge both radius and aperture? 237 if (!pmSourceMoments (source, radius, 0.0, 0.0 )) return false;237 if (!pmSourceMoments (source, radius, 0.0, 0.0, maskVal)) return false; 238 238 239 239 psTrace ("psphot", 5, "trying blob...\n"); -
branches/eam_branches/20091201/psphot/src/psphotSourceStats.c
r26317 r26596 325 325 326 326 // measure basic source moments (no S/N clipping on input pixels) 327 status = pmSourceMoments (source, RADIUS, SIGMA, 0.0 );327 status = pmSourceMoments (source, RADIUS, SIGMA, 0.0, maskVal); 328 328 if (status) { 329 329 Nmoments ++; … … 335 335 BIG_RADIUS = PS_MIN (INNER, 3*RADIUS); 336 336 psTrace ("psphot", 4, "retrying moments for %d, %d\n", source->peak->x, source->peak->y); 337 status = pmSourceMoments (source, BIG_RADIUS, 3.0*SIGMA, 0.0 );337 status = pmSourceMoments (source, BIG_RADIUS, 3.0*SIGMA, 0.0, maskVal); 338 338 if (status) { 339 339 source->mode |= PM_SOURCE_MODE_BIG_RADIUS; … … 394 394 395 395 // measure basic source moments (no S/N clipping on input pixels) 396 status = pmSourceMoments (source, 4*sigma[i], sigma[i], 0.0 );396 status = pmSourceMoments (source, 4*sigma[i], sigma[i], 0.0, 0xffff); 397 397 } 398 398
Note:
See TracChangeset
for help on using the changeset viewer.
