Contact : david.simonne@universite-paris-saclay.fr
You can install the latest version of the package by cloning the repository and via the setup.py
script (pip install .
)
pip install -U gwaihir
in your command line. A stable version from the master branch uploaded to pypi.org will be used (https://pypi.org/project/gwaihir/
)pip install .
in the terminal (you must be in the same directory as the setup.py
script), this will allow you to have the latest updates.Here is a link to a poster that tries to present Gwaihir: Poster_Gwaihir.pdf
To increase the width of the cells in Jupyter Notebook:
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:75% !important; }</style>"))
To avoid automatic cell scrolling:
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
return false;
}
To open the GUI:
from gwaihir.gui import Interface
GUI = Interface()
An example file can be downloaded at: https://www.dsimonne.eu/Attachments/align_031968.cxi
The first time you install gwaihir
, it is possible that when you open the Interface, you only see some text printed, or the content of the readme tab, but you cannot interact with anything. This is solved by restarting your computer.
Bog with printed text:
Bog with README tab:
Gwaihir only works with the p9 partition at the ESRF, optimized for phase retrieval.
If you want to use it for data analysis, you can install gwaihir
and bcdi
on rnice.
How to access:
ssh -X <login>@slurm-nice-devel
srun -N 1 --partition=p9gpu --gres=gpu:1 --time=06:00:00 --pty bash
/usr/bin/python3
: your personal environemntsource /data/id01/inhouse/david/p9.dev/bin/activate
source /data/id01/inhouse/david/p9.stable/bin/activate
source /sware/exp/pynx/devel.p9/bin/activate
You are not allowed to modify these environments but you can link a kernel if you wish to use them in jupyter.
To do so:
source /data/id01/inhouse/david/p9.dev/bin/activate
python3 -m ipykernel install --user --name p9.stable
Once you feel confident, you should create your own environment, to avoid sudden updates that may impact your work!
To list the kernels you have installed: jupyter kernelspec list
And to remove them: jupyter kernelspec uninstall <kernelname>
Make sure that you are using the right kernel on your Jupyter Notebook !
ssh
connection without using password (mandatory for batch jobs)Enter the following commands (replace <username>
with your username, for me it is simonne)
cd
ssh-keygen -t rsa
(press enter when prompted, ~ 3 times)ssh <username>@slurm-nice-devel mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh <username>@slurm-nice-devel 'cat >> .ssh/authorized_keys'
You should not need a password anymore when login into slurm, make sure it is the case by typing
ssh <username>@slurm-nice-devel
To analyse data recorded at SOLEIL from your personal computer, you can use Jupyter Notebook via GRADES. The documentation is here (accessible on- site via the SOLEIL wifi or with the SOLEIL VPN) : http://confluence.synchrotron-soleil.fr/display/EG/Service%3A+Jupyter+Notebook
PyNX
is already installed on GRADES, a version that is out of my control. So you 'just' have to download the bcdi
and gwaihir
packages by typing pip3 install --proxy=http://195.221.0.35:8080 -U gwaihir bcdi
If you encounter an error with gwaihir or bcdi, it is possible that the pip packages are not up to date. Then you should follow the procedure described below and manually download the packages. Just replace pip install
by pip3 install --proxy=http://195.221.0.35:8080
, the proxy IP can be 195.221.0.34:8080 or 195.221.0.35:8080 on the ReS (offices and VPN), and 195.221.10.6:8080 or 195.221.10.7:8080 on the REL (beam-lines, RAS).
You can also directly use a virtual machine provided by GRADES
Create
then on Connect
(after 10 sec).A GPU is installed on sixs3, a computer available on the beamline, for phase retrieval.
Please respect the following steps:
com-sixs
source_py3.9
or source /home/experiences/sixs/simonne/Documents/py39-env/bin/activate
, this environment is protected and you cannot modify it.jupyter notebook
A GPU is installed on cristal4, a computer available on the beamline, for phase retrieval.
Please respect the following steps:
com-cristal
source_gwaihir
or source /home/experiences/crystal/com-cristal/PackagesGwaihir/py-gwaihir/bin/activate
, this environment is protected and you cannot modify it.jupyter notebook
/Packages
directory to keep these.mkdir py38-env
cd py38-env/
python3.8 -m venv .
source bin/activate
# To activate the environmentwheel
and setuptools
are installed: pip install wheel setuptools pip --upgrade
Then you should create an alias such as: alias source_p9="source /home/user/py38-env/bin/activate"
vtk
does not install (on the p9 cluster at the ESRF for example), you can type : pip install --trusted-host www.silx.org --find-links http://www.silx.org/pub/wheelhouse vtk
, you may also need to remove the version requirements in bcdi/setup.py
PyQt5
does not install (also on the p9 cluster at the ESRF), you can install it by activating your environment from the rnice cluster.cd /Packages
mkdir PyNX_install
cd PyNX_install/
curl -O http://ftp.esrf.fr/pub/scisoft/PyNX/pynx-devel-nightly.tar.bz2
# Installation details within install-pynx-venv.shsource_p9
pip install pynx-devel-nightly.tar.bz2[cuda,gui,mpi]
# Install with extras cuda, mpi, cdiPyNX: high-performance computing toolkit for coherent X-ray imaging based on operators is out: J. Appl. Cryst. 53 (2020), 1404
, also available as arXiv:2008.11511
cd /Packages
git clone https://github.com/DSimonne/gwaihir.git
cd gwaihir
source_p9
pip install .
Simonne, D., Carnis, J., Atlan, C., Chatelier, C., Favre-Nicolin, V., Dupraz, M., Leake, S. J., Zatterin, E., Resta, A., Coati, A. & Richard, M. I. (2022). J. Appl. Cryst. 55, 1045-1054.
cd /Packages
git clone https://github.com/carnisj/bcdi.git
cd bcdi
source_p9
pip install .
DOI: 10.5281/zenodo.3257616
cd /Packages
git clone https://salsa.debian.org/science-team/facet-analyser.git
cd facet-analyser
git checkout
sudo mk-build-deps -i
libqt5opengl5-dev
(debian-testing)debuild -b
sudo debi
dpkg -L facet-analyser
/usr/lib/x86_64-linux-gnu/paraview-5.9/plugins/FacetAnalyser/FacetAnalyser.so
/usr/bin/paraview
(if not installed yet, good luck, refer to https://www.paraview.org/Wiki/ParaView:Build_And_Install#Installing
)dpkg -L facet-analyser
command./usr/bin/plugin
so that it is loaded automatically.Grothausmann, R. (2015). Facet Analyser : ParaView plugin for automated facet detection and measurement of interplanar angles of tomographic objects. March.
Gwaihir
only as a plotting tool in Jupyter Notebook