Changeset 2485


Ignore:
Timestamp:
Oct 5, 2016 12:12:58 PM (5 years ago)
Author:
toby
Message:

add Compute density to Phase/atoms

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2482 r2485  
    6969    wxID_RELOADDRAWATOMS,wxID_ATOMSDISAGL,wxID_ATOMMOVE,wxID_MAKEMOLECULE,
    7070    wxID_ASSIGNATMS2RB,wxID_ATOMSPDISAGL, wxID_ISODISP,wxID_ADDHATOM,wxID_UPDATEHATOM,
    71     wxID_WAVEVARY,wxID_ATOMSROTATE,
    72 ] = [wx.NewId() for item in range(19)]
     71    wxID_WAVEVARY,wxID_ATOMSROTATE, wxID_ATOMSDENSITY,
     72] = [wx.NewId() for item in range(20)]
    7373
    7474[ wxID_DRAWATOMSTYLE, wxID_DRAWATOMLABEL, wxID_DRAWATOMCOLOR, wxID_DRAWATOMRESETCOLOR,
     
    21832183        self.AtomCompute.ISOcalc = self.AtomCompute.Append(
    21842184            id=wxID_ISODISP, kind=wx.ITEM_NORMAL,
    2185             text='Compute ISODISTORT mode values',
     2185            text='ISODISTORT mode values',
    21862186            help='Compute values of ISODISTORT modes from atom parameters')
     2187        self.AtomCompute.Append(id=wxID_ATOMSDENSITY, kind=wx.ITEM_NORMAL,
     2188            text='Density',
     2189            help='Compute density for current phase')
    21872190        self.PostfillDataMenu()
    21882191       
  • trunk/GSASIIphsGUI.py

    r2483 r2485  
    24332433            G2frame.ErrorDialog('Select one atom',"select one atom to begin molecule build then redo")
    24342434
     2435    def OnDensity(event):
     2436        'show the density for the current phase'
     2437        density,mattCoeff = G2mth.getDensity(data['General'])
     2438        msg = 'Density of phase {:s} = {:.3f} g/cc'.format(data['General']['Name'],density)
     2439        print(msg)
     2440        G2G.G2MessageBox(G2frame.dataFrame,msg,'Density')
     2441         
    24352442    def OnDistAnglePrt(event):
    24362443        'save distances and angles to a file'   
     
    78957902        G2frame.dataFrame.Bind(wx.EVT_MENU, OnDistAnglePrt, id=G2gd.wxID_ATOMSPDISAGL)
    78967903        G2frame.dataFrame.Bind(wx.EVT_MENU, OnIsoDistortCalc, id=G2gd.wxID_ISODISP)
     7904        G2frame.dataFrame.Bind(wx.EVT_MENU, OnDensity, id=G2gd.wxID_ATOMSDENSITY)
    78977905        if 'HydIds' in data['General']:
    78987906            G2frame.dataFrame.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,True)
Note: See TracChangeset for help on using the changeset viewer.