Changeset 25027 for branches/pap/psModules/src/camera/pmFPACopy.c
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/psModules
- Property svn:mergeinfo deleted
-
branches/pap/psModules/src/camera/pmFPACopy.c
r23761 r25027 70 70 psImageBinningSetRuffSize(binning, PS_IMAGE_BINNING_CENTER); 71 71 *target = psImageAlloc(binning->nXruff, binning->nYruff, source->type.type); 72 psImageInit (*target, 0.0); 72 73 return; 73 74 } … … 221 222 psTrace("psModules.camera", 3, "xFlip: %d; yFlip: %d\n", xFlip, yFlip); 222 223 224 // Blow away extant readouts 225 for (int i = 0; i < target->readouts->n; i++) { 226 psFree(target->readouts->data[i]); 227 target->readouts->data[i] = NULL; 228 } 229 target->readouts->n = 0; 230 223 231 // Perform deep copy of the images. I would prefer *not* to do a deep copy, in the interests of speed (we 224 232 // still need to do another deep copy into the HDU for when we write out), but this is the only way I can … … 242 250 readoutCopyComponent(&targetReadout->variance, sourceReadout->variance, binning, xFlip, yFlip, 243 251 pixels); 252 // Copy covariance matrix: doesn't care about flips, etc. 253 if (sourceReadout->covariance) { 254 if (targetReadout->covariance) { 255 psFree(targetReadout->covariance); 256 } 257 targetReadout->covariance = psKernelCopy(sourceReadout->covariance); 258 #if 0 259 if (binning) { 260 // XXX This isn't strictly correct, but we don't have a function that bins covariance matrices 261 // with unequal binning factors. 262 psKernel *covar = psImageCovarianceBin(PS_MAX(binning->nXbin, binning->nYbin), 263 targetReadout->covariance); 264 psFree(targetReadout->covariance); 265 targetReadout->covariance = covar; 266 } 267 #endif 268 } 244 269 245 270 // Copy bias
Note:
See TracChangeset
for help on using the changeset viewer.
