IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25609


Ignore:
Timestamp:
Sep 27, 2009, 10:49:56 AM (17 years ago)
Author:
eugene
Message:

allow variance to be adjusted by a softening amount for bright values (not a clear success)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psphot/src/psphotMaskReadout.c

    r24484 r25609  
    3333    }
    3434
     35    bool softenVariance = psMetadataLookupBool (&status, recipe, "SOFTEN.VARIANCE");
     36    float softenFraction = psMetadataLookupF32 (&status, recipe, "SOFTEN.VARIANCE.FRACTION");
     37
    3538    // make this an option via the recipe
    36     if (0) {
     39    if (softenVariance) {
    3740      psImage *im = readout->image;
    3841      psImage *wt = readout->variance;
    39       psImage *mk = readout->mask;
    4042      for (int j = 0; j < im->numRows; j++) {
    4143        for (int i = 0; i < im->numCols; i++) {
    42           if (isfinite(im->data.F32[j][i]) && isfinite(wt->data.F32[j][i])) continue;
    43           mk->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskBad;
     44            if (!isfinite(im->data.F32[j][i])) continue;
     45            if (!isfinite(wt->data.F32[j][i])) continue;
     46            float sysError = softenFraction * im->data.F32[j][i];
     47            wt->data.F32[j][i] += PS_SQR(sysError);
    4448        }
    4549      }
Note: See TracChangeset for help on using the changeset viewer.