Energy shift calculations

Note

The term often used in the literature for any arbitrary energy shift is redshift, regardless of whether there is an increase in energy (a blueshift) or a decrease (redshift). The term redshift therefore refers the phenomena, but is generally otherwise misleading. The Gradus.jl authors are transitioning to update the code to refer to the energy shift instead, but for compatibility reasons this will take time.

The energy shift along a single geodesic may be calculated as follows, using unpack_solution to obtain a GeodesicPoint:

using Gradus

m = KerrMetric(a = 0.998)
x_start = SVector(0.0, 10.0, deg2rad(30), 0.0)
v = map_impact_parameters(m, x_start, 1.0, 1.0)

# integrate for 3 affine times, as an illustration
gp = tracegeodesics(m, x_start, v, 3.0) |> unpack_solution

# Energy shift as measured by a stationary observer at `x_start`
g = energyshift(m, gp)
0.9553607247473436
Gradus.energyshiftFunction
energyshift(m, gp::GeodesicPoint; u_init, u_end)
energyshift(m, x_init, v_init, x_end, v_end; u_init, u_end)

Calculate the energyshift along a geodesic as measured by a medium with velocity u_init of a photon originating from a medium with u_end. By default, both velocities are set be locally stationary, and the redshift that is measured is entirely determined by the relative $g_{t t}$ metric components.

The naming may seem reverse, but this is to reflect that the geodesic is traced from u_init to u_end, but the energyshift is measured at u_init.

To get the energyshift as measured by u_end, simply take the inverse of the result.

source

To calculate the redshift along a geodesic, similar code may be used

sol = tracegeodesics(m, x_start, v, 80.0; save_on = true)

points = unpack_solution_full(m, sol)
gs = energyshift.(m, points)

using Makie, CairoMakie
fig = Figure()
ax = Axis(fig[1,1], aspect = DataAspect())
X = [p.x[2] * cos(p.x[4]) * sin(p.x[3]) for p in points]
Y = [p.x[2] * sin(p.x[4]) * sin(p.x[3]) for p in points]
lines!(ax, X, Y, color = log10.(abs.(gs)), colormap = :thermal, linewidth = 4.0)
arc!(ax, Point2f(0), Gradus.inner_radius(m), -π, π, color = :black)
fig

For calculating energy shifts from accretion discs, a number of utility functions exist.

Gradus.redshift_functionFunction
redshift_function(m::AbstractMetric, x_obs::SVector{4}; kwargs...)

Construct a closure which returns a function for evaluating the redshift of a particular medium.

For almost all spacetimes, the velocity keyword is supported, which allows a different velocity function for the disc velocity to be set. The default is RedshiftFunctions.keplerian_orbit

The closure function has the following signature, compatible with PointFunction:

function _redshift_closure(m, gp, max_time)
    _redshift_guard(m, gp, r_isco; kwargs...)
end

For most purposes, ConstPointFunctions.redshift should be used.

source