exoplanet-dev / jaxoplanet

Astronomical time series analysis with JAX
https://jax.exoplanet.codes
MIT License
38 stars 12 forks source link

feat: secondary/emission light curve of (limb-darkened) bodies #223

Closed lgrcia closed 1 month ago

lgrcia commented 1 month ago

A light_curve function taking into account transit and occultations of emissive (optionally limb darkened) bodies.

This function takes a SurfaceSystem in so that the limb darkening and amplitude of each body is defined using the Surface object.

Example:

import jax.numpy as jnp
import matplotlib.pyplot as plt
from jaxoplanet.orbits import keplerian
from jaxoplanet.experimental.starry.surface import Surface
from jaxoplanet.experimental.starry.orbit import SurfaceSystem
from jaxoplanet.light_curves.emission import light_curve

central = keplerian.Central()

system = SurfaceSystem(central, Surface(u=(0.1, 0.2), amplitude=1.0)).add_body(
    radius=0.5, period=1.0, surface=Surface(amplitude=0.5, normalize=False)
)

period = system.bodies[0].period.magnitude
time = jnp.linspace(-0.8 * period, 0.8 * period, 1000)
plt.plot(time, light_curve(system)(time).sum(1))
plt.xlabel("time (days)")
plt.ylabel("flux")
Screenshot 2024-10-04 at 1 52 55 PM