Ignore:
Timestamp:
Sep 18, 2017 12:08:50 PM (5 years ago)
Author:
srkline
Message:

many minor changes after real VSANS data collected.

additional procedures added to allow easy correction of the incorrect header information from NICE.

Most notable addition is the pinhole resolution added to the calculation and the I(q) output. White beam is also treated (incorrectly) as a gaussian distrivution, but the results of smeared fitting look to be quite good.

Trimming and sorting routines are now (pinhole) resolution aware.

File identification routines have been updated to use the proper definitions of "purpose" and "intent". Both fields are now in the catalog, to allow for better sorting.

File:
1 edited

Legend:

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

    r1057 r1064  
    6969//the questionnare form of the protcol (see protocol.ipf) 
    7070// 
    71 //0901, uses 8 points in protocol wave 
    7271Proc V_InitProtocolPanel() 
    7372 
     
    569568Function/S V_GetSAMList() 
    570569 
    571         String match="SAMPLE" 
    572         String list = V_getFileIntentList(match,0) 
     570//      String match="SAMPLE" 
     571//      String list = V_getFileIntentList(match,0) 
     572 
     573        String intent = "SAMPLE" 
     574        String purpose = "SCATTERING" 
     575        String list = V_getFileIntentPurposeList(intent,purpose,0) 
    573576 
    574577//      Printf "SAM files = %s\r",list   
     
    596599end 
    597600 
    598  
    599 // testStr is the "intent" string, or grep string 
    600 // method is the method to use to find the file 
    601 // 0 = (default) is to use the file catalog (= fastest) 
    602 // 1 = Grep (not terribly slow) 
    603 // 2 = read every file (bad choice) 
    604 // 
    605 Function/S V_getFileIntentList(testStr,method) 
    606         String testStr 
    607         Variable method 
    608          
    609         Variable ii,num 
    610         String list="",item="",fname,newList,intent 
    611  
    612         // read every file... 
    613         if(method == 2) 
    614                 PathInfo catPathName 
    615                 String path = S_path 
    616                 newList = V_GetRawDataFileList() 
    617                 num=ItemsInList(newList) 
    618                  
    619                 for(ii=0;ii<num;ii+=1) 
    620                         item=StringFromList(ii, newList , ";") 
    621                         fname = path + item 
    622                         intent = V_getReduction_intent(fname) 
    623                         if(cmpstr(intent,testStr) == 0) 
    624                                 list += item + ";" 
    625                         endif 
    626                 endfor   
    627         endif 
    628          
    629         // use Grep 
    630         if(method == 1) 
    631                 newList = V_GetRawDataFileList() 
    632                 num=ItemsInList(newList) 
    633                 for(ii=0;ii<num;ii+=1) 
    634                         item=StringFromList(ii, newList , ";") 
    635                         Grep/P=catPathName/Q/E=("(?i)"+testStr) item 
    636                         if( V_value )   // at least one instance was found 
    637         //                              Print "found ", item,ii 
    638                                 list += item + ";" 
    639                         endif 
    640                 endfor   
    641          
    642         else 
    643         // get the list from the file catalog 
    644          
    645                 WAVE/T fileNameW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames 
    646                 WAVE/T intentW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent 
    647                  
    648                 Variable np = numpnts(intentW)          //fileNameW is LONGER - so don't use numpnts(fileWave) 
    649                 for(ii=0;ii<np;ii+=1) 
    650                         if(cmpstr(intentW[ii],testStr)==0)              //this is case-INSENSITIVE (necessary, since the case is unknown) 
    651                                 list += fileNameW[ii] + ";" 
    652                         endif            
    653                 endfor 
    654                  
    655                 List = SortList(List,";",0) 
    656         endif 
    657          
    658         return(list) 
    659 end 
    660601 
    661602// 
Note: See TracChangeset for help on using the changeset viewer.