Changeset 15602
- Timestamp:
- Nov 13, 2007, 10:29:16 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimBadPixels.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimBadPixels.c
r15482 r15602 46 46 } 47 47 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 58 48 psRandom *pseudoRNG = psRandomAlloc(PS_RANDOM_TAUS, seed); // Pseudo-random number generator 59 49 … … 64 54 for (int x = 0; x < numCols; x++) { 65 55 if (psRandomUniform(pseudoRNG) < frac) { 66 image->data.F32[y][x] = psRandomUniform(rng) * saturation;56 image->data.F32[y][x] *= psRandomGaussian(rng); 67 57 } 68 58 }
Note:
See TracChangeset
for help on using the changeset viewer.
