Changeset 2452
- Timestamp:
- Aug 25, 2016 9:49:23 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/imports/G2pwd_rigaku.py
r2414 r2452 15 15 class Rigaku_ReaderClass(G2IO.ImportPowderData): 16 16 '''Routines to import powder data from a Rigaku .txt file with an angle and 17 then 1 1(!) intensity values on the line. The example file is proceeded17 then 1 or 11(!) intensity values on the line. The example file is proceeded 18 18 with 10 of blank lines, but I have assumed they could be any sort of text. 19 This code should work with an angle and any number of intensity values/line > 319 This code should work with an angle and any number of intensity values/line 20 20 as long as the number is the same on each line. The step size may not change. The 21 21 number of comment lines can also change, but should not appear to be intensity … … 24 24 def __init__(self): 25 25 super(self.__class__,self).__init__( # fancy way to self-reference 26 extensionlist=('.txt', ),27 strictExtension= False,26 extensionlist=('.txt','.TXT'), 27 strictExtension=True, 28 28 formatName = 'Rigaku .txt exported', 29 29 longFormatName = 'Rigaku powder data exported as .txt' … … 54 54 break 55 55 if err: continue 56 if vals < 4: continue56 if vals < 1: continue 57 57 header = False # found first non-header line 58 if vals < 4:59 print('T wo few values for Rigaku .txt file')58 if vals < 2: 59 print('Too few values for Rigaku .txt file') 60 60 return False 61 61 if self.vals is None:
Note: See TracChangeset
for help on using the changeset viewer.