Changeset 3098
- Timestamp:
- Sep 25, 2017 2:11:37 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIscriptable.py
r3091 r3098 184 184 of 'axial' or 'equatorial'. If boolean 185 185 given sets both axial and equatorial. 186 Pref.Ori. Boolean, whetherto refine187 Show Boolean, whetherto refine186 Pref.Ori. Boolean, True to refine 187 Show Boolean, True to refine 188 188 Size Not implemented 189 Use Boolean, whetherto refine190 Scale Boolean, whetherto refine189 Use Boolean, True to refine 190 Scale Phase fraction; Boolean, True to refine 191 191 ===================== ===================== ==================== 192 192 … … 631 631 block += 1 632 632 rd.objname = os.path.basename(filename) 633 flag = rd.Reader(filename, fp, buffer=rdbuffer, blocknum=block) 633 try: 634 flag = rd.Reader(filename, fp, buffer=rdbuffer, blocknum=block) 635 except: 636 flag = False 634 637 if flag: 635 638 # Omitting image loading special cases … … 638 641 repeat = rd.repeat 639 642 else: 640 raise G2ImportException("{}.Reader() returned:".format(rd), 641 flag) 642 643 if GSASIIpath.GetConfigValue('debug'): print("{} Reader failed to read {}".format(rd.formatName,filename)) 643 644 if rd_list: 644 645 if rd.warnings: 645 646 print("Read warning by", rd.formatName, "reader:", 646 647 rd.warnings, file=sys.stderr) 648 else: 649 print("{} read by Reader {}\n".format(filename,rd.formatName)) 647 650 return rd_list 648 651 raise G2ImportException("No reader could read file: " + filename) … … 924 927 925 928 Automatically checks for an instrument parameter file, or one can be 926 provided. 929 provided. Note that in unix fashion, "~" can be used to indicate the 930 home directory (e.g. ~/G2data/data.fxye). 927 931 928 932 :param str datafile: The powder data file to read, a filename. … … 973 977 phasereaders = import_generic(phasefile, PhaseReaders) 974 978 phasereader = phasereaders[0] 975 979 976 980 phasename = phasename or phasereader.Phase['General']['Name'] 977 981 phaseNameList = [p.name for p in self.phases()] -
trunk/imports/G2pwd_BrukerRAW.py
r2835 r3098 15 15 ''' 16 16 17 import sys17 #import sys 18 18 import os.path as ospath 19 19 import struct as st … … 62 62 'Read a Bruker RAW file' 63 63 self.comments = [] 64 self.repeat = True65 64 self.powderentry[0] = filename 66 65 File = open(filename,'rb') … … 102 101 if blockNum == nBlock: 103 102 self.repeat = False 103 else: 104 self.repeat = True 104 105 File.close() 105 106 elif 'ver. 3' in self.formatName: … … 154 155 File.seek(pos) 155 156 if blockNum == nBlock: 156 self.repeat = False 157 self.repeat = False 158 else: 159 self.repeat = True 157 160 File.close() 158 161 … … 189 192 self.powderdata = [x,y,w,np.zeros(nSteps),np.zeros(nSteps),np.zeros(nSteps)] 190 193 File.close() 194 else: 195 return False 191 196 192 197 return True -
trunk/imports/G2pwd_CIF.py
r2817 r3098 94 94 selections = rdbuffer.get('selections') 95 95 if cf is None: 96 print "Starting parse of CIF file"96 if GSASIIpath.GetConfigValue('debug'): print("Starting parse of {} as CIF".format(filename)) 97 97 cf = G2obj.ReadCIF(filename) 98 print "CIF file parsed"98 if GSASIIpath.GetConfigValue('debug'): print "CIF file parsed" 99 99 # scan all blocks for sets of data 100 100 if choicelist is None: -
trunk/imports/G2pwd_FP.py
r2835 r3098 126 126 except ValueError: 127 127 msg = 'Error parsing number in line '+str(i+1) 128 print msg 129 print S 128 if GSASIIpath.GetConfigValue('debug'): 129 print msg 130 print S.strip() 130 131 break 131 132 except: 132 133 msg = 'Error in line '+str(i+1) 133 print msg 134 print S 134 if GSASIIpath.GetConfigValue('debug'): 135 print msg 136 print S.strip() 135 137 break 136 138 N = len(x) -
trunk/imports/G2pwd_csv.py
r2835 r3098 82 82 msg = 'Error in line '+str(i+1) 83 83 if err and i > 0: 84 print msg 85 print S 84 if GSASIIpath.GetConfigValue('debug'): 85 print msg 86 print S.strip() 86 87 break 87 88 N = len(x) -
trunk/imports/G2pwd_xye.py
r2835 r3098 133 133 except ValueError: 134 134 msg = 'Error parsing number in line '+str(i+1) 135 print msg 136 print S 135 if GSASIIpath.GetConfigValue('debug'): 136 print msg 137 print S.strip() 137 138 break 138 139 except: 139 140 msg = 'Error in line '+str(i+1) 140 print msg 141 print S 141 if GSASIIpath.GetConfigValue('debug'): 142 print msg 143 print S.strip() 142 144 break 143 145 N = len(x)
Note: See TracChangeset
for help on using the changeset viewer.