API

Functions

Photodynamics.compute_lightcurve!Function
compute_lightcurve!(lc, ts; tol=1e-6, maxdepth=6, body_index=0)

Compute a light curve from N-body results (TransitSeries) and a specified set of transit parameters (AbstractLightcurve).

Arguments

  • lc::AbstractLightcurve{T} : Lightcurve object
  • ts::TransitSeries{T, TT} : Transit series object

Optional

  • tol::T=1e-6 : Tolerance of the Simpsons integration.
  • maxdepth::Int64=6 : maximum depth for the Simpsons integration.
  • body_index::Int64=0 : If non-zero, this picks out a particular planet and only computes the transits of that planet.
source

Types

TransitSeries

Photodynamics.TransitSeriesType
TransitSeries{T<:Real, TT<:AbstractTransitTimes}

Transit times, PK20 expansion points about each transit, and derivatives.

Fields (relevant to the user)

  • times::Vector{T} : Transit times for all bodies, in chronological order [days]
  • bodies::Vector{T} : The body index which transited at a given transit time in times.
  • points::Array{T, 4} : Expansion points around each transit [body, transit, 7, 2]
  • points::Array{T, 6} : Derivatives of the expansion points around each transit [body, transit, 7, 2, body, parameter]
source

Integrator

NbodyGradient.IntegratorType
(intr::Integrator)(s, ts, d=nothing; grad=false)

Carry out N-body integration and compute 7 points about each transit time. Expects transit times have been pre-computed.

Arguments

  • s::State{T} : N-body problem state.
  • ts::TransitSeries{T, ProvidedTimes} : Transit series which has pre-computed transit times

Optional

  • d::Union{Derivatives, Nothing}=nothing : Allows the user to provide a pre-allocated Derivatives type. If nothing, it will be allocated inside the function.

Keyword Args

  • grad::Bool=false : Whether to compute derivatives. Default is no derivatives (false).
source
(intr::Integrator)(s, ts, d=nothing; grad=false)

Carry out N-body integration, compute transit times, and compute 7 points about each transit time.

Arguments

  • s::State{T} : N-body problem state.
  • ts::TransitSeries{T, ComputedTimes} : Transit series which will hold the computed transit times and expansion points.
  • tt::TransitOutput{T} : Transit timing from NbodyGradient.jl. Holds transit times and derivatives.

Optional

  • d::Union{Derivatives, Nothing}=nothing : Allows the user to provide a pre-allocated Derivatives type. If nothing, it will be allocated inside the function.

Keyword Args

  • grad::Bool=false : Whether to compute derivatives. Default is no derivatives (false).
source

Lightcurve

Photodynamics.LightcurveType
Lightcurve{T<:Real} <: AbstractLightcurve{T}

A simulated lightcurve.

Constructor

Lightcurve(dt, tobs, fobs, eobs, u_n, k, rstar)

Arguments

  • dt::T : Exposure time [days].
  • tobs::Vector{T} : Time of observations [days].
  • fobs::Vector{T} : Relative flux observations.
  • eobs::Vector{T} : Uncertainity on relative flux observations.
  • u_n::Vector{T} : Stellar limbdarkening coefficients.
  • k::Vector{T} : Planet-Star radius ratios.
  • rstar::T : Stellar radius [AU]

Fields (relevant to the user)

Lightcurve parameters

  • dt::T : Exposure time [days].
  • tobs::Vector{T} : Time of observations [days].
  • fobs::Vector{T} : Relative flux observations.
  • eobs::Vector{T} : Uncertainity on relative flux observations.
  • flux::Vector{T} : Simulated flux at tobs observation times.

Transit parameters

  • u_n::Vector{T} : Stellar limbdarkening coefficients.
  • k::Vector{T} : Planet-Star radius ratios.
  • rstar::Vector{T} : Stellar radius [AU]
source

Constructors

Photodynamics.LightcurveMethod
Lightcurve(dt, duration, u_n, k, rstar)

Setup a Lightcurve without having data.

Arguments

  • dt::T : Exposure time [days].
  • duration::T : Duration of observations [days].
  • u_n::Vector{T} : Stellar limbdarkening coefficients.
  • k::Vector{T} : Planet-Star radius ratios.
  • rstar::T : Stellar radius [AU]
source

dLightcurve

Photodynamics.dLightcurveType
dLightcurve{T<:Real} <: AbstractLightcurve{T}

A simulated lightcurve and the derivatives of the flux with respect to the model parameters

Constructor

Lightcurve(dt, tobs, fobs, eobs, u_n, k, rstar)

Arguments

  • dt::T : Exposure time [days].
  • tobs::Vector{T} : Time of observations [days].
  • fobs::Vector{T} : Relative flux observations.
  • eobs::Vector{T} : Uncertainity on relative flux observations.
  • u_n::Vector{T} : Stellar limbdarkening coefficients.
  • k::Vector{T} : Planet-Star radius ratios.
  • rstar::T : Stellar radius [AU]

Fields (relevant to the user)

Lightcurve parameters

  • dt::T : Exposure time [days].
  • tobs::Vector{T} : Time of observations [days].
  • fobs::Vector{T} : Relative flux observations.
  • eobs::Vector{T} : Uncertainity on relative flux observations.
  • flux::Vector{T} : Simulated flux at tobs observation times.

Transit parameters

  • u_n::Vector{T} : Stellar limbdarkening coefficients.
  • k::Vector{T} : Planet-Star radius ratios.
  • rstar::Vector{T} : Stellar radius [AU].

Jacobians

  • dfdr::Vector{T} : Derivatives of the flux w.r.t. the stellar radius
  • dfdu::Matrix{T} : Derivatives of the flux w.r.t. the limbdarkening coefficients.
  • dfdk::Matrix{T} : Derivatives of the flux w.r.t. the radius ratios.
  • dfdq0::Matrix{T} : Derivatives of the flux w.r.t. the initial Cartesian coordinates and planet masses
  • dfdelements::Matrix{T} : Derivatives of the flux w.r.t. the initial orbital elements and planet masses
source

Constructors

Photodynamics.dLightcurveMethod
dLightcurve(dt, duration, u_n, k, rstar)

Setup a dLightcurve without having data.

Arguments

  • dt::T : Exposure time [days].
  • duration::T : Duration of observations [days].
  • u_n::Vector{T} : Stellar limbdarkening coefficients.
  • k::Vector{T} : Planet-Star radius ratios.
  • rstar::T : Stellar radius [AU]
source