adrn / thejoker

A custom Monte Carlo sampler for the (gravitational) two-body problem
MIT License
30 stars 8 forks source link

Short Period High Eccentricity After MCMC #138

Open ella918 opened 2 months ago

ella918 commented 2 months ago

Hi I'm a student working with @stephtdouglas measuring periods for binaries. For stars of short periods, the original rejection sampling (without MCMC) is resulting in short eccentricities which is what we are expecting. However, when MCMC is done on stars with 1 rejection sample and with short periods, the orbits are being pushed towards higher eccentricities. This is occurring on 7 stars in our sample.

Below is an example of this, a star with a Gaia ID of 2128124963389008384.

This is the period vs eccentricity plot after rejection sampling PeriodvsEccent_2128124963389008384_new

This is the period vs eccentricity after MCMC PeriodvsEccent_MCMC_2128124963389008384_new

Here is the script I am using https://github.com/ella918/Summer-Research/blob/main/RunTheJokerOnePrior.py

adrn commented 2 months ago

👋 Could you share a plot of the radial velocity data vs. time? If that's proprietary, you can email me instead of posting here!

ella918 commented 2 months ago

Here is a plot of the RVs vs time, thanks! RVvTime_2128124963389008384_new

adrn commented 2 months ago

Hm ok, nothing looks immediately strange about the RV data! One quick question: are the RV uncertainties very small? What are the typical values?

Have you checked the convergence statistics for the MCMC run? Does it look like that ran successfully? For example, if you print az.summary(mcmc_samples) in your script, what does that table look like? (and maybe try running with chain=4 for better statistics). Another thing to check is to increase the number of prior samples you use in TheJoker to more like 10 million.

ella918 commented 1 month ago

Hi sorry for the delay! I was able to create a MWE for this issue and attached it to this comment along with the output files when running it with 50 million samples and 8 chains. Please let me know if you need anything else. Thank you!

https://github.com/ella918/Summer-Research/blob/main/MWE_1.py https://github.com/ella918/Summer-Research/blob/main/MWE_RVData.csv (data that I used)

Period vs Eccentricity after rejection sampling PeriodvsEccent_50 0M_2128124963389008384_8chains_MWE Period vs Eccentricity after MCMC PeriodvsEccent_MCMC_50 0M_2128124963389008384_8chains_MWE Trace plot traceplot_50 0M_2128124963389008384_8chains

nogroundNJU commented 1 month ago

Hi there! I have encountered the same problem, eccentricity will become larger after MCMC, but I think the MCMC results didn't converge very well

image

the eccentricity in the returned rejection sample was 0.05, and I used 50M priors and 20 chains when doing the MCMC