jaxoplanet.light_curves.transforms
#
Module Contents#
Functions#
|
Transform a light curve function to apply exposure time integration |
|
Transform a light curve function to pre-compute the model on a grid |
- jaxoplanet.light_curves.transforms.integrate(func: jaxoplanet.light_curves.types.LightCurveFunc, exposure_time: jaxoplanet.types.Quantity | None = None, order: int = 0, num_samples: int = 7) jaxoplanet.light_curves.types.LightCurveFunc [source]#
Transform a light curve function to apply exposure time integration
This transformation applies a fixed stencil numerical integration scheme to the input function
func
to convolve the light curve with a top hat exposure time centered on the input time, with a full width ofexposure_time
.The order of the integration scheme is set using the
order
parameter which must be0
,1
, or2
. The default (0
) uses the “resampling” scheme discussed by Kipping (2010). The higher order schemes1
and2
apply the trapezoid and Simpson’s rules respectively, but won’t necessarily provide higher accuracy results because of discontinuities at the contact points.In practice, the parameter
num_samples
which sets the number of function evaluations per integral has the most significant effect on the accuracy of this integral, trading off against higher computational cost.- Parameters:
func – A light curve function which takes a time
Quantity
as the first argumentexposure_time (Quantity) – The exposure time (in days, by default)
order (int) – The order of the integration scheme as discussed above
num_samples (int) – The number of function evaluations made per integral, controlling the accuracy of the numerics
- Returns:
A new light curve function with the same signature as
func
, computing the exposure time integrated flux
- jaxoplanet.light_curves.transforms.interpolate(func: jaxoplanet.light_curves.types.LightCurveFunc, *, period: jaxoplanet.types.Quantity, time_transit: jaxoplanet.types.Quantity, num_samples: int, duration: jaxoplanet.types.Quantity | None = None, args: tuple[Any, Ellipsis] = (), kwargs: dict[str, Any] | None = None) jaxoplanet.light_curves.types.LightCurveFunc [source]#
Transform a light curve function to pre-compute the model on a grid
Sometimes it can be useful to precompute the light curve on a grid near a transit, and then interpolate those computations to the required phases when computing the full model. This can speed things up a lot when you have many transits, or a lot of out of transit data. This transform uses linear interpolation.
Note
Unlike some other transforms, this function requires that any upstream
*args
and**kwargs
be passed directly to the transform, rather than when calling the transformed function. This is necessary because the model is pre-computed when it is tranformed.- Parameters:
func – A light curve function which takes a time
Quantity
as the first argumentperiod (Quantity) – The period of the orbit. Used to wrap the input times into the domain of the pre-computed model
time_transit (Quantity) – The transit time of the orbit. Used to wrap the input times into the domain of the pre-computed model
duration (Quantity) – The duration centered on the transit to pre-compute. By default, the full period will be evaluated
num_samples (int) – The number of points in the time grid used for pre-computation
args (tuple) – Any extra positional arguments that should be passed to
func
kwargs (dict) – Any extra keyword arguments that should be passed to
func
- Returns:
A new light curve function with the same signature as
func
, computing the flux by interpolating a pre-computed model