Ignore:
Timestamp:
Apr 24, 2018 3:55:39 PM (5 years ago)
Author:
srkline
Message:

added procedures to compare files to see if they are from the same configuration, same wavelength, etc. so they can be properly chosen for transmission files, scattering files, and properly identified for the different resolution conditions.

Re-worked the logic of dispatching averaging, plotting, and saving in Execute_Protocol. Hopefully this will alow for easier dispatching for future conditions, including getting the correct resolution calculation.

File:
1 edited

Legend:

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

    r1095 r1097  
    7979End 
    8080 
    81 Proc V_Phi_Graph_Proc(folderStr,detGroup) 
     81Function V_Phi_Graph_Proc(folderStr,detGroup) 
    8282        String folderStr,detGroup 
    8383         
     
    9696 
    9797        if(cmpstr(detGroup,"F") == 0) 
     98                wave iPhiBin_qxqy_FLRTB=iPhiBin_qxqy_FLRTB 
     99                wave phiBin_qxqy_FLRTB=phiBin_qxqy_FLRTB 
     100                wave ePhiBin_qxqy_FLRTB=ePhiBin_qxqy_FLRTB 
     101                 
    98102                AppendToGraph iPhiBin_qxqy_FLRTB vs phiBin_qxqy_FLRTB 
    99103//              Display /W=(35,45,572,419)/N=V_Phi_Graph /K=1 iPhiBin_qxqy_FLRTB vs phiBin_qxqy_FLRTB 
     
    106110        endif 
    107111        if(cmpstr(detGroup,"M") == 0) 
     112                wave iPhiBin_qxqy_MLRTB=iPhiBin_qxqy_MLRTB 
     113                wave phiBin_qxqy_MLRTB=phiBin_qxqy_MLRTB 
     114                wave ePhiBin_qxqy_MLRTB=ePhiBin_qxqy_MLRTB 
     115                 
    108116                AppendToGraph iPhiBin_qxqy_MLRTB vs phiBin_qxqy_MLRTB 
    109117                ModifyGraph mode=4 
     
    115123        endif 
    116124        if(cmpstr(detGroup,"B") == 0) 
     125                wave iPhiBin_qxqy_B=iPhiBin_qxqy_B 
     126                wave phiBin_qxqy_B=phiBin_qxqy_B 
     127                wave ePhiBin_qxqy_B=ePhiBin_qxqy_B 
     128                 
    117129                AppendToGraph iPhiBin_qxqy_B vs phiBin_qxqy_B 
    118130                ModifyGraph mode=4 
     
    718730        String dataSetFolderParent,basestr 
    719731         
     732        SVAR gProtoStr = root:Packages:NIST:VSANS:Globals:Protocols:gProtoStr 
     733        Wave/T proto=$("root:Packages:NIST:VSANS:Globals:Protocols:"+gProtoStr)  
     734 
     735        SVAR samFiles = root:Packages:NIST:VSANS:Globals:Protocols:gSAM 
     736         
    720737        //make sure the waves exist 
    721738         
    722739        if(WaveExists(pw) == 0) 
    723740                SetDataFolder root: 
    724                 Abort "q is missing" 
     741                Abort "phi is missing" 
    725742        endif 
    726743        if(WaveExists(iw) == 0) 
     
    732749                Abort "s is missing" 
    733750        endif 
     751        if(WaveExists(proto) == 0) 
     752                SetDataFolder root: 
     753                Abort "protocol information is missing." 
     754        endif 
    734755//      if(WaveExists(resw) == 0) 
     756//              SetDataFolder root: 
    735757//              Abort "Resolution information is missing." 
    736758//      endif 
     
    755777//       
    756778 
     779 
     780// no beg/end trimming is used for annular data 
     781 
     782//// if the "default" trimming is used, the proto[] values will be null 
     783//// fill them in with the default values 
     784//      String protoStr7,protoStr8 
     785//      if(strlen(proto[7]) == 0) 
     786//              protoStr7 = "(Default) "+ ksBinTrimBegDefault 
     787//      else 
     788//              protoStr7 = proto[7] 
     789//      endif 
     790//      if(strlen(proto[8]) == 0) 
     791//              protoStr8 = "(Default) "+ ksBinTrimEndDefault 
     792//      else 
     793//              protoStr8 = proto[8] 
     794//      endif    
     795 
     796 
     797 
    757798        PathInfo catPathName 
    758799        fullPath = S_Path + saveName 
     
    761802 
    762803        fprintf refnum,"Annular data written from folder %s on %s\r\n",folderStr,(date()+" "+time()) 
     804 
     805 
     806        //insert protocol information here 
     807        //-1 list of sample files 
     808        //0 - bkg 
     809        //1 - emp 
     810        //2 - div 
     811        //3 - mask 
     812        //4 - abs params c2-c5 
     813        //5 - average params 
     814        //6 - DRK (unused in VSANS) 
     815        //7 - beginning trim points 
     816        //8 - end trim points 
     817        fprintf refnum, "SAM: %s\r\n",samFiles 
     818        fprintf refnum, "BGD: %s\r\n",proto[0] 
     819        fprintf refnum, "EMP: %s\r\n",Proto[1] 
     820        fprintf refnum, "DIV: %s\r\n",Proto[2] 
     821        fprintf refnum, "MASK: %s\r\n",Proto[3] 
     822        fprintf refnum, "ABS Parameters (3-6): %s\r\n",Proto[4] 
     823        fprintf refnum, "Average Choices: %s\r\n",Proto[5] 
     824//      fprintf refnum, "Beginning Trim Points: %s\r\n",ProtoStr7 
     825//      fprintf refnum, "End Trim Points: %s\r\n",ProtoStr8 
     826 
    763827 
    764828// TODO -- make this work for 6-columns (or??) 
Note: See TracChangeset for help on using the changeset viewer.