-
Notifications
You must be signed in to change notification settings - Fork 32
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
Improving the optical depth calculation #46
Conversation
Improving the optical depth calculation (Sourcery refactored)
…gro/agnpy into improve_tau_gamma_gamma
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 1.56%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Let us know what you think of it by mentioning @sourcery-ai in a comment. |
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
==========================================
+ Coverage 83.23% 90.90% +7.67%
==========================================
Files 15 16 +1
Lines 1312 1462 +150
==========================================
+ Hits 1092 1329 +237
+ Misses 220 133 -87
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I am merging, let us continue the discussion with issues. |
Hello,
This PR tries to improve the optical depth calculations.
It solves issue #16 though the agreement with Finke is not yet good.
Here a comparison of the optical depths for Disk
agnpy absorption starts much earlier (a factor ten in energy) than the one in Finke (2016).
Additionally agnpy absorption uses the full integration: if I try to use the simplified formula in Finke (2016) - green line (blob moving parallel to the jet) I get an absorption similarly starting at lower energies than the one of the figure sampled from the paper plot (blue line).
The absorption for the Broad Line Region and Dust Torus instead starts at larger energies than in Finke
Note though that agnpy's absorption is self-consistent. If I replace the dust torus and the BLR with a monochromatic point-like source approximating them at large distances (larger than the size of the target) I have a very good agreement (I did the same tests for the external Compton).
I don't know what am I doing wrong, any suggestion @jsitarek, @pawel21?
@jsitarek you still have that code you used to compute optical depths, might we use it for crosschecks?