User Tools

Site Tools


processing:minimal_software_intallation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
processing:minimal_software_intallation [2023/03/13 13:00] smerkelprocessing:minimal_software_intallation [2026/08/10 10:22] (current) smerkel
Line 1: Line 1:
-====== Minimal software kit installation ======+====== 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. 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 procedure below was tested with recent Windows laptopWe proceed as follow: +The recommended method is to install python dedicated environementThis has been tested on Linux, but should also work on mac and windows, if you have a working python installation (**Instructions from Windows user would be most welcome**).
- Install linux Ubuntu virtual machine +
- Set-up anaconda +
- Install the multigrain software suite within anaconda+
  
-You may be able to run this in windows onlyThis was not tested.+It is best to create and activate a virtual python environements dedicated to 3D-XRDA 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.
  
-===== Install a linux Ubuntu virtual machine =====+See instructions at [[https://www.w3schools.com/python/python_virtualenv.asp]] and many other places online.
  
-There are many tutorials on how to do so on the internet. Here is a quick summary of how we proceeded +Typically this is done by 
-  * Download and install VirtualBox from [[https://www.virtualbox.org/]] + # Creating dedicated folder 
-  * Download a recent Ubuntu Desktop linux from [[https://ubuntu.com/download/desktop]] + # Move into this folder, and create a dedicated python environment for 3D-XRD work 
-  * Install Ubuntu within a VirtualBox virtual machine+ 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
  
-===== Anaconda ===== 
  
-Anaconda is a distribution of the python and other programming languages for scientific computing. It makes it much easier to install and manage packages without messing up your environment or interfering with the operating system.   
- 
-Download Anaconda from [[https://www.anaconda.com/products/distribution]]  
-Install anaconda 
- sh Download/Anconda……. (change file name according to what was downloaded) 
-Keep note of where anaconda will be installed, typically ''/home/myhome/anaconda3'' 
- 
-Keep note of the instructions at the end of the anadonda installation as you may have to type those commands each time you start a new terminal. In our case 
- eval “$(/home/ningma/anaconda3/bin/conda shell.bash hook)” 
- conda init 
  
 ===== Install ESRF data analysis tools, fabio, silx, and ImageD11 ===== ===== Install ESRF data analysis tools, fabio, silx, and ImageD11 =====
  
-Within a terminal in which anaconda is activated+Within a terminal in which your environement is activated
  pip3 install fabio  pip3 install fabio
  pip3 install silx  pip3 install silx
  pip3 install ImageD11  pip3 install ImageD11
 + pip3 install Pmw
  
-===== Install additional packages by hand =====+===== Install additional Fable-3DXRD packages by hand =====
  
-==== Fabian ====+==== TIMEleSS Viewer ====
  
-Fabian is very handy to visualize diffraction images, figure out detector orientations, identify parameters for peak extraction, etc. It is an old piece of software, but there is not real replacement at this point. +The TIMEleSS Viewer  is very handy to visualize diffraction images, figure out detector orientations, identify parameters for peak extraction, etc. 
- +
-Start by installing the Pmw libray, which is required by fabian +
- pip3 install Pmw+
  
 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 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 + cd Fable-3DXRD-Folder 
- git clone https://github.com/FABLE-3DXRD/fabian.git + git clone https://github.com/FABLE-3DXRD/TIMEleSS_Viewer.git 
- cd fabian+ cd TIMEleSS_Viewer
  python3 setup.py build  python3 setup.py build
  python3 setup.py install  python3 setup.py install
-Next time, if you want to update your installation of fabian with a new version, you will not need to ''clone'' the directory. You will move into your folder and update it: + 
- cd ~/Fable-3DXRD/fabian/+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  git pull
  python3 setup.py build  python3 setup.py build
  python3 setup.py install  python3 setup.py install
-We did have a problem while install fabian, which was calling some obscure functions with OpenGL. Move looked into the fabian source code to de-activate those functions. This should be documented somewhere but we did not do it yet.+ 
 +To start the TIMEleSS Viewer, simple type ''timelessViewer'' within your environement.
  
 ==== PolyXSim ==== ==== 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: 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+ cd Fable-3DXRD-Folder
  git clone https://github.com/FABLE-3DXRD/PolyXSim.git  git clone https://github.com/FABLE-3DXRD/PolyXSim.git
  cd PolyXSim  cd PolyXSim
Line 69: Line 59:
  
 If you need to update PolyXSim: If you need to update PolyXSim:
- cd ~/Fable-3DXRD/PolyXSim+ cd Fable-3DXRD-Folder 
 + cd PolyXSim
  git pull  git pull
  python3 setup.py build  python3 setup.py build
Line 79: Line 70:
  
 If you never installed the TIMEleSS-tools: If you never installed the TIMEleSS-tools:
- cd ~/Fable-3DXRD+ cd Fable-3DXRD-Folder
  git clone https://github.com/FABLE-3DXRD/TIMEleSS.git   git clone https://github.com/FABLE-3DXRD/TIMEleSS.git 
  cd TIMEleSS  cd TIMEleSS
Line 86: Line 77:
  
 Otherwise, if you simply want to update your local copy: Otherwise, if you simply want to update your local copy:
- cd ~/Fable-3DXRD/TIMEleSS+ cd Fable-3DXRD-Folder 
 + cd TIMEleSS
  git pull  git pull
  python3 setup.py build  python3 setup.py build
Line 93: Line 85:
 ==== Grainspotter ==== ==== Grainspotter ====
  
-Grainspotter is often used to index grains. It is available on conda: +Grainspotter is often used to index grains. It is a plain C code, with [[software:grainspotter|instructions described here]].
- conda install -c fable grainspotter+
  
 ===== Wrap-up ===== ===== Wrap-up =====
processing/minimal_software_intallation.1678708810.txt.gz · Last modified: by smerkel