uvex_transients.models.arnett.compute_arnett_luminosity#

uvex_transients.models.arnett.compute_arnett_luminosity(t_eval: ~uvex_transients.models._typing.PhysicalInput, energy_function: ~collections.abc.Callable[[~uvex_transients.models._typing.FloatArray], ~uvex_transients.models._typing.FloatArray], ejecta_mass: ~uvex_transients.models._typing.PhysicalInput, ejecta_velocity: ~uvex_transients.models._typing.PhysicalInput, kappa: ~uvex_transients.models._typing.PhysicalInput = <Quantity 0.2 cm2 / g>, kappa_gamma: ~uvex_transients.models._typing.PhysicalInput = inf, t_min: ~uvex_transients.models._typing.PhysicalInput | None = None, t_max: ~uvex_transients.models._typing.PhysicalInput | None = None, t_grid: ~uvex_transients.models._typing.PhysicalInput | None = None, n_grid: int = 2000) → Quantity[source]#

Bolometric luminosity of an energy source diffusing through expanding ejecta.

Follows Nicholl et al.[1], including the high-energy leakage term of Wang et al.[2].

Parameters:
  • t_eval (Quantity or array_like) – Times since explosion at which to evaluate \(L\) (floats are taken to be in s). Must be non-negative.

  • energy_function (callable) – Injected power \(F_\mathrm{in}(t)\). Called as energy_function(t) with t a bare 1D CGS array in s, and must return an array of the same shape in erg/s – e.g. the callable from get_magnetar_engine().

  • ejecta_mass (Quantity or float) – Ejecta mass \(M_\mathrm{ej}\) (a float is taken to be in g).

  • ejecta_velocity (Quantity or float) – Constant ejecta velocity \(v_\mathrm{ej}\) (a float is taken to be in cm/s).

  • kappa (Quantity or float, optional) – Grey optical opacity (a float is taken to be in cm^2/g). Default 0.2, electron scattering in H-free material.

  • kappa_gamma (Quantity or float, optional) – Opacity to high-energy photons (a float is taken to be in cm^2/g). Smaller values let more of the injected energy leak out un-thermalized at late times. The default inf means full trapping (no leakage).

  • t_min (Quantity or float, optional) – Range of the auto-generated grid (geometric + linear). Default to 1e-4 * t_max and max(t_eval). Ignored if t_grid is given.

  • t_max (Quantity or float, optional) – Range of the auto-generated grid (geometric + linear). Default to 1e-4 * t_max and max(t_eval). Ignored if t_grid is given.

  • t_grid (Quantity or array_like, optional) – Explicit integration grid, replacing the automatic one; it is extended to max(t_eval) if it stops short, so cover t_eval for accuracy.

  • n_grid (int, optional) – Number of points in each of the geometric and linear parts of the automatic grid. The result is second-order accurate in the grid spacing: the default 2000 gives about 3e-5 relative error.

Returns:

Luminosity in erg/s, with the shape of t_eval.

Return type:

Quantity

Raises:

ValueError – If t_eval or the grid is negative or non-finite, if a physical parameter is not positive, or if energy_function returns a non-finite or wrongly shaped result.

References