- Timestamp:
- Dec 6, 2012, 6:32:19 PM (14 years ago)
- Location:
- branches/czw_branch/20120906/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot (added) merged: 34408-34409,34415-34416,34428,34466,34565,34570,34575,34735,34747
- Property svn:mergeinfo changed
-
branches/czw_branch/20120906/psphot/src
- Property svn:mergeinfo changed
-
branches/czw_branch/20120906/psphot/src/psphotStackReadout.c
r34354 r34772 169 169 } 170 170 171 // If DET and SRC are different images, subtract radial profiles for the convolved 172 // image first. The profiles found on the convolved image will be replaced by those 173 // found for the unconvolved image. Downstream, in psphotFindDetections, we will 174 // replace the the profiles (and re-subtract them) for the detection image, so we want 175 // to keep those versions of the profiles on the sources. 176 if (strcmp(STACK_SRC, STACK_DET)) { 177 // find and subtract radial profile models for saturated stars (XXX change name eventually) 178 if (!psphotDeblendSatstars (config, view, STACK_SRC)) { 179 psError (PSPHOT_ERR_UNKNOWN, false, "failed on satstar deblend analysis"); 180 return psphotReadoutCleanup (config, view, STACK_SRC); 181 } 182 } 183 // find and subtract radial profile models for saturated stars (XXX change name eventually) 184 if (!psphotDeblendSatstars (config, view, STACK_DET)) { 185 psError (PSPHOT_ERR_UNKNOWN, false, "failed on satstar deblend analysis"); 186 return psphotReadoutCleanup (config, view, STACK_SRC); 187 } 188 171 189 // if we were not supplied a PSF model, determine the IQ stats here (detections->newSources) 172 190 // only run this on detections from the input images, not chisq image … … 206 224 // window of size PSF_MOMENTS_RADIUS (same window used to measure the psf-scale moments) 207 225 // but iterates to an appropriately larger size 208 logMemStats("before.kron.1");226 logMemStats("before.kron.1"); 209 227 psphotKronIterate(config, view, STACK_SRC, 1); 210 logMemStats("after.kron.1");211 228 logMemStats("after.kron.1"); 229 212 230 // identify CRs and extended sources 213 231 psphotSourceSize (config, view, STACK_SRC, true); … … 332 350 psphotStackObjectsSelectForAnalysis (config, view, STACK_SRC, objects); 333 351 334 if (splitLinearFit) { 335 // NOTE: apply to Matched sources. Since the sources that we fit above are subtracted, they will 336 // not be included in this fit. 337 psphotFitSourcesLinear (config, view, STACK_SRC, true, false); // pass 4 (detections->allSources) 338 } else { 339 // Fit all sources together 340 psphotFitSourcesLinear (config, view, STACK_SRC, true, false); // pass 3 (detections->allSources) 341 } 352 // final linear fit. NOTE: if splitLinearFit is true above, this pass will only fit 353 // the unsubtracted (matched) sources (the sources that we fit above are subtracted) 354 psphotFitSourcesLinear (config, view, STACK_SRC, true, false); // pass 4 (detections->allSources) 342 355 343 356 // measure the radial profiles to the sky (only measures new objects) … … 356 369 psMemDump("psfstats"); 357 370 358 // drop matched sources without any useful measurements 359 psphotDropBadMatchedSources (config, view, STACK_SRC, objects); 371 // drop matched sources without any useful measurements and set kron radii for the ones 372 // we decide to keep 373 psphotFilterMatchedSources (config, view, STACK_SRC, objects); 374 375 // measure kron fluxes for the matched sources only 376 psphotKronIterate(config, view, STACK_SRC, 3); 360 377 361 378 // measure elliptical apertures, petrosians (objects sorted by S/N) … … 392 409 } 393 410 } 411 // mark any inputs that we want to skip the matched apertures for 412 psphotStackSetInputsToSkip(config, view, STACK_CNV, true); 413 psphotStackSetInputsToSkip(config, view, STACK_OUT, true); 394 414 psphotRadialApertures (config, view, STACK_CNV, 0); // entry 0 == unmatched 395 415 psMemDump("extmeas"); 396 416 397 // mark any inputs that we want to skip the matched apertures for398 psphotStackSetInputsToSkip(config, view, STACK_OUT, true);399 417 400 418 int nRadialEntries = psphotStackMatchPSFsEntries(config, view, STACK_OUT); … … 422 440 } 423 441 } 442 psphotStackSetInputsToSkip(config, view, STACK_CNV, false); 424 443 psphotStackSetInputsToSkip(config, view, STACK_OUT, false); 425 444
Note:
See TracChangeset
for help on using the changeset viewer.
