Changeset 21363 for trunk/psModules/src/objects/pmSource.c
- Timestamp:
- Feb 5, 2009, 4:31:25 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSource.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSource.c
r21352 r21363 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.6 8$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-06 0 1:09:50$8 * @version $Revision: 1.69 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-06 02:31:25 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 44 44 psFree(tmp->peak); 45 45 psFree(tmp->pixels); 46 psFree(tmp-> weight);46 psFree(tmp->variance); 47 47 psFree(tmp->maskObj); 48 48 psFree(tmp->maskView); … … 66 66 67 67 psFree (source->pixels); 68 psFree (source-> weight);68 psFree (source->variance); 69 69 psFree (source->maskObj); 70 70 psFree (source->maskView); … … 73 73 74 74 source->pixels = NULL; 75 source-> weight= NULL;75 source->variance = NULL; 76 76 source->maskObj = NULL; 77 77 source->maskView = NULL; … … 101 101 source->peak = NULL; 102 102 source->pixels = NULL; 103 source-> weight= NULL;103 source->variance = NULL; 104 104 source->maskObj = NULL; 105 105 source->maskView = NULL; … … 144 144 } 145 145 // this copy is used to allow multiple fit attempts on the 146 // same object. the pixels, weight, and mask arrays all point to146 // same object. the pixels, variance, and mask arrays all point to 147 147 // the same original subarrays. the peak and moments point at 148 148 // the original values. … … 167 167 // We want a new view, but pointing at the same pixels. 168 168 source->pixels = psImageCopyView(NULL, in->pixels); 169 source-> weight = psImageCopyView(NULL, in->weight);169 source->variance = psImageCopyView(NULL, in->variance); 170 170 source->maskView = in->maskView ? psImageCopyView(NULL, in->maskView) : NULL; 171 171 … … 199 199 // these images are subset images of the equivalent parents 200 200 mySource->pixels = psImageSubset(readout->image, srcRegion); 201 if (readout-> weight) {202 mySource-> weight = psImageSubset(readout->weight, srcRegion);201 if (readout->variance) { 202 mySource->variance = psImageSubset(readout->variance, srcRegion); 203 203 } 204 204 if (readout->mask) { … … 237 237 238 238 extend |= (mySource->pixels == NULL); 239 extend |= (mySource-> weight== NULL);239 extend |= (mySource->variance == NULL); 240 240 extend |= (mySource->maskObj == NULL); 241 241 extend |= (mySource->maskView == NULL); … … 245 245 // re-create the subimage 246 246 psFree (mySource->pixels); 247 psFree (mySource-> weight);247 psFree (mySource->variance); 248 248 psFree (mySource->maskView); 249 249 250 250 mySource->pixels = psImageSubset(readout->image, newRegion); 251 mySource-> weight = psImageSubset(readout->weight, newRegion);251 mySource->variance = psImageSubset(readout->variance, newRegion); 252 252 mySource->maskView = psImageSubset(readout->mask, newRegion); 253 253 mySource->region = newRegion; … … 670 670 pmSource->peak 671 671 pmSource->pixels 672 pmSource-> weight672 pmSource->variance 673 673 pmSource->mask 674 674 … … 737 737 738 738 psF32 *vPix = source->pixels->data.F32[row]; 739 psF32 *vWgt = source-> weight->data.F32[row];739 psF32 *vWgt = source->variance->data.F32[row]; 740 740 psImageMaskType *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row]; 741 741 … … 924 924 if (mode & PM_MODEL_OP_NOISE) { 925 925 // XXX need to scale by the gain... 926 target = source-> weight->data.F32;926 target = source->variance->data.F32; 927 927 } 928 928 … … 946 946 psImage *target = source->pixels; 947 947 if (mode & PM_MODEL_OP_NOISE) { 948 target = source-> weight;948 target = source->variance; 949 949 } 950 950
Note:
See TracChangeset
for help on using the changeset viewer.
