Skip to content

Commit

Permalink
Version 2.3.0
Browse files Browse the repository at this point in the history
Merged pull request for non-integer hkl option on SF and electron form factors.
Thanks Prestipino!
Added menu with various options to GUI.
Updated docs and examples.
Added periodic_table.py GUI element
  • Loading branch information
DanPorter committed May 16, 2023
1 parent e5dffd0 commit 3554f61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dans_Diffraction/classes_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def beamline_info(self, energy_kev=None):
out += ' Formula: {}\n'.format(self.molname())
out += 'Magnetic: {}\n'.format(self.xtl.Structure.ismagnetic())
out += ' Weight: %5.2f g/mol\n' % (self.weight())
out += ' Density: %5.2f g/cm\n' % (self.density())
out += ' Density: %5.2f g/cm^3\n' % (self.density())
# Symmetry
out += '\nSymmetry: %r\n' % self.xtl.Symmetry
# Cell info
Expand Down Expand Up @@ -612,7 +612,7 @@ def info(self):
out += '-----------%s-----------\n'%self.xtl.name
out += ' Weight: %5.2f g/mol\n' %(self.weight())
out += ' Volume: %5.2f A^3\n' %(self.volume())
out += 'Density: %5.2f g/cm\n' %(self.density())
out += 'Density: %5.2f g/cm^3\n' %(self.density())
out += '\nAtoms:\n'
types = np.unique(self.xtl.Structure.type)
props = fc.atom_properties(types) # returns a numpy structured array
Expand Down
6 changes: 6 additions & 0 deletions Dans_Diffraction/tkgui/crystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, xtl=None):
'Element Info': {
'Element Info': self.menu_info_elements,
'Periodic Table': self.menu_info_table,
'X-Ray Interactions': self.menu_xray_interactions,
},
'Help': {
'Help': popup_help,
Expand Down Expand Up @@ -245,6 +246,11 @@ def menu_info_table(self):
"""Open periodic table"""
PeriodTableGui()

def menu_xray_interactions(self):
"""Open x-ray interactions gui"""
from .properties import XrayInteractionsGui
XrayInteractionsGui(self.xtl)

def menu_examples(self):
"""List example files, open in system viewer"""
import subprocess, platform, ast
Expand Down

0 comments on commit 3554f61

Please sign in to comment.