Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.66 KB

File metadata and controls

67 lines (44 loc) · 1.66 KB

IRF conversion from CTAO-ROOT to FITS-GDAF format

see GDAF website for details on the data model.

Installation

Preferred installation is using docker or apptainer.

Use the prepared docker image to be downloaded from ghcr.io/eventdisplay/converters/dl3-irfs .

Easiest to use it interactively by opening a bash in the corresponding image, e.g.:

apptainer exec docker://ghcr.io/eventdisplay/converters:latest-dl3-irfs bash

Built the docker image on your own:

docker build -t dl3-irfs .

Without docker, all what is needed is a ROOT and cfitsio installation, and then compile it with:

make convertSensitivityFilesToFITS

Converting IRFs in ROOT to FITS

General syntax:

./convertSensitivityFilesToFITS <file.root> <file.fits.gz> 3D

(3D option is the default)

Using the docker image discussed above, e.g.:

$  docker run --rm -it -v "$(pwd)":/workdir \
   ghcr.io/eventdisplay/converters:latest-dl3-irfs \
   /data/Converters/DL3-IRFs/convertSensitivityFilesToFITS \
   /workdir/Prod5-South-20deg-AverageAz-14MSTs37SSTs.180000s-v0.1.root \
   /workdir/Prod5-South-20deg-AverageAz-14MSTs37SSTs.180000s-v0.1.fits.gz \
   3D

Testing

Install ogadf tools:

conda env create -f environment.yml
conda activate dl3irfs

To test the converted FITS file, do:

python src/test_cta_file.py <file.fits.gz>

Notebooks

Some testing notebooks are in the notebook directory. Use jupyter lab to run them in a gammapy environment.