Skip to content

Rebuild Bayesian galaxy rotation-curve MCMC package - #1

Merged
juandapradam12 merged 6 commits into
masterfrom
cursor/bayesian-rotation-curve-1903
Oct 6, 2026
Merged

juandapradam12 merged 6 commits into
masterfrom
cursor/bayesian-rotation-curve-1903

Conversation

@juandapradam12

@juandapradam12 juandapradam12 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Rebuilds this old Monte Carlo / Bayesian homework into a working inference package for estimating galactic bulge, disk, and halo masses from a rotation curve — with documentation that sells the project.

What’s in

  • Corrected bulge/disk/halo model + adaptive Metropolis–Hastings
  • Optional free (A_h) and (\sigma)
  • Residuals, enclosed-mass (M(<R)), traces, corner plots
  • Posterior .npy + .csv; seed + reproducibility command in JSON
  • Mock recovery test; GitHub Actions pytest CI
  • Legacy C under legacy/
  • Polished README + theory/usage/legacy docs aligned with all features

Verification

  • pytest: 12/12 passed
  • Full run with --fit-ah --fit-sigma recovers (A_h\approx 64) kpc, (\hat{R}\approx 1)

Try it

pip install -r requirements.txt && pip install -e .
make test && make mock && make run
Open in Web Open in Cursor 

Modernize the old homework C prototype into an installable Python toolkit
with a corrected bulge/disk/halo model, adaptive Metropolis–Hastings,
multi-chain Gelman–Rubin diagnostics, tests, and documentation. Keep a
fixed legacy C pipeline for educational reference.
Keep the pipeline small: optionally infer the halo scale length,
plot data−model residuals, and verify MCMC recovery on synthetic data.
Small quality-of-life outputs: M(<R) figure, human-readable posterior
CSV, reproducibility seed in the summary JSON, and a GitHub Actions
pytest workflow.
Rewrite the README with a clearer value proposition, example posterior
table, and feature gallery. Sync theory/usage/legacy docs with free Ah,
residuals, enclosed mass, CSV outputs, mock recovery, and CI.
Add residuals, enclosed mass, corner, and MCMC traces to the
README gallery so the project sells visually on GitHub.
@cursor
cursor Bot force-pushed the cursor/bayesian-rotation-curve-1903 branch 2 times, most recently from cfbd149 to 48fc06d Compare October 6, 2026 10:06
@juandapradam12
juandapradam12 marked this pull request as ready for review October 6, 2026 10:51
@juandapradam12
juandapradam12 merged commit 640f373 into master Oct 6, 2026
2 checks passed
@juandapradam12
juandapradam12 deleted the cursor/bayesian-rotation-curve-1903 branch October 6, 2026 10:51
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