- Timestamp:
- Oct 16, 2009 11:35:04 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/HFIR_Utils.ipf
r570 r572 134 134 End 135 135 136 //**********************137 // 2D resolution function calculation - in terms of X and Y138 //139 // see same-named function in NCNR_Utils140 //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_dist143 Variable &SigmaQX,&SigmaQY,&fSubS //these are the output quantities at the input Q value144 145 146 String results = "success"147 Return results148 End149 136 150 137 … … 247 234 retStr=invalid 248 235 249 //your code here250 236 //find the "dot" 251 237 Variable pos = strsearch( LowerStr(item),".xml",0) … … 314 300 do 315 301 //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. 317 303 // 2 - exclude by isRaw? (to minimize disk access) 318 304 item = StringFromList(ii, list ,";" ) … … 418 404 String fname 419 405 406 //Check by key "transsmission" 407 if (stringmatch( getIsTrans(fName),"True")>0) 408 return (1) 409 else 410 //Check from beam stop motor position 420 411 Variable beamtrap_1y=0,beamtrap_2y=0,beamtrap_3y=0,beamtrap_4y=0 421 // if(your test here)412 // if(your test here) 422 413 beamtrap_1y=getRealValueFromHeader(fname,"trap_y_101mm","mm") 423 414 beamtrap_2y=getRealValueFromHeader(fname,"trap_y_25mm","mm") … … 426 417 427 418 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") 429 421 return (1) 430 422 else … … 432 424 return (0) 433 425 endif 426 endif 427 return (0) 434 428 End 435 429 … … 839 833 // called by Correct.ipf, ProtocolAsPanel.ipf, Transmission.ipf 840 834 // 841 Function AttenuationFactor(fileStr,lam,atten percent)835 Function AttenuationFactor(fileStr,lam,attenuation) 842 836 String fileStr 843 Variable lam,atten percent837 Variable lam,attenuation // 0 =< attenuation <= 1 : where no attenuator stands for 0. 844 838 845 839 Variable attenFactor=1 846 840 847 841 // your code here 848 attenFactor = 1- atten percent /100//???Attenuate transmission842 attenFactor = 1- attenuation //???Attenuate transmission 849 843 850 844 return(attenFactor) … … 881 875 item = StringFromList(ii, list ,";") 882 876 //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") ) 884 878 if( !stringmatch(item,".*") && !stringmatch(item,"*.pxp") && !stringmatch(item,"*.DIV")) //eliminate mac "hidden" files, pxp, and div files 885 879 newlist += item + ";" … … 921 915 endif 922 916 endif 917 if( stringmatch(item,"*.xml") ) 918 if (CheckIfRawData(S_path+item) >0) 919 newlist += item + ";" 920 endif 921 endif 923 922 endfor 924 923 newList = SortList(newList,";",0) 925 924 return(newList) 926 925 End 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 // 934 Function/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") 939 End
Note: See TracChangeset
for help on using the changeset viewer.