Ignore:
Timestamp:
Oct 16, 2009 11:35:04 AM (13 years ago)
Author:
srkline
Message:

Merging changes:

NCNR_Utils -> merging these into FACILITY, HFIR, and ILL_Utils

HFIR files merged by hand to reflect JaeHie?'s 29JUL09 version

Changed MainPanel? to look for TISANE or RealTime? functions to prevent button procedures from being called when the procedures aren't there. Seemed easier than separate versions without the buttons. #define at the begining of TISANE.ipf -> #ifdef in MainPanel? didn't work for some reason?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/HFIR_Utils.ipf

    r570 r572  
    134134End 
    135135 
    136 //********************** 
    137 // 2D resolution function calculation - in terms of X and Y 
    138 // 
    139 // see same-named function in NCNR_Utils 
    140 // 
    141 Function/S get2DResolution(inQ,phi,lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,usingLenses,r_dist,SigmaQX,SigmaQY,fSubS) 
    142         Variable inQ, phi,lambda, lambdaWidth, DDet, apOff, S1, S2, L1, L2, BS, del_r,usingLenses,r_dist 
    143         Variable &SigmaQX,&SigmaQY,&fSubS               //these are the output quantities at the input Q value 
    144  
    145  
    146         String results = "success" 
    147         Return results 
    148 End 
    149136 
    150137 
     
    247234        retStr=invalid 
    248235         
    249         //your code here 
    250236        //find the "dot" 
    251237        Variable pos = strsearch( LowerStr(item),".xml",0) 
     
    314300        do 
    315301                //parse through the list in this order: 
    316                 // 1 - does item contain run number (as a string) "NAMESANS_expNN_scan####_####.xml" : Let the first ### is the run num. 
     302                // 1 - does item contain run number (as a string) "NAMESANS_expNN_scan####_####.xml" : Let the first #### is the run num. 
    317303                // 2 - exclude by isRaw? (to minimize disk access) 
    318304                item = StringFromList(ii, list  ,";" ) 
     
    418404        String fname 
    419405         
     406        //Check by key "transsmission" 
     407        if (stringmatch( getIsTrans(fName),"True")>0) 
     408                return (1) 
     409        else 
     410                //Check from beam stop motor position 
    420411        Variable beamtrap_1y=0,beamtrap_2y=0,beamtrap_3y=0,beamtrap_4y=0 
    421 //      if(your test here) 
     412        //      if(your test here) 
    422413        beamtrap_1y=getRealValueFromHeader(fname,"trap_y_101mm","mm") 
    423414        beamtrap_2y=getRealValueFromHeader(fname,"trap_y_25mm","mm") 
     
    426417 
    427418         if (beamtrap_1y<10 && beamtrap_2y<10 && beamtrap_3y<10 && beamtrap_4y<10)       
    428         //yes, its a transmisison file 
     419                        //Write the flag ON 
     420                        Write_isTransmissionToHeader(fName,"True") 
    429421                return (1) 
    430422        else 
     
    432424                return (0) 
    433425        endif 
     426        endif 
     427        return (0) 
    434428End 
    435429 
     
    839833// called by Correct.ipf, ProtocolAsPanel.ipf, Transmission.ipf 
    840834// 
    841 Function AttenuationFactor(fileStr,lam,attenpercent) 
     835Function AttenuationFactor(fileStr,lam,attenuation) 
    842836        String fileStr 
    843         Variable lam,attenpercent 
     837        Variable lam,attenuation  //    0 =< attenuation <= 1 : where no attenuator stands for 0. 
    844838         
    845839        Variable attenFactor=1 
    846840         
    847841        // your code here 
    848         attenFactor = 1- attenpercent /100  //???Attenuate transmission 
     842        attenFactor = 1- attenuation  //???Attenuate transmission 
    849843 
    850844        return(attenFactor) 
     
    881875                item = StringFromList(ii, list  ,";") 
    882876                //simply remove all that are not raw data files (SA1 SA2 SA3) 
    883                 if( !stringmatch(item,"*.xml") ) 
     877                if( !stringmatch(item,"HiResSANS*.xml")  && !stringmatch(item,"BioSANS*.xml") ) 
    884878                        if( !stringmatch(item,".*") && !stringmatch(item,"*.pxp") && !stringmatch(item,"*.DIV"))                //eliminate mac "hidden" files, pxp, and div files 
    885879                                newlist += item + ";" 
     
    921915                        endif 
    922916                endif 
     917                if( stringmatch(item,"*.xml") ) 
     918                        if (CheckIfRawData(S_path+item) >0) 
     919                                newlist += item + ";" 
     920                        endif 
     921                endif 
    923922        endfor 
    924923        newList = SortList(newList,";",0) 
    925924        return(newList) 
    926925End 
     926 
     927//********************** 
     928// 2D resolution function calculation - in terms of X and Y 
     929// 
     930// based on notes from David Mildner, 2008 
     931// 
     932// the final NCNR version is located in NCNR_Utils.ipf 
     933// 
     934Function/S get2DResolution(inQ,phi,lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,del_r,usingLenses,r_dist,SigmaQX,SigmaQY,fSubS) 
     935        Variable inQ, phi,lambda, lambdaWidth, DDet, apOff, S1, S2, L1, L2, BS, del_r,usingLenses,r_dist 
     936        Variable &SigmaQX,&SigmaQY,&fSubS               //these are the output quantities at the input Q value 
     937         
     938        return("Function Empty") 
     939End 
Note: See TracChangeset for help on using the changeset viewer.