Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch of agnpy absorption with Finke (2016) reference #50

Closed
cosimoNigro opened this issue Oct 19, 2020 · 8 comments
Closed

Mismatch of agnpy absorption with Finke (2016) reference #50

cosimoNigro opened this issue Oct 19, 2020 · 8 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@cosimoNigro
Copy link
Owner

cosimoNigro commented Oct 19, 2020

@jsitarek, @pawel21, let use this thread to keep discussing what I commented in PR #46.

  • what do you think about the mismatch of agnpy with Finke (2016) optical depth?

  • why my optical depths are consistent if I consider instead of the target a monochromatic point-like source approximating it.
    Is the integration procedure wrong, so the two cases - full target and point-like source - match because I perform the same wrong integration in both cases?

  • do we have another code to crosscheck optical depths, I remember @jsitarek had available the code from
    https://arxiv.org/abs/0807.4228?

@cosimoNigro cosimoNigro added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Oct 19, 2020
@jsitarek
Copy link
Collaborator

ok, I will have a look, and will also do my favourite "back-of-the-envelope" checks ;-).
one quick question, for the test with point-like source, have you put the emission region before or after the DT/BLR ? I.e. do you have head-head collisions or head-tail collisions?
I guess you did the latter, but then the energy threshold is extremely dependent on the angle to the photon, and this means what you would expect differences between DT and BLR at very large distances.

@jsitarek
Copy link
Collaborator

jsitarek commented Nov 1, 2020

Hi,
I started looking into this, first with dust torus, since it is the simplest case. Please have a look at the attached notebook. I think the problem is not with the agnpy code, but with the check itself, because I'm getting independently virtually the same results as agnpy. Finke's Fig 14 is for 3c 454.3 and even while he is not writting this explicitely I think he is plotting it as a function of the observed energy, while the calculation in the test macro are for observed energy. When I correct for z of the source I get very nice agreement. Note that while this solves the problem for DT, and will lessen it considerably for BLR (just looking at the plot I think there will be still some factor close to 2 left in the max optical depth) it will not explain the different for accretion disk. Another issue must be there as well
check_tau_dt_js.ipynb.gz

@jsitarek
Copy link
Collaborator

a bit more update on this.
for the DT I guess this factor 2 that was included in the comparison function was the missing factor 2 in the emissivity of Finke'16, that we were discussing some time ago, right?

for the BLR I made a similar test, scaling the frequencies for the redshift, and the shape of the curve agrees then nicely, but there is a factor ~pi/2 difference between Finke and agnpy, I'm investigating...
abs_blr

the explanation in Finke's paper of Fig 14 is a bit confusing, because he refers to appendix for the definition of BLR, and this one gives not a single line, but the whole list of lines, I tested also calculating the absorption on sum of those lines, but this ends up much different in shape then Fig 14 curve, so probably, despite the description it is still computed just for Ly alpha (like the EC was)

@cosimoNigro
Copy link
Owner Author

Many thanks @jsitarek. Indeed adding the redshift of 3C 454.3 to the blob improves the comparison for the opacity on the DT.
I was mislead by this sentence in pag. 15 of Finke 2016

Screenshot from 2020-11-19 20-00-56

so to me it read that z=0 for the plot with the absorptions 🤷‍♂️.
I changed the z of the blob and added your notebook with the alternative calculation in experiments/basic with PR #54.
And yes, I was multiplying the reference value by 2 for that error we found out in Finke's emissivity calculation.


For the BLR, I have no idea where that factor pi/2 is coming from, I will re-check the formulas. But at least adding the redshift makes the threshold for tau>1 matching.
For what concerns the different lines I think Finke starts from the luminosity of the Hbeta line measured for 3C 454.3 and then obtains the luminosity of the other lines using Table 5 (all lines luminosities are expressed as a fraction of the luminosity of the Hbeta line).


For the disk I have no idea, it's almost a year that I try to check that calculation and I rewrote that function 7 times.
In experiments/basic/compute_s.ipynb I compute the kinematic variable s of the cross section as a function of the hitting photon energies (matching the x-axis of Figure 14 in Finke 2016) and of distances from the disk (the target energy is actually a function of the distance on the disk R, once the height above the jet is fixed r). Indeed s>1 is verified at ~TeV energies.

s_for_disk

Particularly at the closest radii (R=6 * R_g) s is >1 at E=5 TeV which is exactly where the absorption for the Disk is starting in Finke's plot.
Here Finke is right and even shifting for the redshift won't fix the order of magnitude mismatch I still get.
tau_disk_comaprison_figure_14_finke_2016

I am really lost on this 😕.

@jsitarek
Copy link
Collaborator

jsitarek commented Dec 6, 2020

Hi,

Some more updates on the BLR absorption.
Somehow the energy threshold that I'm getting does not agree with what you get.
The line in the example is 10.2 eV, the threshold E_thr = 2 m_e^2 / (epsilon * (1-cos theta)). For head-head collisions you get cos theta=-1 and you end up with E_thr = 2.56e10 eV, i.e. nu = 6.2 e24 Hz. In the frame of the observer you would get a factor of 1+z lower value i.e. nu = 3.35e24 Hz, while Finke's and agnpy show 6.6e24 Hz.

I did also full calculations and assymptotically at high energies I get the values consistent with agnpy, but at energies close to the threshold, consistently with what I wrote above I get higher values. See the attached notebook, in particular [10]
check_tau_blr_js.ipynb.gz

And sorry I didn't look yet in the disk one, I have some old code for this, but would need some time to understand how it was working :-), and either way nowadays very rarely anybody used such disk absorption, for blazars it is really negligible due to the angles, for radio galaxies it is more interesting but then RIAF might be more interesting disk model then SS

@jsitarek
Copy link
Collaborator

jsitarek commented Dec 6, 2020

Hi @cosimoNigro

When you compute the absorption from shell-like BLR in principle I see that you have have 3 integrals: over cos zenith, azimuth and distance. This in principle can be done using only 2 integrals: over the zenith angle and distance. Because of azimuthal symmetry the phi integral should trivially converge to 2 pi. Tracking the code:
_cos_psi = cos_psi(self.blob.mu_s, _mu_star, _phi)
...
integral_phi = np.trapz(integral_mu, self.phi, axis=0)

in cos_psi function:

term_2 = np.sqrt(1 - np.power(mu, 2)) * np.sqrt(1 - np.power(mu_s, 2))
term_3 = np.cos(phi)
return term_1 + term_2 * term_3

it does not look like the phi dependence is cancelled out.
It might be that the integral should still end up the same, but adding the extra integral at least makes it slower.

@jsitarek
Copy link
Collaborator

Hi @cosimoNigro
I think we should divide this issue into two issues: check of BLR absorption and check of disk absorption

Also, can you send me the notebook in which you compute the agnpy disk absorption with Finke's ?

I did some simple calculations using this disk absorption, the details are in the attached notebook
check_tau_disk.ipynb.gz

some conclusions:

  1. when I define a disk with a given luminosity and integrate back this luminosity but a value that is off by a factor of 2-3, this can be partially because of the simplification of monoenergetic photons at each radius, but what is nasty is the dependence on eta and radius of the disk, which should not be there. The way how the temperatures are computed is a bit complex, with converting back and forth to Eddington luminosity, but there is no dependence on R_in and R_out in the formula, which obviously affects the actual luminosity
  2. for narrow disk the threshold values that I was getting from simple calcualtions seem to agree with what agnpy computes, however I had to use the "epsilon" parameter from the disk class (see 1) )
  3. what I do not understand is dependence with distance, shifting the emission region 10 times farther and keeping the threshold the same tau decreased not by 10^2 but by 5 x 10^6, really strange. Tracking this in the code in line 153 of absorption.py there is a factor of 1/l^3 which I do not understand, where 'l' is the distance from the BH. I think there should be a factor that is more or less 1/l^2 from the density of the radiation field (however not exactly, because the distance not to the BH but to the individual disk element should be used), so where does the third l come from?

@cosimoNigro
Copy link
Owner Author

I am closing this, it has been split in issues #64, #65 and #66.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants