Numerical setup#
import jetset
print('tested on jetset',jetset.__version__)
tested on jetset 1.3.0rc7
Changing the grid size for the electron distribution#
from jetset.jet_model import Jet
my_jet=Jet(name='test',electron_distribution='lppl',)
my_jet.show_model()
===> setting C threads to 12
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: test
geometry: spherical
electrons distribution:
type: lppl
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+00
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:Sum, hidden: False
name:Sync, state: self-abs
name:Sync, hidden: False
name:SSC, state: on
name:SSC, hidden: False
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
--------------------------------------------------------------------------------
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
---|---|---|---|---|---|---|---|---|
test | R | region_size | cm | 5.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
test | R_H | region_position | cm | 1.000000e+17 | 0.000000e+00 | -- | False | True |
test | B | magnetic_field | gauss | 1.000000e-01 | 0.000000e+00 | -- | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e+00 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | 1.000000e+01 | 1.000000e-04 | -- | False | False | |
test | z_cosm | redshift | 1.000000e-01 | 0.000000e+00 | -- | False | False | |
test | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
test | gmax | high-energy-cut-off | lorentz-factor* | 1.000000e+06 | 1.000000e+00 | 1.000000e+15 | False | False |
test | N | emitters_density | 1 / cm3 | 1.000000e+02 | 0.000000e+00 | -- | False | False |
test | gamma0_log_parab | turn-over-energy | lorentz-factor* | 1.000000e+04 | 1.000000e+00 | 1.000000e+09 | False | False |
test | s | LE_spectral_slope | 2.000000e+00 | -1.000000e+01 | 1.000000e+01 | False | False | |
test | r | spectral_curvature | 4.000000e-01 | -1.500000e+01 | 1.500000e+01 | False | False |
--------------------------------------------------------------------------------
It is possible to change the size of the grid for the electron distributions. It is worth noting that at lower values of the grid size the speed will increase, but it is not recommended to go below 100.
The actual value of the grid size is returned by the Jet.gamma_grid_size()
print (my_jet.gamma_grid_size)
201
and this value can be changed using the method Jet.set_gamma_grid_size()
. In the following we show the result for a grid of size=10, as anticipated the final integration will be not satisfactory
my_jet.set_gamma_grid_size(10)
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
my_jet.set_gamma_grid_size(100)
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
Changing the grid size for the IC process spectra#
in the current version there is a limit of the size to 1000
my_jet=Jet(name='test',electron_distribution='lppl',)
my_jet.show_model()
===> setting C threads to 12
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: test
geometry: spherical
electrons distribution:
type: lppl
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+00
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:Sum, hidden: False
name:Sync, state: self-abs
name:Sync, hidden: False
name:SSC, state: on
name:SSC, hidden: False
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
--------------------------------------------------------------------------------
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
---|---|---|---|---|---|---|---|---|
test | R | region_size | cm | 5.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
test | R_H | region_position | cm | 1.000000e+17 | 0.000000e+00 | -- | False | True |
test | B | magnetic_field | gauss | 1.000000e-01 | 0.000000e+00 | -- | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e+00 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | 1.000000e+01 | 1.000000e-04 | -- | False | False | |
test | z_cosm | redshift | 1.000000e-01 | 0.000000e+00 | -- | False | False | |
test | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
test | gmax | high-energy-cut-off | lorentz-factor* | 1.000000e+06 | 1.000000e+00 | 1.000000e+15 | False | False |
test | N | emitters_density | 1 / cm3 | 1.000000e+02 | 0.000000e+00 | -- | False | False |
test | gamma0_log_parab | turn-over-energy | lorentz-factor* | 1.000000e+04 | 1.000000e+00 | 1.000000e+09 | False | False |
test | s | LE_spectral_slope | 2.000000e+00 | -1.000000e+01 | 1.000000e+01 | False | False | |
test | r | spectral_curvature | 4.000000e-01 | -1.500000e+01 | 1.500000e+01 | False | False |
--------------------------------------------------------------------------------
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
To get a better sampling of the IC cut-off you can increase the IC emission grid size
my_jet.set_IC_nu_size(200)
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
Changing the grid size for the seed photons#
my_jet=Jet(name='test',electron_distribution='lppl',)
my_jet.show_model()
===> setting C threads to 12
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: test
geometry: spherical
electrons distribution:
type: lppl
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+00
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:Sum, hidden: False
name:Sync, state: self-abs
name:Sync, hidden: False
name:SSC, state: on
name:SSC, hidden: False
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
--------------------------------------------------------------------------------
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
---|---|---|---|---|---|---|---|---|
test | R | region_size | cm | 5.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
test | R_H | region_position | cm | 1.000000e+17 | 0.000000e+00 | -- | False | True |
test | B | magnetic_field | gauss | 1.000000e-01 | 0.000000e+00 | -- | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e+00 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | 1.000000e+01 | 1.000000e-04 | -- | False | False | |
test | z_cosm | redshift | 1.000000e-01 | 0.000000e+00 | -- | False | False | |
test | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
test | gmax | high-energy-cut-off | lorentz-factor* | 1.000000e+06 | 1.000000e+00 | 1.000000e+15 | False | False |
test | N | emitters_density | 1 / cm3 | 1.000000e+02 | 0.000000e+00 | -- | False | False |
test | gamma0_log_parab | turn-over-energy | lorentz-factor* | 1.000000e+04 | 1.000000e+00 | 1.000000e+09 | False | False |
test | s | LE_spectral_slope | 2.000000e+00 | -1.000000e+01 | 1.000000e+01 | False | False | |
test | r | spectral_curvature | 4.000000e-01 | -1.500000e+01 | 1.500000e+01 | False | False |
--------------------------------------------------------------------------------
we can get the current value of the seed photons grid size using attribute Jet.nu_seed_size()
in the current version there is lit of the size to 1000
print (my_jet.nu_seed_size)
100
and this value can be changed using the method Jet.set_seed_nu_size()
. In the following we show the result for a grid of nu_size=10
my_jet.nu_seed_size=10
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
my_jet=Jet(name='test',electron_distribution='lppl',)
my_jet.show_model()
===> setting C threads to 12
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: test
geometry: spherical
electrons distribution:
type: lppl
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+00
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:Sum, hidden: False
name:Sync, state: self-abs
name:Sync, hidden: False
name:SSC, state: on
name:SSC, hidden: False
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
--------------------------------------------------------------------------------
model name | name | par type | units | val | phys. bound. min | phys. bound. max | log | frozen |
---|---|---|---|---|---|---|---|---|
test | R | region_size | cm | 5.000000e+15 | 1.000000e+03 | 1.000000e+30 | False | False |
test | R_H | region_position | cm | 1.000000e+17 | 0.000000e+00 | -- | False | True |
test | B | magnetic_field | gauss | 1.000000e-01 | 0.000000e+00 | -- | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e+00 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | 1.000000e+01 | 1.000000e-04 | -- | False | False | |
test | z_cosm | redshift | 1.000000e-01 | 0.000000e+00 | -- | False | False | |
test | gmin | low-energy-cut-off | lorentz-factor* | 2.000000e+00 | 1.000000e+00 | 1.000000e+09 | False | False |
test | gmax | high-energy-cut-off | lorentz-factor* | 1.000000e+06 | 1.000000e+00 | 1.000000e+15 | False | False |
test | N | emitters_density | 1 / cm3 | 1.000000e+02 | 0.000000e+00 | -- | False | False |
test | gamma0_log_parab | turn-over-energy | lorentz-factor* | 1.000000e+04 | 1.000000e+00 | 1.000000e+09 | False | False |
test | s | LE_spectral_slope | 2.000000e+00 | -1.000000e+01 | 1.000000e+01 | False | False | |
test | r | spectral_curvature | 4.000000e-01 | -1.500000e+01 | 1.500000e+01 | False | False |
--------------------------------------------------------------------------------
print(my_jet.IC_nu_size)
100
my_jet.IC_nu_size=20
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
my_jet.IC_nu_size=100
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
my_jet.IC_nu_size=200
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)
my_jet._blob.IC_adaptive_e_binning
my_jet.IC_nu_size=100
my_jet.eval()
sed_plot=my_jet.plot_model()
sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12)