Changeset 2742
- Timestamp:
- Mar 5, 2017 5:39:30 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIimgGUI.py
r2731 r2742 391 391 'IOtth','outChannels','outAzimuths','invert_x','invert_y','DetDepth', 392 392 'calibskip','pixLimit','cutoff','calibdmin','Flat Bkg','varyList', 393 'binType','SampleShape','PolaVal','SampleAbs','dark image','background image'] 393 'binType','SampleShape','PolaVal','SampleAbs','dark image','background image', 394 ] 394 395 for key in keys: 395 396 if key not in data: #uncalibrated! … … 2244 2245 'fullIntegrate','outChannels','outAzimuths','LRazimuth','IOtth','azmthOff','DetDepth', 2245 2246 'calibskip','pixLimit','cutoff','calibdmin','Flat Bkg', 2246 'PolaVal','SampleAbs','dark image','background image' ]2247 'PolaVal','SampleAbs','dark image','background image','setdist'] 2247 2248 File = open(imctrl_file,'r') 2248 2249 fullIntegrate = False … … 2680 2681 msg += 'Files to integrate from '+os.path.join(self.imagedir,value)+msg1 2681 2682 else: 2682 msg += ' All files integrated'2683 msg += 'No files found to read' 2683 2684 except IndexError: 2684 2685 msg += 'Error searching for files named '+os.path.join(self.imagedir,value) … … 2769 2770 #dist = self.controlsDict['distance'] 2770 2771 interpDict,imgctrl,immask = self.Evaluator(dist) # interpolated calibration values 2771 #if GSASIIpath.GetConfigValue('debug'):2772 2772 if GSASIIpath.GetConfigValue('debug'): 2773 2773 print 'interpolated values: ',interpDict … … 2902 2902 G2gd.GetPatternTreeItemId(G2frame,imgId, 'Masks')) 2903 2903 if self.params['Mode'] == 'table': # look up parameter values from table 2904 self.ResetFromTable(controlsDict[' distance'])2904 self.ResetFromTable(controlsDict['setdist']) 2905 2905 # update controls from master 2906 2906 controlsDict.update(self.ImageControls) … … 3051 3051 x = np.array([float(i) for i in parms[0]]) 3052 3052 closest = abs(x-dist).argmin() 3053 D = {' distance':dist}3053 D = {'setdist':dist} 3054 3054 imctfile = IMfileList[closest] 3055 3055 if parms[-1][closest].lower() != '(none)': … … 3092 3092 creates a dictionary with interpolated parameter values. 3093 3093 ''' 3094 ParmList = (' distance','center_x','center_y','wavelength','tilt','rotation','DetDepth',3094 ParmList = ('setdist','distance','center_x','center_y','wavelength','tilt','rotation','DetDepth', 3095 3095 'LRazimuth_min','LRazimuth_max','IOtth_min','IOtth_max','outChannels', 3096 3096 'maskfile', … … 3098 3098 nonInterpVars = ('tilt','rotation','LRazimuth_min','LRazimuth_max','IOtth_min','IOtth_max', 3099 3099 'outChannels') # values in this list are taken from nearest rather than interpolated 3100 HeaderList = (' DetDist','X cntr','Y cntr','wavelength','tilt','rotation','DetDepth',3100 HeaderList = ('Set Dist','Calib Dist','X cntr','Y cntr','wavelength','tilt','rotation','DetDepth', 3101 3101 'Azimuth min','Azimuth max','2Th min','2Th max','Int. pts', 3102 3102 'Mask File', … … 3183 3183 fileList = tmpDict.get('filenames','[]') 3184 3184 parms = [] 3185 if 'setdist' not in tmpDict: 3186 print(u'Old file, recreate before using: {}'.format(files[0])) 3187 return [[]],[] 3185 3188 for key in self.ParmList: 3186 3189 try: … … 3197 3200 for file in files: # read all files; place in dict by distance 3198 3201 imgDict = Read_imctrl(file) 3199 tmpDict[imgDict.get('distance')] = imgDict 3202 dist = imgDict.get('setdist') 3203 if dist is None: 3204 print('Skipping old file, redo: {}'.format(file)) 3205 tmpDict[dist] = imgDict 3200 3206 parms = [[] for key in self.ParmList] 3201 3207 fileList = [] … … 3277 3283 self.InsertColumn(i, lbl) 3278 3284 for r,d in enumerate(parms[0]): 3285 if d is None: continue 3279 3286 if float(d) < 0: continue 3280 3287 index = self.InsertStringItem(sys.maxint, d)
Note: See TracChangeset
for help on using the changeset viewer.