dragozzine / multimoon

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

Masses change in transformed vs non-transformed #9

Closed benp175 closed 4 years ago

benp175 commented 4 years ago

https://github.com/dragozzine/multimoon/blob/f9c2b0a988d47d93ec0f866890fc425f0bce9088/src/mm_analysis.py#L85

I noticed that when this untransform code is run, it outputs masses that are different than when this code isn't run. I think the issue comes down to how the masses are taken from fitting units to normal units. I tried to see what was wrong, but can't quite locate the bug.

benp175 commented 4 years ago

One other comment: mm_run doesn't seem to repeat this behavior and the best_likelihood.csv file shows the correct values for mass. So I think the issue is located inside this part of the code.

benp175 commented 4 years ago

After some digging, I found that the fit_scale in mm_analysis is different between the two cases (transformed vs not transformed). The from_fit_array_to_param_df function works with this scale, but it's not used inside of mm_analysis.py. It looks like there needs a little bit of work to make sure that the untransformed values make it into the flatchain.

benp175 commented 4 years ago

I could be wrong, but I believe that this chunk of code needs to be implemented in mm_analysis.py:

https://github.com/dragozzine/multimoon/blob/f9c2b0a988d47d93ec0f866890fc425f0bce9088/src/mm_param.py#L162-L167

dallinspencer commented 4 years ago

I went ahead and added that to mm_analysis, sorry I forgot to put that in there previously.