redback.transient_models.combined_models.tophat_and_twolayerstratified
- redback.transient_models.combined_models.tophat_and_twolayerstratified(time, redshift, av, thv, loge0, thc, logn0, p, logepse, logepsb, ksin, g0, mej, vej_1, vej_2, kappa, beta, **kwargs)[source]
function to combine the flux density signals of a tophat afterglow and a two layer stratified kilonova with extinction
- Parameters:
time – time in days in observer frame
redshift – source redshift
av – absolute mag extinction
thv – viewing angle in radians
loge0 – log10 on axis isotropic equivalent energy
thc – half width of jet core/jet opening angle in radians
beta – index for power-law structure, theta^-b
logn0 – log10 number density of ISM in cm^-3
p – electron distribution power law index. Must be greater than 2.
logepse – log10 fraction of thermal energy in electrons
logepsb – log10 fraction of thermal energy in magnetic field
ksin – fraction of electrons that get accelerated
g0 – initial lorentz factor
mej – ejecta mass in solar masses
vej_1 – velocity of inner shell in c
vej_2 – velocity of outer shell in c
kappa – constant gray opacity
beta – power law index of density profile
kwargs – Additional keyword arguments
r_v – extinction parameter, defaults to 3.1
spread – whether jet can spread, defaults to False
latres – latitudinal resolution for structured jets, defaults to 2
tres – time resolution of shock evolution, defaults to 100
spectype – whether to have inverse compton, defaults to 0, i.e., no inverse compton. Change to 1 for including inverse compton emission.
q (l0, ts,) – energy injection parameters, defaults to 0
frequency – frequency to calculate - Must be same length as time array or a single number
- Returns:
flux density signal with extinction added