IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34179


Ignore:
Timestamp:
Jul 19, 2012, 12:02:03 PM (14 years ago)
Author:
eugene
Message:

subtract background in psphotReadoutMinimal (should be optional); set ApResidPSF to 0.0 if PSF stars not available

Location:
branches/eam_branches/ipp-20120627/psphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120627/psphot/src/psphotReadoutMinimal.c

    r34172 r34179  
    2525    // Generate the mask and weight images, including the user-defined analysis region of interest
    2626    psphotSetMaskAndVariance (config, view, filerule);
     27
     28    // only subtract background if needed?
     29    if (1) {
     30      // generate a background model (median, smoothed image)
     31      if (!psphotModelBackground (config, view, filerule)) {
     32        return psphotReadoutCleanup (config, view, filerule);
     33      }
     34      if (!psphotSubtractBackground (config, view, filerule)) {
     35        return psphotReadoutCleanup (config, view, filerule);
     36      }
     37    }
    2738
    2839    // load the psf model, if suppled.  FWHM_X,FWHM_Y,etc are saved on readout->analysis
  • branches/eam_branches/ipp-20120627/psphot/src/psphotSourceSize.c

    r34172 r34179  
    456456    psImageMaskType maskVal = options->maskVal | options->markVal;
    457457
     458    // in the ppSub context, do we get sensible values for ApResid?
     459    float ApResidPSF = options->ApResid;
     460    if (!isfinite(ApResidPSF)) {
     461      ApResidPSF = 0.0;
     462    }
     463    float ApSysErrPSF = options->ApSysErr;
     464    if (!isfinite(ApSysErrPSF)) {
     465      ApSysErrPSF = 0.0;
     466    }
     467
    458468    for (psS32 i = 0 ; i < sources->n ; i++) {
    459469
     
    521531        }
    522532
    523         // XXX in the ppSub context, do we get sensible values for ApResid?
    524 
    525533        // set nSigmaMAG to include both systematic and poisson error terms.  we include a hard
    526534        // floor on the Ap Sys Err (to be a bit generous).  XXX put the floor in the recipe...
    527         float nSigmaMAG = (dMag - options->ApResid) / hypot(source->psfMagErr, hypot(options->ApSysErr, 0.02));
     535        float nSigmaMAG = (dMag - ApResidPSF) / hypot(source->psfMagErr, hypot(ApSysErrPSF, 0.02));
    528536        source->extNsigma = nSigmaMAG;
    529537
Note: See TracChangeset for help on using the changeset viewer.