Installation

Installation #

Written byJoysankar Majumdar

The Fermi mission provides a suite of tools called the Fermitools for the analysis of LAT. We are not going to use Fermitools directly; rather, we are going to use FermiPy.

A Linux-based operating system is best for Fermi LAT analysis. We are going to follow the installation procedure for Ubuntu 24.04.2 LTS.

  1. We need to install the conda-forge distribution from the GitHub repository. From the latest release, download the Miniforge**-Linux-x86_64.sh file.

  2. Run this script file with the bash command.

    bash Miniforge3-25.3.1-0-Linux-x86_64.sh 
    

    It will be installed in your system. Generally, it creates a folder miniforge in the home directory.

  3. You need to export the path of the installed miniforge.

    export PATH=path_to_the_diretory/miniforge/condabin:$PATH
    

    And now, in that same terminal, you need to initialise conda.

    conda init
    

    Now close this terminal and open another terminal, and it should look like below image The (base) indicates the activation of the base environment in conda.

  4. We have to create another environment for FermiPy. Run the command below in the terminal.

    mamba create --name fermipy -c conda-forge -c fermi python=3.9 "fermitools>=2.2.0" healpy gammapy
    

    After this, to activate the new fermipy environment, run

    mamba activate fermipy
    
  5. You have to install the fermipy package inside the fermipy environment

    pip install fermipy
    

    Additionally, you should install the Jupyter Notebook for better coding

    pip install notebook
    

You have successfully installed fermitools and FermiPy. Make sure to use FermiPy; you need to activate the fermipy environment each time.