Fixing multiple bugs with geometry and allowing spot contrasts instead of temperatures for fleck.jax #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes several bugs with the JAX version of fleck as well as one bug with the non-JAX version of fleck. This also resolves #23 and resolves #24
For both versions of fleck, this PR makes sure that the transit chord always falls below the stellar equator. This was previously assumed during plotting, but when computing spot occultations sometimes the transit chord would lie above the equator and there would be no spot occultation even though the plot made it look like there should be. I also fixed a bug in the computation of the apparent position of the planet for eccentric orbits. I also added the argument of periastron to plot_star which had mistakenly always assumed omega was pi/2.
I added contrast as an argument to the init function and properly use the contrast argument to the add_spot function. The code can now handle spot temperatures, spot spectra, or spot contrasts and nicely meshes the different options. I also simplified the transit_model function to use the pre-computed spot contrasts rather than always computing them on the fly. I also tweaked the plot_star function to handle cases where no temperatures were provided and only contrasts were used.
I also switched from using the spot colatitudes (on 0 to pi) to spot latitudes (on -pi/2 to pi/2) to keep things consistent with the non-JAX version of fleck.
I also tidied up some of the documentation and comments and formatting while I was at it