Changeset 3857
- Timestamp:
- Mar 18, 2019 12:09:57 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIimage.py
r3842 r3857 26 26 import GSASIIpath 27 27 GSASIIpath.SetVersionNumber("$Revision$") 28 import GSASIIplot as G2plt 28 try: 29 import GSASIIplot as G2plt 30 except ImportError, ModuleNotFoundError: # expected in scriptable w/o matplotlib and/or wx 31 pass 29 32 import GSASIIlattice as G2lat 30 33 import GSASIIpwd as G2pwd -
trunk/GSASIIscriptable.py
r3849 r3857 1068 1068 gsasii_version = str(GSASIIpath.GetVersionNumber()) 1069 1069 LoadG2fil() 1070 import matplotlib as mpl 1071 python_library_versions = G2fil.get_python_versions([mpl, np, sp]) 1070 try: 1071 import matplotlib as mpl 1072 python_library_versions = G2fil.get_python_versions([mpl, np, sp]) 1073 except ModuleNotFoundError: 1074 python_library_versions = G2fil.get_python_versions([np, sp]) 1072 1075 1073 1076 controls_data = dict(G2obj.DefaultControls) … … 2812 2815 try: 2813 2816 import matplotlib.pyplot as plt 2814 data = self.data['data'][1]2815 if Yobs:2816 plt.plot(data[0], data[1], label='Yobs')2817 if Ycalc:2818 plt.plot(data[0], data[3], label='Ycalc')2819 if Background:2820 plt.plot(data[0], data[4], label='Background')2821 if Residual:2822 plt.plot(data[0], data[5], label="Residual")2823 2817 except ImportError: 2824 pass 2818 print('Unable to import matplotlib, skipping plot') 2819 return 2820 data = self.data['data'][1] 2821 if Yobs: 2822 plt.plot(data[0], data[1], label='Yobs') 2823 if Ycalc: 2824 plt.plot(data[0], data[3], label='Ycalc') 2825 if Background: 2826 plt.plot(data[0], data[4], label='Background') 2827 if Residual: 2828 plt.plot(data[0], data[5], label="Residual") 2825 2829 2826 2830 def get_wR(self): -
trunk/docs/source/index.rst
r3288 r3857 5 5 ================================= 6 6 7 The following documentation is intended for those wishing to code 8 withing the GSAS-II framework, those planning to understand how 9 GSAS-II works or for people wishing to develop scripting applications 10 using the API (:mod:`GSASIIscriptable`). 11 12 Contents 13 --------- 14 7 15 .. toctree:: 8 16 17 packages.rst 9 18 GSASII.rst 10 19 GSASIIobj.rst … … 25 34 exports.rst 26 35 27 *Required packages*28 --------------------29 30 GSAS-II requires a standard Python interpreter to be installed, as31 well as several separately-developed packages. GSAS-II is being32 developed using both Python 2.7 and Python 3.6, but some sections of33 the code have not been exercised in Python 3 so bugs are to be34 expected (please report them). Our35 goal is to keep the code compliant with both Python 2.7 and 3.x for36 the immediate future.37 38 Note that GSAS-II requires the Python extension packages39 40 * wxPython (http://wxpython.org/docs/api/). Note that GSAS-II has been tested with wxPython >=2.8, 3.0.x and 4.0.x41 * NumPy (http://docs.scipy.org/doc/numpy/reference/),42 * SciPy (http://docs.scipy.org/doc/scipy/reference/),43 * matplotlib (http://matplotlib.org/contents.html) and44 * PyOpenGL (http://pyopengl.sourceforge.net/documentation). Note: a copy of this is distributed with GSAS-II (at present) and will be installed if the Python setuptools package is present.45 46 Several packages are used by some parts of the code, but are not47 required. If these packages are not present warning messages may be48 generated when needed, but the vast bulk of GSAS-II will function normally.49 50 * PIL (http://www.pythonware.com/products/pil/) or Pillow (https://pillow.readthedocs.org). This is used to save51 and read certain types of images.52 * h5py is the HDF5 interface and hdf5 is the support package. These53 packages are (not surprisingly) required54 to import images from HDF5 files. If these libraries are not present,55 the HDF5 importer(s) will not appear in the import menu and a56 warning message appears on GSAS-II startup.57 * imageio is used to make movies.58 * svn: When using Anaconda we also encourage installation of the59 svn (subversion) conda package. This is not actually part of Python60 and can be installed directly into your system's configuration. It is used by61 GSAS-II to download updates to our code.62 63 Note that the packages listed above are not distributed as part of the Python standard64 library. We use the free Anaconda Python (https://www.anaconda.com/)65 distribution (and provide installers based on that), but there are66 many other fine distributions, such as Enthought Inc.'s Canopy and67 Python(x,y), see here: https://www.python.org/download/alternatives/.68 We do some testing using the older Enthought Python Distribution69 (EPD); this is known to have some problems with reading CIFs and70 encourage updating from that.
Note: See TracChangeset
for help on using the changeset viewer.