Phenomenological model constraining: SSC theory

import jetset
print('tested on jetset',jetset.__version__)
tested on jetset 1.2.2
import matplotlib

from matplotlib import pyplot as plt

import matplotlib.colors as mcolors

font = {'family' : 'sans-serif',
        'weight' : 'normal',
        'size'   : 18}

matplotlib.rc('font', **font)
matplotlib.pyplot.rc('font', **font)


colors=list(mcolors.TABLEAU_COLORS)


import numpy as np
import warnings
warnings.filterwarnings('ignore')
from jetset.poly_fit_tools import get_SED_pl_fit, get_SED_log_par_fit, get_nu_p_S_delta_approx, get_n_gamma_log_par_fit, get_nu_p_S_delta_approx
def n_distr_plot(j,ax,c=None,gmin=None):
    x=my_jet.electron_distribution.gamma_e
    y=my_jet.electron_distribution.n_gamma_e
    ax.plot(np.log10(x),np.log10(y*x*x*x),color=c)
    if gmin is not None:
        ymax=np.log10(y[0]*x[0]*x[0]*x[0])
        ymin=np.log10(y[-1]*x[-1]*x[-1]*x[-1])
        #print('ymax',ymax)
        ax.vlines(np.log10(gmin),ymin=ymin,ymax=ymax,color=colors[ID])

This section is based on the work presented in

image.png

image.png

from jetset.plot_sedfit import PlotSED,PlotPdistr,PlotSpecComp
from jetset.jet_model import Jet
my_jet=Jet(electron_distribution='lppl')
my_jet.parameters.r.val=1.0
my_jet.show_model()
--------------------------------------------------------------------------------
model description:
--------------------------------------------------------------------------------
type: Jet
name: jet_leptonic

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

--------------------------------------------------------------------------------
Table length=12
model namenamepar typeunitsvalphys. bound. minphys. bound. maxlogfrozen
jet_leptonicRregion_sizecm5.000000e+151.000000e+031.000000e+30FalseFalse
jet_leptonicR_Hregion_positioncm1.000000e+170.000000e+00--FalseTrue
jet_leptonicBmagnetic_fieldgauss1.000000e-011.000000e-101.000000e+10FalseFalse
jet_leptonicNH_cold_to_rel_ecold_p_to_rel_e_ratio1.000000e-010.000000e+00--FalseTrue
jet_leptonicbeam_objbeaminglorentz-factor*1.000000e+011.000000e-041.000000e+04FalseFalse
jet_leptonicz_cosmredshift1.000000e-010.000000e+00--FalseFalse
jet_leptonicgminlow-energy-cut-offlorentz-factor*2.000000e+001.000000e+001.000000e+09FalseFalse
jet_leptonicgmaxhigh-energy-cut-offlorentz-factor*1.000000e+061.000000e+001.000000e+15FalseFalse
jet_leptonicNemitters_density1 / cm31.000000e+020.000000e+00--FalseFalse
jet_leptonicgamma0_log_parabturn-over-energylorentz-factor*1.000000e+041.000000e+001.000000e+09FalseFalse
jet_leptonicsLE_spectral_slope2.000000e+00-1.000000e+011.000000e+01FalseFalse
jet_leptonicrspectral_curvature1.000000e+00-1.500000e+011.500000e+01FalseFalse
--------------------------------------------------------------------------------
my_jet.set_par('B',val=0.2)
my_jet.set_par('gamma0_log_parab',val=5E3)
my_jet.set_par('gmin',val=1E2)
my_jet.set_par('gmax',val=1E8)
my_jet.set_par('R',val=1E15)
my_jet.set_par('N',val=1E3)
my_jet.set_par('r',val=0.4)
my_jet.eval()
p=my_jet.electron_distribution.plot()
p.ax.axvline(4.0,ls='--',c='black',label=r'$\gamma_0$')
p.ax.legend()
<matplotlib.legend.Legend at 0x7fcb90f53400>
../../../_images/SSC_th_bkg_11_1.png
p=my_jet.electron_distribution.plot3p()
p.ax.axvline(4.0,ls='--',c='black',label=r'$\gamma_0$')
p.ax.legend()
<matplotlib.legend.Legend at 0x7fcb91bee190>
../../../_images/SSC_th_bkg_12_1.png
my_plot=my_jet.plot_model()
my_plot.setlim(y_max=1E-11,y_min=5E-17,x_min=1E9)
../../../_images/SSC_th_bkg_13_0.png
my_plot=my_jet.plot_model(frame='src')
my_plot.setlim(y_max=1E44,y_min=1E38,x_min=1E9)
../../../_images/SSC_th_bkg_14_0.png

Exercise

derive the trend for the Compton dominance (CD) as a function of N a gamma0_log_parab

hint: use the get_component_peak to extract the peak of the SED for each component