Skip to content

Commit ab80a3b

Browse files
authored
Update README.md
1 parent f308cf8 commit ab80a3b

File tree

1 file changed

+89
-27
lines changed

1 file changed

+89
-27
lines changed

metisp/README.md

+89-27
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,100 @@
11
# METIS Pipeline
2-
METIS pipe line is the data reduction software for ELT early science instrument of Mid-IR imager and spectrograph.
2+
The METIS pipeline is the data reduction software for the Mid-infrared E-ELT Imager and Spectrograph (METIS).
33

4-
## Installation
4+
## Install dependencies
55

6+
The instructions below assume Ubuntu 24.04, but can easily be adapted for other systems.
67
```
7-
cd metisp
8-
./bootstrap
9-
./configure --prefix=/tmp/wherever
10-
make
11-
make python
12-
make install
13-
make install-python
8+
apt-get install -y \
9+
wget gcc automake autogen libtool gsl-bin libgsl-dev \
10+
libfftw3-bin libfftw3-dev fftw-dev \
11+
curl bzip2 less subversion git cppcheck lcov valgrind \
12+
zlib1g zlib1g-dev \
13+
liberfa1 liberfa-dev \
14+
libcurl4-openssl-dev libcurl4 \
15+
tmux ripgrep file \
16+
libcfitsio-bin libcfitsio-dev \
17+
wcslib-dev wcslib-tools \
18+
libcpl-dev \
19+
python3-astropy python3-matplotlib python3-numpy \
20+
perl cmake \
21+
graphviz meld \
22+
python3-pip python3-full \
23+
python3-jupyter-core python3-jupyter-client python3-notebook
1424
```
1525

26+
## Create a Python environment
27+
Use your favourite tool to create a Python environment, e.g. venv, conda, etc
28+
Python 3.12 is recommended. Then start the environment.
1629

17-
## Path Setting
30+
An example using virtualenv:
31+
```
32+
python -m venv metis_pip
33+
source metis_pip/bin/activate
34+
```
35+
36+
An alternative example using conda:
37+
```
38+
conda create -n metis python==3.12 poetry
39+
conda activate metis
40+
```
1841

19-
Including the following two line in your .bashrc
42+
## Clone the METIS pipeline
43+
```
44+
git clone https://github.com/AstarVienna/METIS_Pipeline.git
45+
```
46+
and set the following environment variables:
47+
```
48+
export PYTHONPATH="$(pwd)/METIS_Pipeline/metisp/pymetis/src/"
49+
export PYCPL_RECIPE_DIR="$(pwd)/METIS_Pipeline/metisp/pyrecipes/"
50+
export PYESOREX_PLUGIN_DIR="$PYCPL_RECIPE_DIR"
51+
```
2052

53+
## Install PyEsoRex, PyCPL and EDPS
54+
55+
Set the PYESOREX_PLUGIN_DIR environment variable:
56+
The PYESOREX_PLUGIN_DIR environment variable needs to be pointing to the recipes already before you install pyesorex and edps. See above for the export statement.
57+
58+
Install pyesorex and the EDPS in the Python environment.
59+
```
60+
pip install --extra-index-url \
61+
https://ftp.eso.org/pub/dfs/pipelines/libraries \
62+
pycpl pyesorex edps adari_core
63+
```
64+
65+
Pyesorex and the EDPS need to be configured to use the METIS Pipeline. The easiest way to do this is by copying the provided configuration files.
66+
67+
–WARNING–:
68+
Backup any existing EDPS configuration before proceeding.
69+
70+
Option 1 (beginner)
71+
The simple way to configure the system environment to run EDPS is to run the following bash script from the toolbox:
72+
```
73+
./METIS_Pipeline/toolbox/create_config.sh
2174
```
22-
export METIS_SOFTPATH='<path_of_METIS_pipeline>'
23-
export PYTHONPATH=$METIS_SOFTPATH
24-
export SOF_DATA='<path_to_data>'
25-
export PYCPL_RECIPE_DIR='<path_of_METIS_pipeline>/metisp/pymetis/src/pymetis/recipes/'
75+
Option 2 (expert)
76+
The hard way gives you more control about where the EDPS configuration is kept:
2677
```
78+
mkdir -p "/tmp/EDPS_data"
79+
mkdir -p "${HOME}/.edps"
80+
cp -avi METIS_Pipeline/toolbox/config/DOTedps/* "${HOME}/.edps"
81+
```
82+
Note that the above sets these parameters
83+
```
84+
base_dir=/tmp/EDPS_data
85+
workflow_dir=.
86+
```
87+
since the absolute paths are not known.
88+
89+
For manual configuration, change these parameters in ~./edps/application.properties :
90+
```
91+
esorex_path=pyesorex
92+
workflow_dir=/absolute/path/to/METIS_Pipeline/metisp/workflows
93+
breakpoints_url=
94+
```
95+
Where the absolute path to the METIS workflow directory must be given. Setting the breakpoints_url is optional, but required to use the pipeline offline.
96+
97+
2798
## Checking with PyESOREX
2899

29100
Firstly, run pyesorex. We will see all avaliable receipes if there is not problem.
@@ -52,26 +123,19 @@ List of available recipes:
52123
Before starting to use this pipeline with EDPS, make sure you have read the document of EDPS. You may also
53124
find some useful information [here](https://it.overleaf.com/project/65c1ef845dddcc9a7247e46c)
54125

55-
Remember to define the workflow path in .edps/application.properties.
56-
57-
```
58-
workflow_dir='<Parent path>'/METIS_Pipeline/metisp/workflows
59-
```
60-
61126
To be safe, this command clear our all the cache data, log, product.
62127
```
63128
edps -shutdown ; rm -rf edps.log ;rm -rf pyesorex.log ; rm -rf EDPS_data/*
64129
```
65130

66131
Listing all avaliable data files
67132
```
68-
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -c
133+
edps -w metis.metis_wkf -i $SOF_DATA -c
69134
```
70135

71-
72136
Listing all avaliable processing tasks
73137
```
74-
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -lt
138+
edps -w metis.metis_wkf -i $SOF_DATA -lt
75139
```
76140

77141
Running one specific recipe
@@ -88,15 +152,13 @@ Running Meta-target
88152
edps -w metis.metis_wkf -i $SOF_DATA -m science
89153
```
90154

91-
92155
Getting report in a better way
93156
```
94157
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -t metis_det_dark -od
95158
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -t metis_det_dark -og
96159
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -t metis_det_dark -f
97160
```
98161

99-
100162
Making plots
101163
```
102164
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -g > test.dot
@@ -110,4 +172,4 @@ The gerated plotting code can plot using online tool as well
110172
When you're using the Python Debugger (pdb) and an error occurs, pdb will automatically enter post-mortem debugging mode, allowing you to inspect the state of the program at the point where the error occurred. Here's how you can find out where the error happened:
111173
```
112174
import pdb ; pdb.set_trace()
113-
```
175+
```

0 commit comments

Comments
 (0)