Changeset 1880


Ignore:
Timestamp:
Jun 5, 2015 2:21:06 PM (7 years ago)
Author:
vondreele
Message:

fix wx bug in SetMapPeaksText? - 'GridWindow?' vs 'grid window'
add characteristic source choice to single crystal instrument parameters -
select mean Ka = (2*Ka1+Ka2)/3
change default single crystal wavelength to MoKa?

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1844 r1880  
    44574457                panel = G2frame.dataDisplay.GetPage(page).GetChildren()
    44584458                names = [child.GetName() for child in panel]
    4459                 panel[names.index('grid window')].Refresh()
     4459                try:
     4460                    panel[names.index('GridWindow')].Refresh()
     4461                except ValueError:  #different wx versions!
     4462                    panel[names.index('grid window')].Refresh()
    44604463           
    44614464    def ClearSelectedAtoms():
  • trunk/GSASIIpwdGUI.py

    r1878 r1880  
    11561156        else:
    11571157            G2frame.ErrorDialog('Can not calibrate','Nothing selected for refinement')
    1158            
    11591158
    11601159    def OnLoad(event):
     
    13111310    def OnLamPick(event):
    13121311        data['Source'][1] = lamType = event.GetEventObject().GetValue()
    1313         insVal['Lam1'] = waves[lamType][0]
    1314         insVal['Lam2'] = waves[lamType][1]
     1312        if 'P' in insVal['Type']:
     1313            insVal['Lam1'] = waves[lamType][0]
     1314            insVal['Lam2'] = waves[lamType][1]
     1315        elif 'S' in insVal['Type'] and 'synch' not in lamType:
     1316            insVal['Lam'] = meanwaves[lamType]
    13151317        updateData(insVal,insRef)
    13161318        i,j= wx.__version__.split('.')[0:2]
     
    15201522                instSizer.Add(waveVal,0,WACV)
    15211523                labelLst.append(u'Lam (\xc5)')
     1524                waveSizer = wx.BoxSizer(wx.HORIZONTAL)
     1525                waveSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,'  Source type: '),0,WACV)
     1526                # PATCH?: for now at least, Source is not saved anywhere before here
     1527                if 'Source' not in data: data['Source'] = ['CuKa','?']
     1528                choice = ['synchrotron','TiKa','CrKa','FeKa','CoKa','CuKa','MoKa','AgKa']
     1529                lamPick = wx.ComboBox(G2frame.dataDisplay,value=data['Source'][1],choices=choice,style=wx.CB_READONLY|wx.CB_DROPDOWN)
     1530                lamPick.Bind(wx.EVT_COMBOBOX, OnLamPick)
     1531                waveSizer.Add(lamPick,0,WACV)
     1532                instSizer.Add(waveSizer,0,WACV)
    15221533                elemKeysLst.append(['Lam',1])
    15231534                dspLst.append([10,6])
     
    15821593        'FeKa':[1.93597,1.93991],'CoKa':[1.78892,1.79278],'MoKa':[0.70926,0.713543],
    15831594        'AgKa':[0.559363,0.563775]}
     1595    meanwaves = {'CuKa':1.5418,'TiKa':2.7496,'CrKa':2.2909,'FeKa':1.9373,
     1596        'CoKa':1.7902,'MoKa':0.7107,'AgKa':0.5608}
    15841597    Inst2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,
    15851598            G2frame.PatternId,'Instrument Parameters'))[1]       
  • trunk/GSASIIstrMath.py

    r1879 r1880  
    875875        fas = np.sum(np.sum(fa,axis=2),axis=2)        #real sum over atoms & unique hkl
    876876        fb = np.array([((FF+FP).T-Bab).T*sinp*Tcorr,Flack*FPP*cosp*Tcorr])
    877         fb = np.reshape(fb,(2,len(refl),len(SGT),len(Mdata)))   #imag -B,+a
     877        fb = np.reshape(fb,(2,len(refl),len(SGT),len(Mdata)))   #imag -B,+a       
    878878        fbs = np.sum(np.sum(fb,axis=2),axis=2)  #imag sum over atoms & uniq hkl
    879879        if SGData['SGInv']: #centrosymmetric; B=0
  • trunk/imports/G2sfact_CIF.py

    r1773 r1880  
    335335                wave = float(blk['_diffrn_radiation.wavelength'])
    336336            else:
    337                 wave = 1.5418
     337                wave = 0.70926
    338338            self.UpdateParameters(Type=Type,Wave=wave) # histogram type
    339339            return True
Note: See TracChangeset for help on using the changeset viewer.