Krang api
Krang.AbsorptiveIntensityKrang.AbstractCameraKrang.AbstractGeometryKrang.AbstractLevelSetGeometryKrang.AbstractLightTraitKrang.AbstractMaterialKrang.AbstractMetricKrang.AbstractPixelKrang.AbstractScreenKrang.AbstractSymmetryTraitKrang.AngularCacheKrang.AxisymmetricTraitKrang.ConeGeometryKrang.ElectronSynchrotronPowerLawIntensityKrang.ElectronSynchrotronPowerLawPolarizationKrang.FastLightTraitKrang.IntensityCameraKrang.IntensityPixelKrang.IntensityPixelArrayKrang.IntensityScreenKrang.KerrKrang.MeshKrang.MeshGeometryKrang.NonAxisymmetricTraitKrang.SlowLightIntensityCameraKrang.SlowLightIntensityPixelKrang.SlowLightIntensityPixelArrayKrang.SlowLightIntensityScreenKrang.SlowLightTraitKrang.ThermalSynchrotronKrang.GtKrang.GθKrang.GϕKrang.I0_infKrang.I1_inf_m_I0_termsKrang.I2_inf_m_I0_termsKrang.Im_inf_m_I0_termsKrang.Ip_inf_m_I0_termsKrang.IrKrang.Ir_infKrang.Ir_sKrang.ItKrang.It_infKrang.It_w_I0_termsKrang.IϕKrang.Iϕ_infKrang.Iϕ_w_I0_termsKrang.S1Krang.S2Krang._Gθ_setupKrang._Gθ_subimageKrang._GϕtKrang._absGθo_GθhatKrang._accumulateKrang._emission_coordinatesKrang._intensity_pixel_typeKrang._intersectionKrang._isreal2Krang._slow_light_intensity_pixel_typeKrang._θsKrang.absGto_GthatKrang.absGθo_GθhatKrang.absGϕo_GϕhatKrang.blackbodyKrang.boyer_lindquist_to_quasi_cartesian_kerr_schildKrang.boyer_lindquist_to_quasi_cartesian_kerr_schild_fast_lightKrang.emission_azimuthKrang.emission_coordinatesKrang.emission_coordinates_fast_lightKrang.emission_inclinationKrang.emission_radiusKrang.get_radial_rootsKrang.horizonKrang.inclinationKrang.jac_bl_d_zamo_uKrang.jac_bl_u_zamo_dKrang.jac_fluid_u_zamo_dKrang.jac_zamo_d_bl_uKrang.jac_zamo_u_bl_dKrang.lightTraitKrang.metricKrang.metric_ddKrang.metric_uuKrang.mino_timeKrang.p_bl_dKrang.p_zamo_uKrang.penrose_walkerKrang.r_potentialKrang.radial_inf_integrals_case2Krang.radial_inf_integrals_case3Krang.radial_inf_integrals_case4Krang.radial_inf_integrals_m_I0_termsKrang.radial_integralsKrang.radial_w_I0_terms_integrals_case2Krang.radial_w_I0_terms_integrals_case3Krang.radial_w_I0_terms_integrals_case4Krang.regularizedS1Krang.regularizedS2Krang.regularized_PiKrang.regularized_R1Krang.regularized_R2Krang.rootsKrang.screen_coordinateKrang.screen_polarizationKrang.symmetryTraitKrang.synchrotronIntensityKrang.synchrotronPolarizationKrang.synchrotron_emission_frameKrang.thermalSynchrotronIntensityKrang.thermal_synchrotron_shapeKrang.total_mino_timeKrang.αKrang.αboundaryKrang.βKrang.βboundaryKrang.ηKrang.θ_potentialKrang.λ
Raytracing Functions
Krang.emission_radius Function
emission_radius(
pix::Krang.AbstractPixel,
θs,
isindir,
n
) -> Tuple{Any, Any, Any, Any, Bool}Emission radius for point originating at inclination θs whose nth order image appears at the screen coordinate (α, β). Returns 0 if the emission coordinates do not exist for that screen coordinate.
Arguments
pix: Pixel informationθs: Emission inclinationisindir: Is emission to observer direct or indirectn: Image index
emission_radius(
pix::Krang.AbstractPixel,
cache::Krang.AngularCache{T},
isindir,
n
) -> Tuple{Any, Any, Any, Any, Bool}emission_radius for a sub-image of a cone.
Identical to emission_radius(pix, cache.θs, isindir, n), but it reads Gθs, Gθo and Ĝθ out of the Krang.AngularCache.
Arguments
pix: Pixel informationcache: The angular solve for this ray and emission inclinationisindir: Is emission to observer direct or indirectn: Image index
emission_radius(
pix::Krang.AbstractPixel,
τ
) -> Tuple{Any, Any, Any, Bool}Emission radius for point originating at at Mino time τ whose image appears at the screen coordinate (α, β). Returns 0 if the emission coordinates do not exist for that screen coordinate.
Arguments
-pix : Pixel information
τ: Mino time
Krang.emission_inclination Function
emission_inclination(
pix::Krang.AbstractPixel,
rs,
νr
) -> NTuple{6, Any}Emission inclination for a point originating at radius rs whose image appears at screen coordinate (α, β).
Arguments
pix: Pixel informationrs: Emission radiusνr: Sign of radial velocity direction at emission. This is always positive for case 3 and case 4 geodesics.
emission_inclination(
pix::Krang.AbstractPixel,
τ
) -> NTuple{6, Any}Emission inclination for point at Mino time τ whose image appears at screen coordinate (α, β).
Arguments
pix: Pixel informationτ: Mino Time
Krang.emission_coordinates_fast_light Function
emission_coordinates_fast_light(
pix::Krang.AbstractPixel,
θs,
isindir,
n
) -> Tuple{Any, Any, Any, Any, Bool}Emission radius and azimuthal angle for point originating at inclination θs whose nth order image appears at the screen coordinate (α, β) for an observer located at inclination θo.
Arguments
pix: Pixel informationθs: Emission Inclinationisindir: Whether emission to observer is direct or indirectn: Image index
emission_coordinates_fast_light(
pix::Krang.AbstractPixel,
cache::Krang.AngularCache{T},
isindir,
n
) -> Tuple{Any, Any, Any, Any, Bool}emission_coordinates_fast_light for a sub-image of a cone.
Identical to emission_coordinates_fast_light(pix, cache.θs, isindir, n), but it reads Gθs, Gθo and Ĝθ out of the Krang.AngularCache.
Arguments
pix: Pixel informationcache: The angular solve for this ray and emission inclinationisindir: Is emission to observer direct or indirectn: Image index
emission_coordinates_fast_light(
pix::Krang.AbstractPixel,
τ
) -> Tuple{Any, Any, Any, Any, Any, Bool}Ray trace a point that appears at the screen coordinate (α, β) for an observer located at inclination θo
Arguments
pix: Pixel informationτ: Mino Time
Krang.emission_coordinates Function
emission_coordinates(
pix::Krang.AbstractPixel,
θs,
isindir,
n
) -> Tuple{Any, Any, Any, Any, Any, Bool}Emission radius and azimuthal angle for point originating at inclination θs whose nth order image appears at the screen coordinate (α, β) for an observer located at inclination θo.
Arguments
pix: Pixel informationθs: Emission Inclinationisindir: Whether emission to observer is direct or indirectn: Image index
emission_coordinates(
pix::Krang.AbstractPixel,
cache::Krang.AngularCache{T},
isindir,
n
) -> Tuple{Any, Any, Any, Any, Any, Bool}emission_coordinates for a sub-image of a cone.
Identical to emission_coordinates(pix, θs, isindir, n), but it reads Gθs, Gθo and Ĝθ out of the Krang.AngularCache.
Arguments
pix: Pixel informationcache: The angular solve for this ray and emission inclinationisindir: Whether emission to observer is direct or indirectn: Image index
emission_coordinates(
pix::Krang.AbstractPixel,
τ
) -> Tuple{Any, Any, Any, Any, Any, Any, Bool}Ray trace a point that appears at the screen coordinate (α, β) for an observer located at inclination θo
Arguments
pix: Pixel informationτ: Mino Time
Krang.mino_time Function
mino_time(pix, rs, νr) -> AnyMino time of trajectory between an observer at infinity and point at radius rs
Arguments
pix: Pixel informationrs: Emission radiusνr: Sign of the radial velocity at emission.
mino_time(pix::Krang.AbstractPixel, θs, isindir, n) -> AnyMino time of trajectory between two inclinations for a given screen coordinate
Arguments
pix: Pixel informationθs: Emission inclinationisindir: Is the path direct or indirect?n: nth image in orde of amount of minotime traversed
Metric Functions
Krang.Kerr Type
struct Kerr{T} <: Krang.AbstractMetricKerr Metric in Boyer Lindquist Coordinates
mass: M = massspin: a = J/M, where J is the angular momentum and M is the mass of the black hole.
Krang.metric_uu Function
metric_uu(metric::Krang.AbstractMetric, args...) -> AnyReturns the inverse metric in some representation (usually as an nxn matrix).
sourcemetric_uu(metric::Kerr{T}, r, θ) -> AnyInverse Kerr metric in Boyer Lindquist (BL) coordinates.
sourcemetric_uu(metric::Kerr{T}, coordinates) -> AnyInverse Kerr metric in Boyer Lindquist (BL) coordinates.
Arguments
metric: Kerr metriccoordinates: Coordinates (t, r, θ, ϕ)
Krang.metric_dd Function
metric_dd(metric::Krang.AbstractMetric, args...) -> AnyReturns the metric in some representation (usually as an nxn matrix).
sourcemetric_dd(metric::Kerr{T}, r, θ) -> AnyKerr metric in Boyer Lindquist (BL) coordinates.
sourcemetric_dd(metric::Kerr{T}, coordinates) -> AnyKerr metric in Boyer Lindquist (BL) coordinates.
Arguments
metric: Kerr metriccoordinates: Coordinates (t, r, θ, ϕ)
Krang.λ Function
λ(pix::Krang.AbstractPixel) -> Anyλ(pix::AbstractPixel)Calculate the λ value for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The λ value of the pixel.
λ(_::Kerr, α, θo) -> AnyEnergy reduced azimuthal angular momentum
Arguments
metric: Kerrα: Horizontal Bardeen screen coordinateθo: Observer inclination
Krang.η Function
η(pix::Krang.AbstractPixel) -> Anyη(pix::AbstractPixel)Calculate the η value for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The η value of the pixel.
η(metric::Kerr, α, β, θo) -> AnyEnergy reduced Carter integral
Arguments
metric: Kerrα: Horizontal Bardeen screen coordinateβ: Bardeen vertical coordinateθo: Observer inclination
Radial Integrals
Krang.r_potential Function
r_potential(metric::Kerr, η, λ, r) -> AnyRadial potential of spacetime
Arguments
metric: Kerr{T} metricη: Reduced Carter constantλ: Reduced azimuthal angular momentumr: Boyer Lindquist radius
Krang.get_radial_roots Function
get_radial_roots(metric::Kerr{T}, η, λ) -> NTuple{4, Any}Returns roots of
Arguments
metric: Kerr{T} metricη: Reduced Carter constantλ: Reduced azimuthal angular momentum
Krang.Ir Function
Ir(pix::Krang.AbstractPixel, νr::Bool, rs) -> AnyReturns the antiderivative r_potential(x) for an implementation of
Arguments
pix: Pixel informationνr: Sign of radial velocity direction at emission. This is always positive for case 3 and case 4 geodesics.rs: Emission radius
Angular Integrals
Krang.θ_potential Function
θ_potential(metric::Kerr, η, λ, θ) -> AnyTheta potential of a Kerr black hole
Arguments
metric: Kerr{T} metricη: Reduced Carter constantλ: Reduced azimuthal angular momentumθ: Boyer Lindquist inclination
Krang.Gθ Function
Gθ(
pix::Krang.AbstractPixel,
θs,
isindir,
n
) -> Tuple{Any, Any, Any, Any, Bool, Bool}Returns the antiderivative θ_potential(x) for an implementation of
Arguments
pix: Pixel informationθs: Emission inclinationisindir: Is the path direct or indirect?n: nth image ordered by minotime
Krang._Gθ_setup Function
_Gθ_setup(
met::Kerr,
θo,
ηtemp,
λtemp,
Go,
Ghat,
θs
) -> Tuple{Any, Any, Any, Bool, Any, Bool}The part of Gθ that does not depend on the sub-image index n.
Returns (Gθs, Gθo, Ĝθ, isvortical, isincone, issuccess), with Gθo carrying the sign the vortical geodesic branch gives it. issuccess is false when the ray never reaches θs.
Arguments
met: Kerr metricθo: Observer inclinationηtemp,λtemp: Reduced Carter constant and azimuthal angular momentumGo,Ghat: The cached pair fromKrang.absGθo_Gθhatθs: Emission inclination
Krang._Gθ_subimage Function
_Gθ_subimage(
setup,
signβ,
θo,
θs,
isindir,
n
) -> Tuple{Any, Any, Any, Any, Any, Bool}Gθ for one sub-image
Krang.Gϕ Function
Gϕ(
pix::Krang.AbstractPixel,
θs,
isindir,
n
) -> Tuple{Any, Any, Any, Any, Any, Bool}Returns the antiderivative Gθ. See θ_potential(x) for an implementation of
Returns (Gϕ, Gs, Go, Ghat, isvortical, issuccess). When both this and Gt are wanted at the same inclination, Krang._Gϕt computes the shared angular setup once.
Arguments
pix: Pixel informationθs: Emission inclinationisindir: Is the path direct or indirect?n: nth image ordered by minotime
Krang.Gt Function
Gt(
pix::Krang.AbstractPixel,
θs,
isindir,
n
) -> Tuple{Any, Any, Any, Any, Any, Bool}Returns the antiderivative Gθ. See θ_potential(x) for an implementation of
Returns (Gt, Gs, Go, Ghat, isvortical, issuccess). When both this and Gϕ are wanted at the same inclination, Krang._Gϕt computes the shared angular setup once.
Arguments
pix: Pixel informationθs: Emission inclinationisindir: Is the path direct or indirect?n: nth image ordered by minotime
Krang._Gϕt Function
_Gϕt(
pix::Krang.AbstractPixel,
θs,
isindir,
n
) -> Tuple{Any, Any, Bool}Returns (Gϕ, Gt, issuccess): the ϕ and t angular antiderivatives of Gϕ and Gt for the same emission inclination.
Both share the whole angular setup — η, λ, the turning points up/um, the modulus k and the amplitude asin(args) — and differ only in which elliptic integral they evaluate at that amplitude. The emission_coordinates methods always want both, so computing the setup once avoids doing it twice. Results are bit-identical to calling Gϕ and Gt separately.
Krang._θs Function
_θs(
metric::Kerr{T},
signβ,
θo,
η,
λ,
τ,
Go,
Ghat
) -> NTuple{6, Any}_θs(metric, signβ, θo, η, λ, τ, Go, Ghat)Emission inclination at Mino time τ, with the angular antiderivative pair (Go, Ghat) =_absGθo_Gθhat` supplied by the caller.
Krang._absGθo_Gθhat Function
_absGθo_Gθhat(metric::Kerr{T}, θo, η, λ) -> Tuple{Any, Any}Returns (|Gθo|, Ĝθ): the magnitude of the Gθ antiderivative evaluated at the observer inclination, and the half-period Ĝθ between angular turning points.
Both depend only on the metric, θo, η and λ, so they are constant along a ray and are cached on the pixel – see Krang.absGθo_Gθhat for the accessor. Every sub-image index n reuses the same pair, which is what makes the angular inversion cheap.
Screen Coordinates
Krang.α Function
α(_::Kerr, λ, θo) -> AnyHorizontal Bardeen Screen Coordinate
Arguments
metric: Kerrα: Horizontal Bardeen screen coordinateθo: Observer inclination
Krang.β Function
β(metric::Kerr, λ, η, θo) -> AnyVertical Bardeen Screen Coordinate
Arguments
metric: Kerrλ: Energy-reduced azimuthal angular momentumη: Energy reduced Carter integralθo: Observer inclination
Krang.αboundary Function
αboundary(metric::Kerr, θs) -> AnyDefines a horizontal boundary on the assymptotic observer's screen that emission that from θs must fall within.
Arguments
metric: Kerr metricθs: Emission Inclination
Krang.βboundary Function
βboundary(metric::Kerr, α, θo, θs) -> AnyDefines a vertical boundary on the assymptotic observer's screen that emission that from θs must fall within.
Arguments
metric: Kerr{T} metricα: Horizontal Bardeen screen coordinateθo: Observer inclinationθs: Emission Inclination
Local Frame transformations
Krang.p_bl_d Function
p_bl_d(
metric::Kerr{T},
r,
θ,
η,
λ,
νr::Bool,
νθ::Bool
) -> AnyReturns the momentum form in the Boyer-Lindquist basis.Krang.jac_bl_u_zamo_d Function
jac_bl_u_zamo_d(metric::Kerr{T}, r, θ) -> AnyReturns the tetrad that takes the ZAMO vector to the Boyer-Lindquist basis.
The tetrad is:
√(A/(ΣΔ)) 0 0 0
0 √(Δ/Σ) 0 0
0 0 0 -1/√Σ
2ar/√(ΣΔA) 0 √(Σ/A)csc(θ) 0jac_bl_u_zamo_d(metric::Kerr{T}, r, θ, v_u) -> AnyReturns the ZAMO vector in the Boyer-Lindquist basis.
Applies the tetrad above without forming it.
sourceKrang.jac_zamo_u_bl_d Function
jac_zamo_u_bl_d(metric::Kerr{T}, r, θ) -> AnyReturns the tetrad that transforms the Boyer-Lindquist vector to the ZAMO basis.
The tetrad is (Eq 3.2 1972ApJ...178..347B):
√((ΣΔ)/A) 0 0 0
0 √(Σ/Δ) 0 0
-(2ar sin(θ))/√(AΣ) 0 0 √(A/Σ)sin(θ)
0 0 -√Σ 0jac_zamo_u_bl_d(metric::Kerr{T}, r, θ, v_u) -> AnyTransforms the Boyer-Lindquist vector to the ZAMO basis.
Applies the tetrad above without forming it.
sourceKrang.jac_bl_d_zamo_u Function
jac_bl_d_zamo_u(metric::Kerr{T}, r, θ) -> AnyReturns the tetrad that takes the ZAMO covector to the Boyer-Lindquist basis.
The tetrad is:
√((ΣΔ)/A) 0 -2ar sin(θ)/√(AΣ) 0
0 √(Σ/Δ) 0 0
0 0 0 -√Σ
0 0 √(A/Σ)sin(θ) 0jac_bl_d_zamo_u(metric::Kerr{T}, r, θ, v_d) -> AnyReturns the ZAMO covector in the Boyer-Lindquist basis.
Applies the tetrad above without forming it.
sourceKrang.jac_zamo_d_bl_u Function
jac_zamo_d_bl_u(metric::Kerr{T}, r, θ) -> AnyReturns the tetrad that transforms the Boyer-Lindquist covector to the ZAMO basis.
The tetrad is (Eq 3.1 1972ApJ...178..347B):
√(A/(ΣΔ)) 0 0 2ar/√(AΔΣ)
0 √(Δ/Σ) 0 0
0 0 0 √(Σ/A)csc(θ)
0 0 -1/√Σ 0jac_zamo_d_bl_u(metric::Kerr{T}, r, θ, v_d) -> AnyTransforms the Boyer-Lindquist covector to the ZAMO basis.
Applies the tetrad above without forming it.
sourceKrang.jac_fluid_u_zamo_d Function
jac_fluid_u_zamo_d(_::Kerr{T}, β, θ, φ) -> AnyReturns the Jacobian that takes the ZAMO vector into the frame of a fluid moving with speed β along the direction (θ, φ). Pass -β for the inverse boost.
The Jacobian is:
γ -βγcosφsinθ -βγsinφsinθ -βγcosθ
-βγcosφsinθ cos²θcos²φ+γcos²φsin²θ+sin²φ (γ-1)cosφsin²θsinφ (γ-1)cosθcosφsinθ
-βγsinθsinφ (γ-1)cosφsin²θsinφ cos²φ+(cos²θ+γsin²θ)sin²φ (γ-1)cosθsinθsinφ
-βγcosθ (γ-1)cosθcosφsinθ (γ-1)cosθsinθsinφ γcos²θ+sin²θjac_fluid_u_zamo_d(_::Kerr{T}, β, θ, φ, v_u) -> AnyReturns the ZAMO vector in the frame of a fluid moving with speed β along the direction (θ, φ). Pass -β for the inverse boost.
Applies the Jacobian above without forming it. Its spatial block is δᵢⱼ + (γ-1)n̂ᵢn̂ⱼ for n̂ = (sin(θ)cos(φ), sin(θ)sin(φ), cos(θ)), so the product is the boost γ(vᵗ - β n̂⋅v⃗), v⃗ + ((γ-1)n̂⋅v⃗ - γβvᵗ)n̂.
Krang.p_zamo_u Function
p_zamo_u(
metric::Kerr{T},
r,
θ,
η,
λ,
νr::Bool,
νθ::Bool
) -> AnyReturns the photon momentum in the ZAMO basis.
Composes p_bl_d, metric_uu and jac_zamo_u_bl_d. The frame-dragging term the metric puts into p^ϕ is the one the tetrad subtracts off again, so the composition is:
p^t̂ = (1 - ωλ)/α
p^r̂ = ±√R/√(ΣΔ)
p^ϕ̂ = λ/ϖ
p^θ̂ = ∓√Θ/√Σwith lapse α = √(ΣΔ/A), frame-dragging rate ω = 2ar/A and cylindrical radius ϖ = sin(θ)√(A/Σ).
Polarization
Krang.screen_polarization Function
screen_polarization(
metric::Kerr{T},
κ::Complex,
θ,
α,
β
) -> Tuple{Any, Any}Returns the screen polarization associated with a killing spinor κ as seen seen by an asymptotic observer.
sourceKrang.penrose_walker Function
penrose_walker(
metric::Kerr{T},
r,
θ,
p_u::AbstractVector,
f_u::AbstractVector
) -> Tuple{Any, Any}Returns the Penrose walker constant for a photon with momentum p_u emitted from a fluid particle with momentum f_u.
sourceKrang.synchrotronIntensity Function
synchrotronIntensity(
metric::Kerr{T},
α,
β,
ri,
θs,
θo,
magnetic_field::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
βfluid::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
νr::Bool,
θsign::Bool
) -> Tuple{Any, Any, Any}Calculates the intensity of a photon emitted from a fluid particle with momentum f_u and observed by an asymptotic observer.
sourceKrang.synchrotronPolarization Function
synchrotronPolarization(
metric::Kerr{T},
α,
β,
ri,
θs,
θo,
magnetic_field::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
βfluid::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
νr::Bool,
θsign::Bool
) -> NTuple{4, Any}Calculates the polarization of a photon emitted from a fluid particle with momentum f_u and observed by an asymptotic observer.
sourceKrang.synchrotron_emission_frame Function
synchrotron_emission_frame(
metric::Kerr{T},
α,
β,
ri,
θs,
θo,
magnetic_field::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
βfluid::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
νr::Bool,
θsign::Bool
) -> NTuple{4, Any}Returns the photon momentum and synchrotron emission vector in the fluid frame, shared by Krang.synchrotronIntensity and Krang.synchrotronPolarization.
Returns (p_zamo_u, p_fluid_u, vec, norm), where vec = p̂_fluid × B and norm = |vec| + eps(T).
Krang.thermalSynchrotronIntensity Function
thermalSynchrotronIntensity(
metric::Kerr{T},
α,
β,
ri,
θs,
θo,
magnetic_field::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
βfluid::StaticArraysCore.SArray{Tuple{3}, T, 1, 3},
νr::Bool,
θsign::Bool,
ν,
n_th,
temperature,
rg
) -> Tuple{Any, Any}Emissivity, source function and optical depth of a Krang.ThermalSynchrotron slab at the emission point of a ray.
Returns (g³Bν, τ) in SI units: the source function redshifted to the observer, and the optical depth of the slab. The emissivity carries an extra factor of c, which is what makes τ = jν/Bν * ℓ/c dimensionless.
Arguments
metric: Kerr metricα,β: Bardeen screen coordinatesri,θs: Emission radius and inclinationθo: Observer inclinationmagnetic_field: Magnetic field at the emission radius, in Gaussβfluid: Fluid velocity(speed, inclination, azimuth)νr,θsign: Signs of the radial and polar momenta at emissionν: Observed frequency, in Hzn_th: Number density at the emission radius, in m⁻³temperature: Electron temperature at the emission radius, in Krg: Gravitational radiusGM/c², in metres
Krang.thermal_synchrotron_shape Function
thermal_synchrotron_shape(x) -> AnyAnalytic approximation to the thermal synchrotron integral, eq. A18 of Dexter (2016); the fit is originally that of Mahadevan, Narayan & Yi (1996), who quote a maximum error of 0.0036. It stands in for x > 1.
Arguments
x: Frequency in units of the critical frequency,ν/ν_c
Krang.blackbody Function
blackbody(ν, temperature) -> AnyPlanck function
Arguments
ν: Frequency in Hztemperature: Temperature in K
Meshes, Geometries and Materials
Krang.Mesh Type
struct Mesh{G<:Krang.AbstractGeometry, M<:Krang.AbstractMaterial}Pairs an AbstractGeometry with the AbstractMaterial that emits on it. A Scene is a tuple of these, and rendering sums each mesh's contribution to every pixel.
Krang.MeshGeometry Type
MeshGeometry(mesh::GeometryBasics.Mesh)Wrap a GeometryBasics.Mesh for ray tracing.
Krang.AbstractLevelSetGeometry Type
AbstractLevelSetGeometry{T}Abstract geometry represented by a functor geometry(x, y, z) whose zero set defines a surface in quasi-Cartesian Kerr-Schild coordinates.
Krang.ElectronSynchrotronPowerLawIntensity Type
struct ElectronSynchrotronPowerLawIntensity{N, T} <: Krang.AbstractMaterialA struct representing the linear polarization intensity of synchrotron radiation from electrons following a power-law energy distribution. This model is based on the material described in https://doi.org/10.3847/1538-4357/abf117.
Fields
- `magnetic_field::SVector{3, T}`: The magnetic field vector components (x, y, z).
- `fluid_velocity::SVector{3, T}`: The fluid velocity vector components (speed, inclination angle, azimuthal angle).
- `spectral_index::T`: The spectral index of the electron energy distribution.
- `R::T`: The characteristic radius of the emissivity profile.
- `p1::T`: The first power-law index.
- `p2::T`: The second power-law index.
- `subimgs::NTuple{N, Int}`: The sub-images to ray trace.Krang.ElectronSynchrotronPowerLawPolarization Type
struct ElectronSynchrotronPowerLawPolarization{N, T} <: Krang.AbstractMaterialA struct representing the linear polarization of synchrotron radiation from electrons following a power-law energy distribution. This model is based on the material described in https://doi.org/10.3847/1538-4357/abf117.
Fields
- `magnetic_field::SVector{3, T}`: The magnetic field vector components (x, y, z).
- `fluid_velocity::SVector{3, T}`: The fluid velocity vector components (speed, inclination angle, azimuthal angle).
- `spectral_index::T`: The spectral index of the electron energy distribution.
- `R::T`: The characteristic radius of the emissivity profile.
- `p1::T`: The first power-law index.
- `p2::T`: The second power-law index.
- `subimgs::NTuple{N, Int}`: The sub-images to ray trace.Krang.ThermalSynchrotron Type
struct ThermalSynchrotron{N, T} <: Krang.AbstractMaterialA synchrotron emitting disk of thermal (Maxwell-Jüttner) electrons whose density, temperature and magnetic field each follow a power law in radius. Emission is absorbed on its way out, so the material returns a Krang.AbsorptiveIntensity and render performs the radiative transfer across sub-images.
Follows the model of Desire, Cárdenas-Avendaño & Chael (2025) (their eqs. 13-14), with the thermal synchrotron integral replaced by the Krang.thermal_synchrotron_shape approximation,
with absorption set by Kirchhoff's law,
The emissivity is evaluated at the observed frequency and the result is redshifted by
Radii are in gravitational radii and rg is specified in metres. Every other quantity is SI except for the magnetic field, which is in Gauss.
Fields
- `magnetic_field::SVector{3, T}`: Magnetic field vector `(x, y, z)` at `rb`, in Gauss.
- `fluid_velocity::SVector{3, T}`: Fluid velocity `(speed, inclination, azimuth)`.
- `p_dens::T`: Power-law index of the number density.
- `p_temp::T`: Power-law index of the electron temperature.
- `p_b::T`: Power-law index of the magnetic field magnitude.
- `n_th0::T`: Number density at `rb`, in m⁻³.
- `t_e0::T`: Electron temperature at `rb`, in K.
- `rb::T`: Reference radius, in gravitational radii.
- `ν::T`: Observed frequency, in Hz.
- `rg::T`: Gravitational radius `GM/c²`, in metres.
- `subimgs::NTuple{N, Int}`: The sub-images to ray trace.Material Traits
These pick the emission-coordinate call a material needs; see examples/custom-material-example.jl for how a custom material sets them.
Krang.AbstractLightTrait Type
abstract type AbstractLightTraitTrait that selects whether a material needs the coordinate time of emission. SlowLightTrait materials get the full ts from emission_coordinates; FastLightTrait materials skip it, and ts is reported as zero.
Krang.FastLightTrait Type
struct FastLightTrait <: Krang.AbstractLightTraitMaterial does not use the emission time, so the time integrals are skipped.
sourceKrang.SlowLightTrait Type
struct SlowLightTrait <: Krang.AbstractLightTraitMaterial depends on the emission time, so ts is computed.
Krang.lightTrait Function
lightTrait(
_::Krang.AbstractMaterial
) -> Krang.FastLightTraitlightTrait(material::AbstractMaterial)Return the AbstractLightTrait of material. Defaults to SlowLightTrait; materials that do not need the emission time should define
Krang.lightTrait(::MyMaterial) = Krang.FastLightTrait()Krang.AbstractSymmetryTrait Type
abstract type AbstractSymmetryTraitTrait that selects which emission-coordinate call a material needs. Materials whose emissivity does not depend on the emission azimuth ϕs are AxisymmetricTrait and only need the (cheaper) emission radius; everything else is NonAxisymmetricTrait.
Krang.AxisymmetricTrait Type
struct AxisymmetricTrait <: Krang.AbstractSymmetryTraitMaterial is axisymmetric: ϕs is not needed, so only the emission radius is computed.
Krang.NonAxisymmetricTrait Type
struct NonAxisymmetricTrait <: Krang.AbstractSymmetryTraitMaterial depends on the emission azimuth, so related quantities are computed.
sourceKrang.symmetryTrait Function
symmetryTrait(
_::Krang.AbstractMaterial
) -> Krang.AxisymmetricTraitsymmetryTrait(material::AbstractMaterial)Return the AbstractSymmetryTrait of material. Defaults to NonAxisymmetricTrait; axisymmetric materials should define
Krang.symmetryTrait(::MyMaterial) = Krang.AxisymmetricTrait()Krang.AbsorptiveIntensity Type
struct AbsorptiveIntensity{T}An intensity carried along a ray together with the optical depth accumulated with it.
Fields
I::Any: Intensity accumulated so farτ::Any: Optical depth accumulated so far
Krang._accumulate Function
_accumulate(
observation,
contribution
) -> Krang.AbsorptiveIntensity_accumulate(observation, contribution)Add contribution to what a ray has already picked up.
I += exp(-τ) * I_new
τ += τ_newKrang._intersection Function
_intersection(
_::Krang.FastLightTrait,
_::Krang.AxisymmetricTrait,
pix,
θs,
isindir,
n
) -> Tuple{Krang.Intersection, Bool}_intersection(::AbstractLightTrait, ::AbstractSymmetryTrait, pix, θs, isindir, n)
_intersection(::AbstractLightTrait, ::AbstractSymmetryTrait, pix, cache::AngularCache, isindir, n)Emission coordinates on the θs cone, dispatching on the material's AbstractLightTrait and AbstractSymmetryTrait. Fast-light materials skip the emission time and axisymmetric ones also skip the emission azimuth; skipped coordinates are reported as zero. The second form takes the sub-image independent part of the angular solve from a Krang.AngularCache rather than recomputing it.
Krang.AngularCache Type
struct AngularCache{T}The angular solve of a ray that is shared by all sub-images at a given θs.
Fields
θs::Any: Emission inclination this cache was built forGθs::Any: Theθsangular antiderivativeGθo::Any:|Gθo|, carrying the sign the vortical branch gives itGθhat::Any: Half periodĜθbetween angular turning pointsisvortical::Bool: Whether the ray is vortical (η < 0)isincone::Bool:|cos θs| < |cos θo|, the testGθbranches onβreject::Bool: Whether the screen boundary rejects this ray; only computed for aθsoutside the observer's cone, the one case a caller reads itissuccess::Bool: Whether the ray reachesθsat all
Pixel Related Functions
Krang.absGθo_Gθhat Function
absGθo_Gθhat(
pix::Krang.AbstractPixel
) -> Tuple{T6, T6} where T6absGθo_Gθhat(pix::AbstractPixel)Calculate the pair (|Gθo|, Gθhat) for a given pixel: the angular antiderivative at the observer, and the same antiderivative over a half orbit. The two names are the two returned quantities, not a quotient.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The 2-tuple
(|Gθo|, Gθhat)of the pixel.
Krang.I1_inf_m_I0_terms Function
I1_inf_m_I0_terms(pix::Krang.AbstractPixel) -> AnyI1_inf_m_I0_terms(pix::AbstractPixel)Calculate the I1 infinity minus I0 terms for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The I1 infinity minus I0 terms of the pixel.
Krang.radial_inf_integrals_m_I0_terms Function
radial_inf_integrals_m_I0_terms(
pix::Krang.AbstractPixel
) -> NTuple{4, Any}radial_inf_integrals_m_I0_terms(pix::AbstractPixel)Calculate the radial infinity minus I0 terms for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The radial infinity minus I0 terms of the pixel.
Krang.inclination Function
inclination(pix::Krang.AbstractPixel) -> Anyinclination(pix::AbstractPixel)Get the inclination angle (θo) of a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The inclination angle (θo) of the pixel.
Krang.metric Function
metric(pix::Krang.AbstractPixel) -> Anymetric(pix::AbstractPixel)Get the space time metric.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The space time metric
Krang.absGto_Gthat Function
absGto_Gthat(
pix::Krang.AbstractPixel
) -> Tuple{T14, T14} where T14absGto_Gthat(pix::AbstractPixel)Calculate the pair (|Gto|, Gthat) for a given pixel: the angular antiderivative at the observer, and the same antiderivative over a half orbit. The two names are the two returned quantities, not a quotient.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The 2-tuple
(|Gto|, Gthat)of the pixel.
Krang.screen_coordinate Function
screen_coordinate(
pix::Krang.AbstractPixel
) -> Tuple{T2, T2} where T2screen_coordinate(pix::AbstractPixel)Get the screen coordinates of a given pixel.
Arguments
pix::AbstractPixel: The pixel for which to get the screen coordinates.
Returns
- The screen coordinates of the pixel.
Krang.Ip_inf_m_I0_terms Function
Ip_inf_m_I0_terms(pix::Krang.AbstractPixel) -> AnyIp_inf_m_I0_terms(pix::AbstractPixel)Calculate the Ip infinity minus I0 terms for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The Ip infinity minus I0 terms of the pixel.
Krang.I2_inf_m_I0_terms Function
I2_inf_m_I0_terms(pix::Krang.AbstractPixel) -> AnyI2_inf_m_I0_terms(pix::AbstractPixel)Calculate the I2 infinity minus I0 terms for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The I2 infinity minus I0 terms of the pixel.
Krang.roots Function
roots(pix::Krang.AbstractPixel) -> NTuple{4, T3} where T3roots(pix::AbstractPixel)Calculate the radial roots for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The radial roots of the pixel.
Krang.Im_inf_m_I0_terms Function
Im_inf_m_I0_terms(pix::Krang.AbstractPixel) -> AnyIm_inf_m_I0_terms(pix::AbstractPixel)Calculate the Im infinity minus I0 terms for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The Im infinity minus I0 terms of the pixel.
Krang.absGϕo_Gϕhat Function
absGϕo_Gϕhat(
pix::Krang.AbstractPixel
) -> Tuple{T13, T13} where T13absGϕo_Gϕhat(pix::AbstractPixel)Calculate the pair (|Gϕo|, Gϕhat) for a given pixel: the angular antiderivative at the observer, and the same antiderivative over a half orbit. The two names are the two returned quantities, not a quotient.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The 2-tuple
(|Gϕo|, Gϕhat)of the pixel.
Krang.I0_inf Function
I0_inf(pix::Krang.AbstractPixel) -> AnyI0_inf(pix::AbstractPixel)Calculate the I0 infinity value for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The I0 infinity value of the pixel.
Krang.total_mino_time Function
total_mino_time(pix::Krang.AbstractPixel) -> Anytotal_mino_time(pix::AbstractPixel)Return the total possible Mino time for a ray associated with a pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The total possible Mino time for a ray associated with the pixel.
total_mino_time(
metric::Kerr{T},
roots::NTuple{4, T} where T
) -> AnyReturns the maximum mino time that can be accrued along a ray.
Arguments
metric: Kerr metricroots: Roots of the radial potential
Misc
Krang._isreal2 Function
_isreal2(num) -> AnyChecks if a complex number is real to within √eps of its own magnitude (or √eps absolute, whichever is larger).
sourceKrang.regularized_Pi Function
regularized_Pi(n, ϕ, k) -> AnyRegularized elliptic integral of the third kind
Arguments
n: Parameterϕ: Argumentsk: Parameter
regularized_Pi(n, ϕ, k, Fϕ) -> Anyregularized_Pi with F(ϕ|k) supplied by the caller.
Inside one radial-integral case every elliptic integral is evaluated at the same amplitude and modulus, so F(ϕ, k) comes up several times with identical arguments — five times in case 4, twice in case 3. Threading the value through computes it once. The _*_at_F variants below exist for the same reason.
Krang.radial_inf_integrals_case4 Function
radial_inf_integrals_case4(
metric::Kerr{T},
roots::NTuple{4, T} where T
) -> NTuple{4, Any}Returns the radial integrals for the case where there are no real roots in the radial potential
sourceKrang.It_w_I0_terms Function
It_w_I0_terms(
metric::Kerr{T},
rs,
τ,
roots::NTuple{4, T} where T,
λ,
νr
) -> AnyReturns the antiderivative
See r_potential(x) for an implementation of
Arguments
metric: Kerr{T} metricroots: Radial rootsλ: Reduced azimuthal angular momentumνr: Radial emission direction (Only necessary for case 1&2 geodesics)
Krang.Ir_inf Function
Ir_inf(pix::Krang.AbstractPixel) -> AnyIr_inf(pix::AbstractPixel)Calculate the Ir infinity value for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The Ir infinity value of the pixel.
Ir_inf(metric::Kerr{T}, roots) -> AnyReturns the antiderivative r_potential(x) for an implementation of
Arguments
metric: Kerr{T} metricroots: Roots of the radial potential
Krang.emission_azimuth Function
emission_azimuth(
pix::Krang.AbstractPixel,
θs,
rs,
τ,
νr,
isindir,
n
) -> AnyEmission azimuth for point at Mino time τ whose image appears at screen coordinate (α, β).
Arguments
pix: Pixel informationθs: Emission Inclinationrs:Emission radiusτ: Mino Timeνr: Sign of radial velocity direction at emission. This is always positive for case 3 and case 4 geodesics.
emission_azimuth(
pix::Krang.AbstractPixel,
rs,
τ,
νr,
Gϕtemp
) -> AnyEmission azimuth from an already-computed Gϕ.
For callers that already hold Gϕ and would otherwise pay for a second pass through Gϕ, which redoes the whole angular setup.
Arguments
pix: Pixel informationrs: Emission radiusτ: Mino Timeνr: Sign of radial velocity direction at emission. This is always positive for case 3 and case 4 geodesics.Gϕtemp: The ϕ angular antiderivative for this emission inclination
Krang._emission_coordinates Function
_emission_coordinates(
pix::Krang.AbstractPixel,
θs,
τ,
isindir,
n,
isincone
) -> Tuple{Any, Any, Any, Any, Any, Bool}The radial inversion and the t and ϕ integrals of emission_coordinates, once the Mino time of the sub-image is known. Shared by its cached and uncached entry points.
Arguments
pix: Pixel informationθs: Emission Inclinationτ: Mino time of the sub-imageisindir: Whether emission to observer is direct or indirectn: Image indexisincone: Whether|cos θs| < |cos θo|
Krang.ConeGeometry Type
struct ConeGeometry{T, A} <: Krang.AbstractGeometryCone Geometry with half opening angle opening_angle.
Krang.Iϕ Function
Iϕ(pix::Krang.AbstractPixel, rs, τ, νr) -> AnyReturns the antiderivative r_potential(x) for an implementation of
Arguments
pix: SlowLightIntensityPixelrs: Emission radiusτ: Mino timeνr: Sign of radial velocity direction at emission. This is always positive for case 3 and case 4 geodesics.
Krang.SlowLightIntensityCamera Type
struct SlowLightIntensityCamera{S<:Krang.SlowLightIntensityScreen} <: Krang.AbstractCameraCamera that caches slow light raytracing information for an observer sitting at radial infinity. The frame of this observer is alligned with the Boyer-Lindquist frame.
sourceKrang.Iϕ_w_I0_terms Function
Iϕ_w_I0_terms(metric::Kerr{T}, rs, τ, roots, νr, λ) -> AnyReturns the antiderivative
See r_potential(x) for an implementation of
Arguments
metric: Kerr{T} metricτ: Minotimeroots: Radial rootsνr: Radial emission direction (Only necessary for case 1&2 geodesics)λ: Reduced azimuthal angular momentum
Krang.SlowLightIntensityPixel Type
struct SlowLightIntensityPixel{T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17} <: Krang.AbstractPixelSlow Light Intensity Pixel Type. Each Pixel is associated with a single ray, and caches some information about the ray. On top of what an IntensityPixel caches, a slow light pixel also caches the antiderivatives needed to recover the azimuthal angle and the coordinate time of emission.
Krang.Iϕ_inf Function
Iϕ_inf(pix::Krang.AbstractPixel) -> AnyIϕ_inf(pix::AbstractPixel)Calculate the Iϕ infinity terms for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The Iϕ infinity terms of the pixel.
Iϕ_inf(metric::Kerr{T}, roots, λ) -> AnyReturns the antiderivative
See r_potential(x) for an implementation of
Arguments
metric: Kerr{T} metricroots: Radial rootsλ: Reduced azimuthal angular momentum
Krang.radial_inf_integrals_case3 Function
radial_inf_integrals_case3(
metric::Kerr{T},
roots::NTuple{4, T} where T
) -> NTuple{4, Any}Returns the radial integrals for the case where there are two real roots in the radial potential
sourceKrang.radial_w_I0_terms_integrals_case2 Function
radial_w_I0_terms_integrals_case2(
metric::Kerr{T},
rs,
roots::NTuple{4, T} where T,
τ,
νr
) -> TupleReturns the radial integrals for the case where there are four real roots in the radial potential, with roots outside the horizon.
sourceKrang.SlowLightIntensityScreen Type
struct SlowLightIntensityScreen{T, M<:AbstractArray{T, 2}, MC<:AbstractArray{Complex{T}, 2}} <: Krang.AbstractScreenScreen of slow-light pixels, stored as a struct of arrays: one array per cached geodesic invariant rather than one SlowLightIntensityPixel per screen position.
metric and the inclination θo are constant across the screen, so they are held once here instead of being duplicated into every pixel. SlowLightIntensityPixel is lazily constructed when screen.pixels is indexed. This layout is what allows the cached invariants to cross a Reactant.@compile boundary as data.
Krang.radial_w_I0_terms_integrals_case4 Function
radial_w_I0_terms_integrals_case4(
metric::Kerr{T},
rs,
roots::NTuple{4, T} where T,
τ
) -> NTuple{4, Any}Returns the radial integrals for the case where there are no real roots in the radial potential
sourceKrang.radial_integrals Function
radial_integrals(
pix::Krang.AbstractPixel,
rs,
τ,
νr
) -> NTuple{5, Any}Return the radial integrals
pix: SlowLightIntensityPixelrs: Emission radiusτ: Mino timeνr: Sign of radial velocity direction at emission. This is always positive for case 3 and case 4 geodesics.
Krang.IntensityScreen Type
struct IntensityScreen{T, M<:AbstractArray{T, 2}, MC<:AbstractArray{Complex{T}, 2}} <: Krang.AbstractScreenScreen of fast-light pixels, stored as a struct of arrays: one array per cached geodesic invariant rather than one IntensityPixel per screen position.
metric and the inclination θo are constant across the screen, so they are held once here instead of being duplicated into every pixel. IntensityPixel is lazily constructed when screen.pixels is indexed. This layout is what allows the cached invariants to cross a Reactant.@compile boundary as data.
Krang.It Function
It(pix::Krang.AbstractPixel, rs, τ, νr) -> AnyReturns the antiderivative r_potential(x) for an implementation of
Arguments
pix: SlowLightIntensityPixelrs: Emission radiusτ: Mino timeνr: Sign of radial velocity direction at emission. This is always positive for case 3 and case 4 geodesics.
Krang.IntensityPixel Type
struct IntensityPixel{T1, T2, T3, T4, T5, T6, T7, T8, T9} <: Krang.AbstractPixelIntensity Pixel Type. Each Pixel is associated with a single ray, and caches some information about the ray.
sourceKrang.radial_w_I0_terms_integrals_case3 Function
radial_w_I0_terms_integrals_case3(
metric::Kerr{T},
rs,
roots::NTuple{4, T} where T,
τ
) -> NTuple{4, Any}Returns the radial integrals for the case where there are two real roots in the radial potential
sourceKrang.IntensityCamera Type
struct IntensityCamera{S<:Krang.IntensityScreen} <: Krang.AbstractCameraCamera that caches fast light raytracing information for an observer sitting at radial infinity. The frame of this observer is alligned with the Boyer-Lindquist frame.
sourceKrang.Ir_s Function
Ir_s(metric::Kerr{T}, rs, roots, νr) -> AnyReturns the antiderivative r_potential(x) for an implementation of
Arguments
metric: Kerr{T} metricrs: Emission radiusroots: Roots of the radial potentialνr: Radial emission direction (Only necessary for case 1&2 geodesics)
Krang.radial_inf_integrals_case2 Function
radial_inf_integrals_case2(
metric::Kerr{T},
roots::NTuple{4, T} where T
) -> NTuple{4, Any}Returns the radial integrals for the case where there are four real roots in the radial potential, with roots outside the horizon.
sourceKrang.It_inf Function
It_inf(pix::Krang.AbstractPixel) -> AnyIt_inf(pix::AbstractPixel)Calculate the It infinity terms for a given pixel.
Arguments
pix::AbstractPixel: The pixel of a screen.
Returns
- The It infinity terms of the pixel.
It_inf(
metric::Kerr{T},
roots::NTuple{4, T} where T,
λ
) -> AnyReturns the antiderivative
See r_potential(x) for an implementation of
Arguments
metric: Kerr{T} metricroots: Radial rootsλ: Reduced azimuthal angular momentum
Krang.boyer_lindquist_to_quasi_cartesian_kerr_schild Function
boyer_lindquist_to_quasi_cartesian_kerr_schild(
metric::Kerr,
tBL,
rBL,
θBL,
ϕBL
) -> NTuple{4, Any}Transforms from Boyer-Lindquist to Kerr-Schild coordinatesKrang.boyer_lindquist_to_quasi_cartesian_kerr_schild_fast_light Function
boyer_lindquist_to_quasi_cartesian_kerr_schild_fast_light(
metric::Kerr{T},
rBL,
θBL,
ϕBL
) -> AnyTransforms from Boyer-Lindquist to Kerr-Schild coordinates ignoring timeKrang.S1 Function
S1(α, φ, j, Fφ) -> AnyS1 with F(φ|j) supplied by the caller; see regularized_Pi.
Krang.S2 Function
S2(α, φ, j, Fφ, Eφ) -> AnyS2 with (F, E) at (φ, j) from the caller; see regularized_Pi.
Krang.regularizedS1 Function
regularizedS1(α, φ, j, Fφ) -> AnyregularizedS1 with F(φ|j) supplied by the caller; see regularized_Pi.
Krang.regularizedS2 Function
regularizedS2(α, φ, j, S1reg, Fφ, Eφ) -> AnyregularizedS2 with regularizedS1(α, φ, j) supplied by the caller.
regularizedS1 costs three elliptic evaluations, and every caller of regularizedS2 already evaluates it at the same (α, φ, j), so passing it in avoids repeating them.
Krang.regularized_R1 Function
regularized_R1(α, φ, j, Fφ) -> Anyregularized_R1 with F(φ|j) supplied by the caller; see regularized_Pi.
Krang.regularized_R2 Function
regularized_R2(α, φ, j, Fφ, Eφ) -> Anyregularized_R2 with (F, E) at (φ, j) from the caller; see regularized_Pi.
Krang.IntensityPixelArray Type
struct IntensityPixelArray{P, S<:Krang.IntensityScreen} <: AbstractArray{P, 2}Lazy AbstractMatrix{<:IntensityPixel} view over an IntensityScreen. getindex assembles an IntensityPixel from the screen's field arrays, so existing code that iterates, indexes or broadcasts over screen.pixels keeps working unchanged.
Krang.SlowLightIntensityPixelArray Type
struct SlowLightIntensityPixelArray{P, S<:Krang.SlowLightIntensityScreen} <: AbstractArray{P, 2}Lazy AbstractMatrix{<:SlowLightIntensityPixel} view over a SlowLightIntensityScreen. getindex assembles a SlowLightIntensityPixel from the screen's field arrays, so existing code that iterates, indexes or broadcasts over screen.pixels keeps working unchanged.
Krang._intensity_pixel_type Function
_intensity_pixel_type(
_::Type{T}
) -> Type{Krang.IntensityPixel{T, T1, Complex{T2}, T3, T4, T5, T6, T7, T8}} where {T, T1, T2, T3, T4, T5, T6, T7, T8}Concrete IntensityPixel type produced by a screen whose element type is T.
Krang._slow_light_intensity_pixel_type Function
_slow_light_intensity_pixel_type(
_::Type{T}
) -> Type{Krang.SlowLightIntensityPixel{T, T1, Complex{T2}, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16}} where {T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16}Concrete SlowLightIntensityPixel type produced by a screen whose element type is T.