.. _jet_physical_guide_EC:
External Compton
----------------
The external Compton implementation gives you the possibility to use a double approach
* transformation of the external fields to the blob rest frame Dermer and Schlickeiser (2002) [Dermer2002]_, Dermer and Menon (2009) [DermerMenon2009]_
* transformation of the electron emitting distribution from the blob restframe to
disk/BH restframe Dermer(1995) [Dermer95]_ and Georganopoulos, Kirk, and Mastichiadis (2001) [GKM01]_, Dermer and Menon (2009) [DermerMenon2009]_
The implemented external radiative fields are
* Broad Line Region radiative field using the approach of Donea & Protheroe (2003) [Donea2003]_
* Dusty torus implemented as a uniform BB field within `R_DT`
* accretion disk (mono-energetic, single-temperature BB or a multi-temperature BB)
* Cosmic Microwave Background (CMB)
Please read :ref:`jet_physical_guide_SSC` if you skipped it.
.. figure:: jetset_EC_scheme.png
:alt: EC scheme
EC scheme
Broad Line Region
~~~~~~~~~~~~~~~~~
.. image::jetset_EC_scheme.png
:width: 400
:alt: EC scheme
.. code:: ipython3
import jetset
print('tested on jetset',jetset.__version__)
.. parsed-literal::
tested on jetset 1.2.2
.. code:: ipython3
import matplotlib.pyplot as plt
import numpy as np
.. code:: ipython3
from jetset.jet_model import Jet
my_jet=Jet(name='EC_example',electron_distribution='bkn',beaming_expr='bulk_theta')
my_jet.add_EC_component(['EC_BLR','EC_Disk'],disk_type='BB')
The ``show_model`` method provides, among other information, information
concerning the accretion disk, in this case we use a mono temperature
black body ``BB``
.. code:: ipython3
my_jet.show_model()
.. parsed-literal::
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: EC_example
electrons distribution:
type: bkn
gamma energy grid size: 201
gmin grid : 2.000000e+00
gmax grid : 1.000000e+06
normalization: True
log-values: False
ratio of cold protons to relativistic electrons: 1.000000e-01
accretion disk:
disk Type: BB
L disk: 1.000000e+45 (erg/s)
T disk: 1.000000e+05 (K)
nu peak disk: 8.171810e+15 (Hz)
radiative fields:
seed photons grid size: 100
IC emission grid size: 100
source emissivity lower bound : 1.000000e-120
spectral components:
name:Sum, state: on
name:Sync, state: self-abs
name:SSC, state: on
name:EC_BLR, state: on
name:Disk, state: on
name:EC_Disk, state: on
external fields transformation method: blob
SED info:
nu grid size jetkernel: 1000
nu size: 500
nu mix (Hz): 1.000000e+06
nu max (Hz): 1.000000e+30
flux plot lower bound : 1.000000e-30
--------------------------------------------------------------------------------
.. raw:: html
Table length=18
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
EC_example | R | region_size | cm | 5.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
EC_example | R_H | region_position | cm | 1.000000e+17 | 0.000000e+00 | -- | False | True |
EC_example | B | magnetic_field | gauss | 1.000000e-01 | 1.000000e-10 | 1.000000e+10 | False | False |
EC_example | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | | 1.000000e-01 | 0.000000e+00 | -- | False | True |
EC_example | theta | jet-viewing-angle | deg | 1.000000e-01 | 0.000000e+00 | -- | False | False |
EC_example | BulkFactor | jet-bulk-factor | lorentz-factor* | 1.000000e+01 | 1.000000e+00 | 1.000000e+05 | False | False |
EC_example | z_cosm | redshift | | 1.000000e-01 | 0.000000e+00 | -- | False | False |
EC_example | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | gmax | high-energy-cut-off | lorentz-factor* | 1.000000e+06 | 1.000000e+00 | 1.000000e+15 | False | False |
EC_example | N | emitters_density | 1 / cm3 | 1.000000e+02 | 0.000000e+00 | -- | False | False |
EC_example | gamma_break | turn-over-energy | lorentz-factor* | 1.000000e+04 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | p | LE_spectral_slope | | 2.500000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | p_1 | HE_spectral_slope | | 3.500000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | tau_BLR | BLR | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | R_BLR_in | BLR | cm | 1.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | R_BLR_out | BLR | cm | 2.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | L_Disk | Disk | erg / s | 1.000000e+45 | 0.000000e+00 | -- | False | False |
EC_example | T_Disk | Disk | K | 1.000000e+05 | 0.000000e+00 | -- | False | False |
.. parsed-literal::
--------------------------------------------------------------------------------
change Disk type
~~~~~~~~~~~~~~~~
the disk type can be set as a more realistic multi temperature black
body (MultiBB). In this case the ``show_model`` method provides physical
parameters regarding the multi temperature black body accretion disk:
- the Schwarzschild (Sw radius)
- the Eddington luminosity (L Edd.)
- the accretion rate (accr_rate)
- the Eddington accretion rate (accr_rate Edd.)
.. code:: ipython3
my_jet.add_EC_component(['EC_BLR','EC_Disk'],disk_type='MultiBB')
my_jet.set_par('L_Disk',val=1E46)
my_jet.set_par('gmax',val=5E4)
my_jet.set_par('gmin',val=2.)
my_jet.set_par('R_H',val=3E17)
my_jet.set_par('p',val=1.5)
my_jet.set_par('p_1',val=3.2)
my_jet.set_par('R',val=3E15)
my_jet.set_par('B',val=1.5)
my_jet.set_par('z_cosm',val=0.6)
my_jet.set_par('BulkFactor',val=20)
my_jet.set_par('theta',val=1)
my_jet.set_par('gamma_break',val=5E2)
my_jet.set_N_from_nuLnu(nu_src=3E13,nuLnu_src=5E45)
my_jet.set_IC_nu_size(100)
my_jet.show_model()
.. parsed-literal::
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: EC_example
electrons distribution:
type: bkn
gamma energy grid size: 201
gmin grid : 2.000000e+00
gmax grid : 5.000000e+04
normalization: True
log-values: False
ratio of cold protons to relativistic electrons: 1.000000e-01
accretion disk:
disk Type: MultiBB
L disk: 1.000000e+46 (erg/s)
T disk: 5.015768e+04 (K)
nu peak disk: 4.098790e+15 (Hz)
Sw radius 2.953539e+14 (cm)
L Edd. 1.666723e+47 (erg/s)
accr_rate: 2.205171e+00 (M_sun/yr)
accr_rate Edd.: 3.675409e+01 (M_sun/yr)
radiative fields:
seed photons grid size: 100
IC emission grid size: 100
source emissivity lower bound : 1.000000e-120
spectral components:
name:Sum, state: on
name:Sync, state: self-abs
name:SSC, state: on
name:EC_BLR, state: on
name:Disk, state: on
name:EC_Disk, state: on
external fields transformation method: blob
SED info:
nu grid size jetkernel: 1000
nu size: 500
nu mix (Hz): 1.000000e+06
nu max (Hz): 1.000000e+30
flux plot lower bound : 1.000000e-30
--------------------------------------------------------------------------------
.. raw:: html
Table length=21
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
EC_example | R | region_size | cm | 3.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
EC_example | R_H | region_position | cm | 3.000000e+17 | 0.000000e+00 | -- | False | True |
EC_example | B | magnetic_field | gauss | 1.500000e+00 | 1.000000e-10 | 1.000000e+10 | False | False |
EC_example | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | | 1.000000e-01 | 0.000000e+00 | -- | False | True |
EC_example | theta | jet-viewing-angle | deg | 1.000000e+00 | 0.000000e+00 | -- | False | False |
EC_example | BulkFactor | jet-bulk-factor | lorentz-factor* | 2.000000e+01 | 1.000000e+00 | 1.000000e+05 | False | False |
EC_example | z_cosm | redshift | | 6.000000e-01 | 0.000000e+00 | -- | False | False |
EC_example | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | gmax | high-energy-cut-off | lorentz-factor* | 5.000000e+04 | 1.000000e+00 | 1.000000e+15 | False | False |
EC_example | N | emitters_density | 1 / cm3 | 4.171189e+03 | 0.000000e+00 | -- | False | False |
EC_example | gamma_break | turn-over-energy | lorentz-factor* | 5.000000e+02 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | p | LE_spectral_slope | | 1.500000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | p_1 | HE_spectral_slope | | 3.200000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | tau_BLR | BLR | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | R_BLR_in | BLR | cm | 1.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | R_BLR_out | BLR | cm | 2.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | R_inner_Sw | Disk | Sw. radii* | 3.000000e+00 | 0.000000e+00 | -- | False | False |
EC_example | R_ext_Sw | Disk | Sw. radii* | 5.000000e+02 | 0.000000e+00 | -- | False | False |
EC_example | accr_eff | Disk | | 8.000000e-02 | 0.000000e+00 | -- | False | False |
EC_example | M_BH | Disk | M_sun* | 1.000000e+09 | 0.000000e+00 | -- | False | False |
EC_example | L_Disk | Disk | erg / s | 1.000000e+46 | 0.000000e+00 | -- | False | False |
.. parsed-literal::
--------------------------------------------------------------------------------
now we set some parameter for the model
.. code:: ipython3
my_jet.eval()
.. code:: ipython3
p=my_jet.plot_model(frame='obs')
p.setlim(y_min=1E-13,y_max=5E-11,x_min=1E9,x_max=1E27)
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_16_0.png
Dusty Torus
~~~~~~~~~~~
.. code:: ipython3
my_jet.add_EC_component('DT')
my_jet.show_model()
.. parsed-literal::
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: EC_example
electrons distribution:
type: bkn
gamma energy grid size: 201
gmin grid : 2.000000e+00
gmax grid : 5.000000e+04
normalization: True
log-values: False
ratio of cold protons to relativistic electrons: 1.000000e-01
accretion disk:
disk Type: BB
L disk: 1.000000e+46 (erg/s)
T disk: 5.015768e+04 (K)
nu peak disk: 4.098790e+15 (Hz)
radiative fields:
seed photons grid size: 100
IC emission grid size: 100
source emissivity lower bound : 1.000000e-120
spectral components:
name:Sum, state: on
name:Sync, state: self-abs
name:SSC, state: on
name:EC_BLR, state: on
name:Disk, state: on
name:EC_Disk, state: on
name:DT, state: on
external fields transformation method: blob
SED info:
nu grid size jetkernel: 1000
nu size: 500
nu mix (Hz): 1.000000e+06
nu max (Hz): 1.000000e+30
flux plot lower bound : 1.000000e-30
--------------------------------------------------------------------------------
.. raw:: html
Table length=21
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
EC_example | R | region_size | cm | 3.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
EC_example | R_H | region_position | cm | 3.000000e+17 | 0.000000e+00 | -- | False | True |
EC_example | B | magnetic_field | gauss | 1.500000e+00 | 1.000000e-10 | 1.000000e+10 | False | False |
EC_example | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | | 1.000000e-01 | 0.000000e+00 | -- | False | True |
EC_example | theta | jet-viewing-angle | deg | 1.000000e+00 | 0.000000e+00 | -- | False | False |
EC_example | BulkFactor | jet-bulk-factor | lorentz-factor* | 2.000000e+01 | 1.000000e+00 | 1.000000e+05 | False | False |
EC_example | z_cosm | redshift | | 6.000000e-01 | 0.000000e+00 | -- | False | False |
EC_example | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | gmax | high-energy-cut-off | lorentz-factor* | 5.000000e+04 | 1.000000e+00 | 1.000000e+15 | False | False |
EC_example | N | emitters_density | 1 / cm3 | 4.171189e+03 | 0.000000e+00 | -- | False | False |
EC_example | gamma_break | turn-over-energy | lorentz-factor* | 5.000000e+02 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | p | LE_spectral_slope | | 1.500000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | p_1 | HE_spectral_slope | | 3.200000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | tau_BLR | BLR | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | R_BLR_in | BLR | cm | 1.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | R_BLR_out | BLR | cm | 2.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | T_Disk | Disk | K | 5.015768e+04 | 0.000000e+00 | -- | False | False |
EC_example | T_DT | DT | K | 1.000000e+02 | 0.000000e+00 | -- | False | False |
EC_example | R_DT | DT | cm | 5.000000e+18 | 0.000000e+00 | -- | False | False |
EC_example | tau_DT | DT | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | L_Disk | Disk | erg / s | 1.000000e+46 | 0.000000e+00 | -- | False | False |
.. parsed-literal::
--------------------------------------------------------------------------------
.. code:: ipython3
my_jet.eval()
.. code:: ipython3
p=my_jet.plot_model()
p.setlim(y_min=1E-13,y_max=5E-11,x_min=1E9,x_max=1E27)
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_20_0.png
.. code:: ipython3
my_jet.add_EC_component('EC_DT')
my_jet.eval()
.. code:: ipython3
p=my_jet.plot_model()
p.setlim(y_min=1E-13,y_max=5E-11,x_min=1E9,x_max=1E27)
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_22_0.png
.. code:: ipython3
my_jet.save_model('test_EC_model.pkl')
my_jet=Jet.load_model('test_EC_model.pkl')
.. raw:: html
Table length=21
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
EC_example | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | gmax | high-energy-cut-off | lorentz-factor* | 5.000000e+04 | 1.000000e+00 | 1.000000e+15 | False | False |
EC_example | N | emitters_density | 1 / cm3 | 4.171189e+03 | 0.000000e+00 | -- | False | False |
EC_example | gamma_break | turn-over-energy | lorentz-factor* | 5.000000e+02 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | p | LE_spectral_slope | | 1.500000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | p_1 | HE_spectral_slope | | 3.200000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | tau_BLR | BLR | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | R_BLR_in | BLR | cm | 1.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | R_BLR_out | BLR | cm | 2.000000e+18 | 0.000000e+00 | -- | False | True |
EC_example | T_DT | DT | K | 1.000000e+02 | 0.000000e+00 | -- | False | False |
EC_example | R_DT | DT | cm | 5.000000e+18 | 0.000000e+00 | -- | False | False |
EC_example | tau_DT | DT | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | L_Disk | Disk | erg / s | 1.000000e+46 | 0.000000e+00 | -- | False | False |
EC_example | T_Disk | Disk | K | 5.015768e+04 | 0.000000e+00 | -- | False | False |
EC_example | R | region_size | cm | 3.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
EC_example | R_H | region_position | cm | 3.000000e+17 | 0.000000e+00 | -- | False | True |
EC_example | B | magnetic_field | gauss | 1.500000e+00 | 1.000000e-10 | 1.000000e+10 | False | False |
EC_example | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | | 1.000000e-01 | 0.000000e+00 | -- | False | True |
EC_example | theta | jet-viewing-angle | deg | 1.000000e+00 | 0.000000e+00 | -- | False | False |
EC_example | BulkFactor | jet-bulk-factor | lorentz-factor* | 2.000000e+01 | 1.000000e+00 | 1.000000e+05 | False | False |
EC_example | z_cosm | redshift | | 6.000000e-01 | 0.000000e+00 | -- | False | False |
setting the BLR and DT radius as a function of the disk luminosity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using the depending parameters (see :ref:`depending_parameters`, for more details) we can set the BLR and DT radius, as a function of the disk luminosity
.. code:: ipython3
#kaspi+ 2007:https://iopscience.iop.org/article/10.1086/512094/pdf
my_jet.make_dependent_par(par='R_BLR_in', depends_on=['L_Disk'], par_expr='1E17*(L_Disk/1E45)**0.5')
my_jet.make_dependent_par(par='R_BLR_out', depends_on=['R_BLR_in'], par_expr='R_BLR_in*1.1')
#Cleary+ 2007:https://iopscience.iop.org/article/10.1086/511969/pdf
my_jet.make_dependent_par(par='R_DT', depends_on=['L_Disk'], par_expr='2.5E18*(L_Disk/1E45)**0.5')
.. parsed-literal::
==> par R_BLR_in is now depending on ['L_Disk'] according to expr:R_BLR_in =
1E17*(L_Disk/1E45)**0.5
==> par R_BLR_out is now depending on ['R_BLR_in'] according to expr:R_BLR_out =
R_BLR_in*1.1
==> par R_DT is now depending on ['L_Disk'] according to expr:R_DT =
2.5E18*(L_Disk/1E45)**0.5
.. code:: ipython3
my_jet.parameters.L_Disk.val=5E45
.. code:: ipython3
my_jet.parameters
.. raw:: html
Table length=21
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
EC_example | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | gmax | high-energy-cut-off | lorentz-factor* | 5.000000e+04 | 1.000000e+00 | 1.000000e+15 | False | False |
EC_example | N | emitters_density | 1 / cm3 | 4.171189e+03 | 0.000000e+00 | -- | False | False |
EC_example | gamma_break | turn-over-energy | lorentz-factor* | 5.000000e+02 | 1.000000e+00 | 1.000000e+09 | False | False |
EC_example | p | LE_spectral_slope | | 1.500000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | p_1 | HE_spectral_slope | | 3.200000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
EC_example | tau_BLR | BLR | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | *R_BLR_in(D,L_Disk) | BLR | cm | 2.236068e+17 | 0.000000e+00 | -- | False | True |
EC_example | *R_BLR_out(D,R_BLR_in) | BLR | cm | 2.459675e+17 | 0.000000e+00 | -- | False | True |
EC_example | T_DT | DT | K | 1.000000e+02 | 0.000000e+00 | -- | False | False |
EC_example | *R_DT(D,L_Disk) | DT | cm | 5.590170e+18 | 0.000000e+00 | -- | False | True |
EC_example | tau_DT | DT | | 1.000000e-01 | 0.000000e+00 | 1.000000e+00 | False | False |
EC_example | L_Disk(M) | Disk | erg / s | 5.000000e+45 | 0.000000e+00 | -- | False | False |
EC_example | T_Disk | Disk | K | 5.015768e+04 | 0.000000e+00 | -- | False | False |
EC_example | R | region_size | cm | 3.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
EC_example | R_H | region_position | cm | 3.000000e+17 | 0.000000e+00 | -- | False | True |
EC_example | B | magnetic_field | gauss | 1.500000e+00 | 1.000000e-10 | 1.000000e+10 | False | False |
EC_example | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | | 1.000000e-01 | 0.000000e+00 | -- | False | True |
EC_example | theta | jet-viewing-angle | deg | 1.000000e+00 | 0.000000e+00 | -- | False | False |
EC_example | BulkFactor | jet-bulk-factor | lorentz-factor* | 2.000000e+01 | 1.000000e+00 | 1.000000e+05 | False | False |
EC_example | z_cosm | redshift | | 6.000000e-01 | 0.000000e+00 | -- | False | False |
.. parsed-literal::
None
.. code:: ipython3
my_jet.eval()
p=my_jet.plot_model()
p.setlim(y_min=1E-13,y_max=5E-11,x_min=1E9,x_max=1E27)
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_29_0.png
Changing the external field transformation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Default method, is the transformation of the external photon field from
the disk/BH frame to the relativistic blob
.. code:: ipython3
my_jet.set_external_field_transf('blob')
Alternatively, in the case of istropric fields as the CMB or the BLR and
DT within the BLR radius, and DT radius, respectively, it is possible to
transform the the electron distribution, moving the blob to the disk/BH
frame.
.. code:: ipython3
my_jet.set_external_field_transf('disk')
**Anyhow, the ``disk`` transformation is valid only for isotropic
external fields, suchs as the CMB, or the BLR and Dusty torus seed
photons whitin the DT radius and BLR radius, respectively. Beyond the
isotropic region, the code will switch automatically to the ``blob``
transformation, even if ``disk`` is used**
External photon field energy density along the jet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: ipython3
def iso_field_transf(L,R,BulckFactor):
beta=1.0 - 1/(BulckFactor*BulckFactor)
return L/(4*np.pi*R*R*3E10)*BulckFactor*BulckFactor*(1+((beta**2)/3))
def external_iso_behind_transf(L,R,BulckFactor):
beta=1.0 - 1/(BulckFactor*BulckFactor)
return L/((4*np.pi*R*R*3E10)*(BulckFactor*BulckFactor*(1+beta)**2))
EC seed photon fields, in the Disk rest frame
.. code:: ipython3
%matplotlib inline
fig = plt.figure(figsize=(8,6))
ax=fig.subplots(1)
N=50
G=1
R_range=np.logspace(13,25,N)
y=np.zeros((8,N))
my_jet.set_verbosity(0)
for ID,R in enumerate(R_range):
my_jet.set_par('R_H',val=R)
my_jet.set_external_fields()
my_jet.energetic_report(verbose=False)
y[1,ID]=my_jet.energetic_dict['U_BLR_DRF']
y[0,ID]=my_jet.energetic_dict['U_Disk_DRF']
y[2,ID]=my_jet.energetic_dict['U_DT_DRF']
y[4,:]=iso_field_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_DT.val,my_jet.parameters.R_DT.val,G)
y[3,:]=iso_field_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_BLR.val,my_jet.parameters.R_BLR_in.val,G)
y[5,:]=external_iso_behind_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_BLR.val,R_range,G)
y[6,:]=external_iso_behind_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_DT.val,R_range,G)
y[7,:]=external_iso_behind_transf(my_jet._blob.L_Disk_radiative,R_range,G)
ax.plot(np.log10(R_range),np.log10(y[0,:]),label='Disk')
ax.plot(np.log10(R_range),np.log10(y[1,:]),'-',label='BLR')
ax.plot(np.log10(R_range),np.log10(y[2,:]),label='DT')
ax.plot(np.log10(R_range),np.log10(y[3,:]),'--',label='BLR uniform')
ax.plot(np.log10(R_range),np.log10(y[4,:]),'--',label='DT uniform')
ax.plot(np.log10(R_range),np.log10(y[5,:]),'--',label='BLR 1/R2')
ax.plot(np.log10(R_range),np.log10(y[6,:]),'--',label='DT 1/R2')
ax.plot(np.log10(R_range),np.log10(y[7,:]),'--',label='Disk 1/R2')
ax.set_xlabel('log(R_H) cm')
ax.set_ylabel('log(Uph) erg cm-3 s-1')
ax.legend()
.. parsed-literal::
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_39_1.png
.. code:: ipython3
%matplotlib inline
fig = plt.figure(figsize=(8,6))
ax=fig.subplots(1)
L_Disk=1E45
N=50
G=my_jet.parameters.BulkFactor.val
R_range=np.logspace(15,22,N)
y=np.zeros((8,N))
my_jet.set_par('L_Disk',val=L_Disk)
my_jet._blob.theta_n_int=100
my_jet._blob.l_n_int=100
my_jet._blob.theta_n_int=100
my_jet._blob.l_n_int=100
for ID,R in enumerate(R_range):
my_jet.set_par('R_H',val=R)
my_jet.set_external_fields()
my_jet.energetic_report(verbose=False)
y[1,ID]=my_jet.energetic_dict['U_BLR']
y[0,ID]=my_jet.energetic_dict['U_Disk']
y[2,ID]=my_jet.energetic_dict['U_DT']
y[4,:]=iso_field_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_DT.val,my_jet.parameters.R_DT.val,G)
y[3,:]=iso_field_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_BLR.val,my_jet.parameters.R_BLR_in.val,G)
y[5,:]=external_iso_behind_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_BLR.val,R_range,G)
y[6,:]=external_iso_behind_transf(my_jet._blob.L_Disk_radiative*my_jet.parameters.tau_DT.val,R_range,G)
y[7,:]=external_iso_behind_transf(my_jet._blob.L_Disk_radiative,R_range,G)
ax.plot(np.log10(R_range),np.log10(y[0,:]),label='Disk')
ax.plot(np.log10(R_range),np.log10(y[1,:]),'-',label='BLR')
ax.plot(np.log10(R_range),np.log10(y[2,:]),'-',label='DT')
ax.plot(np.log10(R_range),np.log10(y[3,:]),'--',label='BLR uniform')
ax.plot(np.log10(R_range),np.log10(y[4,:]),'--',label='DT uniform')
ax.plot(np.log10(R_range),np.log10(y[5,:]),'--',label='BLR 1/R2')
ax.plot(np.log10(R_range),np.log10(y[6,:]),'--',label='DT 1/R2')
ax.plot(np.log10(R_range),np.log10(y[7,:]),'--',label='Disk 1/R2')
ax.axvline(np.log10( my_jet.parameters.R_DT.val ))
ax.axvline(np.log10( my_jet.parameters.R_BLR_out.val))
ax.set_xlabel('log(R_H) cm')
ax.set_ylabel('log(Uph`) erg cm-3 s-1')
ax.legend()
.. parsed-literal::
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_40_1.png
IC against the CMB
~~~~~~~~~~~~~~~~~~
.. code:: ipython3
my_jet=Jet(name='test_equipartition',electron_distribution='lppl',beaming_expr='bulk_theta')
my_jet.set_par('R',val=1E21)
my_jet.set_par('z_cosm',val= 0.651)
my_jet.set_par('B',val=2E-5)
my_jet.set_par('gmin',val=50)
my_jet.set_par('gamma0_log_parab',val=35.0E3)
my_jet.set_par('gmax',val=30E5)
my_jet.set_par('theta',val=12.0)
my_jet.set_par('BulkFactor',val=3.5)
my_jet.set_par('s',val=2.58)
my_jet.set_par('r',val=0.42)
my_jet.set_N_from_nuFnu(5E-15,1E12)
my_jet.add_EC_component('EC_CMB')
We can now compare the different beaming pattern for the EC emission if
the CMB, and realize that the beaming pattern is different. This is very
important in the case of radio galaxies. The ``src`` transformation is
the one to use in the case of radio galaxies or misaligned AGNs in
general, and gives a more accurate results for the beaming patter of an
isotropic external field.
.. code:: ipython3
from jetset.plot_sedfit import PlotSED
p=PlotSED()
my_jet.set_external_field_transf('blob')
c= ['k', 'g', 'r', 'c']
for ID,theta in enumerate(np.linspace(2,20,4)):
my_jet.parameters.theta.val=theta
my_jet.eval()
my_jet.plot_model(plot_obj=p,comp='Sum',label='blob, theta=%2.2f'%theta,line_style='--',color=c[ID])
my_jet.set_external_field_transf('disk')
for ID,theta in enumerate(np.linspace(2,20,4)):
my_jet.parameters.theta.val=theta
my_jet.eval()
my_jet.plot_model(plot_obj=p,comp='Sum',label='disk, theta=%2.2f'%theta,line_style='',color=c[ID])
p.setlim(y_min=5E-18,y_max=5E-13,x_max=1E28)
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_44_0.png
Equipartition
-------------
It is also possible to set our jet at the equipartition, that is
achieved not using analytical approximation, but by numerically finding
the equipartition value over a grid. We have to provide the value of the
observed flux (``nuFnu_obs``) at a given observed frequency
(``nu_obs``), the minimum value of B (``B_min``), and the number of grid
points (``N_pts``)
.. code:: ipython3
my_jet.parameters.theta.val=12
B_min,b_grid,U_B,U_e=my_jet.set_B_eq(nuFnu_obs=5E-15,nu_obs=1E12,B_min=1E-9,N_pts=50,plot=True)
my_jet.show_pars()
my_jet.eval()
.. parsed-literal::
B grid min 1e-09
B grid max 1.0
grid points 50
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_47_1.png
.. parsed-literal::
setting B to 0.0001389495494373139
setting N to 9.160733610838076e-06
.. raw:: html
Table length=13
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
test_equipartition | R | region_size | cm | 1.000000e+21 | 1.000000e+03 | 1.000000e+30 | False | False |
test_equipartition | R_H | region_position | cm | 1.000000e+17 | 0.000000e+00 | -- | False | True |
test_equipartition | B | magnetic_field | gauss | 1.389495e-04 | 1.000000e-10 | 1.000000e+10 | False | False |
test_equipartition | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | | 1.000000e-01 | 0.000000e+00 | -- | False | True |
test_equipartition | theta | jet-viewing-angle | deg | 1.200000e+01 | 0.000000e+00 | -- | False | False |
test_equipartition | BulkFactor | jet-bulk-factor | lorentz-factor* | 3.500000e+00 | 1.000000e+00 | 1.000000e+05 | False | False |
test_equipartition | z_cosm | redshift | | 6.510000e-01 | 0.000000e+00 | -- | False | False |
test_equipartition | gmin | low-energy-cut-off | lorentz-factor* | 5.000000e+01 | 1.000000e+00 | 1.000000e+09 | False | False |
test_equipartition | gmax | high-energy-cut-off | lorentz-factor* | 3.000000e+06 | 1.000000e+00 | 1.000000e+15 | False | False |
test_equipartition | N | emitters_density | 1 / cm3 | 9.160734e-06 | 0.000000e+00 | -- | False | False |
test_equipartition | gamma0_log_parab | turn-over-energy | lorentz-factor* | 3.500000e+04 | 1.000000e+00 | 1.000000e+09 | False | False |
test_equipartition | s | LE_spectral_slope | | 2.580000e+00 | -1.000000e+01 | 1.000000e+01 | False | False |
test_equipartition | r | spectral_curvature | | 4.200000e-01 | -1.500000e+01 | 1.500000e+01 | False | False |
.. code:: ipython3
p=my_jet.plot_model()
p.setlim(y_min=5E-18,y_max=2E-14,x_max=1E28)
.. image:: Jet_example_phys_EC_files/Jet_example_phys_EC_48_0.png
.. bibliography:: ../../refs.bib