Skip to content

Commit

Permalink
fix: propagate kwards in redshift point function constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
fjebaker committed Apr 16, 2024
1 parent f6fe740 commit 71611b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/metrics/noz-metric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ function _solve_orbit_θ(m, r)
Gradus.Roots.find_zero(_objective, π / 2)
end

function make_circular_velocity_function(m::NoZMetric{T}) where {T}
function make_circular_velocity_function(m::NoZMetric{T}; outer_radius = T(500.0), num_samples::Int = 200) where {T}
isco = Gradus.isco(m)

rs = collect(Grids._geometric_grid(isco, T(500), 200))
rs = collect(Grids._geometric_grid(isco, outer_radius, num_samples))
θs = Gradus._solve_orbit_θ.(m, rs)
interp = Gradus._make_interpolation(rs, θs)
function _velocity_function(r)
Expand Down
4 changes: 2 additions & 2 deletions src/redshift.jl
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,13 @@ end
For a full, annotated derivation of this method, see
[the following blog post](https://fjebaker.github.io/blog/pages/2022-05-plunging-orbits/).
"""
function interpolate_redshift(plunging_interpolation, u::SVector{4,T}) where {T}
function interpolate_redshift(plunging_interpolation, u::SVector{4,T}; kwargs...) where {T}
isco = Gradus.isco(plunging_interpolation.m)
# metric matrix at observer
m_obs = metric(plunging_interpolation.m, u)
# fixed stationary observer velocity
v_obs = SVector{4,T}(1, 0, 0, 0)
circ_velocity_func = make_circular_velocity_function(plunging_interpolation.m)
circ_velocity_func = make_circular_velocity_function(plunging_interpolation.m; kwargs...)
function _interpolate_redshift_closure(m, gp, max_time)
r = _equatorial_project(gp.x)
v_disc = if r < isco
Expand Down

0 comments on commit 71611b5

Please sign in to comment.