Changeset 3124


Ignore:
Timestamp:
Oct 6, 2017 10:07:28 AM (4 years ago)
Author:
vondreele
Message:

fixes for AutoIntegrate? from imgctrl table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r3122 r3124  
    22122212                fullIntegrate = eval(val)
    22132213            elif key == 'LRazimuth':
    2214                 save['LRazimuth_min'],save['LRazimuth_max'] = eval(val)[0:2]
     2214                vals = eval(val)
     2215                save['LRazimuth_min'] = float(vals[0])
     2216                save['LRazimuth_max'] = float(vals[1])
    22152217            elif key == 'IOtth':
    22162218                save['IOtth_min'],save['IOtth_max'] = eval(val)[0:2]
     
    22272229    finally:
    22282230        File.close()
    2229         if fullIntegrate: save['LRazimuth_min'],save['LRazimuth_max'] = 0.,0.
     2231        if fullIntegrate: save['LRazimuth_min'],save['LRazimuth_max'] = 0.,360.
    22302232    return save
    22312233   
     
    31283130                wx.CallAfter(self.EndModal,wx.ID_CANCEL)
    31293131                return
    3130         mainSizer = self.G2frame.dataWindow.GetSizer()
    3131         self.list = ImgIntLstCtrl(self, wx.ID_ANY,
    3132                       style=wx.LC_REPORT
    3133                           | wx.BORDER_SUNKEN
    3134                          #| wx.BORDER_NONE
    3135                          )
     3132        mainSizer = wx.BoxSizer(wx.VERTICAL)
     3133        self.list = ImgIntLstCtrl(self, wx.ID_ANY,style=wx.LC_REPORT| wx.BORDER_SUNKEN)
    31363134        mainSizer.Add(self.list,1,wx.EXPAND,1)
    31373135        btnsizer = wx.BoxSizer(wx.HORIZONTAL)
     
    31993197        for file in files: # read all files; place in dict by distance
    32003198            imgDict = Read_imctrl(file)
    3201             dist = imgDict.get('setdist')
     3199            dist = imgDict.get('setdist',imgDict['distance'])
    32023200            if dist is None:
    32033201                print('Skipping old file, redo: {}'.format(file))
     
    32673265    '''Creates a custom ListCtrl for editing Image Integration parameters
    32683266    '''
    3269     def __init__(self, parent, ID, pos=wx.DefaultPosition,
    3270                  size=(1000,200), style=0):
     3267    def __init__(self, parent, ID, pos=wx.DefaultPosition,size=(1000,200),style=0):
    32713268        self.parent=parent
    32723269        wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
     
    32753272        self.Bind(wx.EVT_LEFT_DCLICK, self.OnDouble)
    32763273        #self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick)
     3274       
    32773275    def FillList(self,parms):
    32783276        'Places the current parms into the table'
     
    32833281        for r,d in enumerate(parms[0]):
    32843282            if d is None: continue
     3283            if d == 'None': continue
    32853284            if float(d) < 0: continue
    32863285            index = self.InsertStringItem(sys.maxint, d)
     
    32983297        try:
    32993298            dlg = wx.FileDialog(self, 'Select mask or control file to add (Press cancel if none)', pth,
    3300                                 style=wx.OPEN,
    3301                                 wildcard='Add GSAS-II mask file (.immask)|*.immask|add image control file (.imctrl)|*.imctrl')
     3299                style=wx.OPEN,wildcard='Add GSAS-II mask file (.immask)|*.immask|add image control file (.imctrl)|*.imctrl')
    33023300            dlg.CenterOnParent()
    33033301            if dlg.ShowModal() == wx.ID_OK:
Note: See TracChangeset for help on using the changeset viewer.