- Timestamp:
- Sep 7, 2009, 3:41:03 PM (17 years ago)
- Location:
- trunk/psModules/src/imcombine
- Files:
-
- 3 edited
-
pmSubtraction.c (modified) (1 diff)
-
pmSubtraction.h (modified) (1 diff)
-
pmSubtractionAnalysis.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r25120 r25279 957 957 PS_ASSERT_FLOAT_WITHIN_RANGE(y, -1.0, 1.0, NULL); 958 958 959 psArray *images = psArrayAlloc( solution->n - 1); // Images of each kernel to return960 psVector *fakeSolution = psVectorAlloc( solution->n, PS_TYPE_F64); // Fake solution vector959 psArray *images = psArrayAlloc(kernels->solution1->n - 1); // Images of each kernel to return 960 psVector *fakeSolution = psVectorAlloc(kernels->solution1->n, PS_TYPE_F64); // Fake solution vector 961 961 psVectorInit(fakeSolution, 0.0); 962 962 963 for (int i = 0; i < solution->n - 1; i++) {964 fakeSolution->data.F64[i] = solution->data.F64[i];963 for (int i = 0; i < kernels->solution1->n - 1; i++) { 964 fakeSolution->data.F64[i] = kernels->solution1->data.F64[i]; 965 965 images->data[i] = pmSubtractionKernelImage(kernels, x, y, wantDual); 966 966 fakeSolution->data.F64[i] = 0.0; -
trunk/psModules/src/imcombine/pmSubtraction.h
r25120 r25279 93 93 94 94 /// Generate images of the convolution kernel elements 95 psArray *pmSubtractionKernelSolutions(const p sVector *solution, ///< Solution vector96 const pmSubtractionKernels *kernels, ///< Kernel parameters97 float x, float y ///< Normalised position [-1,1] for images95 psArray *pmSubtractionKernelSolutions(const pmSubtractionKernels *kernels, ///< Kernel parameters 96 float x, float y, ///< Normalised position [-1,1] for images 97 bool wantDual ///< Calculate for the dual kernel? 98 98 ); 99 99 100 100 101 /// Execute a thread job to convolve a patch of the image -
trunk/psModules/src/imcombine/pmSubtractionAnalysis.c
r25119 r25279 121 121 { 122 122 psMetadata *header = psMetadataAlloc(); // Header 123 for (int i = 0; i < solution->n; i++) {123 for (int i = 0; i < kernels->solution1->n; i++) { 124 124 psString name = NULL; // Header keyword 125 125 psStringAppend(&name, "SOLN%04d", i); 126 psMetadataAddF64(header, PS_LIST_TAIL, name, 0, NULL, solution->data.F64[i]);126 psMetadataAddF64(header, PS_LIST_TAIL, name, 0, NULL, kernels->solution1->data.F64[i]); 127 127 psFree(name); 128 128 } 129 psArray *kernelImages = pmSubtractionKernelSolutions( solution, kernels, 0.0, 0.0);129 psArray *kernelImages = pmSubtractionKernelSolutions(kernels, 0.0, 0.0, false); 130 130 psFits *kernelFile = psFitsOpen("kernels.fits", "w"); 131 131 (void)psFitsWriteImageCube(kernelFile, header, kernelImages, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
