 Timestamp:
 Oct 27, 2009 2:07:14 PM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/U_CALC.ipf
r577 r583 134 134 Variable/G g_1DFracScatt= 0 // ?? 135 135 Variable/G g_1DEstTrans = 0 // ? can I calculate this? 136 Variable/G g_MultScattFraction = 0 137 136 138 137 139 // not on panel yet … … 311 313 312 314 GroupBox group0,pos={5,1},size={493,177},title="Instrument Setup" 313 GroupBox group1,pos={5,183},size={240,1 47},title="Sample Setup"314 GroupBox group2,pos={5,3 43},size={259,147},title="Results"315 GroupBox group1,pos={5,183},size={240,110},title="Sample Setup" 316 GroupBox group2,pos={5,310},size={240,170},title="Results" 315 317 316 318 PopupMenu popup0,pos={17,19},size={165,20},title="Sample Aperture Diam (in)" … … 455 457 456 458 // a box for the results 457 SetVariable totalTime,pos={left+20,3 70},size={150,15},title="Count time (h:m)",value= gTotTimeStr458 ValDisplay valdisp0_2,pos={left+20,395},size={220,13},title="Fraction of beam scattered"459 ValDisplay valdisp0_2,limits={0,0,0},barmisc={0,1000},value= root:Packages:NIST:USANS:Globals:U_Sim:g_1DFracScatt460 ValDisplay valdisp0_2,disable=1461 ValDisplay valdisp0_3,pos={left+20,420},size={220,13},title="Estimated transmission"462 ValDisplay valdisp0_3,limits={0,0,0},barmisc={0,1000},value=root:Packages:NIST:USANS:Globals:U_Sim:g_1DEstTrans463 ValDisplay valdisp0_3,disable=1464 Button button1,pos={left+20, 400},size={150,20},proc=U_SavePanelProc,title="Save PNG"465 Button button2,pos={left+20,4 30},size={150,20},proc=U_ConfigTextProc,title="Config Text"466 Button button3,pos={left+20,4 60},size={150,20},proc=U_SaveButtonProc,title="Save Simulated Data"459 SetVariable totalTime,pos={left+20,335},size={150,15},title="Count time (h:m)",value= gTotTimeStr 460 SetVariable totalTime,limits={inf,inf,0},noedit=1 461 SetVariable valdisp0_2,pos={left+20,365},size={190,15},title="Multiple Coherent Scattering" 462 SetVariable valdisp0_2,limits={inf,inf,0},noedit=1,value=g_MultScattFraction 463 // ValDisplay valdisp0_3,pos={left+20,420},size={220,13},title="Estimated transmission" 464 // ValDisplay valdisp0_3,limits={0,0,0},barmisc={0,1000},value=root:Packages:NIST:USANS:Globals:U_Sim:g_1DEstTrans 465 // ValDisplay valdisp0_3,disable=1 466 Button button1,pos={left+20,390},size={150,20},proc=U_SavePanelProc,title="Save PNG" 467 Button button2,pos={left+20,420},size={150,20},proc=U_ConfigTextProc,title="Config Text" 468 Button button3,pos={left+20,450},size={150,20},proc=U_SaveButtonProc,title="Save Simulated Data" 467 469 468 470 // help, done buttons … … 906 908 // sprintf abortStr,"sig_sas = %g. Please check that the model coefficients have a zero background, or the low q is wellbehaved.",sig_sas 907 909 // endif 910 // calculate the multiple scattering fraction for display (10/2009) 911 NVAR mScat = root:Packages:NIST:USANS:Globals:U_Sim:g_MultScattFraction 912 Variable nMax=10,tau 913 mScat=0 914 tau = thick*sig_sas 915 // this sums the normalized scattering P', so the result is the fraction of multiply coherently scattered 916 // neutrons out of those that were scattered 917 for(ii=2;ii<nMax;ii+=1) 918 mScat += tau^(ii)/factorial(ii) 919 // print tau^(ii)/factorial(ii) 920 endfor 908 921 estTrans = exp(1*thick*sig_sas) //thickness and sigma both in units of cm 922 mscat *= (estTrans)/(1estTrans) 923 924 if(mScat > 0.1) 925 SetVariable valdisp0_2 win=UCALC,labelBack=(65535,32768,32768) 926 else 927 SetVariable valdisp0_2 win=UCALC,labelBack=0 928 endif 929 930 909 931 Print "Sig_sas = ",sig_sas 910 932
Note: See TracChangeset
for help on using the changeset viewer.