DOI: 10.5281/zenodo.8014310
title: Data and simulation files for "Constraints on the intergalactic magnetic field using Fermi-LAT and H.E.S.S. blazar observations"

description: 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 <em>not</em> included in the data. Furthermore, we provide files that contain the log likelihood profiles as functions of the IGMF in case the halo emission <em>is</em> 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. <strong>H.E.S.S. observational results</strong> 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: <pre><code class="language-python">from astropy.table import Table src = "1ES0229+200" best_fit_pars = Table.read("hess_fit_result_1ES0229+200.fits") sed = Table.read("hess_sed_file_1ES0229+200.fits")</code></pre> <strong>Fermi observational results</strong> 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: <pre><code class="language-python">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 SEDPlotter.plot_sed(sed)</code></pre> <strong>Likelihood profiles</strong> 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, 10<sup>4</sup>, and 10<sup>7</sup> years. They can be read in with the following code snippet: <pre><code class="language-python">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(): print(k,v)</code></pre> 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. <strong>Halo simulations</strong> 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. <pre><code class="language-python">from simCRpropa.cascmaps import stack_results_lso data, config = stack_results_lso("casc_file_z0.140_B1.00e-16.hdf5", "casc_file_z0.140_B1.00e-16_theta_obs0.0.hdf5" )</code></pre> 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.