Changeset 4660
- Timestamp:
- Nov 23, 2020 5:37:49 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIElemGUI.py ¶
r4203 r4660 54 54 if self.multiple: 55 55 b = wx.Button(self,wx.ID_CLOSE, 56 pos=wx.Point(16.5*self.butWid+25,7.75*24+24), 57 label="Done") 56 pos=wx.Point(16.5*self.butWid+25,7.75*24+24),label="Done") 58 57 b.Bind(wx.EVT_BUTTON, self.OnClose) 59 58 -
TabularUnified trunk/GSASIIdataGUI.py ¶
r4659 r4660 6176 6176 'wxID_ATOMSPDISAGL', 'wxID_ISODISP', 'wxID_ADDHATOM', 'wxID_UPDATEHATOM', 6177 6177 'wxID_ATOMSROTATE', 'wxID_ATOMSDENSITY','wxID_ATOMSBNDANGLHIST', 6178 'wxID_ATOMSSETALL', 'wxID_ATOMSSETSEL', )6178 'wxID_ATOMSSETALL', 'wxID_ATOMSSETSEL','wxID_ATOMFRACSPLIT',) 6179 6179 self.AtomsMenu = wx.MenuBar() 6180 6180 self.PrefillDataMenu(self.AtomsMenu) … … 6213 6213 self.AtomCompute.Append(G2G.wxID_ATOMSPDISAGL,'Save Distances && Angles','Compute distances & angles for selected atoms') 6214 6214 self.AtomCompute.Append(G2G.wxID_ATOMSBNDANGLHIST,'Histogram Bonds && Angles','Histogram bonds & angles for selected atoms') 6215 self.AtomCompute.Append(G2G.wxID_ATOMFRACSPLIT,'Apportion atom frac','2 atom type site fraction apportion') 6215 6216 self.AtomCompute.Append(G2G.wxID_ATOMSDENSITY,'Density','Compute density for current phase') 6216 6217 self.AtomCompute.ISOcalc = self.AtomCompute.Append(G2G.wxID_ISODISP,'ISODISTORT mode values', -
TabularUnified trunk/GSASIIphsGUI.py ¶
r4659 r4660 4246 4246 print ("select one or more rows of atoms") 4247 4247 G2frame.ErrorDialog('Select atom',"select one or more rows of atoms then redo") 4248 4249 def OnFracSplit(event): 4250 'Split atom frac accordintg to atom type & refined site fraction' 4251 cx,ct,cs,ci = getAtomPtrs(data) 4252 indx = getAtomSelections(Atoms,ct-1) 4253 if indx: 4254 atomData = data['Atoms'] 4255 colLabels = [Atoms.GetColLabelValue(c) for c in range(Atoms.GetNumberCols())] 4256 PE = G2elemGUI.PickElement(G2frame,oneOnly=True) 4257 if PE.ShowModal() == wx.ID_OK: 4258 Atype2 = PE.Elem.strip() 4259 AtomInfo2 = G2elem.GetAtomInfo(Atype2) 4260 Z2 = AtomInfo2['Z'] 4261 B2 = AtomInfo2['Isotopes']['Nat. Abund.']['SL'][0] 4262 PE.Destroy() 4263 for ind in indx: 4264 Aname1 = atomData[ind][ct-1] 4265 Atype1 = G2elem.FixValence(atomData[ind][ct]) 4266 Afrac = atomData[ind][cx+3] 4267 AtomInfo1 = G2elem.GetAtomInfo(Atype1) 4268 if Atype1 == Atype2: 4269 print('ERROR - 2nd atom type must be different from selected atom') 4270 continue 4271 Z1 = AtomInfo1['Z'] 4272 B1 = AtomInfo1['Isotopes']['Nat. Abund.']['SL'][0] 4273 frac1 = (Z1*Afrac-Z2)/(Z1-Z2) 4274 bfrac1 = (B1*Afrac-B2)/(B1-B2) 4275 print(' For %s: X-ray based %s site fraction = %.3f, %s site fraction = %.3f'%(Aname1,Atype1,frac1,Atype2,(1.-frac1))) 4276 print(' neutron based %s site fraction = %.3f, %s site fraction = %.3f\n'%(Atype1,bfrac1,Atype2,(1.-bfrac1))) 4248 4277 4249 4278 def OnValidProtein(event): … … 12635 12664 G2frame.Bind(wx.EVT_MENU, OnDistAnglePrt, id=G2G.wxID_ATOMSPDISAGL) 12636 12665 G2frame.Bind(wx.EVT_MENU, OnDistAngleHist, id=G2G.wxID_ATOMSBNDANGLHIST) 12666 G2frame.Bind(wx.EVT_MENU, OnFracSplit, id=G2G.wxID_ATOMFRACSPLIT) 12637 12667 G2frame.Bind(wx.EVT_MENU, OnDensity, id=G2G.wxID_ATOMSDENSITY) 12638 12668 G2frame.Bind(wx.EVT_MENU, OnIsoDistortCalc, id=G2G.wxID_ISODISP)
Note: See TracChangeset
for help on using the changeset viewer.