IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 12, 2006, 8:59:15 PM (20 years ago)
Author:
eugene
Message:

tests on non-poisson errors, updates to image background, tests of systematic biases, updates to use pmFPAfile paradigm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotModelTest.c

    r6727 r6851  
    1010    char name[64];
    1111    pmPSF *psf = NULL;
     12    pmSourceFitMode fitMode;
    1213
    1314    psMetadataItem *item  = NULL;
     15
     16    // use poissonian errors or local-sky errors
     17    bool POISSON_ERRORS = psMetadataLookupBool (&status, recipe, "POISSON_ERRORS");
     18    if (!status) POISSON_ERRORS = true;
     19    pmSourceFitModelInit (15, 0.1, POISSON_ERRORS);
    1420
    1521    // run model fitting tests on a single source
     
    1723
    1824    // what fitting mode to use?
    19     char *psfModeWord = psMetadataLookupStr (&status, recipe, "TEST_FIT_MODE");
     25    char *fitModeWord = psMetadataLookupStr (&status, recipe, "TEST_FIT_MODE");
    2026    if (!status) {
    21         psfModeWord = DEFAULT_MODE;
     27        fitModeWord = DEFAULT_MODE;
    2228    }
    23     bool psfMode = !strcasecmp (psfModeWord, "PSF");
     29    fitMode = PM_SOURCE_FIT_EXT;
     30    if (!strcasecmp (fitModeWord, "PSF")) fitMode = PM_SOURCE_FIT_PSF;
    2431
    25     // in psfMode, psf sets the model type
    26     if (psfMode) {
     32    // in fitMode, psf sets the model type
     33    if (fitMode == PM_SOURCE_FIT_PSF) {
    2734        char *psfFile = psMetadataLookupStr (&status, recipe, "PSF_INPUT_FILE");
    2835        if (!status) psAbort ("psphotModelTest", "PSF_INPUT_FILE not supplied");
     
    128135    fprintf (stderr, "peak: %f @ (%f, %f)\n", source->moments->Sum*area, (double)source->peak->x, (double)source->peak->y);
    129136
    130     if (psfMode) {
     137    if (fitMode == PM_SOURCE_FIT_PSF) {
    131138        pmModel *modelPSF = pmModelFromPSF (model, psf);
    132139        psFree (model);
     
    155162    char *fitset = psMetadataLookupStr (&status, recipe, "TEST_FIT_SET");
    156163    if (status) {
    157         status = psphotFitSet (source, model, fitset, psfMode);
     164        status = psphotFitSet (source, model, fitset, fitMode);
    158165        exit (0);
    159166    }
    160167
    161     status = pmSourceFitModel (source, model, psfMode);
     168    status = pmSourceFitModel (source, model, fitMode);
    162169
    163170    // measure the source mags
Note: See TracChangeset for help on using the changeset viewer.