Changeset 20349
- Timestamp:
- Oct 24, 2008, 4:18:51 AM (18 years ago)
- Location:
- branches/sj_ippTests_branch_20080929
- Files:
-
- 2 edited
-
ippconfig/recipes/ppSim.config (modified) (1 diff)
-
ppSim/src/ppSimAddNoise.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/sj_ippTests_branch_20080929/ippconfig/recipes/ppSim.config
r19378 r20349 71 71 BADPIX.SEED U64 123456789 # Seed for RNG in creating deterministic bad pixels 72 72 BADPIX.FRAC F32 0.0001 # Fraction of bad pixels 73 74 NOISE.ADD BOOL TRUE # Add noise to image? 73 75 74 76 ### The following options are used if not defined by the concepts (e.g., usually read from headers) -
branches/sj_ippTests_branch_20080929/ppSim/src/ppSimAddNoise.c
r18011 r20349 32 32 // (generate a static array with the cumulative distribution, use the 33 33 // random number to select a bin from the histogram) 34 signal->data.F32[y][x] += sqrtf(variance->data.F32[y][x]) * ppSimRandomGaussianNorm(rng); 34 if (psMetadataLookupBool(NULL, recipe, "NOISE.ADD")) { // add noise? 35 signal->data.F32[y][x] += sqrtf(variance->data.F32[y][x]) * ppSimRandomGaussianNorm(rng); 36 } 35 37 signal->data.F32[y][x] /= gain; // Converting to ADU 36 38 }
Note:
See TracChangeset
for help on using the changeset viewer.
