- Timestamp:
- Apr 5, 2017 7:50:11 AM (6 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Q.ipf
r1031 r1032 846 846 847 847 if(binType==1) 848 ClearIQIfDisplayed("VCALC","MLRTB" )849 ClearIQIfDisplayed("VCALC","MLR" )850 ClearIQIfDisplayed("VCALC","MTB" )848 ClearIQIfDisplayed("VCALC","MLRTB","") 849 ClearIQIfDisplayed("VCALC","MLR","") 850 ClearIQIfDisplayed("VCALC","MTB","") 851 851 852 852 SetDataFolder root:Packages:NIST:VSANS:VCALC … … 870 870 871 871 if(binType==2) 872 ClearIQIfDisplayed("VCALC","MLRTB" )873 ClearIQIfDisplayed("VCALC","MT" )874 ClearIQIfDisplayed("VCALC","ML" )875 ClearIQIfDisplayed("VCALC","MR" )876 ClearIQIfDisplayed("VCALC","MB" )872 ClearIQIfDisplayed("VCALC","MLRTB","") 873 ClearIQIfDisplayed("VCALC","MT","") 874 ClearIQIfDisplayed("VCALC","ML","") 875 ClearIQIfDisplayed("VCALC","MR","") 876 ClearIQIfDisplayed("VCALC","MB","") 877 877 878 878 … … 898 898 899 899 if(binType==3) 900 ClearIQIfDisplayed("VCALC","MLR" )901 ClearIQIfDisplayed("VCALC","MTB" )902 ClearIQIfDisplayed("VCALC","MT" )903 ClearIQIfDisplayed("VCALC","ML" )904 ClearIQIfDisplayed("VCALC","MR" )905 ClearIQIfDisplayed("VCALC","MB" )900 ClearIQIfDisplayed("VCALC","MLR","") 901 ClearIQIfDisplayed("VCALC","MTB","") 902 ClearIQIfDisplayed("VCALC","MT","") 903 ClearIQIfDisplayed("VCALC","ML","") 904 ClearIQIfDisplayed("VCALC","MR","") 905 ClearIQIfDisplayed("VCALC","MB","") 906 906 907 907 SetDataFolder root:Packages:NIST:VSANS:VCALC … … 924 924 925 925 if(binType==4) // slit aperture binning - MT, ML, MR, MB are averaged 926 ClearIQIfDisplayed("VCALC","MLRTB" )927 ClearIQIfDisplayed("VCALC","MLR" )928 ClearIQIfDisplayed("VCALC","MTB" )926 ClearIQIfDisplayed("VCALC","MLRTB","") 927 ClearIQIfDisplayed("VCALC","MLR","") 928 ClearIQIfDisplayed("VCALC","MTB","") 929 929 930 930 SetDataFolder root:Packages:NIST:VSANS:VCALC … … 1206 1206 1207 1207 if(binType==1) 1208 ClearIQIfDisplayed("VCALC","FLRTB" )1209 ClearIQIfDisplayed("VCALC","FLR" )1210 ClearIQIfDisplayed("VCALC","FTB" )1208 ClearIQIfDisplayed("VCALC","FLRTB","") 1209 ClearIQIfDisplayed("VCALC","FLR","") 1210 ClearIQIfDisplayed("VCALC","FTB","") 1211 1211 1212 1212 SetDataFolder root:Packages:NIST:VSANS:VCALC … … 1233 1233 1234 1234 if(binType==2) 1235 ClearIQIfDisplayed("VCALC","FLRTB" )1236 ClearIQIfDisplayed("VCALC","FT" )1237 ClearIQIfDisplayed("VCALC","FL" )1238 ClearIQIfDisplayed("VCALC","FR" )1239 ClearIQIfDisplayed("VCALC","FB" )1235 ClearIQIfDisplayed("VCALC","FLRTB","") 1236 ClearIQIfDisplayed("VCALC","FT","") 1237 ClearIQIfDisplayed("VCALC","FL","") 1238 ClearIQIfDisplayed("VCALC","FR","") 1239 ClearIQIfDisplayed("VCALC","FB","") 1240 1240 1241 1241 … … 1261 1261 1262 1262 if(binType==3) 1263 ClearIQIfDisplayed("VCALC","FLR" )1264 ClearIQIfDisplayed("VCALC","FTB" )1265 ClearIQIfDisplayed("VCALC","FT" )1266 ClearIQIfDisplayed("VCALC","FL" )1267 ClearIQIfDisplayed("VCALC","FR" )1268 ClearIQIfDisplayed("VCALC","FB" )1263 ClearIQIfDisplayed("VCALC","FLR","") 1264 ClearIQIfDisplayed("VCALC","FTB","") 1265 ClearIQIfDisplayed("VCALC","FT","") 1266 ClearIQIfDisplayed("VCALC","FL","") 1267 ClearIQIfDisplayed("VCALC","FR","") 1268 ClearIQIfDisplayed("VCALC","FB","") 1269 1269 1270 1270 SetDataFolder root:Packages:NIST:VSANS:VCALC … … 1288 1288 1289 1289 if(binType==4) //slit mode 1290 ClearIQIfDisplayed("VCALC","FLRTB" )1291 ClearIQIfDisplayed("VCALC","FLR" )1292 ClearIQIfDisplayed("VCALC","FTB" )1290 ClearIQIfDisplayed("VCALC","FLRTB","") 1291 ClearIQIfDisplayed("VCALC","FLR","") 1292 ClearIQIfDisplayed("VCALC","FTB","") 1293 1293 1294 1294 SetDataFolder root:Packages:NIST:VSANS:VCALC … … 1324 1324 // and if it is, it will be removed 1325 1325 // 1326 // VCALC panel can pass in "" for the winNameStr 1327 // 1326 1328 Function ClearIQIfDisplayed_AllFldr(type,winNameStr) 1327 1329 String type,winNameStr … … 1344 1346 // ("B", "FLTB", "MTB" etc) will be checked to see if the data is on the graph 1345 1347 // and if it is, it will be removed 1348 // 1349 // VCALC panel can pass in "" for the winNameStr 1346 1350 // 1347 1351 Function ClearIQIfDisplayed_AllBin(fldr,winNameStr) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Combine_1D.ipf
r1031 r1032 18 18 // TODO: 19 19 // x- add a popup to the load tab to set the work folder 20 // -- add this file to the Includes list and to the SVN folder20 // x- add this file to the Includes list and to the SVN folder 21 21 // -- add button (mask tab) to save mask 22 22 // -- add button (mask tab) to recall mask … … 44 44 // masking 45 45 // 46 // -- remove the mask by relative error button - this is not really a good idea. 46 47 // 47 48 // … … 672 673 endPt=numpnts(MaskData) 673 674 674 pct = 0. 25675 pct = 0.05 675 676 676 677 for(ii=0;ii<endPt;ii+=1) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Marquee_Operations.ipf
r1028 r1032 11 11 // -- still many operations in (SANS)Marquee.ipf that will be useful to implement: 12 12 // 13 // -- writing the box co rrdinates and the counts (and error) to the data file13 // -- writing the box coordinates and the counts (and error) to the data file 14 14 // -- determining the beam center (centroid) of the selection + writing this to the file 15 15 // -- a box sum over a range of files (with a plot) … … 21 21 // 22 22 // 23 24 25 // TODO:26 // -- make a separate file with PRODIV27 // -- follow through the logic and reduction to create a DIV file28 // -- start with command line utilities, then work on a panel as needed.29 23 30 24 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1030 r1032 530 530 531 531 532 Function/S V_GetBGDList() 533 534 String match="BLOCKED BEAM" 535 String list = V_getFileIntentList(match,0) 536 537 // Printf "BGD files = %s\r",list 538 return(list) 539 end 540 541 542 Function/S V_GetEMPList() 543 544 String match="EMPTY CELL" 545 String list = V_getFileIntentList(match,0) 546 547 // Printf "EMP files = %s\r",list 548 return(list) 549 end 550 551 552 // testStr is the "intent" string, or grep string 553 // method is the method to use to find the file 554 // 0 = (default) is to use the file catalog (= fastest) 555 // 1 = Grep (not terribly slow) 556 // 2 = read every file (bad choice) 557 // 558 Function/S V_getFileIntentList(testStr,method) 559 String testStr 560 Variable method 561 562 Variable ii,num 563 String list="",item="",fname,newList,intent 564 565 // read every file... 566 if(method == 2) 567 PathInfo catPathName 568 String path = S_path 569 newList = V_GetRawDataFileList() 570 num=ItemsInList(newList) 571 572 for(ii=0;ii<num;ii+=1) 573 item=StringFromList(ii, newList , ";") 574 fname = path + item 575 intent = V_getReduction_intent(fname) 576 if(cmpstr(intent,testStr) == 0) 577 list += item + ";" 578 endif 579 endfor 580 endif 581 582 // use Grep 583 if(method == 1) 584 newList = V_GetRawDataFileList() 585 num=ItemsInList(newList) 586 for(ii=0;ii<num;ii+=1) 587 item=StringFromList(ii, newList , ";") 588 Grep/P=catPathName/Q/E=("(?i)"+testStr) item 589 if( V_value ) // at least one instance was found 590 // Print "found ", item,ii 591 list += item + ";" 592 endif 593 endfor 594 595 else 596 // get the list from the file catalog 597 598 WAVE/T fileNameW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames 599 WAVE/T intentW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent 600 601 Variable np = numpnts(intentW) //fileNameW is LONGER - so don't use numpnts(fileWave) 602 for(ii=0;ii<np;ii+=1) 603 if(cmpstr(intentW[ii],testStr)==0) 604 list += fileNameW[ii] + ";" 605 endif 606 endfor 607 608 List = SortList(List,";",0) 609 endif 610 611 return(list) 612 end 613 532 614 // 533 615 // TODO … … 546 628 PathInfo catPathName 547 629 String path = S_path 548 549 newList = V_GetRawDataFileList() 630 631 String match="BLOCKED BEAM" 632 633 //s_tic() 634 // get the list from the file catalog (=0.0007s) 635 // 636 WAVE/T fileNameW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames 637 WAVE/T intentW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent 638 639 Variable np = numpnts(intentW) 640 for(ii=0;ii<np;ii+=1) 641 if(cmpstr(intentW[ii],match)==0) 642 list += fileNameW[ii] + ";" 643 endif 644 endfor 645 646 List = SortList(List,";",0) 647 Printf "BGD files = %s\r",list 648 //S_toc() 649 650 651 ////S_tic() // from grep = 3.3s 652 // newList = V_GetRawDataFileList() 653 // num=ItemsInList(newList) 654 // 655 //// for(ii=0;ii<num;ii+=1) 656 //// item=StringFromList(ii, newList , ";") 657 //// fname = path + item 658 //// intent = V_getReduction_intent(fname) 659 //// if(cmpstr(intent,"BLOCKED BEAM") == 0) 660 //// list += item + ";" 661 //// endif 662 //// 663 //// endfor 664 // list = "" 665 // for(ii=0;ii<num;ii+=1) 666 // item=StringFromList(ii, newList , ";") 667 // Grep/P=catPathName/Q/E=("(?i)"+match) item 668 // if( V_value ) // at least one instance was found 669 //// Print "found ", item,ii 670 // list += item + ";" 671 // endif 672 // endfor 673 // 674 // 675 // List = SortList(List,";",0) 676 // Printf "BGD files = %s\r",list 677 ////S_toc() 678 679 return(list) 680 End 681 682 683 // 684 Function/S V_PickEMPButton(ctrlName) : ButtonControl 685 String ctrlName 686 String list="",item="",fname,newList,intent 687 Variable ii,num 688 689 PathInfo catPathName 690 String path = S_path 691 692 String match="EMPTY CELL" 693 694 // get the list from the file catalog (=0.0007s) 695 // 696 WAVE/T fileNameW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames 697 WAVE/T intentW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent 698 699 Variable np = numpnts(intentW) 700 for(ii=0;ii<np;ii+=1) 701 if(cmpstr(intentW[ii],match)==0) 702 list += fileNameW[ii] + ";" 703 endif 704 endfor 705 706 List = SortList(List,";",0) 707 Printf "EMP files = %s\r",list 708 709 710 // 711 // newList = V_GetRawDataFileList() 712 // num=ItemsInList(newList) 713 // 714 //// for(ii=0;ii<num;ii+=1) 715 //// item=StringFromList(ii, newList , ";") 716 //// fname = path + item 717 //// intent = V_getReduction_intent(fname) 718 //// if(cmpstr(intent,"EMPTY CELL") == 0) 719 //// list += item + ";" 720 //// endif 721 //// 722 //// endfor 723 // 724 // for(ii=0;ii<num;ii+=1) 725 // item=StringFromList(ii, newList , ";") 726 // Grep/P=catPathName/Q/E=("(?i)"+match) item 727 // if( V_value ) // at least one instance was found 728 //// Print "found ", item,ii 729 // list += item + ";" 730 // endif 731 // 732 // endfor 733 // 734 // List = SortList(List,";",0) 735 // Printf "EMP files = %s\r",list 736 737 return(list) 738 End 739 740 741 Function/S V_GetDIVList() 742 743 String list="",item="",fname,newList,intent 744 Variable ii,num 745 746 PathInfo catPathName 747 String path = S_path 748 749 newList = V_Get_NotRawDataFileList() 550 750 num=ItemsInList(newList) 551 751 … … 554 754 // fname = path + item 555 755 // intent = V_getReduction_intent(fname) 556 // if(cmpstr(intent," BLOCKED BEAM") == 0)756 // if(cmpstr(intent,"SENSITIVITY") == 0) 557 757 // list += item + ";" 558 758 // endif 559 759 // 560 760 // endfor 561 562 String match=" BLOCKED BEAM"761 762 String match="DIV" 563 763 for(ii=0;ii<num;ii+=1) 564 764 item=StringFromList(ii, newList , ";") 565 Grep/P=catPathName/Q/E=("(?i)"+match) item 765 Grep/P=catPathName/Q/E=("(?i)\\b"+match+"\\b") item 766 // Grep/P=catPathName/Q/E=("(?i)"+match) item 566 767 if( V_value ) // at least one instance was found 567 768 // Print "found ", item,ii 568 list += item + ";" 769 if(strsearch(item,"pxp",0,2) == -1) //does NOT contain .pxp (the current experiment will be a match) 770 list += item + ";" 771 endif 569 772 endif 570 571 773 endfor 572 774 573 574 775 List = SortList(List,";",0) 575 Printf "BGD files = %s\r",list 576 776 577 777 return(list) 578 End 579 580 581 // 582 Function/S V_PickEMPButton(ctrlName) : ButtonControl 583 String ctrlName 584 String list="",item="",fname,newList,intent 585 Variable ii,num 586 587 PathInfo catPathName 588 String path = S_path 589 590 newList = V_GetRawDataFileList() 591 num=ItemsInList(newList) 592 593 // for(ii=0;ii<num;ii+=1) 594 // item=StringFromList(ii, newList , ";") 595 // fname = path + item 596 // intent = V_getReduction_intent(fname) 597 // if(cmpstr(intent,"EMPTY CELL") == 0) 598 // list += item + ";" 599 // endif 600 // 601 // endfor 602 603 String match="EMPTY CELL" 604 for(ii=0;ii<num;ii+=1) 605 item=StringFromList(ii, newList , ";") 606 Grep/P=catPathName/Q/E=("(?i)"+match) item 607 if( V_value ) // at least one instance was found 608 // Print "found ", item,ii 609 list += item + ";" 610 endif 611 612 endfor 613 614 List = SortList(List,";",0) 615 Printf "EMP files = %s\r",list 616 617 return(list) 618 619 620 End 621 778 end 622 779 623 780 // TODO … … 646 803 // endfor 647 804 648 String match=" DIV"805 String match="VSANS_DIV" //this is part of the title of a VSANS DIV file 649 806 for(ii=0;ii<num;ii+=1) 650 807 item=StringFromList(ii, newList , ";") … … 653 810 if( V_value ) // at least one instance was found 654 811 // Print "found ", item,ii 655 list += item + ";"812 list += item + ";" 656 813 endif 657 814 … … 664 821 665 822 End 823 824 Function/S V_GetMSKList() 825 826 String list="",item="",fname,newList,intent 827 Variable ii,num 828 829 PathInfo catPathName 830 String path = S_path 831 832 newList = V_Get_NotRawDataFileList() 833 num=ItemsInList(newList) 834 835 // for(ii=0;ii<num;ii+=1) 836 // item=StringFromList(ii, newList , ";") 837 // fname = path + item 838 // intent = V_getReduction_intent(fname) 839 // if(cmpstr(intent,"SENSITIVITY") == 0) 840 // list += item + ";" 841 // endif 842 // 843 // endfor 844 845 String match="MASK" // this is part of the title of a VSANS MASK file 846 for(ii=0;ii<num;ii+=1) 847 item=StringFromList(ii, newList , ";") 848 Grep/P=catPathName/Q/E=("(?i)\\b"+match+"\\b") item 849 // Grep/P=catPathName/Q/E=("(?i)"+match) item 850 if( V_value ) // at least one instance was found 851 // Print "found ", item,ii 852 if(strsearch(item,"pxp",0,2) == -1) //does NOT contain .pxp (the current experiment will be a match) 853 list += item + ";" 854 endif 855 endif 856 857 endfor 858 859 List = SortList(List,";",0) 860 861 return(list) 862 end 666 863 667 864 … … 806 1003 Button button_quest,help={"Run through the questionnaire for setting up a reduction protocol"} 807 1004 808 1005 PopupMenu popup_bkg,pos={85,76},size={51,23},proc=BKGFilePopMenuProc 1006 PopupMenu popup_bkg,mode=1,value= #"V_getBGDList()" 1007 PopupMenu popup_emp,pos={85,125},size={51,23},proc=EMPFilePopMenuProc 1008 PopupMenu popup_emp,mode=1,value= #"V_getEMPList()" 1009 PopupMenu popup_div,pos={85,175},size={51,23},proc=DIVFilePopMenuProc 1010 PopupMenu popup_div,mode=1,value= #"V_getDIVList()" 1011 PopupMenu popup_msk,pos={85,268},size={51,23},proc=MSKFilePopMenuProc 1012 PopupMenu popup_msk,mode=1,value= #"V_getMSKList()" 1013 809 1014 CheckBox prot_check,pos={5,75},size={74,14},title="Background" 810 1015 CheckBox prot_check,help={"If checked, the specified background file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 811 1016 CheckBox prot_check,value= 1 812 Button pick_bgd,pos={114,75},size={100,20},proc=V_PickBGDButton,title="set BGD file"813 Button pick_bgd,help={"This button will set the file selected in the File Catalog table to be the background file."}814 Button recallProt,pos={7,406},size={107,20},proc=V_RecallProtocolButton,title="Recall Protocol"815 Button recallProt,help={"Resets the panel to the file choices in a previously saved protocol"}816 Button del_protocol,pos={7,428},size={110,20},proc=V_DeleteProtocolButton,title="Delete Protocol"817 Button del_protocol,help={"Use this to delete a previously saved protocol."}818 Button done_protocol,pos={225,428},size={45,20},proc=V_DoneProtocolButton,title="Done"819 Button done_protocol,help={"This button will close the panel. The panel can be recalled at any time from the SANS menu."}820 Button saveProtocol,pos={7,384},size={100,20},proc=V_SaveProtocolButton,title="Save Protocol"821 Button saveProtocol,help={"Saves the cerrent selections in the panel to a protocol which can be later recalled"}822 1017 CheckBox prot_check_1,pos={5,127},size={71,14},title="Empty Cell" 823 1018 CheckBox prot_check_1,help={"If checked, the specified empty cell file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} … … 829 1024 CheckBox prot_check_3,help={"If checked, the specified mask file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 830 1025 CheckBox prot_check_3,value= 1 831 Button pick_emp,pos={113,125},size={100,20},proc=V_PickEMPButton,title="set EMP file" 832 Button pick_emp,help={"This button will set the file selected in the File Catalog table to be the empty cell file."} 833 Button pick_DIV,pos={114,173},size={100,20},proc=V_PickDIVButton,title="set DIV file" 834 Button pick_DIV,help={"This button will set the file selected in the File Catalog table to be the sensitivity file."} 835 Button pick_MASK,pos={119,266},size={100,20},proc=V_PickMASKButton,title="set MASK file" 836 Button pick_MASK,help={"This button will set the file selected in the File Catalog table to be the mask file."} 1026 CheckBox prot_check_4,pos={5,30},size={53,14},title="Sample" 1027 CheckBox prot_check_4,help={"If checked, the specified sample file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 1028 CheckBox prot_check_4,value= 1 1029 CheckBox prot_check_5,pos={6,311},size={56,14},title="Average" 1030 CheckBox prot_check_5,help={"If checked, the specified averaging will be performed at the end of the data reduction."} 1031 CheckBox prot_check_5,value= 1 1032 CheckBox prot_check_9,pos={7,222},size={59,14},title="Absolute" 1033 CheckBox prot_check_9,help={"If checked, absolute calibration will be included in the data reduction. If the parameter list is \"ask\", then the user will be prompted for absolue parameters"} 1034 CheckBox prot_check_9,value= 1 1035 1036 1037 // Button pick_sam,pos={214,28},size={70,20},proc=V_PickSAMButton,title="set SAM" 1038 // Button pick_sam,help={"This button will set the file selected in the File Catalog table to be the sample file"} 1039 // Button pick_bgd,pos={214,75},size={70,20},proc=V_PickBGDButton,title="set BGD" 1040 // Button pick_bgd,help={"This button will set the file selected in the File Catalog table to be the background file."} 1041 // Button pick_emp,pos={214,125},size={70,20},proc=V_PickEMPButton,title="set EMP" 1042 // Button pick_emp,help={"This button will set the file selected in the File Catalog table to be the empty cell file."} 1043 // Button pick_DIV,pos={214,173},size={70,20},proc=V_PickDIVButton,title="set DIV" 1044 // Button pick_DIV,help={"This button will set the file selected in the File Catalog table to be the sensitivity file."} 1045 Button pick_ABS,pos={214,220},size={70,20},proc=V_SetABSParamsButton,title="set ABS" 1046 Button pick_ABS,help={"This button will prompt the user for absolute scaling parameters"} 1047 // Button pick_MASK,pos={214,266},size={70,20},proc=V_PickMASKButton,title="set MASK" 1048 // Button pick_MASK,help={"This button will set the file selected in the File Catalog table to be the mask file."} 1049 1050 1051 Button pick_AVE,pos={108,313},size={150,20},proc=V_SetAverageParamsButtonProc,title="set AVERAGE params" 1052 Button pick_AVE,help={"Prompts the user for the type of 1-D averaging to perform, as well as saving options"} 1053 1054 SetVariable samStr,pos={6,50},size={250,15},title="file:" 1055 SetVariable samStr,help={"Filename of the sample file(s) to be used in the data reduction"} 1056 SetVariable samStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gSAM 837 1057 SetVariable bgdStr,pos={7,98},size={250,15},title="file:" 838 1058 SetVariable bgdStr,help={"Filename of the background file(s) to be used in the data reduction"} … … 847 1067 SetVariable maskStr,help={"Filename of the mask file to be used in the data reduction"} 848 1068 SetVariable maskStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gMASK 849 Button ReduceOne,pos={194,384},size={100,20},proc=V_ReduceOneButton,title="Reduce A File"850 Button ReduceOne,help={"Using the panel selections, the specified sample file will be reduced. If none is specified, the user will be prompted for a sample file"}851 CheckBox prot_check_4,pos={5,30},size={53,14},title="Sample"852 CheckBox prot_check_4,help={"If checked, the specified sample file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"}853 CheckBox prot_check_4,value= 1854 Button pick_sam,pos={115,28},size={100,20},proc=V_PickSAMButton,title="set SAM file"855 Button pick_sam,help={"This button will set the file selected in the File Catalog table to be the sample file"}856 SetVariable samStr,pos={6,50},size={250,15},title="file:"857 SetVariable samStr,help={"Filename of the sample file(s) to be used in the data reduction"}858 SetVariable samStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gSAM859 Button pick_ABS,pos={115,220},size={110,20},proc=V_SetABSParamsButton,title="set ABS params"860 Button pick_ABS,help={"This button will prompt the user for absolute scaling parameters"}861 CheckBox prot_check_9,pos={7,222},size={59,14},title="Absolute"862 CheckBox prot_check_9,help={"If checked, absolute calibration will be included in the data reduction. If the parameter list is \"ask\", then the user will be prompted for absolue parameters"}863 CheckBox prot_check_9,value= 1864 1069 SetVariable absStr,pos={7,243},size={250,15},title="parameters:" 865 1070 SetVariable absStr,help={"Keyword-string of values necessary for absolute scaling of data. Remaining parameters are taken from the sample file."} 866 1071 SetVariable absStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gAbsStr 867 868 869 CheckBox prot_check_5,pos={6,311},size={56,14},title="Average"870 CheckBox prot_check_5,help={"If checked, the specified averaging will be performed at the end of the data reduction."}871 CheckBox prot_check_5,value= 1872 Button pick_AVE,pos={108,313},size={150,20},proc=V_SetAverageParamsButtonProc,title="set AVERAGE params"873 Button pick_AVE,help={"Prompts the user for the type of 1-D averaging to perform, as well as saving options"}874 1072 SetVariable aveStr,pos={9,336},size={250,15},title="parameters:" 875 1073 SetVariable aveStr,help={"Keyword-string of choices used for averaging and saving the 1-D data files"} 876 1074 SetVariable aveStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gAVE 1075 1076 1077 1078 1079 1080 1081 877 1082 878 1083 //only show DRK if user wants to see it … … 889 1094 Button import_button, size={60,20},pos={125,406},title="Import",proc=V_ImportProtocol 890 1095 Button import_button,help={"Imports a protocol from disk for use in this experiment"} 1096 Button recallProt,pos={7,406},size={107,20},proc=V_RecallProtocolButton,title="Recall Protocol" 1097 Button recallProt,help={"Resets the panel to the file choices in a previously saved protocol"} 1098 Button del_protocol,pos={7,428},size={110,20},proc=V_DeleteProtocolButton,title="Delete Protocol" 1099 Button del_protocol,help={"Use this to delete a previously saved protocol."} 1100 Button done_protocol,pos={225,428},size={45,20},proc=V_DoneProtocolButton,title="Done" 1101 Button done_protocol,help={"This button will close the panel. The panel can be recalled at any time from the SANS menu."} 1102 Button saveProtocol,pos={7,384},size={100,20},proc=V_SaveProtocolButton,title="Save Protocol" 1103 Button saveProtocol,help={"Saves the cerrent selections in the panel to a protocol which can be later recalled"} 1104 Button ReduceOne,pos={194,384},size={100,20},proc=V_ReduceOneButton,title="Reduce A File" 1105 Button ReduceOne,help={"Using the panel selections, the specified sample file will be reduced. If none is specified, the user will be prompted for a sample file"} 1106 891 1107 EndMacro 1108 1109 Function BKGFilePopMenuProc(pa) : PopupMenuControl 1110 STRUCT WMPopupAction &pa 1111 1112 switch( pa.eventCode ) 1113 case 2: // mouse up 1114 Variable popNum = pa.popNum 1115 String popStr = pa.popStr 1116 SVAR tempStr = root:Packages:NIST:VSANS:Globals:Protocols:gBGD 1117 tempStr = popStr 1118 break 1119 case -1: // control being killed 1120 break 1121 endswitch 1122 1123 return 0 1124 End 1125 1126 Function EMPFilePopMenuProc(pa) : PopupMenuControl 1127 STRUCT WMPopupAction &pa 1128 1129 switch( pa.eventCode ) 1130 case 2: // mouse up 1131 Variable popNum = pa.popNum 1132 String popStr = pa.popStr 1133 SVAR tempStr = root:Packages:NIST:VSANS:Globals:Protocols:gEMP 1134 tempStr = popStr 1135 break 1136 case -1: // control being killed 1137 break 1138 endswitch 1139 1140 return 0 1141 End 1142 1143 Function DIVFilePopMenuProc(pa) : PopupMenuControl 1144 STRUCT WMPopupAction &pa 1145 1146 switch( pa.eventCode ) 1147 case 2: // mouse up 1148 Variable popNum = pa.popNum 1149 String popStr = pa.popStr 1150 SVAR tempStr = root:Packages:NIST:VSANS:Globals:Protocols:gDIV 1151 tempStr = popStr 1152 break 1153 case -1: // control being killed 1154 break 1155 endswitch 1156 1157 return 0 1158 End 1159 1160 Function MSKFilePopMenuProc(pa) : PopupMenuControl 1161 STRUCT WMPopupAction &pa 1162 1163 switch( pa.eventCode ) 1164 case 2: // mouse up 1165 Variable popNum = pa.popNum 1166 String popStr = pa.popStr 1167 SVAR tempStr = root:Packages:NIST:VSANS:Globals:Protocols:gMASK 1168 tempStr = popStr 1169 break 1170 case -1: // control being killed 1171 break 1172 endswitch 1173 1174 return 0 1175 End 892 1176 893 1177 ////activated when user checks/unchecks the box … … 1409 1693 //reset the panel based on the protocol textwave (currently a string) 1410 1694 V_ResetToSavedProtocol(newProtoStr) 1695 1696 SetDataFolder root: 1411 1697 1412 1698 return(0)
Note: See TracChangeset
for help on using the changeset viewer.