this part of code is Eq 78 in Finke'16 paper (in the description there is also a small mistake mentioning Eq 76 instead),
however the formula in the paper is for mu_star^2, and the code is simply taking a sqrt of it, while the value of mu_star can be also negative for parts of the BLR shell. This most likely explains the difference that I was having with simple calculations of the energy threshold, and too good agreement between DT and BLR for a blob well inside the BLR sphere
https://github.com/cosimoNigro/agnpy/blob/489f1cc3bfb16d5dbdec91fb0eef604d1e70e5c1/agnpy/utils/geometry.py#L31-L45
this part of code is Eq 78 in Finke'16 paper (in the description there is also a small mistake mentioning Eq 76 instead), however the formula in the paper is for mu_star^2, and the code is simply taking a sqrt of it, while the value of mu_star can be also negative for parts of the BLR shell. This most likely explains the difference that I was having with simple calculations of the energy threshold, and too good agreement between DT and BLR for a blob well inside the BLR sphere