JetTimeEvol#

class jetset.jet_timedep.JetTimeEvol(jet_rad, only_radiation=False, Q_inj=None, name='jet_time_ev', inplace=True, log_sampling=False, jet_gamma_grid_size=200, setup=True)[source]#

Bases: object

Parameters:
  • jet

  • Q_inj

  • name

  • inplace

  • jet_gamma_grid_size

The model parameters can be set after object creation, eg:

from jetset.jet_emitters_factory import EmittersFactory
q_inj=InjEmittersFactory().create_inj_emitters('pl',emitters_type='electrons',normalize=True)
q_inj.parameters.gmax.val=5


from jetset.jet_timedep import  JetTimeEvol
from jetset.jet_model import Jet

my_jet=Jet()

temp_ev_acc=JetTimeEvol(jet=my_jet_acc,Q_inj=q_inj,inplace=True)

temp_ev_acc.parameters.duration.val=1E4

model parameters#

duration: float (s)

duration of the evolution in seconds

gmin_grid: float

lower bound of the gamma grid for the temporal evolution

gmax_grid: float

upper bound of the gamma grid for the temporal evolution

gamma_grid_size: int

size of the gamma grid

TStart_Acc: float (s)

starting time of the acceleration process

TStop_Acc: float (s)

stop time of the acceleration process

TStart_Inj: float (s)

starting time of the injection process

TStop_Inj: float (s)

stop time of the injection process

T_esc: float (R/c)

escape time scale in (R/c)

Esc_Index: float

power-law index for the escapce term t_esc(gamma)=T_esc*gamma^(Esc_Index)

t_D0: float (s)

acceleration time scale for diffusive acceleration term

t_A0: float (s)

acceleration time scale for the systematic acceleration term

Diff_Index: float (s)

power-law index for the diffusive acceleration term

Acc_Index: float (s)

power-law index for the systematic acceleration term

Lambda_max_Turb: float (cm)

max scale of the turbulence

Lambda_choer_Turb_factor: float (cm)

max scale for the quasi-linear resonant regime

t_size: int

number of steps for the time grid

num_samples: int

number of the time steps saved in the output

L_inj: float (erg/s)

if not None, the inj function is rescaled to match L_inj

Attributes Summary

Adiabatic_cooling

Sync cooling.

Delta_R_acc

Delta r acc.

IC_cooling

Ic cooling.

Sync_cooling

Sync cooling.

custom_acc_profile

Custom acc profile.

custom_q_inj_profile

Custom q inj profile.

delta_t

blob delta t in s

log_sampling

logarithmically spaced bool

region_expansion

Region expansion.

t_unit_acc

blob time in R/c

t_unit_rad

blob time in R/c

temp_ev

Temp ev.

tempev_table

Tempev table.

time_steps_array

Time steps array.

Methods Summary

V_acc()

V acc.

V_rad()

V rad.

eval_L_tot_inj()

Evaluate l tot inj.

get_region(region)

Return region.

init_TempEv()

Init temp ev.

load_model(file_name)

Load object state from disk.

plot_pre_run_plot([figsize, dpi])

Plot pre run plot.

plot_tempev_emitters([region, figsize, dpi, ...])

Plot tempev emitters.

plot_tempev_model([comp, region, frame, t1, ...])

Plot tempev model.

plot_time_profile([figsize, dpi])

Plot time profile.

run([only_injection, do_injection, ...])

save_model(file_name)

Save object state to disk.

set_time([time_slice, time, frame])

Set time.

show_model([getstring, names_list, sort_key])

Display model.

show_pars([sort_key])

Display pars.

Attributes Documentation

Adiabatic_cooling#

Sync cooling.

Returns:

Requested value.

Return type:

object

Delta_R_acc#

Delta r acc.

Returns:

Requested value.

Return type:

object

IC_cooling#

Ic cooling.

Returns:

Requested value.

Return type:

object

Sync_cooling#

Sync cooling.

Returns:

Requested value.

Return type:

object

custom_acc_profile#

Custom acc profile.

Returns:

Requested value.

Return type:

object

custom_q_inj_profile#

Custom q inj profile.

Returns:

Requested value.

Return type:

object

delta_t#

blob delta t in s

log_sampling#

logarithmically spaced bool

region_expansion#

Region expansion.

Returns:

Requested value.

Return type:

object

t_unit_acc#

blob time in R/c

t_unit_rad#

blob time in R/c

temp_ev#

Temp ev.

Returns:

Requested value.

Return type:

object

tempev_table#

Tempev table.

Returns:

Requested value.

Return type:

object

time_steps_array#

Time steps array.

Returns:

Requested value.

Return type:

object

Methods Documentation

V_acc()[source]#

V acc.

Returns:

Computed result.

Return type:

object

V_rad()[source]#

V rad.

Returns:

Computed result.

Return type:

object

eval_L_tot_inj()[source]#

Evaluate l tot inj.

Returns:

Computed result.

Return type:

object

get_region(region)[source]#

Return region.

Parameters:

region (object) – Parameter controlling region.

Returns:

Requested value.

Return type:

object

init_TempEv()[source]#

Init temp ev.

classmethod load_model(file_name)[source]#

Load object state from disk.

Parameters:

file_name (object) – Input/output file path.

Returns:

Computed result.

Return type:

object

plot_pre_run_plot(figsize=(8, 6), dpi=120)[source]#

Plot pre run plot.

Parameters:
  • figsize (tuple, optional) – Parameter controlling figsize.

  • dpi (int, optional) – Parameter controlling dpi.

Returns:

Computed result.

Return type:

object

plot_tempev_emitters(region='rad', figsize=(8, 8), dpi=120, energy_unit='gamma', loglog=True, plot_Q_inj=True, pow=None)[source]#

Plot tempev emitters.

Parameters:
  • region (str, optional) – Parameter controlling region.

  • figsize (tuple, optional) – Parameter controlling figsize.

  • dpi (int, optional) – Parameter controlling dpi.

  • energy_unit (str, optional) – Frequency/energy control value for energy unit.

  • loglog (bool, optional) – If True, operate in log10 space.

  • plot_Q_inj (bool, optional) – If True, plot q inj.

  • pow (object, optional) – Parameter controlling pow.

Returns:

Computed result.

Return type:

object

plot_tempev_model(comp='Sum', region='rad', frame='obs', t1=None, t2=None, time_slice=None, time_slice_bin=None, time=None, time_bin=None, density=False, use_cached=False, sed_data=None, plot_obj=None, average=False)[source]#

Plot tempev model.

Parameters:
  • comp (str, optional) – Parameter controlling comp.

  • region (str, optional) – Parameter controlling region.

  • frame (str, optional) – Reference frame for data/model values.

  • t1 (object, optional) – Parameter controlling t1.

  • t2 (object, optional) – Parameter controlling t2.

  • time_slice (object, optional) – Time-related value for time slice.

  • time_slice_bin (object, optional) – Time-related value for time slice bin.

  • time (object, optional) – Time-related value for time.

  • time_bin (object, optional) – Time-related value for time bin.

  • density (bool, optional) – Parameter controlling density.

  • use_cached (bool, optional) – If True, enable cached.

  • sed_data (object, optional) – Observational SED data container.

  • plot_obj (object, optional) – Existing plot object to update.

  • average (bool, optional) – Parameter controlling average.

Returns:

Computed result.

Return type:

object

plot_time_profile(figsize=(8, 8), dpi=120)[source]#

Plot time profile.

Parameters:
  • figsize (tuple, optional) – Parameter controlling figsize.

  • dpi (int, optional) – Parameter controlling dpi.

Returns:

Computed result.

Return type:

object

run(only_injection=True, do_injection=True, cache_SEDs_rad=True, cache_SEDs_acc=False)[source]#
Parameters:
  • only_injection (if TRUE radiative regions is considered empty and is filled by particles escaped from acceleration region,)

  • region. (otherwise particle escaped from acc regions are injected and mixed with pre-existing particles in the radiative)

  • object (in the radiative region are cooled. if Q_inj is not provided in the)

  • FALSE (then do_injection will be considered)

  • do_injection (if TRUE, particles are injected in the acceleration region, otherwise acc region is skipped, and only particles)

  • object

  • FALSE

  • cache_SEDs_rad (if TRUE, all the SEDs of the radiative region will be cached)

  • cache_SEDs_acc (if TRUE, all the SEDs of the acceleration region will be cached)

save_model(file_name)[source]#

Save object state to disk.

Parameters:

file_name (object) – Input/output file path.

set_time(time_slice=None, time=None, frame='blob')[source]#

Set time.

Parameters:
  • time_slice (object, optional) – Time-related value for time slice.

  • time (object, optional) – Time-related value for time.

  • frame (str, optional) – Reference frame for data/model values.

show_model(getstring=False, names_list=None, sort_key=None)[source]#

Display model.

Parameters:
  • getstring (bool, optional) – Parameter controlling getstring.

  • names_list (object, optional) – List of names.

  • sort_key (object, optional) – Parameter controlling sort key.

show_pars(sort_key='par type')[source]#

Display pars.

Parameters:

sort_key (str, optional) – Parameter controlling sort key.