Changeset 31252
- Timestamp:
- Apr 8, 2011, 6:30:45 PM (15 years ago)
- Location:
- branches/czw_branch/20110406
- Files:
-
- 5 edited
-
ppStack/src/ppStackCombineFinal.c (modified) (2 diffs)
-
ppStack/src/ppStackCombineInitial.c (modified) (1 diff)
-
ppStack/src/ppStackLoop.c (modified) (1 diff)
-
ppStack/src/ppStackReject.c (modified) (2 diffs)
-
psModules/src/imcombine/pmStackReject.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20110406/ppStack/src/ppStackCombineFinal.c
r31158 r31252 1 1 #include "ppStack.h" 2 2 3 //#define TESTING // Enable test output3 #define TESTING // Enable test output 4 4 5 5 bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options, … … 29 29 reject->data[i] = pmStackRejectGrow(options->rejected->data[i], numCols, numRows, poorFrac, 30 30 options->regions->data[i], options->kernels->data[i]); 31 if (!reject->data[i]) {32 psError(psErrorCodeLast(), false, "Unable to grow rejected pixels for image %d", i);33 psFree(reject);34 return false;35 }36 31 } else { 37 32 reject->data[i] = psMemIncrRefCounter(options->rejected->data[i]); -
branches/czw_branch/20110406/ppStack/src/ppStackCombineInitial.c
r31203 r31252 1 1 #include "ppStack.h" 2 2 3 //#define TESTING // Enable test output3 #define TESTING // Enable test output 4 4 5 5 bool ppStackCombineInitial(ppStackThreadData *stack, ppStackOptions *options, pmConfig *config) -
branches/czw_branch/20110406/ppStack/src/ppStackLoop.c
r31203 r31252 123 123 } 124 124 else { 125 // Since we haven't convolved, I believe we do need to normalize here. We also cannot grow.126 if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, false)) {125 // Since we haven't convolved, I believe we do need to normalize here. 126 if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, true)) { 127 127 psError(psErrorCodeLast(), false, "Unable to perform final combination."); 128 128 psFree(stack); -
branches/czw_branch/20110406/ppStack/src/ppStackReject.c
r31203 r31252 1 1 #include "ppStack.h" 2 2 3 //#define TESTING3 #define TESTING 4 4 5 5 bool ppStackReject(ppStackOptions *options, pmConfig *config) … … 13 13 /* } */ 14 14 15 15 16 int num = options->num; // Number of inputs 17 18 // Construct a small convolution kernel to aid in rejection 19 if (!options->convolve) { 20 for (int i = 0; i < num; i++) { 21 psArray *regions = psArrayAllocEmpty(1); 22 psRegion *region = psRegionAlloc(0,options->numCols - 1, 0, options->numRows - 1); 23 regions = psArrayAdd(regions,1, region); 24 25 psArray *kernels = psArrayAllocEmpty(1); 26 psVector *fwhms = psVectorAllocEmpty(1, PS_TYPE_F32); 27 psVectorAppend(fwhms,5.0); // Should be a parameter 28 psVector *orders = psVectorAllocEmpty(1, PS_TYPE_S32); 29 psVectorAppend(orders,0); 30 pmSubtractionKernels *kernel = pmSubtractionKernelsISIS(15,0,fwhms,orders,0,*region,PM_SUBTRACTION_MODE_2); 31 kernels = psArrayAdd(kernels, 1, kernel); 32 33 kernel->solution1 = psVectorAlloc(3, PS_TYPE_F64); 34 psVectorSet(kernel->solution1, 1, 1.0); 35 psVectorSet(kernel->solution1, 2, 1.0); 36 psVectorSet(kernel->solution1, 3, 1.0); 37 kernel->solution2 = psVectorAlloc(3, PS_TYPE_F64); 38 psVectorSet(kernel->solution2, 1, 1.0); 39 psVectorSet(kernel->solution1, 2, 1.0); 40 psVectorSet(kernel->solution1, 3, 1.0); 41 42 options->kernels->data[i] = kernels; 43 options->regions->data[i] = regions; 44 } 45 } 46 16 47 17 48 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe -
branches/czw_branch/20110406/psModules/src/imcombine/pmStackReject.c
r31203 r31252 127 127 128 128 if (!subRegions || !subKernels) { 129 psTrace("psModules.imcombine",2,"Do not have the necessary kernels and regions, returning input pixels."); 129 130 psPixels *out = psPixelsCopy(NULL,in); 130 131 return out;
Note:
See TracChangeset
for help on using the changeset viewer.
