Changeset 1667


Ignore:
Timestamp:
Feb 23, 2015 4:09:20 PM (7 years ago)
Author:
vondreele
Message:

fix bug in load mask ignore thresholds
inner/outer image limits now in 2-theta of q depending of binType.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1660 r1667  
    7171[ wxID_ATOMSEDITADD, wxID_ATOMSEDITINSERT, wxID_ATOMSEDITDELETE, wxID_ATOMSREFINE,
    7272    wxID_ATOMSMODIFY, wxID_ATOMSTRANSFORM, wxID_ATOMSVIEWADD, wxID_ATOMVIEWINSERT,
    73     wxID_RELOADDRAWATOMS,wxID_ATOMSDISAGL,wxID_ATOMMOVE,
     73    wxID_RELOADDRAWATOMS,wxID_ATOMSDISAGL,wxID_ATOMMOVE,wxID_MAKEMOLECULE,
    7474    wxID_ASSIGNATMS2RB,wxID_ATOMSPDISAGL, wxID_ISODISP,
    75 ] = [wx.NewId() for item in range(14)]
     75] = [wx.NewId() for item in range(15)]
    7676
    7777[ wxID_DRAWATOMSTYLE, wxID_DRAWATOMLABEL, wxID_DRAWATOMCOLOR, wxID_DRAWATOMRESETCOLOR,
     
    19871987        self.AtomEdit.Append(id=wxID_ATOMSTRANSFORM, kind=wx.ITEM_NORMAL,text='Transform atoms',
    19881988            help='Select atoms to transform first')
     1989        self.AtomEdit.Append(id=wxID_MAKEMOLECULE, kind=wx.ITEM_NORMAL,text='Assemble molecule',
     1990            help='Assemble molecule from scatterd atom positions')
    19891991        self.AtomEdit.Append(id=wxID_RELOADDRAWATOMS, kind=wx.ITEM_NORMAL,text='Reload draw atoms',
    19901992            help='Reload atom drawing list')
  • trunk/GSASIIimgGUI.py

    r1666 r1667  
    528528        def OnNewBinType(event):
    529529            data['binType'] = binSel.GetValue()
     530            wx.CallAfter(UpdateImageControls,G2frame,data,masks)
    530531       
    531532        def OnIOtth(event):
     
    534535            if Ltth > Utth:
    535536                Ltth,Utth = Utth,Ltth
    536             data['IOtth'] = [Ltth,Utth]
     537            if 'q' in data['binType']:
     538                data['IOtth'] = [2.*asind(Ltth*wave/(4.*math.pi)),2.*asind(Utth*wave/(4.*math.pi))]
     539            else:
     540                data['IOtth'] = [Ltth,Utth]
    537541            G2frame.InnerTth.SetValue("%8.3f" % (Ltth))
    538             G2frame.OuterTth.SetValue("%8.2f" % (Utth))
     542            G2frame.OuterTth.SetValue("%8.3f" % (Utth))
    539543            G2plt.PlotExposedImage(G2frame,event=event)
    540544       
     
    671675        binSel.Bind(wx.EVT_COMBOBOX, OnNewBinType)
    672676        dataSizer.Add(binSel,0,WACV)
    673         dataSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Inner/Outer 2-theta'),0,WACV)           
    674         IOtth = data['IOtth']
     677        binType = '2-theta'
     678        if 'q' in data['binType']:
     679            binType = 'q'
     680        dataSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Inner/Outer '+binType),0,WACV)           
     681        IOtth = data['IOtth'][:]
     682        if 'q' in data['binType']:
     683            wave = data['wavelength']
     684            IOtth = [4.*math.pi*sind(IOtth[0]/2.)/wave,4.*math.pi*sind(IOtth[1]/2.)/wave]
    675685        littleSizer = wx.BoxSizer(wx.HORIZONTAL)
    676686        G2frame.InnerTth = wx.TextCtrl(parent=G2frame.dataDisplay,
     
    10421052
    10431053    def Replot(*args,**kwargs):
    1044         G2plt.PlotExposedImage(G2frame)       
     1054        G2plt.PlotExposedImage(G2frame,newPlot=True)       
    10451055
    10461056    def onDeleteMask(event):
     
    11311141                    [key,val] = S[:-1].split(':')
    11321142                    if key in ['Points','Rings','Arcs','Polygons','Frames','Thresholds']:
    1133                         if ignoreThreshold and key == 'Thresholds': continue
     1143                        if ignoreThreshold and key == 'Thresholds':
     1144                            S = File.readline()
     1145                            continue
    11341146                        save[key] = eval(val)
    11351147                        if key == 'Thresholds':
     
    13261338    if frame:
    13271339        lbl = wx.StaticText(parent=G2frame.dataDisplay,
    1328             label=' Frame mask (on plot RB vertex drag to move,\nLB vertex drag to insert)')
     1340            label=' Frame mask (on plot RB vertex drag to move,LB vertex drag to insert)')
    13291341        lbl.SetBackgroundColour(wx.Colour(200,200,210))
    13301342        mainSizer.Add(lbl,0,wx.EXPAND|wx.ALIGN_CENTER,0)
Note: See TracChangeset for help on using the changeset viewer.