 Timestamp:
 Feb 17, 2012 12:04:13 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Panel.ipf
r798 r836 84 84 Button FFTButton_2,pos={14,187},size={100,20},proc=FFTDrawSphereButtonProc,title="Draw Sphere" 85 85 Button FFTButton_3,pos={14,265},size={70,20},proc=DoTheFFT_ButtonProc,title="Do FFT" 86 Button FFTButton_4,pos={1 91,264},size={110,20},proc=FFT_PlotResultsButtonProc,title="Plot 1DResults"86 Button FFTButton_4,pos={180,264},size={130,20},proc=FFT_PlotResultsButtonProc,title="Plot FFT Results" 87 87 Button FFTButton_5,pos={13,218},size={120,20},proc=FFTDrawZCylinderButtonProc,title="Draw Cylinder" 88 88 Button FFTButton_6,pos={134,79},size={90,20},proc=FFTEraseMatrixButtonProc,title="Erase Matrix" 89 89 Button FFTButton_7,pos={13,329},size={130,20},proc=FFT_BinnedSpheresButtonProc,title="Do Binned Debye" 90 Button FFTButton_7a,pos={180,329},size={130,20},proc=FFT_PlotResultsButtonProc,title="Plot Binned Results" 91 90 92 Button FFTButton_8,pos={13,297},size={130,20},proc=FFT_AltiSpheresButtonProc,title="Do Debye Spheres" 93 Button FFTButton_8a,pos={180,297},size={130,20},proc=FFT_PlotResultsButtonProc,title="Plot Debye Results" 94 91 95 Button FFTButton_14,pos={13,360},size={130,20},proc=FFT_BinnedSLDButtonProc,title="Do Binned SLD" 96 Button FFTButton_14a,pos={180,360},size={130,20},proc=FFT_PlotResultsButtonProc,title="Plot SLD Results" 97 92 98 SetVariable FFTSetVar_4,pos={201,4},size={100,15},title="FFT time(s)" 93 99 SetVariable FFTSetVar_4,limits={0,0,0},value= FFT_estTime,noedit= 1,live= 1,format="%d" 94 Button FFTButton_9,pos={200, 295},size={100,20},proc=FFT_Get2DSlice,title="GetSlice"100 Button FFTButton_9,pos={200,400},size={100,20},proc=FFT_Get2DSlice,title="Get 2D Slice" 95 101 Button FFTButton_10,pos={169,156},size={130,20},proc=FFT_TransposeMat,title="Transpose Matrix" 96 102 Button FFTButton_11,pos={169,189},size={130,20},proc=FFT_RotateMat,title="Rotate Matrix" 97 103 Button FFTButton_12,pos={168,219},size={130,20},proc=FFT_AddRotatedObject,title="Add Rotated Obj" 104 Button FFTButton_12,disable=2 // hide this button 98 105 Button FFTButton_13,pos={14,109},size={120,20},proc=FFTFillSolventMatrixProc,title="Solvent Matrix" 99 SetVariable FFTSetVar_5,pos={155,111},size={1 00,15},title="Solvent SLD"106 SetVariable FFTSetVar_5,pos={155,111},size={150,15},title="Solvent SLD (10^6)" 100 107 SetVariable FFTSetVar_5,limits={99,99,1},value= FFT_SolventSLD,live= 1 101 Button FFTButton_15,pos={209,327},size={90,20},proc=Interp2DSliceButton,title="Interp 2D" 108 Button FFTButton_15,pos={209,430},size={90,20},proc=Interp2DSliceButton,title="Interp 2D" 109 Button FFTButton_16,pos={14,460},size={70,20},proc=FFTHelpButton,title="Help" 102 110 EndMacro 111 112 Function FFTHelpButton(ba) : ButtonControl 113 STRUCT WMButtonAction &ba 114 115 String win = ba.win 116 117 switch (ba.eventCode) 118 case 2: 119 // click code here 120 DisplayHelpTopic/Z/K=1 "RealSpace Modeling" 121 if(V_flag !=0) 122 DoAlert 0,"The RealSpace Modeling Help file could not be found" 123 endif 124 break 125 endswitch 126 127 return 0 128 End 129 103 130 104 131 Function Interp2DSliceButton(ba) : ButtonControl … … 424 451 String ctrlName 425 452 453 Variable first=0 426 454 DoWindow/F FFT_IQ 427 455 if(V_flag==0) 428 Execute "FFT_IQ()" 456 first = 1 457 Display /W=(295,44,627,302) 458 DoWindow/C FFT_IQ 429 459 Endif 430 End 431 460 461 // append the desired data, if it's not already there 462 // FFTButton_4 = FFT = iBin 463 // FFTButton_7a = binned = _XOP 464 // FFTButton_8a = Debye = _full 465 // FFTButton_14a = SLD = _SLD 466 strswitch(ctrlName) 467 case "FFTButton_4": 468 if(!isTraceOnGraph("iBin","FFT_IQ") && exists("iBin")==1) //only append if it's not already there 469 AppendToGraph /W=FFT_IQ iBin vs qBin 470 ModifyGraph mode=4,marker=19,msize=2,rgb(iBin)=(65535,0,0) 471 endif 472 break 473 case "FFTButton_7a": 474 if(!isTraceOnGraph("ival_XOP","FFT_IQ") && exists("ival_XOP")==1) //only append if it's not already there 475 AppendToGraph /W=FFT_IQ ival_XOP vs qval_XOP 476 ModifyGraph mode=4,marker=19,msize=2,rgb(ival_XOP)=(1,12815,52428) 477 endif 478 break 479 case "FFTButton_8a": 480 if(!isTraceOnGraph("ival_full","FFT_IQ") && exists("ival_full")==1) //only append if it's not already there 481 AppendToGraph /W=FFT_IQ ival_full vs qval_full 482 ModifyGraph mode=4,marker=19,msize=2,rgb(ival_full)=(0,0,0) 483 endif 484 break 485 case "FFTButton_14a": 486 if(!isTraceOnGraph("ival_SLD","FFT_IQ") && exists("ival_SLD")==1) //only append if it's not already there 487 AppendToGraph /W=FFT_IQ ival_SLD vs qval_SLD 488 ModifyGraph mode=4,marker=19,msize=2,rgb(ival_SLD)=(2,39321,1) 489 endif 490 break 491 endswitch 492 493 if(first) 494 ModifyGraph mode=4 495 ModifyGraph marker=19 496 ModifyGraph msize=2 497 ModifyGraph gaps=0 498 ModifyGraph grid=1 499 ModifyGraph log=1 500 ModifyGraph mirror=2 501 Legend 502 endif 503 504 return(0) 505 End 506 507 Function isTraceOnGraph(traceStr,winStr) 508 String traceStr,winStr 509 510 Variable isOn=0 511 String str 512 str = TraceNameList("winStr",";",1) //only normal traces 513 isOn = stringmatch(str,traceStr) //must be an exact match 514 515 return(isOn) 516 End 432 517 433 518 Function FFTEraseMatrixButtonProc(ctrlName) : ButtonControl … … 466 551 End 467 552 468 469 Proc FFT_IQ() : Graph470 PauseUpdate; Silent 1 // building window...471 Display /W=(295,44,627,302) iBin vs qBin472 DoWindow/C FFT_IQ473 ModifyGraph mode=4474 ModifyGraph marker=19475 ModifyGraph msize=2476 ModifyGraph gaps=0477 ModifyGraph grid=1478 ModifyGraph log=1479 ModifyGraph mirror=2480 Legend/N=text0/J "\\s(iBin) iBin"481 EndMacro482 553 483 554
Note: See TracChangeset
for help on using the changeset viewer.