Changeset 19916
- Timestamp:
- Oct 6, 2008, 3:18:11 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotVisual.c (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotVisual.c
r19888 r19916 1 1 # include "psphotInternal.h" 2 bool psphotVisualPlotMoments (pmConfig *config, const pmFPAview *view, psArray *sources);3 2 4 3 // this function displays representative images as the psphot analysis progresses: … … 88 87 } 89 88 90 bool psphotVisualShowImage (pm Config *config, pmReadout *readout) {89 bool psphotVisualShowImage (pmReadout *readout) { 91 90 92 91 if (!isVisual) return true; … … 178 177 } 179 178 180 bool psphotVisualShowPeaks (pm Config *config, const pmFPAview *view, pmDetections *detections) {179 bool psphotVisualShowPeaks (pmDetections *detections) { 181 180 182 181 int Noverlay; … … 256 255 } 257 256 258 // XXX this is just wrong: outlines entire image 259 bool psphotVisualShowFootprints (pmConfig *config, const pmFPAview *view, pmDetections *detections) { 257 bool psphotVisualShowFootprints (pmDetections *detections) { 260 258 261 259 int Noverlay; … … 371 369 } 372 370 373 bool psphotVisualShowMoments (p mConfig *config, const pmFPAview *view, psArray *sources) {371 bool psphotVisualShowMoments (psArray *sources) { 374 372 375 373 int Noverlay; … … 429 427 } 430 428 431 bool psphotVisualPlotMoments (p mConfig *config, const pmFPAview *view, psArray *sources) {429 bool psphotVisualPlotMoments (psMetadata *recipe, psArray *sources) { 432 430 433 431 bool status; … … 445 443 } 446 444 447 // select the current recipe448 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE);449 if (!recipe) {450 fprintf (stderr, "missing recipe, skipping moments plot\n");451 return false;452 }453 454 445 KapaClearPlots (kapa3); 455 446 KapaInitGraph (&graphdata); 456 447 457 float psfX = psMetadataLookupF32 (&status, recipe, "PSF.CLUMP.X"); 458 float psfY = psMetadataLookupF32 (&status, recipe, "PSF.CLUMP.Y"); 459 float psfdX = psMetadataLookupF32 (&status, recipe, "PSF.CLUMP.DX"); 460 float psfdY = psMetadataLookupF32 (&status, recipe, "PSF.CLUMP.DY"); 461 float PSF_CLUMP_NSIGMA = psMetadataLookupF32 (&status, recipe, "PSF_CLUMP_NSIGMA"); 462 float Rx = psfdX * PSF_CLUMP_NSIGMA; 463 float Ry = psfdY * PSF_CLUMP_NSIGMA; 448 // there are N regions: use the first (guaranteed to exist) to get the overall limits 449 psMetadata *regionMD = psMetadataLookupPtr (&status, recipe, "PSF.CLUMP.REGION.000"); 450 451 float psfX = psMetadataLookupF32 (&status, regionMD, "PSF.CLUMP.X"); 452 float psfY = psMetadataLookupF32 (&status, regionMD, "PSF.CLUMP.Y"); 464 453 465 454 // examine sources to set data range … … 522 511 KapaPlotVector (kapa3, nB, yBright->data.F32, "y"); 523 512 524 // draw a circle centered on psfX,Y with size of the psf limit 525 psVector *xLimit = psVectorAlloc (120, PS_TYPE_F32); 526 psVector *yLimit = psVectorAlloc (120, PS_TYPE_F32); 527 for (int i = 0; i < xLimit->n; i++) { 528 xLimit->data.F32[i] = Rx*cos(i*2.0*M_PI/120.0) + psfX; 529 yLimit->data.F32[i] = Ry*sin(i*2.0*M_PI/120.0) + psfY; 530 } 531 graphdata.color = KapaColorByName ("blue"); 532 graphdata.style = 0; 533 KapaPrepPlot (kapa3, xLimit->n, &graphdata); 534 KapaPlotVector (kapa3, xLimit->n, xLimit->data.F32, "x"); 535 KapaPlotVector (kapa3, yLimit->n, yLimit->data.F32, "y"); 536 psFree (xLimit); 537 psFree (yLimit); 513 // XXX draw N circles to outline the clumps 514 { 515 // draw a circle centered on psfX,Y with size of the psf limit 516 psVector *xLimit = psVectorAlloc (120, PS_TYPE_F32); 517 psVector *yLimit = psVectorAlloc (120, PS_TYPE_F32); 518 519 int nRegions = psMetadataLookupS32 (&status, recipe, "PSF.CLUMP.NREGIONS"); 520 float PSF_CLUMP_NSIGMA = psMetadataLookupF32 (&status, recipe, "PSF_CLUMP_NSIGMA"); 521 522 graphdata.color = KapaColorByName ("blue"); 523 graphdata.style = 0; 524 525 for (int n = 0; n < nRegions; n++) { 526 527 char regionName[64]; 528 snprintf (regionName, 64, "PSF.CLUMP.REGION.%03d", n); 529 psMetadata *regionMD = psMetadataLookupPtr (&status, recipe, regionName); 530 531 float psfX = psMetadataLookupF32 (&status, regionMD, "PSF.CLUMP.X"); 532 float psfY = psMetadataLookupF32 (&status, regionMD, "PSF.CLUMP.Y"); 533 float psfdX = psMetadataLookupF32 (&status, regionMD, "PSF.CLUMP.DX"); 534 float psfdY = psMetadataLookupF32 (&status, regionMD, "PSF.CLUMP.DY"); 535 float Rx = psfdX * PSF_CLUMP_NSIGMA; 536 float Ry = psfdY * PSF_CLUMP_NSIGMA; 537 538 for (int i = 0; i < xLimit->n; i++) { 539 xLimit->data.F32[i] = Rx*cos(i*2.0*M_PI/120.0) + psfX; 540 yLimit->data.F32[i] = Ry*sin(i*2.0*M_PI/120.0) + psfY; 541 } 542 KapaPrepPlot (kapa3, xLimit->n, &graphdata); 543 KapaPlotVector (kapa3, xLimit->n, xLimit->data.F32, "x"); 544 KapaPlotVector (kapa3, yLimit->n, yLimit->data.F32, "y"); 545 } 546 psFree (xLimit); 547 psFree (yLimit); 548 } 538 549 539 550 # if (0) … … 589 600 590 601 // assumes 'kapa' value is checked and set 591 bool psphotVisualShowRoughClass_Single (p mConfig *config, const pmFPAview *view, psArray *sources, pmSourceType type, pmSourceMode mode, char *color) {602 bool psphotVisualShowRoughClass_Single (psArray *sources, pmSourceType type, pmSourceMode mode, char *color) { 592 603 593 604 int Noverlay; … … 635 646 } 636 647 637 bool psphotVisualShowRoughClass (pmConfig *config, const pmFPAview *view, psArray *sources) { 638 639 psphotVisualPlotMoments (config, view, sources); 648 bool psphotVisualShowRoughClass (psArray *sources) { 640 649 641 650 if (!isVisual) return true; … … 648 657 KiiEraseOverlay (kapa, "yellow"); // moments 649 658 650 psphotVisualShowRoughClass_Single ( config, view,sources, PM_SOURCE_TYPE_STAR, 0, "red");651 psphotVisualShowRoughClass_Single ( config, view,sources, PM_SOURCE_TYPE_EXTENDED, 0, "blue");652 psphotVisualShowRoughClass_Single ( config, view,sources, PM_SOURCE_TYPE_DEFECT, 0, "blue");653 psphotVisualShowRoughClass_Single ( config, view,sources, PM_SOURCE_TYPE_SATURATED, 0, "red");654 psphotVisualShowRoughClass_Single ( config, view,sources, PM_SOURCE_TYPE_STAR, PM_SOURCE_MODE_PSFSTAR, "yellow");655 psphotVisualShowRoughClass_Single ( config, view,sources, PM_SOURCE_TYPE_STAR, PM_SOURCE_MODE_SATSTAR, "green");659 psphotVisualShowRoughClass_Single (sources, PM_SOURCE_TYPE_STAR, 0, "red"); 660 psphotVisualShowRoughClass_Single (sources, PM_SOURCE_TYPE_EXTENDED, 0, "blue"); 661 psphotVisualShowRoughClass_Single (sources, PM_SOURCE_TYPE_DEFECT, 0, "blue"); 662 psphotVisualShowRoughClass_Single (sources, PM_SOURCE_TYPE_SATURATED, 0, "red"); 663 psphotVisualShowRoughClass_Single (sources, PM_SOURCE_TYPE_STAR, PM_SOURCE_MODE_PSFSTAR, "yellow"); 664 psphotVisualShowRoughClass_Single (sources, PM_SOURCE_TYPE_STAR, PM_SOURCE_MODE_SATSTAR, "green"); 656 665 657 666 // pause and wait for user input: … … 666 675 } 667 676 668 bool psphotVisualShowPSFStars (pmConfig *config, const pmFPAview *view, pmPSF *psf, psArray *sources) { 669 670 bool status; 677 bool psphotVisualShowPSFModel (pmReadout *readout, pmPSF *psf) { 671 678 672 679 if (!isVisual) return true; … … 681 688 } 682 689 683 // select the current recipe 684 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE); 685 if (!recipe) { 686 psError(PSPHOT_ERR_CONFIG, false, "missing recipe %s", PSPHOT_RECIPE); 687 return false; 688 } 690 int DX = 64; 691 int DY = 64; 692 693 psImage *psfMosaic = psImageAlloc (3*DX, 3*DY, PS_TYPE_F32); 694 psImageInit (psfMosaic, 0.0); 695 696 pmModel *modelRef = pmModelAlloc(psf->type); 697 698 // generate a fake model at each of the 3x3 image grid positions 699 for (int x = -1; x <= +1; x ++) { 700 for (int y = -1; y <= +1; y ++) { 701 // use the center of the center pixel of the image 702 float xc = (0.5 + 0.45*x)*readout->image->numCols + readout->image->col0; 703 float yc = (0.5 + 0.45*y)*readout->image->numRows + readout->image->row0; 704 705 // assign the x and y coords to the image center 706 // create an object with center intensity of 1000 707 modelRef->params->data.F32[PM_PAR_SKY] = 0; 708 modelRef->params->data.F32[PM_PAR_I0] = 1000; 709 modelRef->params->data.F32[PM_PAR_XPOS] = xc; 710 modelRef->params->data.F32[PM_PAR_YPOS] = yc; 711 712 // create modelPSF from this model 713 pmModel *model = pmModelFromPSF (modelRef, psf); 714 715 // place the reference object in the image center 716 // no need to mask the source here 717 // XXX should we measure this for the analytical model only or the full model? 718 pmModelAddWithOffset (psfMosaic, NULL, model, PM_MODEL_OP_FULL | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY); 719 psFree (model); 720 } 721 } 722 723 psImage *psfLogFlux = (psImage *) psUnaryOp (NULL, psfMosaic, "log"); 724 psphotVisualRangeImage (kapa2, psfLogFlux, "psf_mosaic", 1, -2.0, 3.0); 725 726 psFree (psfMosaic); 727 psFree (psfLogFlux); 728 729 // pause and wait for user input: 730 // continue, save (provide name), ?? 731 char key[10]; 732 fprintf (stdout, "[c]ontinue? "); 733 if (!fgets(key, 8, stdin)) { 734 psWarning("Unable to read option"); 735 } 736 return true; 737 } 738 739 bool psphotVisualShowPSFStars (psMetadata *recipe, pmPSF *psf, psArray *sources) { 740 741 bool status; 742 743 if (!isVisual) return true; 744 745 if (kapa2 == -1) { 746 kapa2 = KapaOpenNamedSocket ("kapa", "psphot:psfstars"); 747 if (kapa2 == -1) { 748 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 749 isVisual = false; 750 return false; 751 } 752 } 689 753 690 754 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) … … 822 886 psFree (outpos); 823 887 psFree (outsub); 824 return true; 825 } 826 827 bool psphotVisualShowSatStars (pmConfig *config, const pmFPAview *view, pmPSF *psf, psArray *sources) { 888 889 890 // after displaying (as an image) the psf stars, we cycle throught them and display their 891 // radial profiles: 892 psphotVisualPlotRadialProfiles (recipe, sources); 893 894 return true; 895 } 896 897 bool psphotVisualShowSatStars (psMetadata *recipe, pmPSF *psf, psArray *sources) { 828 898 829 899 bool status; … … 839 909 } 840 910 } 841 842 // select the current recipe843 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE);844 if (!recipe) {845 psError(PSPHOT_ERR_CONFIG, false, "missing recipe %s", PSPHOT_RECIPE);846 return false;847 }848 911 849 912 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) … … 971 1034 } 972 1035 973 bool psphotVisualShowPSFModel (pmConfig *config, pmReadout *readout, pmPSF *psf) { 1036 bool psphotVisualPlotRadialProfile (int myKapa, pmSource *source, psMaskType maskVal) { 1037 1038 Graphdata graphdata; 1039 1040 bool state = !(source->mode & PM_SOURCE_MODE_SUBTRACTED); 1041 psphotAddWithTest (source, true, maskVal); // replace source if subtracted 1042 1043 int nPts = source->pixels->numRows * source->pixels->numCols; 1044 psVector *rg = psVectorAllocEmpty (nPts, PS_TYPE_F32); 1045 psVector *Rg = psVectorAllocEmpty (nPts, PS_TYPE_F32); 1046 psVector *fg = psVectorAllocEmpty (nPts, PS_TYPE_F32); 1047 psVector *rb = psVectorAllocEmpty (nPts, PS_TYPE_F32); 1048 psVector *Rb = psVectorAllocEmpty (nPts, PS_TYPE_F32); 1049 psVector *fb = psVectorAllocEmpty (nPts, PS_TYPE_F32); 1050 1051 int ng = 0; 1052 int nb = 0; 1053 float Xo = source->modelPSF->params->data.F32[PM_PAR_XPOS] - source->pixels->col0; 1054 float Yo = source->modelPSF->params->data.F32[PM_PAR_YPOS] - source->pixels->row0; 1055 for (int iy = 0; iy < source->pixels->numRows; iy++) { 1056 for (int ix = 0; ix < source->pixels->numCols; ix++) { 1057 if (source->maskObj->data.U8[iy][ix]) { 1058 // rb->data.F32[nb] = hypot (ix + 0.5 - Xo, iy + 0.5 - Yo) ; 1059 rb->data.F32[nb] = hypot (ix - Xo, iy - Yo) ; 1060 Rb->data.F32[ng] = log10(rb->data.F32[nb]); 1061 fb->data.F32[nb] = log10(source->pixels->data.F32[iy][ix]); 1062 nb++; 1063 } else { 1064 // rg->data.F32[ng] = hypot (ix + 0.5 - Xo, iy + 0.5 - Yo) ; 1065 rg->data.F32[ng] = hypot (ix - Xo, iy - Yo) ; 1066 Rg->data.F32[ng] = log10(rg->data.F32[ng]); 1067 fg->data.F32[ng] = log10(source->pixels->data.F32[iy][ix]); 1068 ng++; 1069 } 1070 } 1071 } 1072 1073 // reset source Add/Sub state to recorded 1074 psphotSetState (source, state, maskVal); 1075 1076 KapaInitGraph (&graphdata); 1077 1078 // ** linlog ** 1079 KapaSelectSection (myKapa, "linlog"); 1080 1081 // examine sources to set data range 1082 graphdata.xmin = -0.05; 1083 graphdata.xmax = +30.05; 1084 graphdata.ymin = -0.05; 1085 graphdata.ymax = +5.05; 1086 KapaSetLimits (myKapa, &graphdata); 1087 1088 KapaSetFont (myKapa, "helvetica", 14); 1089 KapaBox (myKapa, &graphdata); 1090 KapaSendLabel (myKapa, "radius (pixels)", KAPA_LABEL_XM); 1091 KapaSendLabel (myKapa, "log flux (counts)", KAPA_LABEL_YM); 1092 1093 graphdata.color = KapaColorByName ("black"); 1094 graphdata.ptype = 2; 1095 graphdata.size = 0.5; 1096 graphdata.style = 2; 1097 KapaPrepPlot (myKapa, ng, &graphdata); 1098 KapaPlotVector (myKapa, ng, rg->data.F32, "x"); 1099 KapaPlotVector (myKapa, ng, fg->data.F32, "y"); 1100 1101 graphdata.color = KapaColorByName ("red"); 1102 graphdata.ptype = 0; 1103 graphdata.size = 0.3; 1104 graphdata.style = 2; 1105 KapaPrepPlot (myKapa, nb, &graphdata); 1106 KapaPlotVector (myKapa, nb, rb->data.F32, "x"); 1107 KapaPlotVector (myKapa, nb, fb->data.F32, "y"); 1108 1109 // ** loglog ** 1110 KapaSelectSection (myKapa, "loglog"); 1111 1112 // examine sources to set data range 1113 graphdata.xmin = -1.51; 1114 graphdata.xmax = +1.51; 1115 graphdata.ymin = -0.05; 1116 graphdata.ymax = +5.05; 1117 KapaSetLimits (myKapa, &graphdata); 1118 1119 KapaSetFont (myKapa, "helvetica", 14); 1120 KapaBox (myKapa, &graphdata); 1121 KapaSendLabel (myKapa, "log radius (pixels)", KAPA_LABEL_XM); 1122 KapaSendLabel (myKapa, "log flux (counts)", KAPA_LABEL_YM); 1123 1124 graphdata.color = KapaColorByName ("black"); 1125 graphdata.ptype = 2; 1126 graphdata.size = 0.5; 1127 graphdata.style = 2; 1128 KapaPrepPlot (myKapa, ng, &graphdata); 1129 KapaPlotVector (myKapa, ng, Rg->data.F32, "x"); 1130 KapaPlotVector (myKapa, ng, fg->data.F32, "y"); 1131 1132 graphdata.color = KapaColorByName ("red"); 1133 graphdata.ptype = 0; 1134 graphdata.size = 0.3; 1135 graphdata.style = 2; 1136 KapaPrepPlot (myKapa, nb, &graphdata); 1137 KapaPlotVector (myKapa, nb, Rb->data.F32, "x"); 1138 KapaPlotVector (myKapa, nb, fb->data.F32, "y"); 1139 1140 psFree (rg); 1141 psFree (Rg); 1142 psFree (fg); 1143 psFree (rb); 1144 psFree (Rb); 1145 psFree (fb); 1146 return true; 1147 } 1148 1149 bool psphotVisualPlotRadialProfiles (psMetadata *recipe, psArray *sources) { 1150 1151 KapaSection section; // put the positive profile in one and the residuals in another? 974 1152 975 1153 if (!isVisual) return true; 976 1154 977 if (kapa 2== -1) {978 kapa 2 = KapaOpenNamedSocket ("kapa", "psphot:psfstars");979 if (kapa 2== -1) {1155 if (kapa3 == -1) { 1156 kapa3 = KapaOpenNamedSocket ("kapa", "psphot:plots"); 1157 if (kapa3 == -1) { 980 1158 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 981 1159 isVisual = false; … … 984 1162 } 985 1163 986 int DX = 64; 987 int DY = 64; 988 989 psImage *psfMosaic = psImageAlloc (3*DX, 3*DY, PS_TYPE_F32); 990 psImageInit (psfMosaic, 0.0); 991 992 pmModel *modelRef = pmModelAlloc(psf->type); 993 994 # if (1) 995 // generate a fake model at each of the 3x3 image grid positions 996 for (int x = -1; x <= +1; x ++) { 997 for (int y = -1; y <= +1; y ++) { 998 // use the center of the center pixel of the image 999 float xc = (0.5 + 0.45*x)*readout->image->numCols + readout->image->col0; 1000 float yc = (0.5 + 0.45*y)*readout->image->numRows + readout->image->row0; 1001 1002 // assign the x and y coords to the image center 1003 // create an object with center intensity of 1000 1004 modelRef->params->data.F32[PM_PAR_SKY] = 0; 1005 modelRef->params->data.F32[PM_PAR_I0] = 1000; 1006 modelRef->params->data.F32[PM_PAR_XPOS] = xc; 1007 modelRef->params->data.F32[PM_PAR_YPOS] = yc; 1008 1009 // create modelPSF from this model 1010 pmModel *model = pmModelFromPSF (modelRef, psf); 1011 1012 // place the reference object in the image center 1013 // no need to mask the source here 1014 // XXX should we measure this for the analytical model only or the full model? 1015 pmModelAddWithOffset (psfMosaic, NULL, model, PM_MODEL_OP_FULL | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY); 1016 psFree (model); 1017 } 1018 } 1019 # else 1020 { 1021 // use the center of the center pixel of the image 1022 float xc = 0.5*readout->image->numCols + readout->image->col0 + 0.5; 1023 float yc = 0.5*readout->image->numRows + readout->image->row0 + 0.5; 1024 1025 // assign the x and y coords to the image center 1026 // create an object with center intensity of 1000 1027 modelRef->params->data.F32[PM_PAR_SKY] = 0; 1028 modelRef->params->data.F32[PM_PAR_I0] = 1000; 1029 modelRef->params->data.F32[PM_PAR_XPOS] = xc; 1030 modelRef->params->data.F32[PM_PAR_YPOS] = yc; 1031 1032 // create modelPSF from this model 1033 pmModel *model = pmModelFromPSF (modelRef, psf); 1034 1035 // place the reference object in the image center 1036 // no need to mask the source here 1037 // XXX should we measure this for the analytical model only or the full model? 1038 pmModelAddWithOffset (psfMosaic, NULL, model, PM_MODEL_OP_FULL | PM_MODEL_OP_CENTER, 0, 32.0, 16.0); 1039 } 1040 # endif 1041 1042 psImage *psfLogFlux = (psImage *) psUnaryOp (NULL, psfMosaic, "log"); 1043 psphotVisualRangeImage (kapa2, psfLogFlux, "psf_mosaic", 1, -2.0, 3.0); 1044 1045 psFree (psfMosaic); 1046 psFree (psfLogFlux); 1047 1048 // pause and wait for user input: 1049 // continue, save (provide name), ?? 1050 char key[10]; 1051 fprintf (stdout, "[c]ontinue? "); 1052 if (!fgets(key, 8, stdin)) { 1053 psWarning("Unable to read option"); 1054 } 1055 return true; 1056 } 1057 1058 bool psphotVisualShowFlags (pmConfig *config, const pmFPAview *view, psArray *sources) { 1164 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) 1165 bool status; 1166 psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels 1167 assert (maskVal); 1168 1169 KapaClearPlots (kapa3); 1170 // first section : mag vs CR nSigma 1171 section.dx = 1.0; 1172 section.dy = 0.5; 1173 section.x = 0.0; 1174 section.y = 0.0; 1175 section.name = NULL; 1176 psStringAppend (§ion.name, "linlog"); 1177 KapaSetSection (kapa3, §ion); 1178 psFree (section.name); 1179 1180 // first section : mag vs CR nSigma 1181 section.dx = 1.0; 1182 section.dy = 0.5; 1183 section.x = 0.0; 1184 section.y = 0.5; 1185 section.name = NULL; 1186 psStringAppend (§ion.name, "loglog"); 1187 KapaSetSection (kapa3, §ion); 1188 psFree (section.name); 1189 1190 // loop over the PSF stars 1191 for (int i = 0; i < sources->n; i++) { 1192 1193 pmSource *source = sources->data[i]; 1194 if (!(source->mode & PM_SOURCE_MODE_PSFSTAR)) continue; 1195 1196 psphotVisualPlotRadialProfile (kapa3, source, maskVal); 1197 1198 // pause and wait for user input: 1199 // continue, save (provide name), ?? 1200 char key[10]; 1201 fprintf (stdout, "[e]rase and continue? [o]verplot and continue? [s]kip rest of stars? : "); 1202 if (!fgets(key, 8, stdin)) { 1203 psWarning("Unable to read option"); 1204 } 1205 if (key[0] == 'e') { 1206 KapaClearPlots (kapa3); 1207 } 1208 if (key[0] == 's') { 1209 break; 1210 } 1211 } 1212 1213 return true; 1214 } 1215 1216 bool psphotVisualShowFlags (psArray *sources) { 1059 1217 1060 1218 int NoverlayE, NOVERLAYE; … … 1161 1319 } 1162 1320 1163 bool psphotVisualShowSourceSize (p mConfig *config, const pmFPAview *view, psArray *sources) {1321 bool psphotVisualShowSourceSize (psArray *sources) { 1164 1322 1165 1323 int Noverlay, NOVERLAY; … … 1236 1394 } 1237 1395 1238 bool psphotVisualPlotSourceSize (pmConfig *config, psArray *sources) { 1239 1240 bool status; 1396 bool psphotVisualPlotSourceSize (psArray *sources) { 1397 1241 1398 Graphdata graphdata; 1242 1399 KapaSection section; … … 1252 1409 } 1253 1410 } 1254 1255 // select the current recipe1256 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);1257 if (!recipe) {1258 fprintf (stderr, "missing recipe, skipping moments plot\n");1259 return false;1260 }1261 1411 1262 1412 KapaClearPlots (kapa3); … … 1387 1537 } 1388 1538 1389 bool psphotVisualShowResidualImage (pm Config *config, pmReadout *readout) {1539 bool psphotVisualShowResidualImage (pmReadout *readout) { 1390 1540 1391 1541 if (!isVisual) return true; … … 1412 1562 } 1413 1563 1414 bool psphotVisualPlotApResid (pmConfig *config, psArray *sources) { 1415 1416 bool status; 1564 bool psphotVisualPlotApResid (psArray *sources) { 1565 1417 1566 Graphdata graphdata; 1418 1567 … … 1427 1576 } 1428 1577 } 1429 1430 // select the current recipe1431 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);1432 if (!recipe) {1433 fprintf (stderr, "missing recipe, skipping moments plot\n");1434 return false;1435 }1436 1578 1437 1579 KapaClearPlots (kapa3);
Note:
See TracChangeset
for help on using the changeset viewer.
