Skip to content
Snippets Groups Projects
Commit b8aa31a0 authored by Danilo Ferreira de Lima's avatar Danilo Ferreira de Lima
Browse files

Update instructions.

parent f1f0733c
No related branches found
No related tags found
No related merge requests found
Pipeline #119890 passed
...@@ -6,7 +6,20 @@ results. ...@@ -6,7 +6,20 @@ results.
The concept is to collect both results simultaneously during a training phase and use it to learn a model that may be used later, under the same conditions, but without the high-resolution, invasive spectrometer. The idea is that minimum tuning of the parameters of this methods are needed, so that if the data for training is available, no fine-tuning is required. The concept is to collect both results simultaneously during a training phase and use it to learn a model that may be used later, under the same conditions, but without the high-resolution, invasive spectrometer. The idea is that minimum tuning of the parameters of this methods are needed, so that if the data for training is available, no fine-tuning is required.
## Installation in Maxwell ## Simple usage in Maxwell
The dependencies in the standard kernel `xfel (current)` are enough to run the example notebook. All one needs to do is copy the main code in this package to a given directory.
This can be done by typing this command in a Maxwell machine:
```
git clone https://git.xfel.eu/machineLearning/pes_to_spec.git
cd pes_to_spec
```
Afterwards open a Jupyter Lab instance (max-jhub.desy.de), go to the directory where the package has been copied and open the example notebook in `notebook/Example offline analysis.ipynb`.
One should be able to run the example analysis in the notebook.
## Full installation of dependencies from scratch
The dependencies can be installed in a separate environment and used from Juyter Lab in Maxwell, by executing the following commands in Maxwell: The dependencies can be installed in a separate environment and used from Juyter Lab in Maxwell, by executing the following commands in Maxwell:
...@@ -37,23 +50,7 @@ python -m ipykernel install --user --name pes_to_spec_env ...@@ -37,23 +50,7 @@ python -m ipykernel install --user --name pes_to_spec_env
After this, open the example notebook from the `notebook` directory in a Jupyter Lab instance (max-jhub.desy.de) and set the kernel to `pes_to_spec_env`. After this, open the example notebook from the `notebook` directory in a Jupyter Lab instance (max-jhub.desy.de) and set the kernel to `pes_to_spec_env`.
## Installation in an existing environment ## API usage
If one just wants to install it standalone, simply type:
`pip install pes_to_spec`
While the dependencies should be automatically used, using the Intel-optimized `numpy` and `scipy` packages is recommended, as they are much faster.
This has been tested with `scipy==1.7.3`, but it should work with any version of scipy and numpy.
```
# install the optimized numpy and scipy versions
pip install --force-reinstall --index-url https://pypi.anaconda.org/intel/simple --no-dependencies numpy scipy==1.7.3
pip install numpy scipy==1.7.3
# install PyTorch
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install joblib scikit-learn
```
## Usage
The API may be used as follows: The API may be used as follows:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment