https://github.com/arnauqb/qsosed
Python module to compute the SED of an AGN following Kubota & Done (2018).
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.1%) to scientific vocabulary
Keywords
Repository
Python module to compute the SED of an AGN following Kubota & Done (2018).
Basic Info
Statistics
- Stars: 15
- Watchers: 0
- Forks: 6
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Disclaimer [This has not been mantained for a while, please review the code before using for your research.]
QSOSED
This Python module handles various calculations involving the accretion physics of AGNs. In particular, it implements the qsosed model of Xspec, explained in Kubota & Done (2018) to create the flux energy distribution in the UV/X-Ray band of an AGN.
the SED model has three characteristic regions: the outer standard disc region; the warm Comptonising region; and the inner hot Comptonising region.
For the warm Comptonising region, this model adopts the passive disc scenario tested by Petrucci et al. 2018 (https://ui.adsabs.harvard.edu//#abs/2018A&A...611A..59P/abstract). Here, the flow is assumed to be completely radially stratified, emitting as a standard disc blackbody from Rout to Rwarm, as warm Comptonisation from Rwarm to Rhot and then makes a transition to the hard X-ray emitting hot Comptonisation component from Rhot to RISCO. The warm Comptonisation component is optically thick, so is associated with material in the disc. Nonetheless, the energy does not thermalise to even a modified blackbody, perhaps indicating that significant dissipation takes place within the vertical structure of the disc, rather than being predominantly released in the midplane.
At a radius below Rhot, the energy is emitted in the hot Comptonisation component. This has much lower optical depth, so it is not the disc itself. In the model, the albedo is fixed at a = 0.3, and the seed photon temperature for the hot Comptonisation component is calculated internally. In contrast to optxagnf, this model does not take the color temperature correction into account.
Table of contents
Setup
The easiest install method is
pip install pyagn
Requirements
Requirements are installed automatically if the package is installed via pip, otherwise they can also be install through
pip install -r requirements.txt
The specific requirements are:
numpy
scipy
matplotlib
astropy
Parameters for the SED class
| parameter | type | description |default |
| --------- | ------- | ---------------------------------------|------------- |
| M | float | Black Hole mass in solar masses. | 1e8
| mdot | float | Black Hole accretion rate in Eddington units. | 0.5 |
| astar | float | Black Hole dimensionless spin absolute value. | 0 |
| astar_sign | int | +1 for prograde rotation, -1 for retrograde. | +1 |
| reprocessing | boolean | True to include reprocessing, False otherwise. | True |
| hard_xray_fraction | float | Dissipated corona luminosity in Eddington units. | 0.02 |
| corona_electron_energy | float | Electron temperature for the hot Comptonisation component in keV | 100 |
| warm_electron_energy | float | Electron temperature for the warm Comptonisation component in keV. | 0.2 |
| warm_photon_index | float | The spectral index $\Gamma$ of the warm Comptonisation component. | 2.5 |
| reflection_albedo | float | reflection albedo for the reprocessed flux | 0.3 |
Example usage
```python from pyagn import SED from astropy import units as u
initialize class
M = 1e8 mdot = 0.5 a = 0 sed_test = SED(M=M, mdot = mdot, astar = 0)
choose a distance in cm.
distance = 100 * u.Mpc distance_cm = distance.to(u.cm).value
compute total flux
totalflux = sedtest.totalflux( distance = distancecm)
we can also easily plot the results
fig, ax = plt.subplots(9,6) sedtest.plottotal_flux(distance, ax=ax) ```

Comparison with Xspec
We can test that our Python implementation gives the same results as the Xspec code. Note that in order to recreate Xspec results, the innner disk radius has to be multiplied by a factor of 0.85. This is an artifact of the energy binning in Xspec.
M = 1e8
mdot = 0.5

Owner
- Name: Arnau Quera-Bofarull
- Login: arnauqb
- Kind: user
- Location: Oxford
- Website: arnau.ai
- Repositories: 42
- Profile: https://github.com/arnauqb
Astrophysicist now doing research on agent-based modeling at Oxford.
GitHub Events
Total
- Watch event: 2
- Fork event: 2
Last Year
- Watch event: 2
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: 2 months
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- yuxuanpang (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- astropy >=3.2.1
- numpy >=1.16.4
- scipy >=1.3.0