====== Getting started with a Python environment ====== There is a whole suite of software required to run multigrain X-ray diffraction, and their installation procedure can be quite tricky if you are not comfortable with computing techniques. The recommended method is to install a python dedicated environement. This has been tested on Linux, but should also work on mac and windows, if you have a working python installation (**Instructions from a Windows user would be most welcome**). It is best to create and activate a virtual python environements dedicated to 3D-XRD. A virtual environment in Python is an isolated environment on your computer, where you can run and test your Python projects, without interfering with the main python installation or the rest of your computer system. See instructions at [[https://www.w3schools.com/python/python_virtualenv.asp]] and many other places online. Typically this is done by # Creating a dedicated folder # Move into this folder, and create a dedicated python environment for 3D-XRD work python3 -m venv .venv To activate the environment, move into the folder in which it was created, and type source .venv/bin/activate To de-active the environment, simple type deactivate ===== Install ESRF data analysis tools, fabio, silx, and ImageD11 ===== Within a terminal in which your environement is activated pip3 install fabio pip3 install silx pip3 install ImageD11 pip3 install Pmw ===== Install additional Fable-3DXRD packages by hand ===== ==== TIMEleSS Viewer ==== The TIMEleSS Viewer is very handy to visualize diffraction images, figure out detector orientations, identify parameters for peak extraction, etc. Create a folder for additional software somewhere on your hard disk, called ''Fable-3DXRD'' for instance. Move into this folder and create a clone of the repository at github cd Fable-3DXRD-Folder git clone https://github.com/FABLE-3DXRD/TIMEleSS_Viewer.git cd TIMEleSS_Viewer python3 setup.py build python3 setup.py install Next time, if you want to update your installation of the TIMEleSS Viewer with a new version, you will not need to ''clone'' the directory. You will move into your folder and update it: cd TIMEleSS_Viewe git pull python3 setup.py build python3 setup.py install To start the TIMEleSS Viewer, simple type ''timelessViewer'' within your environement. ==== PolyXSim ==== If you want to simulate data for training, you need will PolyXSim. The procedure is very similar to that we used for fabian. If you never installed PolyXSim: cd Fable-3DXRD-Folder git clone https://github.com/FABLE-3DXRD/PolyXSim.git cd PolyXSim python3 setup.py build python3 setup.py install If you need to update PolyXSim: cd Fable-3DXRD-Folder cd PolyXSim git pull python3 setup.py build python3 setup.py install ==== TIMEleSS-tools ==== The TIMEleSS-tools include many helpers, guis, etc that were developed along with this tutorial. You will probably need them. If you never installed the TIMEleSS-tools: cd Fable-3DXRD-Folder git clone https://github.com/FABLE-3DXRD/TIMEleSS.git cd TIMEleSS python3 setup.py build python3 setup.py install Otherwise, if you simply want to update your local copy: cd Fable-3DXRD-Folder cd TIMEleSS git pull python3 setup.py build python3 setup.py install ==== Grainspotter ==== Grainspotter is often used to index grains. It is a plain C code, with [[software:grainspotter|instructions described here]]. ===== Wrap-up ===== If you made it here, you are done! You can follow other pages of this wiki to get started. Good luck!