Closed benp175 closed 3 years ago
I think the relevant portions of code are located here:
https://github.com/dragozzine/multimoon/blob/c737ebc0b9bbb0dd1f174bc7edd98331c00240de/src/mm_relast.py#L47 https://github.com/dragozzine/multimoon/blob/c737ebc0b9bbb0dd1f174bc7edd98331c00240de/src/mm_relast.py#L48 https://github.com/dragozzine/multimoon/blob/c737ebc0b9bbb0dd1f174bc7edd98331c00240de/src/mm_relast.py#L108 https://github.com/dragozzine/multimoon/blob/c737ebc0b9bbb0dd1f174bc7edd98331c00240de/src/mm_relast.py#L109 https://github.com/dragozzine/multimoon/blob/c737ebc0b9bbb0dd1f174bc7edd98331c00240de/src/prep/latlon_transform.py#L114 https://github.com/dragozzine/multimoon/blob/c737ebc0b9bbb0dd1f174bc7edd98331c00240de/src/prep/latlon_transform.py#L115
Pretty sure @dallinspencer and I talked about this and even tested it. For such small angles, simple subtraction is pretty good. Sometimes the astropy spherical trigonometry functions are actually worse because they are designed for larger separations. @dallinspencer, can you remind us of the testing you did on this?
I see right now that when we are doing angle offsets, we are just subtracting the two angles from each other. While this provides a decent approximation of the true angular offsets, it is just an approximation. I was poking around the astropy documentation and found that astropy has functions which actually do the spherical trig to find the true angular separations (see here). I think we should at least test to see if our assumption is valid, but I propose that we have MultiMoon use this instead of the simple subtraction. The bottleneck in MultiMoon is the integrations rather than the relative astrometry, so this shouldn't impact runtimes.
What does everyone think about this?