Changeset 778 for sans/Dev/trunk/NCNR_User_Procedures
- Timestamp:
- Dec 22, 2010 11:49:36 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Marquee.ipf
r776 r778 647 647 endif 648 648 649 650 //could draw the width lines on the graph using the normal drawing routines 651 // -- but can't draw horizontal and vertical on at the same time. MasterAngleDraw clears 652 // between drawing. Also, the lines are drawn though the beam center of the data file as 653 // loaded. Not good for beamstop alignment, since the beam center may not have been measured yet 654 // SVAR tempStr = root:myGlobals:Drawing:gDrawInfoStr 655 // String newStr = ReplaceNumberByKey("WIDTH", tempStr, xWidth, "=", ";") 656 // newStr = ReplaceNumberByKey("PHI", newStr, 0, "=", ";") 657 // String/G root:myGlobals:Drawing:gDrawInfoStr = newStr 658 // //redraw the angles 659 // MasterAngleDraw() 660 661 // so use a pair of cursors instead (how do I easily get rid of them?) - a "done" button 662 Cursor/W=SANS_Data/K B 663 Cursor/W=SANS_Data/K C 664 665 Cursor/W=SANS_Data/F/I B data (xin-xwidth), (yin-yWidth) 666 Cursor/W=SANS_Data/M/S=2/H=1/L=1/C=(3,52428,1) B 667 // Cursor/W=SANS_Data/M/A=0 B 668 669 Cursor/W=SANS_Data/F/I C data (xin+xwidth), (yin+yWidth) 670 Cursor/W=SANS_Data/M/S=2/H=1/L=1/C=(3,52428,1) C 671 // Cursor/W=SANS_Data/M/A=0 C 672 649 673 return(0) 650 674 end … … 653 677 Function Draw_HistoPair() 654 678 PauseUpdate; Silent 1 // building window... 655 Display /W=(432.75,431.75,903,698.75)/K= 1AvgCountsX vs PositionX as "Histogram Pair"679 Display /W=(432.75,431.75,903,698.75)/K=2 AvgCountsX vs PositionX as "Histogram Pair" 656 680 AppendToGraph/L=leftY/B=bottomY AvgCountsY vs PositionY 657 681 DoWindow/C HistoPair … … 685 709 Button button0 title="Update",size={70,20},pos={200,9},proc=SH_RecalcButton 686 710 SetVariable setvar0,pos={20,11},size={120,16},title="Width (pixels)" 687 SetVariable setvar0,limits={0,64,1},value= _NUM:5 688 711 SetVariable setvar0,limits={0,64,1},value= _NUM:5,proc=SH_WidthSetVarProc 712 713 Button button1 title="Done",size={70,20},pos={300,9},proc=SH_DoneButton 714 689 715 EndMacro 690 716 … … 733 759 return 0 734 760 End 761 762 Function SH_DoneButton(ba) : ButtonControl 763 STRUCT WMButtonAction &ba 764 765 switch( ba.eventCode ) 766 case 2: // mouse up 767 // click code here 768 DoWindow/K HistoPair 769 Cursor/W=SANS_Data/K A 770 Cursor/W=SANS_Data/K B 771 Cursor/W=SANS_Data/K C 772 break 773 endswitch 774 775 return 0 776 End 777 Function SH_WidthSetVarProc(sva) : SetVariableControl 778 STRUCT WMSetVariableAction &sva 779 780 switch( sva.eventCode ) 781 case 1: // mouse up 782 case 2: // Enter key 783 case 3: // Live update 784 Variable dval = sva.dval 785 String sval = sva.sval 786 787 DoHistogramPair(hcsr(A,"SANS_Data"),vcsr(A,"SANS_Data")) 788 789 break 790 endswitch 791 792 return 0 793 End
Note: See TracChangeset
for help on using the changeset viewer.