IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 19, 2007, 4:40:44 PM (19 years ago)
Author:
Paul Price
Message:

Extensive changes to APIs to allow use of a nominated value to mask
against (the maskVal). Previously, the mask values were either
hard-coded (e.g., PM_MASK_SAT) or taken as anything non-zero. The
code is tested with psModules (which has similar changes) and does not
crash, but neither is it successful in marking all bad pixels. For
this reason, I have left the "gutter" pixels (cell gaps) set to 0
instead of NAN in pmFPAMosaic.

File:
1 edited

Legend:

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

    r13035 r13900  
    33
    44// XXX consider this function : add more test information?
    5 bool psphotModelTest (pmReadout *readout, psMetadata *recipe) {
     5bool psphotModelTest (pmReadout *readout, psMetadata *recipe, psMaskType maskVal, psMaskType mark) {
    66
    77    bool status;
     
    9494
    9595    // find the local sky
    96     status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER);
     96    status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark);
    9797    if (!status) psAbort("pmSourceLocalSky error");
    9898
     
    159159
    160160    // define the pixels used for the fit
    161     psImageKeepCircle (source->maskObj, xObj, yObj, RADIUS, "OR", PM_MASK_MARK);
     161    psImageKeepCircle (source->maskObj, xObj, yObj, RADIUS, "OR", mark);
    162162
    163163    char *fitset = psMetadataLookupStr (&status, recipe, "TEST_FIT_SET");
    164164    if (status) {
    165         status = psphotFitSet (source, model, fitset, fitMode);
     165        status = psphotFitSet (source, model, fitset, fitMode, maskVal);
    166166        exit (0);
    167167    }
    168168
    169     status = pmSourceFitModel (source, model, fitMode);
     169    status = pmSourceFitModel (source, model, fitMode, maskVal);
    170170
    171171    // measure the source mags
    172172    pmSourcePhotometryModel (&fitMag, model);
    173     pmSourcePhotometryAper  (&obsMag, model, source->pixels, source->maskObj);
     173    pmSourcePhotometryAper  (&obsMag, model, source->pixels, source->maskObj, maskVal);
    174174    fprintf (stderr, "ap: %f, fit: %f, apmifit: %f\n", obsMag, fitMag, obsMag - fitMag);
    175175
     
    178178
    179179    // subtract object, leave local sky
    180     pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
     180    pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL, maskVal);
    181181
    182182    fprintf (stderr, "output parameters: \n");
Note: See TracChangeset for help on using the changeset viewer.