DSimonne / gwaihir

Repository regarding the Gwaihir GUI used for Bragg Coherent Coherent Diffraction (BCDI) data analysis
GNU General Public License v3.0
9 stars 3 forks source link

Welcome

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 .)

Here is a link to a poster that tries to present Gwaihir: Poster_Gwaihir.pdf

And to the paper: 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

Gwahir

Important code snippets

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()

GUI Preview:

Pre-processing data

https://user-images.githubusercontent.com/51970962/154160601-f3e7878a-d2c6-4560-95e5-adf7087f59ab.mp4

Phase retrieval

https://user-images.githubusercontent.com/51970962/154160830-f3c6460b-14e5-4bcc-99f5-e8691278a4e9.mp4

Data plotting

https://user-images.githubusercontent.com/51970962/154160549-c5caea1b-afa0-4a29-a5a8-aff8a1a5158b.mp4

Post-processing

https://user-images.githubusercontent.com/51970962/154236802-24643473-1ee9-4d01-823c-beca07ea1c58.mp4

An example file can be downloaded at: https://www.dsimonne.eu/Attachments/align_031968.cxi

Known bog

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: index

Bog with README tab: image

Clusters at ESRF

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.

Jupyter-slurm

How to access:

Available environements

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:

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 !

Set up ssh connection without using password (mandatory for batch jobs)

Enter the following commands (replace <username> with your username, for me it is simonne)

You should not need a password anymore when login into slurm, make sure it is the case by typing

CLuster at SOLEIL

GRADES

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

SixS

A GPU is installed on sixs3, a computer available on the beamline, for phase retrieval.

Please respect the following steps:

Cristal

A GPU is installed on cristal4, a computer available on the beamline, for phase retrieval.

Please respect the following steps:

Installing different packages yourself

Create a virtual environment

Then you should create an alias such as: alias source_p9="source /home/user/py38-env/bin/activate"

Specific instructions for the p.9 cluster

1) Install PyNX

2) Install gwaihir

3) Install bcdi

4) Install facet-analyser (Debian 11 only)

To go further ...

Using Gwaihir only as a plotting tool in Jupyter Notebook

image

To do :