Changeset 5019
 Timestamp:
 Aug 31, 2021 8:06:14 AM (15 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/imports/G2pwd_xye.py
r5017 r5019 166 166 continue 167 167 try: 168 if self.Wave: 169 try: 170 val = min(0.995,self.Wave/(4.*np.pi/float(vals[0]))) #set max at 168deg 171 x.append(2.0*asind(val)) 172 except: 173 msg = 'Error converting '+str(vals[0] 174 ) + 'with wavelength ' + str(self.Wave) 175 break 176 else: 177 x.append(float(vals[0])) 168 x.append(float(vals[0])) 178 169 f = float(vals[1]) 179 170 if f <= 0.0: … … 199 190 break 200 191 N = len(x) 192 x = np.array(x) 193 y = np.nan_to_num(np.array(y)) 194 w = np.nan_to_num(np.array(w)) 195 if self.Wave: #for q data 196 val = self.Wave/(4.*np.pi/x) 197 x = 2.0*asind(val) 198 y *= 100. 199 w /= 100**2 200 201 201 self.powderdata = [ 202 np.array(x), # xaxis values203 np.array(y), # powder pattern intensities204 np.array(w), # 1/sig(intensity)^2 values (weights)202 x, # xaxis values 203 y, # powder pattern intensities 204 w, # 1/sig(intensity)^2 values (weights) 205 205 np.zeros(N), # calc. intensities (zero) 206 206 np.zeros(N), # calc. background (zero)
Note: See TracChangeset
for help on using the changeset viewer.