- Timestamp:
- Feb 19, 2009, 7:59:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branch_20090215/psModules/src/astrom/pmAstrometryVisual.c
r21422 r21536 23 23 24 24 //variables to determine when things are plotted 25 static bool isVisual = false;26 25 static bool plotGridMatch = true; 27 26 static bool plotTweak = true; … … 48 47 /* Initialization Routines */ 49 48 50 bool pmAstromSetVisual (bool mode) {51 isVisual = mode;52 return true;53 }54 55 56 49 bool pmAstromVisualClose() 57 50 { … … 68 61 { 69 62 // make sure we want to plot this 70 if (!plotRawStars || ! isVisual) return true;63 if (!plotRawStars || !pmVisualIsVisual()) return true; 71 64 72 65 //set up plot region 73 66 if (!pmVisualInitWindow (&kapa, "psastro:plots")){ 74 isVisual = false;75 67 return false; 76 68 } … … 222 214 223 215 // pause and wait for user input: 224 pmVisualAskUser(&plotRawStars , &isVisual);216 pmVisualAskUser(&plotRawStars); 225 217 226 218 psFree (xVec); … … 234 226 { 235 227 //make sure we want to plot this 236 if (! isVisual|| !plotRefStars) return true;228 if (!pmVisualIsVisual() || !plotRefStars) return true; 237 229 238 230 //set up plotting variables 239 231 if (!pmVisualInitWindow (&kapa, "psastro:plots")) { 240 isVisual = false;241 232 return false; 242 233 } … … 284 275 285 276 // pause and wait for user input: 286 pmVisualAskUser(&plotRefStars , &isVisual);277 pmVisualAskUser(&plotRefStars); 287 278 288 279 psFree (xVec); … … 301 292 302 293 // make sure we want to plot this 303 if ( ! isVisual|| !plotLumFunc ) return true;294 if ( !pmVisualIsVisual() || !plotLumFunc ) return true; 304 295 305 296 //set up plotting variables 306 297 if ( !pmVisualInitWindow (&kapa, "psastro:plots")){ 307 isVisual = false;308 298 return false; 309 299 } … … 377 367 378 368 // pause and wait for user input: 379 pmVisualAskUser (&plotLumFunc , &isVisual);369 pmVisualAskUser (&plotLumFunc); 380 370 } 381 371 return true; … … 391 381 392 382 //make sure we want to plot this 393 if (! isVisual|| !plotRemoveClumps) return true;383 if (!pmVisualIsVisual() || !plotRemoveClumps) return true; 394 384 395 385 //set up plot variables 396 386 if ( !pmVisualInitWindow (&kapa, "psastro:plots")) { 397 isVisual = false;398 387 return false; 399 388 } … … 480 469 481 470 //ask for user input and finish 482 pmVisualAskUser (&plotRemoveClumps , &isVisual);471 pmVisualAskUser (&plotRemoveClumps); 483 472 psFree (xVec); 484 473 psFree (yVec); … … 496 485 497 486 //make sure we want to plot this 498 if (! isVisual|| !plotOneChipFit)487 if (!pmVisualIsVisual() || !plotOneChipFit) 499 488 return true; 500 489 501 490 if(!pmVisualInitWindow(&kapa, "psastro:plots") || !pmVisualInitWindow(&kapa2, "psastro:plots")) { 502 isVisual = false;503 491 return false; 504 492 } … … 511 499 512 500 //ask for user input and finish 513 pmVisualAskUser(&plotOneChipFit , &isVisual);501 pmVisualAskUser(&plotOneChipFit); 514 502 return true; 515 503 } … … 522 510 { 523 511 //make sure we want to plot this 524 if(! isVisual|| !plotFixChips) return true;512 if(!pmVisualIsVisual() || !plotFixChips) return true; 525 513 526 514 if(!pmVisualInitWindow(&kapa, "psastro:plots")) { 527 isVisual = false;528 515 return false; 529 516 } … … 588 575 KapaPlotVector (kapa, xNew->n, yNew->data.F32, "y"); 589 576 590 pmVisualAskUser(&plotFixChips , &isVisual);577 pmVisualAskUser(&plotFixChips); 591 578 psFree(xNew); 592 579 psFree(yNew); … … 606 593 607 594 //make sure we want to plot this 608 if (! isVisual|| !plotAstromGuessCheck) return true;595 if (!pmVisualIsVisual() || !plotAstromGuessCheck) return true; 609 596 610 597 //set up graph window 611 598 if ( !pmVisualInitWindow (&kapa, "psastro:plots")) { 612 isVisual = false;613 599 return false; 614 600 } … … 686 672 psFree(xResid); 687 673 psFree(yResid); 688 pmVisualAskUser (&plotAstromGuessCheck , &isVisual);674 pmVisualAskUser (&plotAstromGuessCheck); 689 675 return true; 690 676 } … … 696 682 { 697 683 //make sure we want to plot this 698 if (! isVisual|| !plotCommonScale) return true;684 if (!pmVisualIsVisual() || !plotCommonScale) return true; 699 685 700 686 if (!pmVisualInitWindow(&kapa, "psastro:plots")){ 701 isVisual = false;702 687 return false; 703 688 } … … 736 721 KapaSendLabel (kapa, "Old Pixel Scale of FPA Chips (Not to Scale)", KAPA_LABEL_XP); 737 722 738 pmVisualAskUser (&plotCommonScale , &isVisual);723 pmVisualAskUser (&plotCommonScale); 739 724 740 725 psFree(xVec); … … 750 735 751 736 //make sure we want to plot this 752 if (! isVisual|| !plotMosaicOneChip) return true;737 if (!pmVisualIsVisual() || !plotMosaicOneChip) return true; 753 738 754 739 if(!pmVisualInitWindow(&kapa, "psastro:plots") || !pmVisualInitWindow(&kapa2, "psastro:plots")) { 755 isVisual = false;756 740 return false; 757 741 } … … 759 743 //plot the residuals 760 744 if (!residPlot(rawstars, refstars, match, recipe, "Single Chip Fit Residuals - Mosaic Mode")) { 761 isVisual = false;745 pmVisualSetVisual(false); 762 746 return false; 763 747 } 764 748 765 749 //ask for user input and finish 766 pmVisualAskUser(&plotMosaicOneChip , &isVisual);750 pmVisualAskUser(&plotMosaicOneChip); 767 751 768 752 return true; … … 775 759 { 776 760 //make sure we want to plot this 777 if (! isVisual|| !plotMosaicMatches) return true;761 if (!pmVisualIsVisual() || !plotMosaicMatches) return true; 778 762 779 763 char title[60]; … … 782 766 783 767 if(!pmVisualInitWindow(&kapa, "psastro:plots") || !pmVisualInitWindow(&kapa2, "psastro:plots")) { 784 isVisual = false;785 768 return false; 786 769 } 787 770 788 771 if (!residPlot(rawstars, refstars, match, recipe, title)){ 789 isVisual = false;772 pmVisualSetVisual(false); 790 773 return false; 791 774 } 792 775 793 776 //ask for user input 794 pmVisualAskUser (&plotMosaicMatches , &isVisual);777 pmVisualAskUser (&plotMosaicMatches); 795 778 return true; 796 779 } … … 807 790 { 808 791 //make sure we want to plot this 809 if (! isVisual|| !plotGridMatch) return true;792 if (!pmVisualIsVisual() || !plotGridMatch) return true; 810 793 if (!pmVisualInitWindow(&kapa, "psastro:plots")){ 811 isVisual = false;812 794 return false; 813 795 } … … 952 934 KapaPlotVector (kapa, 2, yslice, "y"); 953 935 954 pmVisualAskUser(&plotGridMatch , &isVisual);936 pmVisualAskUser(&plotGridMatch); 955 937 psFree(dXplot); 956 938 psFree(dYplot); … … 966 948 { 967 949 //make sure we want to plot this 968 if (! isVisual|| !plotTweak) return true;950 if (!pmVisualIsVisual() || !plotTweak) return true; 969 951 if (!pmVisualInitWindow(&kapa, "psastro:plots")) { 970 isVisual = false;971 952 return false; 972 953 } … … 1051 1032 KAPA_LABEL_XP); 1052 1033 1053 pmVisualAskUser(&plotTweak , &isVisual);1034 pmVisualAskUser(&plotTweak); 1054 1035 1055 1036 psFree(xIndices); … … 1341 1322 # else 1342 1323 1343 bool pmAstromSetVisual(bool mode) { return true; }1344 1324 bool pmAstromVisualClose() { return true; } 1345 1325 bool pmAstromVisualPlotGridMatch (const psArray *raw, const psArray *ref, psImage *gridNP, double offsetX, double offsetY, double maxOffpix, double Scale, double Offset) { return true; }
Note:
See TracChangeset
for help on using the changeset viewer.
