IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 17, 2005, 10:26:59 AM (21 years ago)
Author:
eugene
Message:

clean up of small accounting bugs, adding the post-subtraction ApResid

File:
1 edited

Legend:

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

    r5755 r5802  
    6767    source->peak->counts = source->moments->Peak;
    6868
     69    fprintf (stderr, "sum: %f\n", source->moments->Sum);
     70
    6971    // get the initial model parameter guess
    7072    pmModel *model = pmSourceModelGuess (source, modelType);
     
    7375    psF32 *params = model->params->data.F32;
    7476    for (int i = 0; i < nParams; i++) {
     77        if (i == 2) {
     78            params[i] = xObj;
     79            continue;
     80        }
     81        if (i == 3) {
     82            params[i] = yObj;
     83            continue;
     84        }
    7585        sprintf (name, "TEST_FIT_PAR%d", i);
    7686        value = psMetadataLookupF32 (&status, config, name);
    7787        if (status) {
     88            fprintf (stderr, "using supplied value %f for PAR %d\n", value, i);
    7889            params[i] = value;
     90        } else {
     91            fprintf (stderr, "using guessed  value %f for PAR %d\n", params[i], i);
    7992        }
    8093    }
     94
     95    float area = params[4]*params[5];
     96    fprintf (stderr, "peak: %f\n", source->moments->Sum*area);
    8197
    8298    // what fitting mode to use?
     
    98114    pmSourceSubModel (source->pixels, source->mask, model, false, false);
    99115   
     116    for (int i = 0; i < nParams; i++) {
     117        fprintf (stderr, "result value %f for PAR %d\n", params[i], i);
     118    }
     119
    100120    // write out
    101121    DumpImage (source->pixels, "resid.fits");
Note: See TracChangeset for help on using the changeset viewer.