Markov Chain Monte Carlo Stellar Orbit Fit Explorer
Version 1.0.0 (1.64 MB) by
Duncan Carlsmith
Live Script exploring Markov chain Monte Carlo fits to observations of stars orbiting a black hole.
The motions of stars around the black hole at the center of the Milky Way galaxy can be used to estimate its mass and distance and to test Einstein's general theory of relativity. The initial observations and analysis were the basis for the 2020 Nobel Prize in Physics awarded to Reinhard Genzel and Andrea Ghez. The observations include the angular positions of target stars relative to reference stars from high-resolution infrared imaging and the velocity along the line of sight at various times using Doppler spectroscopy. For most of these stars, only a fraction of an orbit has been observed. A challenge is to fully reconstruct the orbits in three dimensions, each described by seven orbital elements, from limited observations.
This Live Script simulates such observations and explores the use of a Markov chain Monte Carlo method to search the high-dimensional solution space for the best-fit orbital parameters with error estimates, and then refines these results with a nonlinear maximum likelihood method. The radial velocity measurements are critical in overcoming the geometric degeneracies of orbits observed in projection and in setting the absolute scale. The technique is applicable to other optimization problems.
This educational script may interest students and instructors of physics and astronomy and others as a demonstration of the Markov chain Monte Carlo method. 'Try this' suggestions, coding 'Challenges,' hyperlinks, and references are included for further exploration. Additional educational Live Scripts by the author may be found here.
Cite As
Duncan Carlsmith (2025). Markov Chain Monte Carlo Stellar Orbit Fit Explorer (https://uk.mathworks.com/matlabcentral/fileexchange/181393-markov-chain-monte-carlo-stellar-orbit-fit-explorer), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2025a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
MarkovChainMonteCarloStellarOrbitFitExplorer folder
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
