import jetset
print('tested on jetset',jetset.__version__)
tested on jetset 1.2.2
from jetset.jet_model import Jet
my_jet=Jet(name='test',electron_distribution='lppl',)
my_jet.show_model()
-------------------------------------------------------------------------------- model description: -------------------------------------------------------------------------------- type: Jet name: test 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-01 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 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 | 1.000000e-10 | 1.000000e+10 | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e-01 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | lorentz-factor* | 1.000000e+01 | 1.000000e-04 | 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.
print (my_jet.gamma_grid_size)
201
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)
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()
-------------------------------------------------------------------------------- model description: -------------------------------------------------------------------------------- type: Jet name: test 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-01 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 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 | 1.000000e-10 | 1.000000e+10 | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e-01 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | lorentz-factor* | 1.000000e+01 | 1.000000e-04 | 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)
my_jet=Jet(name='test',electron_distribution='lppl',)
my_jet.show_model()
-------------------------------------------------------------------------------- model description: -------------------------------------------------------------------------------- type: Jet name: test 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-01 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 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 | 1.000000e-10 | 1.000000e+10 | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e-01 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | lorentz-factor* | 1.000000e+01 | 1.000000e-04 | 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 |
--------------------------------------------------------------------------------
in the current version there is lit of the size to 1000
print (my_jet.nu_seed_size)
100
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()
-------------------------------------------------------------------------------- model description: -------------------------------------------------------------------------------- type: Jet name: test 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-01 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 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 | 1.000000e-10 | 1.000000e+10 | False | False |
test | NH_cold_to_rel_e | cold_p_to_rel_e_ratio | 1.000000e-01 | 0.000000e+00 | -- | False | True | |
test | beam_obj | beaming | lorentz-factor* | 1.000000e+01 | 1.000000e-04 | 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)