dragozzine / multimoon

fit solar system small body multiple systems with non-Keplerian orbits including quadrupole shapes
MIT License
4 stars 0 forks source link

J2/C22 parameterization is suboptimal? #20

Open benp175 opened 1 year ago

benp175 commented 1 year ago

Currently J2 and C22 are independent parameters (both internally and for the user) with a prior making sure that C22 <= 0.5*J2. While this is fine, it presents a problem for convergence of chains. For values of low J2 to be explored, walkers have simultaneously decrease both J2 and C22. This makes convergence of the posterior slower, especially near low values of J2. I believe that the algorithm behind emcee is designed to limit these problems, but our sharp prior interferes.

A possible fix to this issue is to reparameterize (possibly only internally?) to fit J2R2 and C22R2/J2R2. This creates a less constrained parameter space since walkers can freely explore the J2 parameter space. Essentially, the reparameterization transforms the parameter space such that the prior is removed for J2 and placed only on C22R2/J2R2, which should allow for quicker convergence and less systematic issues near J2 = 0. In my opinion, this also seems more physically meaningful since the elongation (which C22 controls) is actually dependent on the ratio of C22/J2, rather than C22R2 alone.

Implementing this is really quite easy and doesn't even require a change in the fitting procedures. It could be an internal coordinate transform that we automatically do behind the scenes, similar to how we use ecosw and esinw, instead of e and w. Before doing this, I'm interested to hear other people's input on whether this would be an effective and useful change.

dragozzine commented 1 year ago

Yes, I think this makes sense! I think doing this as part of our existing parameter transformations makes sense. Since Dallin worked on those, he could potentially add this in.

You could also imagine being able to "lock" or "freeze" C22/J2 to a particular value (in runprops), similar to spin locking. That way, the dynamics of C22 is included, but it is not a free parameter in the fit.