IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 7, 2012, 10:51:18 AM (14 years ago)
Author:
eugene
Message:

merge changes from eam_branch/ipp-20120905: add satstar profile to psphotStackReadout; skip negative fluxes in standard psphotReadout; replace mask pixel values when growing the CR mask; mask cores of 1st pass sources to avoid excessively close detections; add SUBTRACT_SATSTAR_PROFILE to psphot recipe

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/psphot

  • trunk/psphot/src

  • trunk/psphot/src/psphotStackReadout.c

    r34354 r34418  
    169169    }
    170170
     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
    171189    // if we were not supplied a PSF model, determine the IQ stats here (detections->newSources)
    172190    // only run this on detections from the input images, not chisq image
     
    206224    // window of size PSF_MOMENTS_RADIUS (same window used to measure the psf-scale moments)
    207225    // but iterates to an appropriately larger size
    208         logMemStats("before.kron.1");
     226    logMemStats("before.kron.1");
    209227    psphotKronIterate(config, view, STACK_SRC, 1);
    210         logMemStats("after.kron.1");
    211 
     228    logMemStats("after.kron.1");
     229       
    212230    // identify CRs and extended sources
    213231    psphotSourceSize (config, view, STACK_SRC, true);
     
    332350    psphotStackObjectsSelectForAnalysis (config, view, STACK_SRC, objects);
    333351
    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)
    342355
    343356    // measure the radial profiles to the sky (only measures new objects)
Note: See TracChangeset for help on using the changeset viewer.