IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 1:32:31 PM (15 years ago)
Author:
eugene
Message:
  • clarified the output to show the stages and their timing more clearly
  • psphotStackReadout now uses the same functions as psphotReadout (deprecated FitLinearStack, ExtendedAnalysisByObject, RadialAnalysisByObject, etc)
  • psphotStack now does 2nd (5 sigma) detection pass and radial photometry of the un-matched image (as well as the matched images)
  • for speed, fitting uses a smaller subset of pixels than subtraction: the model is extended when the subtraction is performed to avoid a discontinuity
  • extended source analysis (petrosians) is threaded
  • iterative kron radius / magnitude analysis with down-weighted neighbors replaces the masked neighbor kron analysis. the result of this analysis is used by fitting guesses and is the value written to the PSF and XFIT tables.
  • the target matched PSFs are determined in advance and the 0 element of this array is always the unmatched image (with target PSF of NAN)
  • dQ, the difference between the upper and lower quartile, is measured (but not yet used to adjust the sky level. sky should be FITTED_MEAN - 2.5*dQ
  • fake sources inserted for the efficiency analysis are removed at the end of the analysis
  • radial apertures is now threaded
  • edge case petrosian mags are now handled without aborts (may still have a problem with the measured error of the petrosian radius)
  • new sersic model guess based on the psf size, the moments, and the kron flux. the psf - kron mag is used to guess the index, then the index is used to convert measured moments into model guess parameters. this uses empirical relationships between the quantities generated from fake images.
  • define the fit region and window region based on the 1st radial moments
  • use the kron S/N to determine if analysis is performed for extended sources, not the psf S/N
  • remove the old 'basic deblend' which did not really do any deblending and is superceeded by the deblending in KronIterate and the footprint analysis
Location:
trunk/psphot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

  • trunk/psphot/src

    • Property svn:ignore
      •  

        old new  
        2222psphotMakePSF
        2323psphotStack
         24psphotModelTest
  • trunk/psphot/src/psphotFitSourcesLinearStack.c

    r31452 r32348  
    6464          // turn this bit off and turn it on again if we keep this source
    6565          source->mode &= ~PM_SOURCE_MODE_LINEAR_FIT;
     66
     67          // skip non-astronomical objects (very likely defects)
     68          if (source->type == PM_SOURCE_TYPE_DEFECT) continue;
     69          if (source->type == PM_SOURCE_TYPE_SATURATED) continue;
     70
     71          // do not include CRs in the full ensemble fit
     72          if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue;
     73
     74          // do not include MOMENTS_FAILURES in the fit
     75          if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) continue;
     76
     77          if (final) {
     78              if (source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED) continue;
     79          } else {
     80              // if (source->mode & PM_SOURCE_MODE_BLEND) continue;
     81          }
    6682
    6783          // generate model for sources without, or skip if we can't
     
    8399          }
    84100
    85           source->mode |= PM_SOURCE_MODE_LINEAR_FIT;
     101          bool isPSF = false;
     102          pmModel *model = pmSourceGetModel (&isPSF, source);
     103
     104          // clear the 'mark' pixels and remask on the fit aperture
     105          psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal));
     106          psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, model->fitRadius, "OR", markVal);
     107
     108          // we call this function multiple times. for the first time, we have only PSF models for all objects
     109          // the second time has extended sources.  If we ever fit the PSF model, we should raise this bit
     110          source->mode |= PM_SOURCE_MODE_LINEAR_FIT;
     111          if (isPSF) {
     112              source->mode |= PM_SOURCE_MODE_PSFMODEL;
     113          }         
    86114          psArrayAdd (fitSources, 100, source);
    87115        }
     
    166194        model->params->data.F32[PM_PAR_I0] = norm->data.F32[i];
    167195        model->dparams->data.F32[PM_PAR_I0] = errors->data.F32[i];
     196
     197        // clear the 'mark' pixels so the subtraction covers the full window
     198        psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal));
    168199
    169200        // subtract object
     
    190221    psFree (errors);
    191222
    192     psLogMsg ("psphot.ensemble", PS_LOG_INFO, "measure ensemble of PSFs: %f sec\n", psTimerMark ("psphot.linear"));
     223    psLogMsg ("psphot.ensemble", PS_LOG_WARN, "measure ensemble of PSFs: %f sec\n", psTimerMark ("psphot.linear"));
    193224    return true;
    194225}
Note: See TracChangeset for help on using the changeset viewer.