-
Notifications
You must be signed in to change notification settings - Fork 6
Install
Tdl includes a number of application modules, binary libraries and utilities. Tdl can be installed as a python package and used from the python shell, from within other python packages or scripts, or as a standalone program (using the pds interpreter). You can browse the source code here
If you do not have these packages installed locally follow the provided links to install them. Usually the most recent 'stable version' is best (however we have not yet moved to python3.x!).
The following are required for tdl: Python (2.6 or higher), [Numpy] (http://numpy.scipy.org/), [Scipy] (http://www.scipy.org/Download), [Matplotlib] (http://matplotlib.sourceforge.net/), [H5py] (http://code.google.com/p/h5py/downloads/list), and Python Imaging Library
If you want to run the graphical user interface of pds you'll need: wxPython (get unicode version) , and pythoncard
To use the reflectivity module currently you will need to have Ifeffit installed and have the Ifeffit python library installed in your PYTHONPATH. You'll also need the Ifeffit environment variables defined. See XX for more info.
The following arent required, but you might find useful: PyTables python hdf interface (also check out ViTables and/or HDFView for viewing hdf files), Pyreadline, and pywin32 modules for windows users
To speed up the structure factor calculations in the python interface structure refinement tool, the use of [Parallel Python] (http://www.parallelpython.com/) is recommended. To use the internal 3D structure viewer you need vtk. An (unofficial) windows installer for vtk is available here.
After installing python and associated packages, make sure the python installation directory is on your systems 'PATH' so that >>python
works from your command line
-
You can download a recent source tarball (or zipfile) from the download page
-
Or you can download the most recent source using git:
>>git clone http://github.com/xraypy/tdl.git
-
Install into your site-packages using:
>>python setup.py install
-
To access the scripts make sure the .../python/../site-packages/tdl/scripts directory is on your system PATH
If you want to keep the tdl package in a non-standard location (e.g. in you are working on the source code and want to keep it in your home directory) just make sure to add the root directory to your PYTHONPATH.
For example if you put tdl under /home/user/bob/devel/tdl, add PYTHONPATH=/home/user/bob/devel to your environment variables. You'll probably also want to add /home/user/bob/devel/tdl/scripts to your PATH so you can access the command line scripts.
- To test your installation try the following:
>>python
python>>from tdl.pds import runpds
python>>runpds.main()
- If the tdl/scripts directory is on your PATH then the following should also work:
>>pds