These codes aim at reproducing the paper results.
The codes rely on the pystem python library (version 0.1.1) that I developped for this purpose.
The code has been tested on python 3.6 only.
Using the requirement file
pip install -r requirements.txt
Another way is to manually install the requirements.
pip install scikit-image==0.16.2 hyperspy==1.5.2 inpystem==0.1.1 PyQt5 inquirer blessings
Warning: The inpystem version is 0.1.1. The scikit and hyperspy versions are set as a conflict was discovered recently discovered (see here).
Getting the images
The images disk usage is 327.6 Mo, so that it is not hosted by github. To get them, please follow these steps:
- Download the data here,
- Unzip it into the codes directory.
- Ensure the
acquisitions/folder is loacated at the same level as the python codes.
For linux users, this should help.
cd /path/to/the/codes wget http://dobigeon.perso.enseeiht.fr/data/EELS/data_EELS_2020.zip unzip data_EELS_2020.zip rm data_EELS_2020.zip
To reproduce the results, one should first build the reconstructed data to generate the figures afterwards.
To build the data, please execute the
$ python reconstruction.py
The data to process and the reconstruction methods to execute will be asked in the console. Be aware that this is highly time-consuming, expecially for R1 and for dictionary-learning methods. I recommand you to first try the R2 and S data for some methods and add other configuration afterwards. All output data are stored in the
To generate the results, the python interpreter should be interactive. We then recommend you to use
ipython instead of
python alone. Just type:
$ ipython Python 3.6.2 (default, Jul 24 2019, 11:45:48) Type 'copyright', 'credits' or 'license' for more information IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help. In : %run display.py
Again, the program will ask you which figure you are interested in. Finally, it will propose you to display the results, to save the results or to perform both. The results are saved in the results directory.
Author and license
These codes were written by Etienne Monier and are distributed under the MIT license.