- Timestamp:
- Jul 30, 2009, 5:20:29 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppImage/src/ppImageDetrendReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup
- Property svn:mergeinfo changed
/trunk (added) merged: 24714-24742,24744-24784,24786-24798,24801-24824,24827-24834,24836-24859,24861-24901,24903-24912,24914-24939
- Property svn:mergeinfo changed
-
branches/czw_branch/cleanup/ppImage/src/ppImageDetrendReadout.c
r24485 r24951 64 64 if (options->doVarianceBuild) { 65 65 // create the target mask and variance images 66 psImage *noiseImage = NULL;67 if (options->doNoiseMap) {68 // XXX convert the noiseMap image to a binned image69 pmReadout *noiseMap = NULL;70 noiseMap = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.NOISEMAP");71 noiseImage = psImageCopy (NULL, input->image, PS_TYPE_F32);72 psImageInit (noiseImage, 0.0);73 74 // XXX this works, but is not really quite right: the model shoud include the75 // offset information, we are not really getting exactly the right mapping from the76 // original file.77 psImageBinning *binning = psImageBinningAlloc();78 binning->nXruff = noiseMap->image->numCols;79 binning->nYruff = noiseMap->image->numRows;80 binning->nXfine = input->image->numCols;81 binning->nYfine = input->image->numRows;82 psImageBinningSetScale(binning, PS_IMAGE_BINNING_LEFT);83 84 psImageUnbin (noiseImage, noiseMap->image, binning);85 psFree (binning);86 }66 psImage *noiseImage = NULL; 67 if (options->doNoiseMap) { 68 // XXX convert the noiseMap image to a binned image 69 pmReadout *noiseMap = NULL; 70 noiseMap = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.NOISEMAP"); 71 noiseImage = psImageCopy (NULL, input->image, PS_TYPE_F32); 72 psImageInit (noiseImage, 0.0); 73 74 // XXX this works, but is not really quite right: the model shoud include the 75 // offset information, we are not really getting exactly the right mapping from the 76 // original file. 77 psImageBinning *binning = psImageBinningAlloc(); 78 binning->nXruff = noiseMap->image->numCols; 79 binning->nYruff = noiseMap->image->numRows; 80 binning->nXfine = input->image->numCols; 81 binning->nYfine = input->image->numRows; 82 psImageBinningSetScale(binning, PS_IMAGE_BINNING_LEFT); 83 84 psImageUnbin (noiseImage, noiseMap->image, binning); 85 psFree (binning); 86 } 87 87 pmReadoutGenerateVariance(input, noiseImage, true); 88 psFree (noiseImage);88 psFree (noiseImage); 89 89 } 90 90 … … 119 119 pmReadout *flat = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.FLAT"); 120 120 if (!pmFlatField(input, flat, options->flatMask)) { 121 psFree(detview); 122 return false; 123 } 124 } 125 126 // Pattern noise correction 127 if (options->doPattern) { 128 if (!pmPatternRow(input, options->patternOrder, options->patternIter, options->patternRej, 129 options->patternThresh, options->patternMean, options->patternStdev, 130 options->maskValue, options->darkMask)) { 121 131 psFree(detview); 122 132 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
