cosimoNigro / agnpy

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

renormalization in calculation of DT flux #104

Open jsitarek opened 3 years ago

jsitarek commented 3 years ago

Investigating the DT SED computation I realized that this part is quite problematic. If you compute DT SED for nu that are not sorted (e.g. if you generate lambdas and convert them to nu) the value will be wrong (I got negative). Also if the calculations are done only at course frequencies (or not covering the whole emission) this renormalization can screw up the integral emission. BB emission can be integrated analitically, so it would be better to use such analytical integration instead.

https://github.com/cosimoNigro/agnpy/blob/c7ede0c2d75fc66276c0487f6955c8cec204f504/agnpy/targets/targets.py#L596