Skip to content

Add radial velocity component to the fit_map rotation curve - #38

Open
richteague wants to merge 1 commit into
masterfrom
add-radial-velocity-fit-map
Open

Add radial velocity component to the fit_map rotation curve#38
richteague wants to merge 1 commit into
masterfrom
add-radial-velocity-fit-map

Conversation

@richteague

Copy link
Copy Markdown
Collaborator

Summary

  • vr_100/vr_q were declared in default_parameters.yml with priors but never wired into _make_model, so fit_map had no way to fit a radial (infall/wind) velocity term on top of the rotation curve -- unlike fit_annuli, which already supports this via fit_vrad.
  • Add _vrad(r) (power-law radial velocity), a params['vradial'] flag set from vr_100 is not None, and project/add it into v0 in _make_model alongside the existing rotational, vortex, and vlsr terms.
  • Default behaviour (no vr_100) is unchanged -- verified byte-identical model output.

Test plan

  • New regression test test_make_model_includes_radial_velocity -- confirms vr_100/vr_q perturb _make_model's output by the expected vr_100 * sin(inc) projection, and that omitting vr_100 reproduces the prior model exactly.
  • Full test suite passes (pytest tests/)
  • ruff check clean

vr_100/vr_q were declared in default_parameters.yml with priors but
never wired into _make_model, so the global parametric fit had no way
to include a radial (infall/wind) velocity term -- unlike fit_annuli,
which already supports fit_vrad. Restore this by projecting
_vrad(r) via _proj_vrad and adding it into v0 whenever vr_100 is set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant