redback.transient_models.afterglow_models.base_models.RedbackAfterglows

class redback.transient_models.afterglow_models.base_models.RedbackAfterglows(k, n, epsb, epse, g0, ek, thc, thj, tho, p, exp, time, freq, redshift, Dl, extra_structure_parameter_1, extra_structure_parameter_2, method='TH', res=100, steps=500, xiN=1, a1=1)[source]

Bases: object

__init__(k, n, epsb, epse, g0, ek, thc, thj, tho, p, exp, time, freq, redshift, Dl, extra_structure_parameter_1, extra_structure_parameter_2, method='TH', res=100, steps=500, xiN=1, a1=1)[source]

A general class for afterglow models implemented directly in redback. This class is not meant to be used directly but instead via the interface for each specific model. The afterglows are based on the method shown in Lamb, Mandel & Resmi 2018 and other papers. Script was originally written by En-Tzu Lin <entzulin@gapp.nthu.edu.tw> and Gavin Lamb <g.p.lamb@ljmu.ac.uk> and modified and implemented into redback by Nikhil Sarin <nsarin.astro@gmail.com>. Includes wind-like mediums, expansion and multiple jet structures. Includes SSA and uses Numba for acceleration (or numpy if Numba is not installed).

Parameters:
  • k – 0 or 2 for constant or wind density

  • n – ISM, ambient number density

  • epsb – magnetic fraction

  • epse – electron fraction

  • g0 – initial Lorentz factor

  • ek – kinetic energy

  • thc – core angle

  • thj – jet outer angle. For tophat jets thc=thj

  • tho – observers viewing angle

  • p – electron power-law index

  • exp – Boolean for whether to include sound speed expansion

  • time – lightcurve time steps

  • freq – lightcurve frequencies

  • redshift – source redshift

  • Dl – luminosity distance

  • extra_structure_parameter_1 – Extra structure specific parameter #1. Specifically, this parameter sets; The index on energy for power-law jets. The fractional energy contribution for the Double Gaussian (must be less than 1). The energy fraction for the outer sheath for two-component jets (must be less than 1). Unused for tophat or Gaussian jets.

  • extra_structure_parameter_2 – Extra structure specific parameter #2. Specifically, this parameter sets; The index on lorentz factor for power-law jets. The lorentz factor for second Gaussian (must be less than 1). The lorentz factor for the outer sheath for two-component jets (must be less than 1). Unused for tophat or Gaussian jets.

  • method – Type of jet structure to use. Defaults to ‘TH’ for tophat jet. Other options are ‘2C’, ‘GJ’, ‘PL’, ‘PL2’, ‘DG’. Corresponding to two component, gaussian jet, powerlaw, alternative powerlaw and double Gaussian.

  • res – resolution

  • steps – number of steps used to resolve Gamma and dm

  • XiN – fraction of electrons that get accelerated

  • a1 – the expansion description, a1 = 0 sound speed, a1 = 1 Granot & Piran 2012

__call__(**kwargs)

Call self as a function.

Methods

__init__(k, n, epsb, epse, g0, ek, thc, thj, ...)

A general class for afterglow models implemented directly in redback.

calc_afterglow_numba(G, SM, Dl, p, xp, Fx, ...)

Numba-accelerated afterglow calculation

calc_lightcurve(time, tobs, Flux, nu_size, ...)

get_lightcurve()

calc_afterglow_numba(G, SM, Dl, p, xp, Fx, EB, Ee, Gs, Omi, Ei, n, k, tho, thi, phii, thj, ghat, rotstep, latstep, Obsa, nu, steps, XiN)[source]

Numba-accelerated afterglow calculation