IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15602


Ignore:
Timestamp:
Nov 13, 2007, 10:29:16 AM (18 years ago)
Author:
Paul Price
Message:

Changing nature of bad pixels, so that they don't dominate the statistics in binned images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimBadPixels.c

    r15482 r15602  
    4646    }
    4747
    48     float saturation = psMetadataLookupF32(NULL, readout->parent->concepts, "CELL.SATURATION");
    49     if (isnan(saturation)) {
    50         psWarning("CELL.SATURATION is not set; reverting to recipe value SATURATION.");
    51         saturation = psMetadataLookupF32(&mdok, recipe, "SATURATION");
    52         if (!mdok) {
    53             psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to find SATURATION in recipe.");
    54             return false;
    55         }
    56     }
    57 
    5848    psRandom *pseudoRNG = psRandomAlloc(PS_RANDOM_TAUS, seed); // Pseudo-random number generator
    5949
     
    6454        for (int x = 0; x < numCols; x++) {
    6555            if (psRandomUniform(pseudoRNG) < frac) {
    66                 image->data.F32[y][x] = psRandomUniform(rng) * saturation;
     56                image->data.F32[y][x] *= psRandomGaussian(rng);
    6757            }
    6858        }
Note: See TracChangeset for help on using the changeset viewer.