diff --git a/README.md b/README.md index 9af2e50bb0741e6230b498c7deae72bb2b28f7e6..52af12e7d12a6ae50b9b94a83c7cc41f40ed17fe 100644 --- a/README.md +++ b/README.md @@ -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. -## 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: @@ -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`. -## Installation in an existing environment - -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 +## API usage The API may be used as follows: