Changeset 29600 for trunk/psModules/src/imcombine/pmSubtractionVisual.c
- Timestamp:
- Oct 28, 2010, 5:52:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionVisual.c
r29543 r29600 19 19 #include "pmSubtractionStamps.h" 20 20 #include "pmSubtractionEquation.h" 21 #include "pmSubtractionKernels.h" 21 22 22 23 #include "pmVisual.h" … … 40 41 static int kapa2 = -1; 41 42 static int kapa3 = -1; 43 static int kapa4 = -1; 42 44 43 45 /** function prototypes*/ … … 61 63 * @param convKernels the kernels to plot 62 64 * @return true for success */ 63 bool pmSubtractionVisualPlotConvKernels(p sImage *convKernels) {65 bool pmSubtractionVisualPlotConvKernels(pmSubtractionKernels *kernels) { 64 66 65 67 if (!pmVisualTestLevel("ppsub.kernels", 1)) return true; … … 67 69 if (!plotConvKernels) return true; 68 70 69 if (!pmVisualInitWindow(&kapa 1, "ppSub:Images")) {71 if (!pmVisualInitWindow(&kapa4, "kernels")) { 70 72 return false; 71 73 } 72 pmVisualScaleImage(kapa1, convKernels, "Convolution_Kernels", 0, true); 74 75 psImage *convKernels = pmSubtractionKernelsImageMosaic(kernels); 76 pmVisualScaleImage(kapa4, convKernels, "Convolution_Kernels", 0, true); 73 77 pmVisualAskUser(&plotConvKernels); 78 psFree(convKernels); 74 79 return true; 75 80 } … … 549 554 for (int y = -footprint; y <= footprint; y++) { 550 555 for (int x = -footprint; x <= footprint; x++) { 551 convolutionImage->data.F32[y + NYpix][x + NXpix] = -convolution->kernel[y][x];556 convolutionImage->data.F32[y + NYpix][x + NXpix] = convolution->kernel[y][x]; 552 557 sum += convolutionImage->data.F32[y + NYpix][x + NXpix]; 553 558 } … … 584 589 } 585 590 591 bool pmVisualShowImage(int kapaFD, psImage *inImage, const char *name, int channel, float min, float max) { 592 593 KiiImage image; 594 KapaImageData data; 595 Coords coords; 596 strcpy (coords.ctype, "RA---TAN"); 597 598 image.data2d = inImage->data.F32; 599 image.Nx = inImage->numCols; 600 image.Ny = inImage->numRows; 601 strcpy (data.name, name); 602 strcpy (data.file, name); 603 604 data.zero = min; 605 data.range = max; 606 data.logflux = 0; 607 608 KiiSetChannel (kapaFD, channel); 609 KiiNewPicture2D (kapaFD, &image, &data, &coords); 610 return true; 611 } 612 586 613 bool pmSubtractionVisualShowFit(double norm) { 587 614 … … 604 631 KiiEraseOverlay (kapa2, "red"); 605 632 606 pmVisualS caleImage(kapa1, targetImage, "Target Stamps", 0, true);607 pmVisualS caleImage(kapa1, sourceImage, "Source Stamps", 1, true);608 pmVisualS caleImage(kapa1, convolutionImage, "Convolution Stamps", 2, true);633 pmVisualShowImage(kapa1, targetImage, "Target", 0, -200.0, 400.0); 634 pmVisualShowImage(kapa1, sourceImage, "Source", 1, -200.0, 400.0); 635 pmVisualShowImage(kapa1, convolutionImage, "Convolution", 2, -200.0, 400.0); 609 636 KiiCenter (kapa1, 0.5*targetImage->numCols, 0.5*targetImage->numRows, 1); 610 637 611 pmVisualScaleImage(kapa2, fresidualImage, "Frac Residual Stamps", 2, true); 612 pmVisualScaleImage(kapa2, differenceImage, "Difference Stamps", 0, true); 613 614 if (1) { 615 KiiImage image; 616 KapaImageData data; 617 Coords coords; 618 strcpy (coords.ctype, "RA---TAN"); 619 620 image.data2d = residualImage->data.F32; 621 image.Nx = residualImage->numCols; 622 image.Ny = residualImage->numRows; 623 strcpy (data.name, "Residual Stamps"); 624 strcpy (data.file, "Residual Stamps"); 625 626 data.zero = -300.0; 627 data.range = +600.0; 628 data.logflux = 0; 629 630 KiiSetChannel (kapa2, 1); 631 KiiNewPicture2D (kapa2, &image, &data, &coords); 632 } else { 633 pmVisualScaleImage(kapa2, residualImage, "Residual Stamps", 1, true); 634 } 635 638 pmVisualScaleImage(kapa2, fresidualImage, "Frac.Residual", 2, true); 639 pmVisualShowImage(kapa2, differenceImage, "Difference", 0, -200.0, 400.0); 640 pmVisualShowImage(kapa2, residualImage, "Residual", 1, -200.0, 400.0); 636 641 KiiCenter (kapa2, 0.5*residualImage->numCols, 0.5*residualImage->numRows, 1); 637 642
Note:
See TracChangeset
for help on using the changeset viewer.
