Changeset 2742


Ignore:
Timestamp:
Mar 5, 2017 5:39:30 PM (6 years ago)
Author:
toby
Message:

Key on autointegration on setdist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r2731 r2742  
    391391            'IOtth','outChannels','outAzimuths','invert_x','invert_y','DetDepth',
    392392            '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            ]
    394395        for key in keys:
    395396            if key not in data:     #uncalibrated!
     
    22442245                        'fullIntegrate','outChannels','outAzimuths','LRazimuth','IOtth','azmthOff','DetDepth',
    22452246                        'calibskip','pixLimit','cutoff','calibdmin','Flat Bkg',
    2246                         'PolaVal','SampleAbs','dark image','background image']
     2247                        'PolaVal','SampleAbs','dark image','background image','setdist']
    22472248    File = open(imctrl_file,'r')
    22482249    fullIntegrate = False
     
    26802681                    msg += 'Files to integrate from '+os.path.join(self.imagedir,value)+msg1
    26812682                else:
    2682                     msg += 'All files integrated'
     2683                    msg += 'No files found to read'
    26832684        except IndexError:
    26842685            msg += 'Error searching for files named '+os.path.join(self.imagedir,value)
     
    27692770        #dist = self.controlsDict['distance']
    27702771        interpDict,imgctrl,immask = self.Evaluator(dist) # interpolated calibration values
    2771         #if GSASIIpath.GetConfigValue('debug'):
    27722772        if GSASIIpath.GetConfigValue('debug'):
    27732773            print 'interpolated values: ',interpDict
     
    29022902                G2gd.GetPatternTreeItemId(G2frame,imgId, 'Masks'))
    29032903            if self.params['Mode'] == 'table': # look up parameter values from table
    2904                 self.ResetFromTable(controlsDict['distance'])
     2904                self.ResetFromTable(controlsDict['setdist'])
    29052905            # update controls from master
    29062906            controlsDict.update(self.ImageControls)
     
    30513051        x = np.array([float(i) for i in parms[0]])
    30523052        closest = abs(x-dist).argmin()
    3053         D = {'distance':dist}
     3053        D = {'setdist':dist}
    30543054        imctfile = IMfileList[closest]
    30553055        if parms[-1][closest].lower() != '(none)':
     
    30923092    creates a dictionary with interpolated parameter values.
    30933093    '''
    3094     ParmList = ('distance','center_x','center_y','wavelength','tilt','rotation','DetDepth',
     3094    ParmList = ('setdist','distance','center_x','center_y','wavelength','tilt','rotation','DetDepth',
    30953095            'LRazimuth_min','LRazimuth_max','IOtth_min','IOtth_max','outChannels',
    30963096            'maskfile',
     
    30983098    nonInterpVars = ('tilt','rotation','LRazimuth_min','LRazimuth_max','IOtth_min','IOtth_max',
    30993099                     'outChannels')  # values in this list are taken from nearest rather than interpolated
    3100     HeaderList = ('Det Dist','X cntr','Y cntr','wavelength','tilt','rotation','DetDepth',
     3100    HeaderList = ('Set Dist','Calib Dist','X cntr','Y cntr','wavelength','tilt','rotation','DetDepth',
    31013101            'Azimuth min','Azimuth max','2Th min','2Th max','Int. pts',
    31023102            'Mask File',
     
    31833183            fileList = tmpDict.get('filenames','[]')
    31843184            parms = []
     3185            if 'setdist' not in tmpDict:
     3186                print(u'Old file, recreate before using: {}'.format(files[0]))
     3187                return [[]],[]
    31853188            for key in self.ParmList:
    31863189                try:
     
    31973200        for file in files: # read all files; place in dict by distance
    31983201            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
    32003206        parms = [[] for key in self.ParmList]
    32013207        fileList = []
     
    32773283            self.InsertColumn(i, lbl)
    32783284        for r,d in enumerate(parms[0]):
     3285            if d is None: continue
    32793286            if float(d) < 0: continue
    32803287            index = self.InsertStringItem(sys.maxint, d)
Note: See TracChangeset for help on using the changeset viewer.