Changeset 1632 for trunk/imports/G2pwd_fxye.py
 Timestamp:
 Jan 21, 2015 4:23:24 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/imports/G2pwd_fxye.py
r1515 r1632 171 171 if self.clockWd: 172 172 x = Tmap2TOF(self.TimeMap,self.clockWd)[:2] 173 return [np.array(x),np.array(y),np.array(w),np.zeros(N),np.zeros(N),np.zeros(N)] 174 175 def GetALTdata(File,Pos,Bank): 176 File.seek(Pos) 177 cons = Bank.split() 178 x = [] 179 y = [] 180 w = [] 181 S = File.readline() 182 j = 0 183 while S and S[:4] != 'BANK' and S[0] != '#': 184 for i in range(0,80,20): 185 xi = sfloat(S[i:i+9])/3200. 186 yi = sfloat(S[i+9:i+16])/1000. 187 ei = sfloat(S[i+16:i+21])/1000. 188 x.append(xi) 189 if yi > 0.0: 190 y.append(yi) 191 w.append(1.0/ei**2) 192 else: 193 y.append(0.0) 194 w.append(0.0) 195 j += 1 196 S = File.readline() 197 N = len(x) 198 if self.clockWd: 199 x = Tmap2TOF(self.TimeMap,clockWd) 173 200 return [np.array(x),np.array(y),np.array(w),np.zeros(N),np.zeros(N),np.zeros(N)] 174 201 … … 317 344 self.errors = 'Error reading STD data in Bank\n '+Banks[selblk] 318 345 self.powderdata = GetSTDdata(filepointer,Pos[selblk],Banks[selblk]) 346 elif 'ALT' in Bank: 347 self.errors = 'Error reading ALT data in Bank\n '+Banks[selblk] 348 self.powderdata = GetALTdata(filepointer,Pos[selblk],Banks[selblk]) 319 349 else: 320 350 self.errors = 'Error reading STD data in Bank\n '+Banks[selblk]
Note: See TracChangeset
for help on using the changeset viewer.