Ignore:
Timestamp:
Apr 5, 2017 7:50:11 AM (6 years ago)
Author:
srkline
Message:

made the file selections in the test protocol panel to be popup menus with the filtered files for each step. popping now selects the file. Still a work in progress.

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  
    846846 
    847847        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","") 
    851851                 
    852852                SetDataFolder root:Packages:NIST:VSANS:VCALC 
     
    870870         
    871871        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","") 
    877877         
    878878 
     
    898898         
    899899        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","")      
    906906         
    907907                SetDataFolder root:Packages:NIST:VSANS:VCALC 
     
    924924 
    925925        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","") 
    929929                 
    930930                SetDataFolder root:Packages:NIST:VSANS:VCALC 
     
    12061206 
    12071207        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","") 
    12111211                 
    12121212                SetDataFolder root:Packages:NIST:VSANS:VCALC 
     
    12331233 
    12341234        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","") 
    12401240         
    12411241 
     
    12611261         
    12621262        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","")      
    12691269         
    12701270                SetDataFolder root:Packages:NIST:VSANS:VCALC 
     
    12881288 
    12891289        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","") 
    12931293                 
    12941294                SetDataFolder root:Packages:NIST:VSANS:VCALC 
     
    13241324// and if it is, it will be removed 
    13251325// 
     1326// VCALC panel can pass in "" for the winNameStr 
     1327// 
    13261328Function ClearIQIfDisplayed_AllFldr(type,winNameStr) 
    13271329        String type,winNameStr 
     
    13441346// ("B", "FLTB", "MTB" etc) will be checked to see if the data is on the graph 
    13451347// and if it is, it will be removed 
     1348// 
     1349// VCALC panel can pass in "" for the winNameStr 
    13461350// 
    13471351Function ClearIQIfDisplayed_AllBin(fldr,winNameStr) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Combine_1D.ipf

    r1031 r1032  
    1818// TODO: 
    1919// 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 folder 
     20// x- add this file to the Includes list and to the SVN folder 
    2121// -- add button (mask tab) to save mask 
    2222// -- add button (mask tab) to recall mask 
     
    4444//    masking 
    4545// 
     46// -- remove the mask by relative error button - this is not really a good idea. 
    4647// 
    4748// 
     
    672673        endPt=numpnts(MaskData) 
    673674 
    674         pct = 0.25 
     675        pct = 0.05 
    675676         
    676677        for(ii=0;ii<endPt;ii+=1) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Marquee_Operations.ipf

    r1028 r1032  
    1111// -- still many operations in (SANS)Marquee.ipf that will be useful to implement: 
    1212// 
    13 // -- writing the box corrdinates and the counts (and error) to the data file 
     13// -- writing the box coordinates and the counts (and error) to the data file 
    1414// -- determining the beam center (centroid) of the selection + writing this to the file 
    1515//  -- a box sum over a range of files (with a plot) 
     
    2121// 
    2222// 
    23  
    24  
    25 // TODO: 
    26 // -- make a separate file with PRODIV 
    27 // -- follow through the logic and reduction to create a DIV file 
    28 // -- start with command line utilities, then work on a panel as needed. 
    2923 
    3024 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf

    r1030 r1032  
    530530 
    531531 
     532Function/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) 
     539end 
     540 
     541 
     542Function/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) 
     549end 
     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// 
     558Function/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) 
     612end 
     613 
    532614// 
    533615// TODO 
     
    546628        PathInfo catPathName 
    547629        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) 
     680End 
     681 
     682 
     683// 
     684Function/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) 
     738End 
     739 
     740 
     741Function/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() 
    550750        num=ItemsInList(newList) 
    551751         
     
    554754//              fname = path + item 
    555755//              intent = V_getReduction_intent(fname) 
    556 //              if(cmpstr(intent,"BLOCKED BEAM") == 0) 
     756//              if(cmpstr(intent,"SENSITIVITY") == 0) 
    557757//                      list += item + ";" 
    558758//              endif 
    559759// 
    560760//      endfor 
    561          
    562         String match="BLOCKED BEAM" 
     761 
     762        String match="DIV" 
    563763        for(ii=0;ii<num;ii+=1) 
    564764                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 
    566767                if( V_value )   // at least one instance was found 
    567768//                              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 
    569772                endif 
    570  
    571773        endfor 
    572774                 
    573                  
    574775        List = SortList(List,";",0) 
    575         Printf "BGD files = %s\r",list 
    576          
     776 
    577777        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  
     778end 
    622779 
    623780// TODO 
     
    646803//      endfor 
    647804 
    648         String match="DIV" 
     805        String match="VSANS_DIV"                //this is part of the title of a VSANS DIV file 
    649806        for(ii=0;ii<num;ii+=1) 
    650807                item=StringFromList(ii, newList , ";") 
     
    653810                if( V_value )   // at least one instance was found 
    654811//                              Print "found ", item,ii 
    655                         list += item + ";" 
     812                                list += item + ";" 
    656813                endif 
    657814 
     
    664821 
    665822End 
     823 
     824Function/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) 
     862end 
    666863 
    667864 
     
    8061003        Button button_quest,help={"Run through the questionnaire for setting up a reduction protocol"} 
    8071004         
    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                 
    8091014        CheckBox prot_check,pos={5,75},size={74,14},title="Background" 
    8101015        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"} 
    8111016        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"} 
    8221017        CheckBox prot_check_1,pos={5,127},size={71,14},title="Empty Cell" 
    8231018        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"} 
     
    8291024        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"} 
    8301025        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            
    8371057        SetVariable bgdStr,pos={7,98},size={250,15},title="file:" 
    8381058        SetVariable bgdStr,help={"Filename of the background file(s) to be used in the data reduction"} 
     
    8471067        SetVariable maskStr,help={"Filename of the mask file to be used in the data reduction"} 
    8481068        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= 1 
    854         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:gSAM 
    859         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= 1 
    8641069        SetVariable absStr,pos={7,243},size={250,15},title="parameters:" 
    8651070        SetVariable absStr,help={"Keyword-string of values necessary for absolute scaling of data. Remaining parameters are taken from the sample file."} 
    8661071        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= 1 
    872         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"} 
    8741072        SetVariable aveStr,pos={9,336},size={250,15},title="parameters:" 
    8751073        SetVariable aveStr,help={"Keyword-string of choices used for averaging and saving the 1-D data files"} 
    8761074        SetVariable aveStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gAVE 
     1075 
     1076 
     1077 
     1078 
     1079 
     1080 
     1081 
    8771082         
    8781083        //only show DRK if user wants to see it  
     
    8891094        Button import_button, size={60,20},pos={125,406},title="Import",proc=V_ImportProtocol 
    8901095        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 
    8911107EndMacro 
     1108 
     1109Function 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 
     1124End 
     1125 
     1126Function 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 
     1141End 
     1142 
     1143Function 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 
     1158End 
     1159 
     1160Function 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 
     1175End 
    8921176 
    8931177////activated when user checks/unchecks the box 
     
    14091693        //reset the panel based on the protocol textwave (currently a string) 
    14101694        V_ResetToSavedProtocol(newProtoStr) 
     1695         
     1696        SetDataFolder root: 
    14111697         
    14121698        return(0) 
Note: See TracChangeset for help on using the changeset viewer.