Changeset 5359
- Timestamp:
- Oct 28, 2022 11:35:54 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/imports/G2pwd_BrukerRAW.py
r5358 r5359 258 258 'Read a Bruker brml file' 259 259 print(filename) 260 nSteps = int(self.data['RawData']['DataRoutes']['DataRoute'][1]['ScanInformation']['MeasurementPoints']) 260 datano = 1 261 try: 262 nSteps = int(self.data['RawData']['DataRoutes']['DataRoute'][datano]['ScanInformation']['MeasurementPoints']) 263 except KeyError: 264 datano = 0 265 nSteps = int(self.data['RawData']['DataRoutes']['DataRoute']['ScanInformation']['MeasurementPoints']) 261 266 262 267 x = np.zeros(nSteps, dtype=float) … … 264 269 w = np.zeros(nSteps, dtype=float) 265 270 266 effTime = float(self.data['RawData']['DataRoutes']['DataRoute'][1]['ScanInformation']['TimePerStepEffective']) 271 if datano: 272 effTime = float(self.data['RawData']['DataRoutes']['DataRoute'][datano]['ScanInformation']['TimePerStepEffective']) 273 else: 274 effTime = float(self.data['RawData']['DataRoutes']['DataRoute']['ScanInformation']['TimePerStepEffective']) 267 275 268 276 # Extract 2-theta angle and counts from the XML document 269 277 i=0 270 278 while i < nSteps : 271 entry = self.data['RawData']['DataRoutes']['DataRoute'][1]['Datum'][i].split(',') 279 if datano: 280 entry = self.data['RawData']['DataRoutes']['DataRoute'][datano]['Datum'][i].split(',') 281 else: 282 entry = self.data['RawData']['DataRoutes']['DataRoute']['Datum'][i].split(',') 272 283 x[i] = float(entry[2]) 273 284 y[i] = float(entry[4])*float(entry[0])/effTime
Note: See TracChangeset
for help on using the changeset viewer.