Skip to content

Commit

Permalink
Version 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
DanPorter committed Dec 13, 2019
1 parent 7dc8f2b commit 897cf83
Show file tree
Hide file tree
Showing 39 changed files with 5,690 additions and 3,340 deletions.
163 changes: 163 additions & 0 deletions Dans_Diffraction.ipynb

Large diffs are not rendered by default.

24 changes: 15 additions & 9 deletions Dans_Diffraction/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
Diamond
2017
Version 1.4
Last updated: 13/07/19
Version 1.5
Last updated: 13/12/19
Version History:
02/03/18 1.0 Version History started.
30/05/18 1.1 Fdmnes added
08/06/18 1.2 Python3 now fully supported
23/02/19 1.3 Graphical user intrface and magnetic x-ray scattering now implemented
13/07/19 1.4 FDMNES GUI functionality added
13/12/19 1.5 Multiple Scattering added, tkGUI refactored, Startgui changed to start_gui
"""

# Set TkAgg environment
Expand All @@ -44,20 +45,25 @@
if fdmnes_checker():
from .classes_fdmnes import Fdmnes, FdmnesAnalysis

# GUI (requires tkinter)
try:
from .classes_gui import Crystalgui as Startgui
except ImportError:
print('GUI functionality not available, you need to install tkinter.')

__version__ = '1.4'
__date__ = '12/08/19'
__version__ = '1.5'
__date__ = '13/12/19'


# Build
structure_list = Structures()


# tkGUI Activation
def start_gui(xtl=None):
"""Start GUI window (requires tkinter)"""
try:
from .tkgui import CrystalGui
CrystalGui(xtl)
except ImportError:
print('GUI functionality not available, you need to install tkinter.')


# FDMNES Activation
def activate_fdmnes():
"""To activate FDMNES functionality"""
Expand Down
4 changes: 2 additions & 2 deletions Dans_Diffraction/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Usage:
***From Terminal***
cd /location/of/file
ipython -i -m -matplotlib tk Dans_Diffraction
ipython -i -m --matplotlib tk Dans_Diffraction
By Dan Porter, PhD
Diamond
Expand All @@ -18,6 +18,6 @@
import Dans_Diffraction as dif

print('\nDans_Diffraction version %s, %s\n By Dan Porter, Diamond Light Source Ltd.'%(dif.__version__, dif.__date__))
print('See help(dif.Crystal) for info, or dif.Startgui() to get started!')
print('See help(dif.Crystal) for info, or dif.start_gui() to get started!')
xtl = dif.Crystal()

4 changes: 2 additions & 2 deletions Dans_Diffraction/classes_crystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ def start_gui(self):
:return: None
"""
try:
from Dans_Diffraction.classes_gui import Crystalgui
Crystalgui(self)
from .tkgui import CrystalGui
CrystalGui(self)
except ImportError:
print('Sorry, you need to install tkinter!')

Expand Down
Loading

0 comments on commit 897cf83

Please sign in to comment.