Changeset 3979
 Timestamp:
 May 15, 2019 2:16:48 PM (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/imports/G2pwd_BrukerRAW.py
r3969 r3979 160 160 step = st.unpack('<d',fp.read(8))[0] 161 161 pos += headLen #position at start of data block 162 # if blockNum != nBlock: 163 # fp.seek(pos40) 164 # else: 165 fp.seek(pos) 162 fp.seek(pos) 166 163 x = np.array([start2Th+i*step for i in range(nSteps)]) 167 y = np.array([max(1.,st.unpack('<f',fp.read(4))[0]) for i in range(nSteps)]) 164 try: 165 y = np.array([max(1.,st.unpack('<f',fp.read(4))[0]) for i in range(nSteps)]) 166 except: #this is absurd 167 fp.seek(pos40) 168 y = np.array([max(1.,st.unpack('<f',fp.read(4))[0]) for i in range(nSteps)]) 168 169 w = 1./y 169 170 self.powderdata = [x,y,w,np.zeros(nSteps),np.zeros(nSteps),np.zeros(nSteps)]
Note: See TracChangeset
for help on using the changeset viewer.