Changeset 2179 for trunk/GSASIIimage.py
 Timestamp:
 Mar 18, 2016 3:20:03 PM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIimage.py
r2125 r2179 867 867 azmOff = data['azmthOff'] 868 868 Dazm = (LRazm[1]LRazm[0])/numAzms 869 if ' log(q)' in data['binType']:870 lutth = np.log(4.*np.pi*npsind(LUtth/2.)/data['wavelength'])869 if '2theta' in data.get('binType','2theta'): 870 lutth = LUtth 871 871 elif 'Q' == data['binType']: 872 872 lutth = 4.*np.pi*npsind(LUtth/2.)/data['wavelength'] 873 elif ' 2theta' in data['binType']:874 lutth = LUtth873 elif 'log(q)' in data['binType']: 874 lutth = np.log(4.*np.pi*npsind(LUtth/2.)/data['wavelength']) 875 875 dtth = (lutth[1]lutth[0])/numChans 876 muT = data ['SampleAbs'][0]876 muT = data.get('SampleAbs',[0.0,''])[0] 877 877 if 'SASD' in data['type']: 878 878 muT = np.log(muT)/2. #Transmission to 1/2 thickness muT … … 909 909 tax = np.where(tax > LRazm[1],tax360.,tax) #put azm inside limits if possible 910 910 tax = np.where(tax < LRazm[0],tax+360.,tax) 911 if data ['SampleAbs'][1]:911 if data.get('SampleAbs',[0.0,''])[1]: 912 912 if 'Cylind' in data['SampleShape']: 913 913 muR = muT*(1.+npsind(tax)**2/2.)/(npcosd(tay)) #adjust for additional thickness off sample normal … … 915 915 elif 'Fixed' in data['SampleShape']: #assumes flat plate sample normal to beam 916 916 tabs = G2pwd.Absorb('Fixed',muT,tay) 917 if 'log(q)' in data ['binType']:917 if 'log(q)' in data.get('binType',''): 918 918 tay = np.log(4.*np.pi*npsind(tay/2.)/data['wavelength']) 919 elif 'Q' == data ['binType']:919 elif 'Q' == data.get('binType',''): 920 920 tay = 4.*np.pi*npsind(tay/2.)/data['wavelength'] 921 921 t0 = time.time() … … 932 932 H0 = np.nan_to_num(H0) 933 933 H2 = np.array([tth for tth in np.linspace(lutth[0],lutth[1],numChans+1)]) 934 if 'log(q)' in data ['binType']:934 if 'log(q)' in data.get('binType',''): 935 935 H2 = 2.*npasind(np.exp(H2)*data['wavelength']/(4.*np.pi)) 936 elif 'Q' == data ['binType']:936 elif 'Q' == data.get('binType',''): 937 937 H2 = 2.*npasind(H2*data['wavelength']/(4.*np.pi)) 938 938 if Dazm:
Note: See TracChangeset
for help on using the changeset viewer.