.. _jet_numerical_guide: Numerical setup =============== .. code:: ipython3 import jetset print('tested on jetset',jetset.__version__) .. parsed-literal:: tested on jetset 1.2.2 Changing the grid size for the electron distribution ---------------------------------------------------- .. code:: ipython3 from jetset.jet_model import Jet my_jet=Jet(name='test',electron_distribution='lppl',) my_jet.show_model() .. parsed-literal:: -------------------------------------------------------------------------------- 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 -------------------------------------------------------------------------------- .. raw:: html Table length=12
model namenamepar typeunitsvalphys. bound. minphys. bound. maxlogfrozen
testRregion_sizecm5.000000e+151.000000e+031.000000e+30FalseFalse
testR_Hregion_positioncm1.000000e+170.000000e+00--FalseTrue
testBmagnetic_fieldgauss1.000000e-011.000000e-101.000000e+10FalseFalse
testNH_cold_to_rel_ecold_p_to_rel_e_ratio1.000000e-010.000000e+00--FalseTrue
testbeam_objbeaminglorentz-factor*1.000000e+011.000000e-041.000000e+04FalseFalse
testz_cosmredshift1.000000e-010.000000e+00--FalseFalse
testgminlow-energy-cut-offlorentz-factor*2.000000e+001.000000e+001.000000e+09FalseFalse
testgmaxhigh-energy-cut-offlorentz-factor*1.000000e+061.000000e+001.000000e+15FalseFalse
testNemitters_density1 / cm31.000000e+020.000000e+00--FalseFalse
testgamma0_log_parabturn-over-energylorentz-factor*1.000000e+041.000000e+001.000000e+09FalseFalse
testsLE_spectral_slope2.000000e+00-1.000000e+011.000000e+01FalseFalse
testrspectral_curvature4.000000e-01-1.500000e+011.500000e+01FalseFalse
.. parsed-literal:: -------------------------------------------------------------------------------- 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 :meth:`.Jet.gamma_grid_size` .. code:: ipython3 print (my_jet.gamma_grid_size) .. parsed-literal:: 201 and this value can be changed using the method :meth:`.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 .. code:: ipython3 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) .. image:: Jet_example_num_files/Jet_example_num_9_0.png .. code:: ipython3 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) .. image:: Jet_example_num_files/Jet_example_num_10_0.png Changing the grid size for the IC process spectra ------------------------------------------------- **in the current version there is a limit of the size to 1000** .. code:: ipython3 my_jet=Jet(name='test',electron_distribution='lppl',) my_jet.show_model() .. parsed-literal:: -------------------------------------------------------------------------------- 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 -------------------------------------------------------------------------------- .. raw:: html Table length=12
model namenamepar typeunitsvalphys. bound. minphys. bound. maxlogfrozen
testRregion_sizecm5.000000e+151.000000e+031.000000e+30FalseFalse
testR_Hregion_positioncm1.000000e+170.000000e+00--FalseTrue
testBmagnetic_fieldgauss1.000000e-011.000000e-101.000000e+10FalseFalse
testNH_cold_to_rel_ecold_p_to_rel_e_ratio1.000000e-010.000000e+00--FalseTrue
testbeam_objbeaminglorentz-factor*1.000000e+011.000000e-041.000000e+04FalseFalse
testz_cosmredshift1.000000e-010.000000e+00--FalseFalse
testgminlow-energy-cut-offlorentz-factor*2.000000e+001.000000e+001.000000e+09FalseFalse
testgmaxhigh-energy-cut-offlorentz-factor*1.000000e+061.000000e+001.000000e+15FalseFalse
testNemitters_density1 / cm31.000000e+020.000000e+00--FalseFalse
testgamma0_log_parabturn-over-energylorentz-factor*1.000000e+041.000000e+001.000000e+09FalseFalse
testsLE_spectral_slope2.000000e+00-1.000000e+011.000000e+01FalseFalse
testrspectral_curvature4.000000e-01-1.500000e+011.500000e+01FalseFalse
.. parsed-literal:: -------------------------------------------------------------------------------- .. code:: ipython3 my_jet.eval() sed_plot=my_jet.plot_model() sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12) .. image:: Jet_example_num_files/Jet_example_num_14_0.png To get a better sampling of the IC cut-off you can increase the IC emission grid size .. code:: ipython3 my_jet.set_IC_nu_size(200) .. code:: ipython3 my_jet.eval() sed_plot=my_jet.plot_model() sed_plot.setlim(x_min=1E8,y_min=1E-20,y_max=1E-12) .. image:: Jet_example_num_files/Jet_example_num_17_0.png Changing the grid size for the seed photons ------------------------------------------- .. code:: ipython3 my_jet=Jet(name='test',electron_distribution='lppl',) my_jet.show_model() .. parsed-literal:: -------------------------------------------------------------------------------- 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 -------------------------------------------------------------------------------- .. raw:: html Table length=12
model namenamepar typeunitsvalphys. bound. minphys. bound. maxlogfrozen
testRregion_sizecm5.000000e+151.000000e+031.000000e+30FalseFalse
testR_Hregion_positioncm1.000000e+170.000000e+00--FalseTrue
testBmagnetic_fieldgauss1.000000e-011.000000e-101.000000e+10FalseFalse
testNH_cold_to_rel_ecold_p_to_rel_e_ratio1.000000e-010.000000e+00--FalseTrue
testbeam_objbeaminglorentz-factor*1.000000e+011.000000e-041.000000e+04FalseFalse
testz_cosmredshift1.000000e-010.000000e+00--FalseFalse
testgminlow-energy-cut-offlorentz-factor*2.000000e+001.000000e+001.000000e+09FalseFalse
testgmaxhigh-energy-cut-offlorentz-factor*1.000000e+061.000000e+001.000000e+15FalseFalse
testNemitters_density1 / cm31.000000e+020.000000e+00--FalseFalse
testgamma0_log_parabturn-over-energylorentz-factor*1.000000e+041.000000e+001.000000e+09FalseFalse
testsLE_spectral_slope2.000000e+00-1.000000e+011.000000e+01FalseFalse
testrspectral_curvature4.000000e-01-1.500000e+011.500000e+01FalseFalse
.. parsed-literal:: -------------------------------------------------------------------------------- we can get the current value of the seed photons grid size using attribute :meth:`.Jet.nu_seed_size` **in the current version there is lit of the size to 1000** .. code:: ipython3 print (my_jet.nu_seed_size) .. parsed-literal:: 100 and this value can be changed using the method :meth:`.Jet.set_seed_nu_size`. In the following we show the result for a grid of nu_size=10 .. code:: ipython3 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) .. image:: Jet_example_num_files/Jet_example_num_24_0.png .. code:: ipython3 my_jet=Jet(name='test',electron_distribution='lppl',) my_jet.show_model() .. parsed-literal:: -------------------------------------------------------------------------------- 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 -------------------------------------------------------------------------------- .. raw:: html Table length=12
model namenamepar typeunitsvalphys. bound. minphys. bound. maxlogfrozen
testRregion_sizecm5.000000e+151.000000e+031.000000e+30FalseFalse
testR_Hregion_positioncm1.000000e+170.000000e+00--FalseTrue
testBmagnetic_fieldgauss1.000000e-011.000000e-101.000000e+10FalseFalse
testNH_cold_to_rel_ecold_p_to_rel_e_ratio1.000000e-010.000000e+00--FalseTrue
testbeam_objbeaminglorentz-factor*1.000000e+011.000000e-041.000000e+04FalseFalse
testz_cosmredshift1.000000e-010.000000e+00--FalseFalse
testgminlow-energy-cut-offlorentz-factor*2.000000e+001.000000e+001.000000e+09FalseFalse
testgmaxhigh-energy-cut-offlorentz-factor*1.000000e+061.000000e+001.000000e+15FalseFalse
testNemitters_density1 / cm31.000000e+020.000000e+00--FalseFalse
testgamma0_log_parabturn-over-energylorentz-factor*1.000000e+041.000000e+001.000000e+09FalseFalse
testsLE_spectral_slope2.000000e+00-1.000000e+011.000000e+01FalseFalse
testrspectral_curvature4.000000e-01-1.500000e+011.500000e+01FalseFalse
.. parsed-literal:: -------------------------------------------------------------------------------- .. code:: ipython3 print(my_jet.IC_nu_size) .. parsed-literal:: 100 .. code:: ipython3 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) .. image:: Jet_example_num_files/Jet_example_num_27_0.png .. code:: ipython3 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) .. image:: Jet_example_num_files/Jet_example_num_28_0.png .. code:: ipython3 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) .. image:: Jet_example_num_files/Jet_example_num_29_0.png .. code:: ipython3 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) .. image:: Jet_example_num_files/Jet_example_num_30_0.png