Published June 7, 2023 | Version 1.0
Dataset Open

Data and simulation files for "Constraints on the intergalactic magnetic field using Fermi-LAT and H.E.S.S. blazar observations"

  • 1. University of Southern Denmark


In this repository, we provide data files in connection to our paper “Constraints on the intergalactic magnetic field using Fermi-LAT and H.E.S.S. blazar observations” accepted for publication in the Astrophysical Journals and soon available on Arxiv.

In the publication, we perform a joint analysis of observations of five blazars with the Fermi Large Area Telescope (LAT) and the High Energy Stereoscopic System (H.E.S.S.) in order to search for signatures of a gamma-ray halo around these sources. The non-detection of such extended emission allows us to place lower limits on the intergalactic magnetic field (IGMF).

In this repository, we provide our data analysis products of both H.E.S.S. and LAT data for the case when a template for the halo flux is not included in the data. Furthermore, we provide files that contain the log likelihood profiles as functions of the IGMF in case the halo emission is included. Lastly, we also provide our template files for the halo, generated with CRPropa 3.

Below, we provide minimal code examples to demonstrate how to read in the specific files.

H.E.S.S. observational results

We provide the best-fit spectral parameters as well as the flux points (spectral energy distribution; SED) for the H.E.S.S. observations of the five blazars under consideration. The corresponding files are:

  • hess_fit_result_*.fits which contain the best-fit parameters,
  • hess_sed_file_*.fits which contain the flux points.

In the file names above, the '*' should be replaced with a the corresponding source name, e.g. 1ES0229+200. The files can be read in using astropy:

from astropy.table import Table

src = "1ES0229+200"

best_fit_pars ="hess_fit_result_1ES0229+200.fits")
sed ="hess_sed_file_1ES0229+200.fits")

Fermi observational results

For Fermi-LAT, we provide the SED files as well as the best-fit models for the region of interests. These files are called:

  • fermi_avg_file_*.npy provides the best-fit ROI model
  • fermi_sed_file_*.npy provides the SED.

Both of these files are generated with fermipy and can be read-in the following way:

import numpy as np

# first a little helper function since the 
# fermipy analysis was run under python 2.7
def convert(data):
    if isinstance(data, bytes):  return data.decode('ascii')
    if isinstance(data, dict):   return dict(map(convert, data.items()))
    if isinstance(data, tuple):  return map(convert, data)
    return data

# Load the ROI fit 
roi_fit_file = "fermi_avg_file_1ES0229+200.npy"
roi_fit = np.load(avg_file, allow_pickle=True, encoding="latin1").flat[0]

# if you want to inspect the dictionaries in python 3, you need to run the convert function.
# For example, to inspect the central source of the ROI
# you would first get the source name 
src_fgl_name = roi_fit['config']['selection']['target']

# and then you can get the dictionary for the central source
src_dict = convert(roi_fit['sources'])[src_fgl_name]

# Load the SED
sed_file = "fermi_sed_file_1ES0229+200.npy"
sed = np.load(sed_file, allow_pickle=True, encoding='latin1').flat[0]

# to plot the SED, you can use the SEDPlotter class from fermipy
from fermipy.plotting import SEDPlotter


Likelihood profiles

The likelihood profiles as function of the IGMF strengths are provided in the files logl_profile_*_*yr.npz. Their are provided for all five sources and all tested blazar activity times of 10, 104, and 107 years. They can be read in with the following code snippet:

import numpy as np

logl = dict(np.load("logl_profile_1ES0229+200_1.0e+07yr.npz"))
b_fields = np.array([1.00000e-16, 3.16228e-16, 1.00000e-15,
                     3.16228e-15, 1.00000e-14,
                     3.16228e-14, 1.00000e-13])

for k, v in logl.items():

As the print command shows, the python dictionary contains 3 entries: "fermi_only" are the likelihood values for the Fermi data as a function of magnetic field, "combined" are the likelihood values from Fermi and H.E.S.S. combined, and "ps" is the likelihood value of the Fit without halo to the H.E.S.S. data only.

Halo simulations

Lastly, we also provide the output simulations files from CRPropa. For details how the simulations were run, please consult the accompanying paper, in particular Section 3.1 and Appendix C. For each source redshift, a tar file is provided, which in itself contains 7 hdf5 files with the simulation outputs for each tested magnetic field strength. The name of the files is casc_file_z*.tar.gz. After unpacking the files, they can be read in with your favorite hdf5 library; in python you would need to install h5py. We recommend that you check out this github repository which provides an advanced python wrapper for CRPropa and functions to read in the files. In particular, you can use this function to read in the files. It also writes a new hdf5 file with parallel transport applied. The written data is also returned together with the configuration dictionary.

from simCRpropa.cascmaps import stack_results_lso

data, config = stack_results_lso("casc_file_z0.140_B1.00e-16.hdf5", 

You can provide arbitrary angles between the observer and the jet angles using the theta_obs keyword. Note, however, that the simulations used a jet opening angle of 3 degrees and going beyond that value will return zero halo photons.


Files (667.0 MB)

Name Size Download all
128.4 MB Download
133.5 MB Download
134.3 MB Download
135.0 MB Download
134.8 MB Download
96.8 kB Download
63.2 kB Download
83.3 kB Download
96.4 kB Download
147.1 kB Download
127.8 kB Download
16.4 kB Download
32.8 kB Download
32.8 kB Download
32.8 kB Download
32.8 kB Download
32.8 kB Download
8.6 kB Download
8.6 kB Download
8.6 kB Download
8.6 kB Download
8.6 kB Download
17.3 kB Download
17.3 kB Download
17.3 kB Download
17.3 kB Download
17.3 kB Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download
878 Bytes Download

Additional details


AxionDM – Searching for axion and axion-like-particle dark matter in the laboratory and with high-energy astrophysical observations 948689
European Commission