Changeset 23242
- Timestamp:
- Mar 9, 2009, 4:19:37 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 10 deleted
- 34 edited
- 6 copied
-
ppImage (modified) (1 prop)
-
ppImage/src/ppImageArguments.c (modified) (2 diffs)
-
ppStack (modified) (1 prop)
-
ppStack/src/ppStack.c (modified) (1 diff)
-
ppStack/src/ppStackArguments.c (modified) (2 diffs)
-
ppStack/src/ppStackLoop.c (modified) (5 diffs)
-
ppStack/src/ppStackMatch.c (modified) (5 diffs)
-
ppStack/src/ppStackPhotometry.c (modified) (1 diff)
-
ppStack/src/ppStackSources.c (modified) (1 diff)
-
ppSub (modified) (1 prop)
-
ppSub/src/ppSub.c (modified) (1 diff)
-
ppSub/src/ppSubArguments.c (modified) (3 diffs)
-
psModules (modified) (1 prop)
-
psModules/src/astrom/pmAstrometryVisual.c (modified) (27 diffs)
-
psModules/src/astrom/pmAstrometryVisual.h (modified) (1 diff)
-
psModules/src/extras/pmVisual.c (modified) (8 diffs)
-
psModules/src/extras/pmVisual.h (modified) (3 diffs)
-
psModules/src/imcombine/Makefile.am (modified) (2 diffs)
-
psModules/src/imcombine/pmPSFEnvelope.c (modified) (6 diffs)
-
psModules/src/imcombine/pmStack.c (modified) (1 diff)
-
psModules/src/imcombine/pmStackVisual.c (copied) (copied from branches/cnb_branches/cnb_branch_20090215/psModules/src/imcombine/pmStackVisual.c )
-
psModules/src/imcombine/pmStackVisual.h (copied) (copied from branches/cnb_branches/cnb_branch_20090215/psModules/src/imcombine/pmStackVisual.h )
-
psModules/src/imcombine/pmSubtractionIO.c (modified) (3 diffs)
-
psModules/src/imcombine/pmSubtractionVisual.c (modified) (10 diffs)
-
psModules/src/imcombine/pmSubtractionVisual.h (modified) (1 diff)
-
psModules/src/objects/pmSourceIO_CMF_PS1_V1.c (copied) (copied from branches/cnb_branches/cnb_branch_20090215/psModules/src/objects/pmSourceIO_CMF_PS1_V1.c )
-
psModules/src/objects/pmSourceVisual.c (modified) (4 diffs)
-
psModules/src/objects/pmSourceVisual.h (modified) (2 diffs)
-
psModules/src/psmodules.h (modified) (1 diff)
-
psModules/templates (copied) (copied from branches/cnb_branches/cnb_branch_20090215/psModules/templates )
-
psModules/templates/c (copied) (copied from branches/cnb_branches/cnb_branch_20090215/psModules/templates/c )
-
psModules/templates/h (copied) (copied from branches/cnb_branches/cnb_branch_20090215/psModules/templates/h )
-
psModules/test/astrom/verified (deleted)
-
psModules/test/config/verified (deleted)
-
psModules/test/detrend/verified (deleted)
-
psModules/test/imcombine/verified (deleted)
-
psModules/test/imsubtract (deleted)
-
psModules/test/objects/verified (deleted)
-
psModules/test/photom (deleted)
-
psModules/test/pslib (deleted)
-
psModules/test/verified (deleted)
-
psastro (modified) (1 prop)
-
psastro/src/psastroArguments.c (modified) (2 diffs)
-
psastro/src/psastroCleanup.c (modified) (2 diffs)
-
psastro/src/psastroVisual.c (deleted)
-
psphot (modified) (1 prop)
-
psphot/src/psphot.h (modified) (1 diff)
-
psphot/src/psphotArguments.c (modified) (1 diff)
-
psphot/src/psphotVisual.c (modified) (30 diffs)
-
pswarp/src/pswarpArguments.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/ppImage merged eligible /branches/cnb_branch_20090215/ppImage 21495-22685
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/ppImage/src/ppImageArguments.c
r23229 r23242 81 81 if ((argnum = psArgumentGet(argc, argv, "-visual"))) { 82 82 psArgumentRemove(argnum, &argc, argv); 83 psphotSetVisual(true);83 pmVisualSetVisual(true); 84 84 } 85 85 … … 87 87 if ((argnum = psArgumentGet(argc, argv, "-threads"))) { 88 88 psArgumentRemove(argnum, &argc, argv); 89 int nThreads = atoi(argv[argnum]);89 int nThreads = atoi(argv[argnum]); 90 90 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "NTHREADS", 0, "number of warp threads", nThreads); 91 91 psArgumentRemove(argnum, &argc, argv); 92 92 93 // create the thread pool with number of desired threads, supplying our thread launcher function94 // XXX need to determine the number of threads from the config data95 psThreadPoolInit (nThreads);93 // create the thread pool with number of desired threads, supplying our thread launcher function 94 // XXX need to determine the number of threads from the config data 95 psThreadPoolInit (nThreads); 96 96 } 97 97 -
trunk/ppStack
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/ppStack merged eligible /branches/cnb_branch_20090215/ppStack 21495-22685
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/ppStack/src/ppStack.c
r23195 r23242 76 76 pmConfigDone(); 77 77 psLibFinalize(); 78 78 pmVisualClose(); 79 79 exit(exitValue); 80 80 } -
trunk/ppStack/src/ppStackArguments.c
r23212 r23242 185 185 "Delete temporary files on completion?", false); 186 186 psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Number of threads to use", 0); 187 psMetadataAddBool(arguments, PS_LIST_TAIL, "- psphot-visual", 0, "psphot visualisation", 0);187 psMetadataAddBool(arguments, PS_LIST_TAIL, "-visual", 0, "visualisation", false); 188 188 189 189 if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 3) { … … 262 262 valueArgRecipeStr(arguments, recipe, "-psf-model", "PSF.MODEL", recipe); 263 263 264 if (psMetadataLookupBool(NULL, arguments, "-visual")) { 265 pmVisualSetVisual(true); 266 } 267 264 268 if (psMetadataLookupBool(NULL, arguments, "-photometry") || 265 269 psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) { -
trunk/ppStack/src/ppStackLoop.c
r23192 r23242 517 517 psStringAppend(&name, "covariance_%d.fits", i); 518 518 writeImage(name, hdu->header, readout->covariance->image, config); 519 pmStackVisualPlotTestImage(readout->covariance->image, name); 519 520 psFree(name); 520 521 } … … 815 816 #ifdef TESTING 816 817 writeImage("combined_initial.fits", NULL, outRO->image, config); 818 pmStackVisualPlotTestImage(outRO->image, "combined_initial.fits"); 817 819 #endif 818 820 … … 898 900 psString name = NULL; // Name of image 899 901 psStringAppend(&name, "inspect_%03d.fits", i); 902 pmStackVisualPlotTestImage(mask, name); 900 903 psFits *fits = psFitsOpen(name, "w"); 901 904 psFree(name); … … 915 918 psString name = NULL; // Name of image 916 919 psStringAppend(&name, "reject_%03d.fits", i); 920 pmStackVisualPlotTestImage(mask, name); 917 921 psFits *fits = psFitsOpen(name, "w"); 918 922 psFree(name); … … 1048 1052 1049 1053 #ifdef TESTING 1054 pmStackVisualPlotTestImage(outRO->image, "combined_initial.fits"); 1050 1055 writeImage("combined_final.fits", NULL, outRO->image, config); 1051 1056 #endif -
trunk/ppStack/src/ppStackMatch.c
r21525 r23242 358 358 psString name = NULL; 359 359 psStringAppend(&name, "fake_%03d.fits", numInput); 360 pmStackVisualPlotTestImage(fake->image, name); 360 361 psFits *fits = psFitsOpen(name, "w"); 361 362 psFree(name); … … 367 368 psString name = NULL; 368 369 psStringAppend(&name, "real_%03d.fits", numInput); 370 pmStackVisualPlotTestImage(readout->image, name); 369 371 psFits *fits = psFitsOpen(name, "w"); 370 372 psFree(name); … … 397 399 psString name = NULL; 398 400 psStringAppend(&name, "conv_%03d.fits", numInput); 401 pmStackVisualPlotTestImage(output->image, name); 399 402 psFits *fits = psFitsOpen(name, "w"); 400 403 psFree(name); … … 406 409 psString name = NULL; 407 410 psStringAppend(&name, "diff_%03d.fits", numInput); 411 pmStackVisualPlotTestImage(fake->image, name); 408 412 psFits *fits = psFitsOpen(name, "w"); 409 413 psFree(name); … … 633 637 psString name = NULL; 634 638 psStringAppend(&name, "convolved_%03d.fits", numInput); 639 pmStackVisualPlotTestImage(output->image, name); 635 640 psFits *fits = psFitsOpen(name, "w"); 636 641 psFree(name); -
trunk/ppStack/src/ppStackPhotometry.c
r22730 r23242 118 118 pmFPACopy(photFile->fpa, readout->parent->parent->parent); 119 119 120 if (psMetadataLookupBool(NULL, config->arguments, "- psphot-visual")) {121 p sphotSetVisual(true);120 if (psMetadataLookupBool(NULL, config->arguments, "-visual")) { 121 pmVisualSetVisual(true); 122 122 } 123 123 -
trunk/ppStack/src/ppStackSources.c
r23234 r23242 121 121 psString name = NULL; 122 122 psStringAppend(&name, "start_%03d.fits", i); 123 pmStackVisualPlotTestImage(fake->image, name); 123 124 psFits *fits = psFitsOpen(name, "w"); 124 125 psFree(name); -
trunk/ppSub
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/ppSub merged eligible /branches/cnb_branch_20090215/ppSub 21495-22685
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/ppSub/src/ppSub.c
r23195 r23242 77 77 psTimerStop(); 78 78 79 pm SubtractionVisualClose(); //close plot windows, if -visual is set79 pmVisualClose(); //close plot windows, if -visual is set 80 80 psFree(config); 81 81 pmModelClassCleanup(); -
trunk/ppSub/src/ppSubArguments.c
r23238 r23242 191 191 bool ppSubArgumentsSetup(int argc, char *argv[], pmConfig *config) 192 192 { 193 int argnum; // Argument Number193 // int argnum; // Argument Number 194 194 assert(config); 195 195 … … 200 200 } 201 201 202 if ((argnum = psArgumentGet(argc, argv, "-psphot-visual"))) {203 psArgumentRemove(argnum, &argc, argv);204 psphotSetVisual(true);205 }206 202 207 203 psMetadata *arguments = config->arguments; // Command-line arguments … … 370 366 371 367 if (psMetadataLookupBool(NULL, arguments, "-visual")) { 372 pm SubtractionSetVisual(true);368 pmVisualSetVisual(true); 373 369 } 374 370 -
trunk/psModules
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/psModules merged eligible /branches/cnb_branch_20090215/psModules 21495-22685
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/psModules/src/astrom/pmAstrometryVisual.c
r21422 r23242 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; } -
trunk/psModules/src/astrom/pmAstrometryVisual.h
r21422 r23242 22 22 int sPeak; ///< sum of stars to peak bin 23 23 } pmLumFunc; 24 25 26 /** Enable or disable visual plotting for psastro routines27 * @param mode true/false to enable/disable plotting28 * @return true for success */29 bool pmAstromSetVisual(bool mode);30 24 31 25 -
trunk/psModules/src/extras/pmVisual.c
r21422 r23242 18 18 #include "pmHDU.h" 19 19 #include "pmFPA.h" 20 #include "pmFPAfile.h" 20 21 #include "pmAstrometryObjects.h" 22 #include "pmSubtractionStamps.h" 23 #include "pmTrend2D.h" 21 24 #include "pmFPAExtent.h" 22 25 … … 28 31 # define KAPAY 700 29 32 33 #include "pmAstrometryVisual.h" 34 #include "pmSubtractionVisual.h" 35 #include "pmStackVisual.h" 36 #include "pmSourceVisual.h" 37 38 //#define TESTING 39 40 static bool isVisual = false; 41 42 43 bool pmVisualSetVisual(bool value) { 44 isVisual = value; 45 return true; 46 } 47 48 49 bool pmVisualIsVisual(void) {return isVisual;} 50 51 bool pmVisualClose(void) { 52 pmAstromVisualClose(); 53 pmSubtractionVisualClose(); 54 pmStackVisualClose(); 55 pmSourceVisualClose(); 56 //XXX handle psphot 57 // psphotVisualClose(); 58 return true; 59 } 30 60 31 61 bool pmVisualInitWindow (int *kapid, char *name) { … … 34 64 if (*kapid == -1) { 35 65 fprintf (stderr, "Failure to open kapa.\n"); 66 isVisual = false; 36 67 return false; 37 68 } … … 52 83 53 84 54 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag)85 bool pmVisualAskUser(bool *plotFlag) 55 86 { 56 87 char key[10]; … … 63 94 } 64 95 if (key[0] == 'a') { 65 *packageFlag= false;96 isVisual = false; 66 97 } 67 98 return true; … … 182 213 183 214 bool pmVisualScaleImage(int kapaFD, psImage *inImage, const char *name, int channel, bool clip) { 184 185 215 KiiImage image; 186 216 KapaImageData data; 187 217 Coords coords; 188 218 189 //make sure we have a compatible image type 219 //make sure we have a compatible image 220 if (inImage == NULL) { 221 fprintf(stderr, "Image is NULL, and cannot be displayed\n"); 222 return false; 223 } 224 190 225 if(inImage->type.type != PS_TYPE_F32) { 191 226 fprintf(stderr, "Cannot display this image (imcompatible data type)\n"); … … 194 229 195 230 strcpy (coords.ctype, "RA---TAN"); 231 196 232 197 233 double min, max, stdev, mean; … … 304 340 305 341 #else 306 342 bool pmVisualSetVisual(bool value) {return true;} 343 bool pmVisualIsVisual(void) {return false;} 344 bool pmVisualClose(void) {return true;} 307 345 bool pmVisualInitWindow(int *kapid, char *name){return true;} 308 346 bool pmVisualInitGraph (int kapa, void *section, void *graphdata){return true;} 309 347 310 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag){return true;}348 bool pmVisualAskUser(bool *plotFlag){return true;} 311 349 bool pmVisualImStats(psImage *image, double *mean, 312 350 double *stdev, double *min, double *max){return true;} -
trunk/psModules/src/extras/pmVisual.h
r21422 r23242 10 10 11 11 #if (HAVE_KAPA) 12 13 14 /** Globally enable or disable plotting 15 * @param value - true to enable plotting 16 * @return true 17 */ 18 bool pmVisualSetVisual(bool value); 19 20 21 /** Check whether plotting is enabled 22 * @retrun true if plots should be generated 23 */ 24 bool pmVisualIsVisual(void); 25 26 27 /** Destroy plotting windows at the end of a run 28 * @return true for success */ 29 bool pmVisualClose(void); 12 30 13 31 … … 32 50 * At the user's request, this will disable diagnostic plotting. 33 51 * @param plotFlag, set to false if this plot should be disabled in the future 34 * @param packageFlag, set to false if all plots from this package (e.g. psastro, pmSubtraction)35 * should be disabled.36 52 */ 37 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag);53 bool pmVisualAskUser(bool *plotFlag); 38 54 39 55 … … 115 131 116 132 // kapa-specific data types are changed to void 133 bool pmVisualSetVisual(bool value); 134 bool pmVisualIsVisual(void); 135 bool pmVisualClose(void); 117 136 bool pmVisualInitWindow (int *kapid, char *name); 118 137 bool pmVisualInitGraph (int kapa, void *section, void *graphdata); 119 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag);138 bool pmVisualAskUser(bool *plotFlag); 120 139 bool pmVisualScaleImage(int kapaFD, psImage *inImage, 121 140 const char *name, int channel, bool clip); -
trunk/psModules/src/imcombine/Makefile.am
r21422 r23242 19 19 pmSubtractionThreads.c \ 20 20 pmPSFEnvelope.c \ 21 pmSubtractionVisual.c 21 pmSubtractionVisual.c \ 22 pmStackVisual.c 22 23 23 24 pkginclude_HEADERS = \ … … 37 38 pmSubtractionThreads.h \ 38 39 pmPSFEnvelope.h \ 39 pmSubtractionVisual.h 40 pmSubtractionVisual.h \ 41 pmStackVisual.h 40 42 41 43 CLEANFILES = *~ -
trunk/psModules/src/imcombine/pmPSFEnvelope.c
r23191 r23242 30 30 31 31 #include "pmPSFEnvelope.h" 32 32 #include "pmStackVisual.h" 33 33 34 34 … … 165 165 psStringAppend(&name, "psf_field_%03d.fits", i); 166 166 psFits *fits = psFitsOpen(name, "w"); 167 pmStackVisualPlotTestImage(fakeRO->image, name); 167 168 psFitsWriteImage(fits, NULL, fakeRO->image, 0, NULL); 168 169 psFitsClose(fits); … … 182 183 // Write out the envelope 183 184 psFits *fits = psFitsOpen("psf_field_envelope.fits", "w"); 185 pmStackVisualPlotTestImage(envelope, "psf_field_envelope.fits"); 184 186 psFitsWriteImage(fits, NULL, envelope, 0, NULL); 185 187 psFitsClose(fits); … … 234 236 // Write out the envelope 235 237 psFits *fits = psFitsOpen("psf_field_full.fits", "w"); 238 pmStackVisualPlotTestImage(readout->image, "psf_field_full.fits"); 236 239 psFitsWriteImage(fits, NULL, readout->image, 0, NULL); 237 240 psFitsClose(fits); … … 315 318 { 316 319 psFits *fits = psFitsOpen("psf_field_model.fits", "w"); 320 pmStackVisualPlotTestImage(generated->image, "psf_field_model.fits"); 317 321 psFitsWriteImage(fits, NULL, generated->image, 0, NULL); 318 322 psFitsClose(fits); … … 321 325 { 322 326 psFits *fits = psFitsOpen("psf_field_resid.fits", "w"); 327 pmStackVisualPlotTestImage(generated->image, "psf_field_resid.fits"); 323 328 psFitsWriteImage(fits, NULL, generated->image, 0, NULL); 324 329 psFitsClose(fits); -
trunk/psModules/src/imcombine/pmStack.c
r21476 r23242 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.48 $ $Name: not supported by cvs2svn $11 * @date $Date: 2009-02-1 3 23:52:14$10 * @version $Revision: 1.48.2.1 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2009-02-19 17:59:50 $ 12 12 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii 13 13 * -
trunk/psModules/src/imcombine/pmSubtractionIO.c
r22699 r23242 16 16 17 17 #include "pmSubtractionIO.h" 18 #include "pmStackVisual.h" 18 19 19 20 #define ARRAY_BUFFER 16 // Number to add to array at a time … … 144 145 // CVS tags, used to identify the version of this file (in case incompatibilities are introduced) 145 146 psString cvsFile = psStringCopy("$RCSfile: pmSubtractionIO.c,v $"); 146 psString cvsRev = psStringCopy("$Revision: 1.9 $");147 psString cvsDate = psStringCopy("$Date: 200 8-10-24 21:21:06$");147 psString cvsRev = psStringCopy("$Revision: 1.9.18.1 $"); 148 psString cvsDate = psStringCopy("$Date: 2009-02-19 17:59:50 $"); 148 149 psStringSubstitute(&cvsFile, NULL, "RCSfile: "); 149 150 psStringSubstitute(&cvsRev, NULL, "Revision: "); … … 167 168 168 169 psImage *image = psMetadataLookupPtr(NULL, ro->analysis, PM_SUBTRACTION_ANALYSIS_KERNEL_IMAGE); // Image 170 pmStackVisualPlotTestImage(image, "Subtraction_kernels.fits"); 171 169 172 if (image && !psFitsWriteImage(fits, header, image, 0, EXTNAME_IMAGE)) { 170 173 psError(PS_ERR_IO, false, "Unable to write subtraction kernel image."); -
trunk/psModules/src/imcombine/pmSubtractionVisual.c
r21422 r23242 28 28 29 29 //variables to determine when things are plotted 30 static bool isVisual = false;31 30 static bool plotConvKernels = true; 32 31 static bool plotStamps = true; … … 42 41 // Initialization Routines 43 42 44 /** start or stop plotting */45 bool pmSubtractionSetVisual (bool mode) {46 isVisual = mode;47 return true;48 }49 43 50 44 … … 65 59 * @return true for success */ 66 60 bool pmSubtractionVisualPlotConvKernels(psImage *convKernels) { 67 if (! isVisual|| !plotConvKernels) return true;61 if (!pmVisualIsVisual() || !plotConvKernels) return true; 68 62 if (!pmVisualInitWindow(&kapa, "ppSub:Images")) { 69 isVisual = false;70 63 return false; 71 64 } 72 65 pmVisualScaleImage(kapa, convKernels, "Convolution_Kernels", 0, true); 73 pmVisualAskUser(&plotConvKernels , &isVisual);66 pmVisualAskUser(&plotConvKernels); 74 67 return true; 75 68 } … … 80 73 @return true for success */ 81 74 bool pmSubtractionVisualPlotStamps(pmSubtractionStampList *stamps, pmReadout *ro) { 82 if (! isVisual|| !plotStamps) return true;75 if (!pmVisualIsVisual() || !plotStamps) return true; 83 76 if (!pmVisualInitWindow (&kapa, "ppSub:Images")) { 84 isVisual = false;85 77 return false; 86 78 } 87 79 if (!pmVisualInitWindow (&kapa2, "ppSub:StampMasterImage")) { 88 isVisual = false;89 80 return false; 90 81 } … … 145 136 pmVisualScaleImage(kapa, canvas, "Subtraction_Stamps", 0, true); 146 137 147 pmVisualAskUser(&plotStamps , &isVisual);138 pmVisualAskUser(&plotStamps); 148 139 return true; 149 140 } … … 152 143 bool pmSubtractionVisualPlotLeastSquares (pmSubtractionStampList *stamps, bool dual) { 153 144 154 if (! isVisual|| !plotLeastSquares) return true;145 if (!pmVisualIsVisual() || !plotLeastSquares) return true; 155 146 if (!pmVisualInitWindow (&kapa, "PPSub:Images")) { 156 isVisual = false;157 147 return false; 158 148 } … … 209 199 pmVisualScaleImage(kapa, canvas32, "Least_Squares", 0, true); 210 200 211 pmVisualAskUser(&plotLeastSquares , &isVisual);201 pmVisualAskUser(&plotLeastSquares); 212 202 psFree(canvas); 213 203 psFree(canvas32); … … 216 206 217 207 bool pmSubtractionVisualShowSubtraction(psImage *image, psImage *ref, psImage *sub) { 218 if (! isVisual|| !plotImage) return true;208 if (!pmVisualIsVisual() || !plotImage) return true; 219 209 if (!pmVisualInitWindow (&kapa, "PPSub:Images")) { 220 isVisual = false;221 210 return false; 222 211 } … … 225 214 pmVisualScaleImage(kapa, ref, "Reference", 1, true); 226 215 pmVisualScaleImage(kapa, sub, "Subtraction", 2, true); 227 pmVisualAskUser(&plotImage , &isVisual);216 pmVisualAskUser(&plotImage); 228 217 return true; 229 218 } … … 267 256 268 257 #else 269 bool pmSubtractionSetVisual (bool mode) {return true;}270 258 bool pmSubtractionVisualClose() {return true;} 271 259 bool pmSubtractionVisualPlotConvKernels(psImage *convKernels) {return true;} -
trunk/psModules/src/imcombine/pmSubtractionVisual.h
r21422 r23242 2 2 #define PM_SUBTRACTION_VISUAL_H 3 3 4 bool pmSubtractionSetVisual (bool mode);5 4 bool pmSubtractionVisualClose(); 6 5 bool pmSubtractionVisualPlotConvKernels(psImage *convKernels); -
trunk/psModules/src/objects/pmSourceVisual.c
r22752 r23242 9 9 #if (HAVE_KAPA) 10 10 #include <kapa.h> 11 #include "pmVisual.h" 11 12 12 13 // functions used to visualize the analysis as it goes 13 14 // these are invoked by the -visual options 14 15 15 static bool isVisual = false;16 16 static int kapa1 = -1; 17 static bool plotPSF = true; 17 18 // static int kapa2 = -1; 18 19 // static int kapa3 = -1; 19 20 21 bool pmSourceVisualClose() { 22 if (kapa1 != -1) 23 KiiClose(kapa1); 24 return true; 25 } 26 20 27 bool pmSourcePlotPoints3D (int myKapa, Graphdata *graphdata, psVector *xn, psVector *yn, psVector *zn, float theta, float phi); 21 28 22 bool pmSourceSetVisual (bool mode) {23 24 isVisual = mode;25 return true;26 }27 29 28 30 bool pmSourceVisualPSFModelResid (pmTrend2D *trend, psVector *x, psVector *y, psVector *param, psVector *mask) { … … 32 34 Graphdata graphdata; 33 35 34 if (! isVisual) return true;36 if (!pmVisualIsVisual() || !plotPSF) return true; 35 37 36 38 if (kapa1 == -1) { … … 38 40 if (kapa1 == -1) { 39 41 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 40 isVisual = false;42 pmVisualSetVisual(false); 41 43 return false; 42 44 } … … 152 154 // pause and wait for user input: 153 155 // continue, save (provide name), ?? 154 char key[10]; 155 fprintf (stdout, "[c]ontinue? "); 156 if (!fgets(key, 8, stdin)) { 157 psWarning("Unable to read option"); 158 } 156 pmVisualAskUser(&plotPSF); 157 159 158 return true; 160 159 } -
trunk/psModules/src/objects/pmSourceVisual.h
r20582 r23242 1 1 /* @file pmKapaPlots.h 2 * @brief functions to make plots with the external program 'kapa' 2 * @brief functions to make plots with the external program 'kapa' 3 3 * 4 4 * @author EAM, IfA 5 5 * 6 * @version $Revision: 1.1 $ $Name: not supported by cvs2svn $7 * @date $Date: 200 8-11-08 01:52:34$6 * @version $Revision: 1.1.16.1 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2009-02-19 17:59:50 $ 8 8 * Copyright 2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 12 12 #define PM_SOURCE_VISUAL_H 13 13 14 bool pmSourceVisualClose(void); 15 14 16 /// @addtogroup Extras Miscellaneous Funtions 15 17 /// @{ 16 18 17 bool pmSourceSetVisual (bool mode);18 19 bool pmSourceVisualPSFModelResid (pmTrend2D *trend, psVector *x, psVector *y, psVector *param, psVector *mask); 19 20 -
trunk/psModules/src/psmodules.h
r23184 r23242 101 101 #include <pmReadoutCombine.h> 102 102 #include <pmSubtractionVisual.h> 103 #include <pmStackVisual.h> 103 104 104 105 // the following headers are from psModule:objects -
trunk/psastro
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/psastro merged eligible /branches/cnb_branch_20090215/psastro 21495-22685
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/psastro/src/psastroArguments.c
r21422 r23242 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1.34 $ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02- 09 21:25:34$8 * @version $Revision: 1.34.2.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-19 17:59:50 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 100 100 if ((N = psArgumentGet (argc, argv, "-visual"))) { 101 101 psArgumentRemove (N, &argc, argv); 102 pm AstromSetVisual (true);102 pmVisualSetVisual (true); 103 103 } 104 104 -
trunk/psastro/src/psastroCleanup.c
r21422 r23242 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02- 09 21:25:34$8 * @version $Revision: 1.8.2.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-19 17:59:50 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 16 16 17 17 psFree (config); 18 pm AstromVisualClose ();18 pmVisualClose (); 19 19 20 20 psTimerStop (); -
trunk/psphot
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/psphot merged eligible /branches/cnb_branch_20090215/psphot 21495-22685
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/psphot/src/psphot.h
r23195 r23242 171 171 172 172 // psphotVisual functions 173 bool psphotSetVisual (bool mode);174 173 bool psphotVisualShowImage (pmReadout *readout); 175 174 bool psphotVisualShowBackground (pmConfig *config, const pmFPAview *view, pmReadout *readout); -
trunk/psphot/src/psphotArguments.c
r21458 r23242 82 82 if ((N = psArgumentGet (argc, argv, "-visual"))) { 83 83 psArgumentRemove (N, &argc, argv); 84 psphotSetVisual (true); 85 // pmSourceSetVisual (true); 84 pmVisualSetVisual(true); 86 85 } 87 86 -
trunk/psphot/src/psphotVisual.c
r21519 r23242 18 18 // these are invoked by the -visual options 19 19 20 static bool isVisual = false;21 20 static int kapa = -1; 22 21 static int kapa2 = -1; 23 22 static int kapa3 = -1; 24 23 25 bool psphotSetVisual (bool mode) {26 27 isVisual = mode;28 return true;29 }30 24 31 25 bool psphotVisualShowMask (int kapaFD, psImage *inImage, const char *name, int channel) { … … 135 129 bool psphotVisualShowImage (pmReadout *readout) { 136 130 137 if (! isVisual) return true;131 if (!pmVisualIsVisual()) return true; 138 132 139 133 if (kapa == -1) { … … 141 135 if (kapa == -1) { 142 136 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 143 isVisual = false;137 pmVisualSetVisual(false); 144 138 return false; 145 139 } … … 164 158 pmReadout *backgnd; 165 159 166 if (! isVisual) return true;160 if (!pmVisualIsVisual()) return true; 167 161 168 162 if (kapa == -1) { … … 170 164 if (kapa == -1) { 171 165 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 172 isVisual = false;166 pmVisualSetVisual(false); 173 167 return false; 174 168 } … … 199 193 bool psphotVisualShowSignificance (psImage *image) { 200 194 201 if (! isVisual) return true;195 if (!pmVisualIsVisual()) return true; 202 196 203 197 if (kapa == -1) { … … 205 199 if (kapa == -1) { 206 200 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 207 isVisual = false;201 pmVisualSetVisual(false); 208 202 return false; 209 203 } … … 228 222 KiiOverlay *overlay; 229 223 230 if (! isVisual) return true;224 if (!pmVisualIsVisual()) return true; 231 225 232 226 if (kapa == -1) { … … 306 300 KiiOverlay *overlay; 307 301 308 if (! isVisual) return true;302 if (!pmVisualIsVisual()) return true; 309 303 310 304 if (kapa == -1) { … … 423 417 psEllipseAxes axes; 424 418 425 if (! isVisual) return true;419 if (!pmVisualIsVisual()) return true; 426 420 427 421 if (kapa == -1) { … … 478 472 Graphdata graphdata; 479 473 480 if (! isVisual) return true;474 if (!pmVisualIsVisual()) return true; 481 475 482 476 if (kapa3 == -1) { … … 484 478 if (kapa3 == -1) { 485 479 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 486 isVisual = false;480 pmVisualSetVisual(false); 487 481 return false; 488 482 } … … 694 688 bool psphotVisualShowRoughClass (psArray *sources) { 695 689 696 if (! isVisual) return true;690 if (!pmVisualIsVisual()) return true; 697 691 698 692 if (kapa == -1) { … … 723 717 bool psphotVisualShowPSFModel (pmReadout *readout, pmPSF *psf) { 724 718 725 if (! isVisual) return true;719 if (!pmVisualIsVisual()) return true; 726 720 727 721 if (kapa2 == -1) { … … 729 723 if (kapa2 == -1) { 730 724 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 731 isVisual = false;725 pmVisualSetVisual(false); 732 726 return false; 733 727 } … … 801 795 bool status; 802 796 803 if (! isVisual) return true;797 if (!pmVisualIsVisual()) return true; 804 798 805 799 if (kapa2 == -1) { … … 807 801 if (kapa2 == -1) { 808 802 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 809 isVisual = false;803 pmVisualSetVisual(false); 810 804 return false; 811 805 } … … 961 955 bool status; 962 956 963 if (! isVisual) return true;957 if (!pmVisualIsVisual()) return true; 964 958 965 959 if (kapa2 == -1) { … … 967 961 if (kapa2 == -1) { 968 962 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 969 isVisual = false;963 pmVisualSetVisual(false); 970 964 return false; 971 965 } … … 1214 1208 KapaSection section; // put the positive profile in one and the residuals in another? 1215 1209 1216 if (! isVisual) return true;1210 if (!pmVisualIsVisual()) return true; 1217 1211 1218 1212 if (kapa3 == -1) { … … 1220 1214 if (kapa3 == -1) { 1221 1215 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 1222 isVisual = false;1216 pmVisualSetVisual(false); 1223 1217 return false; 1224 1218 } … … 1286 1280 psEllipseAxes axes; 1287 1281 1288 if (! isVisual) return true;1282 if (!pmVisualIsVisual()) return true; 1289 1283 1290 1284 if (kapa == -1) { … … 1387 1381 KiiOverlay *overlay; 1388 1382 1389 if (! isVisual) return true;1383 if (!pmVisualIsVisual()) return true; 1390 1384 1391 1385 if (kapa == -1) { … … 1464 1458 KapaSection section; 1465 1459 1466 if (! isVisual) return true;1460 if (!pmVisualIsVisual()) return true; 1467 1461 1468 1462 if (kapa3 == -1) { … … 1470 1464 if (kapa3 == -1) { 1471 1465 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 1472 isVisual = false;1466 pmVisualSetVisual(false); 1473 1467 return false; 1474 1468 } … … 1604 1598 bool psphotVisualShowResidualImage (pmReadout *readout) { 1605 1599 1606 if (! isVisual) return true;1600 if (!pmVisualIsVisual()) return true; 1607 1601 1608 1602 if (kapa == -1) { … … 1610 1604 if (kapa == -1) { 1611 1605 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 1612 isVisual = false;1606 pmVisualSetVisual(false); 1613 1607 return false; 1614 1608 } … … 1631 1625 Graphdata graphdata; 1632 1626 1633 if (! isVisual) return true;1627 if (!pmVisualIsVisual()) return true; 1634 1628 1635 1629 if (kapa3 == -1) { … … 1637 1631 if (kapa3 == -1) { 1638 1632 fprintf (stderr, "failure to open kapa; visual mode disabled\n"); 1639 isVisual = false;1633 pmVisualSetVisual(false); 1640 1634 return false; 1641 1635 } … … 1712 1706 # else 1713 1707 1714 bool psphotSetVisual (bool mode){}1715 1708 bool psphotVisualShowImage (pmConfig *config, pmReadout *readout) { return true; } 1716 1709 bool psphotVisualShowBackground (pmConfig *config, const pmFPAview *view, pmReadout *readout) { return true; } -
trunk/pswarp/src/pswarpArguments.c
r22736 r23242 41 41 if ((arg = psArgumentGet(argc, argv, "-psphot-visual"))) { 42 42 psArgumentRemove(arg, &argc, argv); 43 p sphotSetVisual(true);43 pmVisualSetVisual(true); 44 44 } 45 45 }
Note:
See TracChangeset
for help on using the changeset viewer.
