cosimoNigro / agnpy

Modelling jetted Active Galactic Nuclei radiative processes with python
https://agnpy.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
45 stars 32 forks source link

Error in the EBL absorption #134

Closed jsitarek closed 1 year ago

jsitarek commented 1 year ago

@pawel21 saw that the EBL absorption is a suspiciously low energy (~3 orders of magnitude too low): https://agnpy.readthedocs.io/en/latest/absorption.html#extragalactic-background-light

The code that is loading the EBL models says that the energies are in eV: https://github.com/cosimoNigro/agnpy/blob/075933ef582f2d90ec4572b00d65e8b9b1335577/agnpy/absorption/absorption.py#L785 however looking e.g. in ebl_dominguez11.fits the values go from 1.e6 to 1.e11, which would more like keV: Zrzut ekranu z 2023-02-01 10-04-53 Zrzut ekranu z 2023-02-01 10-04-31 Zrzut ekranu z 2023-02-01 10-04-24

@cosimoNigro how were the fits files with the models generated?

cosimoNigro commented 1 year ago

Hi @jsitarek,

it was a very stupid mistake from my side. I assigned eV units to the energies, while I should have assigned keV (it is the format of the XSPEC tables).

Will fix it soon in a PR.