Ignore:
Timestamp:
Mar 23, 2018 10:29:07 AM (5 years ago)
Author:
srkline
Message:

added a few corrections to the reduction:

Added sample apertures to the patch panel so that they can be corrected

A flag is now written to the data files if the "flip" has been done, and it will refuse to flip again. This flag can be reset if something goes wrong.

Multiple reduce now allows run numbers to be entered as is for SANS,

Filtering of files for the protocol panel should be better behaved now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MultipleReduce.ipf

    r1073 r1092  
    7575        Button helpButton,pos={385,3},size={25,20},proc=V_ShowMRHelp,title="?" 
    7676        Button helpButton,help={"Show the help file for reducing multiple files using the same protocol"} 
    77         PopupMenu MRFilesPopup,pos={3,44},size={167,19},proc=V_MRedPopMenuProc,title="File(s) to Reduce" 
     77        PopupMenu MRFilesPopup,pos={3,72},size={167,19},proc=V_MRedPopMenuProc,title="File(s) to Reduce" 
    7878        PopupMenu MRFilesPopup,help={"The displayed file is the one that will be reduced. The entire list will be reduced if \"Reduce All..\" is selected. \r If no items, or the wrong items appear, click on the popup to refresh."} 
    7979        PopupMenu MRFilesPopup,mode=1,popvalue="none",value= #"root:Packages:NIST:VSANS:Globals:MRED:gMRedList" 
    80 //      SetVariable MRList,pos={3,72},size={350,13},proc=FileNumberListProc,title="File number list: " 
    81 //      SetVariable MRList,help={"Enter a comma delimited list of file numbers to reduce. Ranges can be entered using a dash."} 
    82 //      SetVariable MRList,limits={-Inf,Inf,1},value= root:Packages:NIST:VSANS:Globals:MRED:gFileNumList 
     80        SetVariable MRList,pos={3,48},size={350,13},proc=V_FileNumberListProc,title="File number list: " 
     81        SetVariable MRList,help={"Enter a comma delimited list of file numbers to reduce. Ranges can be entered using a dash."} 
     82        SetVariable MRList,limits={-Inf,Inf,1},value= root:Packages:NIST:VSANS:Globals:MRED:gFileNumList 
    8383        Button ReduceAllButton,pos={3,128},size={180,20},proc=V_ReduceAllPopupFiles,title="Reduce All Files in Popup" 
    8484        Button ReduceAllButton,help={"This will reduce ALL of the files in the popup list, not just the top file."} 
    85         Button ReduceOneButton,pos={3,98},size={180,20},proc=V_ReduceTopPopupFile,title="Reduce Top File in Popup" 
    86         Button ReduceOneButton,help={"This will reduce TOP files in the popup list, not all of the files."} 
     85//      Button ReduceOneButton,pos={3,98},size={180,20},proc=V_ReduceTopPopupFile,title="Reduce Top File in Popup" 
     86//      Button ReduceOneButton,help={"This will reduce TOP files in the popup list, not all of the files."} 
    8787        Button DoneButton,pos={290,128},size={110,20},proc=V_MRDoneButtonProc,title="Done Reducing" 
    8888        Button DoneButton,help={"When done reducing files, this will close this control panel."} 
     
    9595//      Button acceptList,pos={280,98},size={120,20},proc=AcceptMREDList,title="Accept List" 
    9696//      Button acceptList,help={"Accept the list of files to reduce."} 
    97         PopupMenu MRProto_pop,pos={3,72},size={119,19},proc=V_MRProtoPopMenuProc,title="Protocol " 
     97        PopupMenu MRProto_pop,pos={3,98},size={119,19},proc=V_MRProtoPopMenuProc,title="Protocol " 
    9898        PopupMenu MRProto_pop,help={"All of the data files in the popup will be reduced using this protocol"} 
    9999        PopupMenu MRProto_pop,mode=1,popvalue="none",value= #"root:Packages:NIST:VSANS:Globals:MRED:gMRProtoList" 
     
    254254// get a  list of all of the sample files, based on intent 
    255255// 
     256//parses the file number list to get valid raw data filenames for reduction 
     257// -if the numbers and full ranges can be translated to correspond to actual files 
     258// on disk, the popup list is updated - otherwise the offending number is reported 
     259// and the user must fix the problem before any reduction can be done 
     260// 
     261//              V_ParseRunNumberList() does the work 
     262// 
     263// only accepts files in the list that are purpose=scattering 
     264// 
    256265Function/S V_GetValidMRedPopupList() 
    257266 
    258         String semiList = V_GetSAMList() 
     267//      String semiList = V_GetSAMList() 
     268 
     269        String commaList="",semiList="",fname="",purpose="" 
     270        SVAR numList=root:Packages:NIST:VSANS:Globals:MRED:gFileNumList 
     271         
     272        commaList = V_ParseRunNumberList(numList) 
     273        //convert commaList to a semicolon delimited list, checking that files are SCATTERING 
     274        Variable num=ItemsinList(commaList,","),ii 
     275        for(ii=0;ii<num;ii+=1) 
     276                fname = StringFromList(ii, commaList  ,",") 
     277                purpose = V_getReduction_Purpose(fname) 
     278                if(cmpstr(purpose,"SCATTERING") == 0) 
     279                        semiList += StringFromList(ii, commaList  ,",") + ";" 
     280                endif 
     281        endfor 
     282//      print semiList 
     283//sort the list 
     284        semiList = SortList(semiList,";",0) 
     285        return(semiList) 
     286 
    259287 
    260288        return(semiList) 
Note: See TracChangeset for help on using the changeset viewer.