diff --git a/binder/environment.yml b/binder/environment.yml new file mode 100644 index 0000000000000000000000000000000000000000..41ddcf481a1be8ad37e610ccba00617162b7c116 --- /dev/null +++ b/binder/environment.yml @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# Conda environment configuration for [famewoks](https://gitlab.esrf.fr/F-CRG/fames/famewoks) +name: famewoks +channels: + - conda-forge + - nodefaults +dependencies: + - python=3.12 + - pip + - xraylarch + - pip: + - jupyterlab + - jupyterhub~=4.1.5 + - batchspawner~=1.3.0 + - git+https://gitlab.esrf.fr/F-CRG/fames/famewoks.git + +#: -> run 'postBuild' script to complete install of Jupyter extensions (NOTE: automatically run on binderhub) diff --git a/doc/index.rst b/doc/index.rst index c336078cdce8ba5666fae4cbface91e4d467e3e3..f146eb9c536a3272a8c6c9ae86f43f709d082f83 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -12,9 +12,11 @@ This project is primarily targeted to the users of the FAME beamlines, `FAME-PIX <https://www.esrf.fr/home/UsersAndScience/Experiments/CRG/BM30.html>`_, the French CRG spectroscopy beamlines at the ESRF. The goal is to help applying -common data reduction/analysis workflows at the beamline. The code should be -compatible with the data collected at other ESRF beamlines with the `BLISS -<https://bliss.gitlab-pages.esrf.fr/bliss/master/>`_ control software.` +common data reduction/analysis workflows at the beamline. + +The code should be compatible with the data collected at other ESRF beamlines +with the `BLISS <https://bliss.gitlab-pages.esrf.fr/bliss/master/>`_ control +software. But it has not been tested with such datasets. The project is under **active development** and my be affected by bugs. Please, subscribe to the `fame-data-analysis@esrf.fr` mailing list `here diff --git a/doc/install_esrf.md b/doc/install_esrf.md new file mode 100644 index 0000000000000000000000000000000000000000..f2b993731623e40a58354ee8fdcc5368cd2379bf --- /dev/null +++ b/doc/install_esrf.md @@ -0,0 +1,15 @@ +# ESRF installation (remote) + +It is possible to use the `famewoks` environment at the ESRF via the +`jupyter-slurm.esrf.fr` portal by following this simple procedure (once): + +- Login into [https://jupyter-slurm.esrf.fr](https://jupyter-slurm.esrf.fr) +- Go to the **Advanced tab** +- Choose **Jupyter environment: Custom** with the following parameters: + - Environment name: `famewoks` + - Path: `/home/esrf/rovezzi/local/miniforge/envs/famewoks/bin` + - Click on *Add custom environment* + +Once this procedure is completed. You can start your server choosing the +`famewoks` environment directly from the **Jupyter environment** combo box in +the *Simple* tab. diff --git a/doc/installation.md b/doc/install_local.md similarity index 69% rename from doc/installation.md rename to doc/install_local.md index 8d99fa63648183cde3e6f3b2ea470512c650133c..91d44b1ba8cef4eda246b94f73ba523d780e4564 100644 --- a/doc/installation.md +++ b/doc/install_local.md @@ -1,9 +1,11 @@ -# Installation +# Local installation (e.g. on your own computer) The code is currently (2024) under active development and is distributed as source only. -Here the procedure to follow: +The following procedure can be performend on an Unix-like OS (Linux, MacOS). On +Windows, you have to first install the [Windows Subsystem for Linux - +WSL](https://learn.microsoft.com/en-us/windows/wsl/). - Create a Conda python environment and activate it. You can use [miniforge](https://github.com/conda-forge/miniforge). Please, refer to the @@ -15,7 +17,7 @@ Here the procedure to follow: wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh bash ./Miniforge3-Linux-x86_64.sh -b -p /home/alili/local/conda -u source conda/bin/activate -mamba create -n famewoks +mamba create -n famewoks python=3.12 source conda/bin/activate famewoks ``` @@ -44,3 +46,11 @@ want to install a *specific branch*: ``` pip install -U git+https://gitlab.esrf.fr/F-CRG/fames/famewoks.git@the_name_of_the_branch ``` + +- Run JupyterLab: open a shell, activate the `famewoks` conda environment and start Jupyterlab + +```bash +#go to the directory where the notebook is +conda activate famewoks #refer to conda documentation if you have problems with this +jupyter lab +``` diff --git a/doc/quickstart.md b/doc/quickstart.md index 3b5b70db3706bdbc1923276d2873dbe911cafcac..2743abbc5b42c0ac7280ada87ac660c8f772dea6 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -1,17 +1,20 @@ # Quickstart -Follow these steps to quickly start using `famewoks` for analyzing your data -acquired at the ESRF: +To quickly start using `famewoks` for analyzing your data there are three +different scenarios: -- [Install](./installation.md) -- Download the *Data reduction notebook* from - [https://gitlab.esrf.fr/F-CRG/fames/famewoks]](https://gitlab.esrf.fr/F-CRG/fames/famewoks) -- Open a shell, activate the `famewoks` conda environment and start Jupyterlab +## You are doing an experiment on FAME -```bash -#go to the directory where the notebook is -conda activate famewoks #refer to conda documentation if you have problems with this -jupyter lab -``` +- Simply connect to `http://jade:8000` and open the notebook in the `SCRIPTS` + directory of your experiment (usually at + `/data/visitor/your_proposal/bm16/your_session/`) -- Open the notebook with your browser and follow the instructions [there](./notebooks/data_reduction.nblink) \ No newline at end of file +## Your experiment is finished and your data are not archived yet + +- Follow the [ESRF installation procedure](./install_esrf.md) + +## You want to work locally on your machine + +- Follow the [local installation procedure](./install_local.md) +- If you do not have already your own notebook, download the *Data reduction notebook* from + [https://gitlab.esrf.fr/F-CRG/fames/famewoks](https://gitlab.esrf.fr/F-CRG/fames/famewoks) \ No newline at end of file