Changeset 4855 for trunk


Ignore:
Timestamp:
Mar 18, 2021 1:27:55 PM (2 years ago)
Author:
vondreele
Message:

Add new option to AtomModify? in G2phsGUI - 'Uij' - converts Uiso to Uij & sets I/A to 'A'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4849 r4855  
    39223922        colLabels = [Atoms.GetColLabelValue(c) for c in range(Atoms.GetNumberCols())]
    39233923        ci = colLabels.index('I/A')
    3924         choices = ['Type','Name','x','y','z','frac','I/A','Uiso']
     3924        choices = ['Type','Name','x','y','z','frac','I/A','Uiso','Uij']
    39253925        if generalData['Type'] == 'magnetic':
    39263926            choices += ['Mx','My','Mz',]
     
    39313931            sel = dlg.GetSelection()
    39323932            parm = choices[sel]
    3933             cid = colLabels.index(parm)
     3933            cid = -1
     3934            if parm != 'Uij':
     3935                cid = colLabels.index(parm)
    39343936        dlg.Destroy()
    39353937        if parm in ['Type']:
     
    40004002                FillAtomsGrid(Atoms)
    40014003            dlg.Destroy()
     4004        elif parm == 'Uij':
     4005            limits = [0.,0.25]
     4006            val = 0.01
     4007            dlg = G2G.SingleFloatDialog(G2frame,'Convert Uiso to Uij','Enter default for Uiso'+parm,val,limits)
     4008            if dlg.ShowModal() == wx.ID_OK:
     4009                parm = dlg.GetValue()
     4010                for r in indx:                       
     4011                    if not Atoms.IsReadOnly(r,0):   #not if in RB!
     4012                        atomData[r][ci] = 'A'
     4013                        sytsym = atomData[r][cs]
     4014                        CSI = G2spc.GetCSuinel(sytsym)
     4015                        if atomData[r][ci+1] > 0.:
     4016                            atomData[r][ci+2:ci+8] = atomData[r][ci+1]*np.array(CSI[3])
     4017                        else:
     4018                            atomData[r][ci+2:ci+8] = parm*np.array(CSI[3])                           
     4019                SetupGeneral()
     4020                FillAtomsGrid(Atoms)
     4021            dlg.Destroy()
     4022           
    40024023        elif parm in ['x','y','z']:
    40034024            limits = [-1.,1.]
Note: See TracChangeset for help on using the changeset viewer.