Changeset 30627
- Timestamp:
- Feb 13, 2011, 3:03:08 PM (15 years ago)
- Location:
- tags/ipp-20101215/ppImage/src
- Files:
-
- 2 edited
-
ppImageAddNoise.c (modified) (3 diffs)
-
ppImageLoop.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20101215/ppImage/src/ppImageAddNoise.c
r30596 r30627 22 22 static float add_sigmas[] = {NAN, 13.39, 23.79, 75.25, 110.19, 128.84}; 23 23 24 // Exposure times for 3pi in grizy24 // Target Exposure times for 3pi in grizy 25 25 static float expTimes3Pi[] = {NAN, 43.0, 40.0, 45.0, 30.0, 30.0}; 26 26 float expTime = psMetadataLookupF32(NULL, fpa->concepts, "FPA.EXPOSURE"); // Exposure time for image … … 54 54 // find the currently selected readout 55 55 psImage *image = inReadout->image; 56 psImage *variance = inReadout->variance; 56 57 57 58 // Warning, just in case this is left on accidently! … … 68 69 image->data.F32[iy][ix] += ppImageRandomGaussian(rng, 0.0, add_sigmas[band]); 69 70 image->data.F32[iy][ix] /= expTimeScaling; 71 variance->data.F32[iy][ix] += PS_SQR(add_sigmas[band]); 72 variance->data.F32[iy][ix] /= expTimeScaling; 70 73 } 71 74 } 72 75 73 76 // Update the metadata about exposure time 74 psMetadataAddF32( fpa->concepts, PS_LIST_TAIL, "FPA.EXPOSURE", PS_META_REPLACE, "the modified exposure time", expTimes3Pi[band]);77 psMetadataAddF32(inReadout->parent->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE, "the modified exposure time", expTimes3Pi[band]); 75 78 psMetadataAddF32(fpa->concepts, PS_LIST_TAIL, "EXPTIME", PS_META_REPLACE, "the modified exposure time", expTimes3Pi[band]); 76 79 ppImageRandomGaussianFree(); -
tags/ipp-20101215/ppImage/src/ppImageLoop.c
r30596 r30627 110 110 ESCAPE("Unable to set bit masks"); 111 111 } 112 113 // perform the detrend analysis 114 if (!ppImageDetrendReadout(config, options, view)) { 115 ESCAPE("Unable to detrend readout"); 116 } 117 118 // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT 119 if (!ppImageDetrendFree (config, view)) { 120 ESCAPE("Unable to free detrend images"); 121 } 122 123 // optionally measure CTE by examining the variance in a box 124 if (!ppImageCheckCTE (config, options, view)) { 125 ESCAPE("Unable to measure CTE"); 126 } 127 112 128 // optionally degrade a MD image to 3pi exposure times 113 129 if (!ppImageAddNoise(config, options, view, input->fpa)){ 114 130 ESCAPE("Unable to degrade MD image to 3pi"); 115 131 } 116 117 // perform the detrend analysis118 if (!ppImageDetrendReadout(config, options, view)) {119 ESCAPE("Unable to detrend readout");120 }121 122 // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT123 if (!ppImageDetrendFree (config, view)) {124 ESCAPE("Unable to free detrend images");125 }126 127 // optionally measure CTE by examining the variance in a box128 if (!ppImageCheckCTE (config, options, view)) {129 ESCAPE("Unable to measure CTE");130 }131 132 } 132 133
Note:
See TracChangeset
for help on using the changeset viewer.
