- Timestamp:
- May 5, 2011, 10:09:53 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110404/ppStack/src/ppStackReject.c
r31158 r31442 1 1 #include "ppStack.h" 2 2 3 // This is the doomsday switch. 3 4 // #define TESTING 4 5 … … 8 9 psAssert(config, "Require configuration"); 9 10 11 /* if (!options->convolve) { */ 12 /* // No need to do complicated rejection when we haven't convolved */ 13 /* return true; */ 14 /* } */ 15 16 17 int num = options->num; // Number of inputs 18 19 // Construct a small convolution kernel to aid in rejection 10 20 if (!options->convolve) { 11 // No need to do complicated rejection when we haven't convolved 12 return true; 21 for (int i = 0; i < num; i++) { 22 psArray *regions = psArrayAllocEmpty(1); 23 psRegion *region = psRegionAlloc(0,options->numCols - 1, 0, options->numRows - 1); 24 regions = psArrayAdd(regions,1, region); 25 26 psArray *kernels = psArrayAllocEmpty(1); 27 psVector *fwhms = psVectorAllocEmpty(1, PS_TYPE_F32); 28 psVectorAppend(fwhms,5.0); // Should be a parameter 29 psVector *orders = psVectorAllocEmpty(1, PS_TYPE_S32); 30 psVectorAppend(orders,0); 31 pmSubtractionKernels *kernel = pmSubtractionKernelsISIS(15,0,fwhms,orders,0,*region,PM_SUBTRACTION_MODE_2); 32 kernels = psArrayAdd(kernels, 1, kernel); 33 34 kernel->solution1 = psVectorAlloc(3, PS_TYPE_F64); 35 psVectorSet(kernel->solution1, 1, 1.0); 36 psVectorSet(kernel->solution1, 2, 1.0); 37 psVectorSet(kernel->solution1, 3, 1.0); 38 kernel->solution2 = psVectorAlloc(3, PS_TYPE_F64); 39 psVectorSet(kernel->solution2, 1, 1.0); 40 psVectorSet(kernel->solution1, 2, 1.0); 41 psVectorSet(kernel->solution1, 3, 1.0); 42 43 options->kernels->data[i] = kernels; 44 options->regions->data[i] = regions; 45 } 13 46 } 14 15 int num = options->num; // Number of inputs 47 16 48 17 49 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
Note:
See TracChangeset
for help on using the changeset viewer.
