API
Functions
Photodynamics.compute_lightcurve!
— Functioncompute_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 objectts::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.
Types
TransitSeries
Photodynamics.TransitSeries
— TypeTransitSeries{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 intimes
.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]
Integrator
NbodyGradient.Integrator
— Type(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-allocatedDerivatives
type. Ifnothing
, it will be allocated inside the function.
Keyword Args
grad::Bool=false
: Whether to compute derivatives. Default is no derivatives (false
).
(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 fromNbodyGradient.jl
. Holds transit times and derivatives.
Optional
d::Union{Derivatives, Nothing}=nothing
: Allows the user to provide a pre-allocatedDerivatives
type. Ifnothing
, it will be allocated inside the function.
Keyword Args
grad::Bool=false
: Whether to compute derivatives. Default is no derivatives (false
).
Lightcurve
Photodynamics.Lightcurve
— TypeLightcurve{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 attobs
observation times.
Transit parameters
u_n::Vector{T}
: Stellar limbdarkening coefficients.k::Vector{T}
: Planet-Star radius ratios.rstar::Vector{T}
: Stellar radius [AU]
Constructors
Photodynamics.Lightcurve
— MethodLightcurve(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]
dLightcurve
Photodynamics.dLightcurve
— TypedLightcurve{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 attobs
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 radiusdfdu::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 massesdfdelements::Matrix{T}
: Derivatives of the flux w.r.t. the initial orbital elements and planet masses
Constructors
Photodynamics.dLightcurve
— MethoddLightcurve(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]