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/psphotGrowthCurve.c

    r13035 r13900  
    77// XXX add a option to turn off the curve-of-growth (ie, make the apMag = fitMag everywhere);
    88
    9 bool psphotGrowthCurve (pmReadout *readout, pmPSF *psf, bool ignore) {
     9bool psphotGrowthCurve (pmReadout *readout, pmPSF *psf, bool ignore, psMaskType maskVal) {
    1010
    1111    // bool status;
     
    4545
    4646    // loop over a range of source fluxes
    47     // no need to interpolate since we have force the object center 
     47    // no need to interpolate since we have force the object center
    4848    // to 0.5, 0.5 above
    4949    for (int i = 0; i < psf->growth->radius->n; i++) {
     
    5353        radius = psf->growth->radius->data.F32[i];
    5454
    55         // NOTE: we use pmModelAdd not pmSourceAdd because we are not working with a normal source
     55        // NOTE: we use pmModelAdd not pmSourceAdd because we are not working with a normal source
    5656        psImageKeepCircle (mask, xc, yc, radius, "OR", PM_MASK_MARK);
    57         pmModelAdd (image, mask, model, PM_MODEL_OP_FULL);
    58         pmSourcePhotometryAper (&apMag, model, image, mask);
     57        pmModelAdd (image, mask, model, PM_MODEL_OP_FULL, maskVal);
     58        pmSourcePhotometryAper (&apMag, model, image, mask, maskVal);
    5959        psImageKeepCircle (mask, xc, yc, radius, "AND", PS_NOT_U8(PM_MASK_MARK));
    6060
    61         // the 'ignore' mode is for testing
    62         if (ignore) {
    63             psf->growth->apMag->data.F32[i] = fitMag;
    64         } else {
    65             psf->growth->apMag->data.F32[i] = apMag;
    66         }
     61        // the 'ignore' mode is for testing
     62        if (ignore) {
     63            psf->growth->apMag->data.F32[i] = fitMag;
     64        } else {
     65            psf->growth->apMag->data.F32[i] = apMag;
     66        }
    6767    }
    6868
Note: See TracChangeset for help on using the changeset viewer.