API/Reference
BoxLeastSquares.BLSPeriodogram
BoxLeastSquares.BLS
BoxLeastSquares.autoperiod
BoxLeastSquares.model
BoxLeastSquares.model
BoxLeastSquares.params
BoxLeastSquares.periods
BoxLeastSquares.power
BoxLeastSquares.BLSPeriodogram
— TypeBLSPeriodogram
A convenient wrapper for outputs from BLS
.
Methods
Attributes
t
- input time gridy
- input datayerr
- input data uncertaintyperiods
- the input periodsduration_in
- the input durationsobjective
- the objective that was maximizedpower
- the power calculated at each periodduration
- the best duration at each periodt0
- the best transit time at each perioddepth
- the best transit depth at each periodsnr
- the signal-to-noise ratio at each periodloglike
- the log-likeilhood at each period
Plotting
Plotting recipes are provided for BLSPeriodogram
which automatically plots the period and the power
BoxLeastSquares.BLS
— FunctionBLS(t, y, [yerr];
duration, periods=autoperiod(t, duration, kwargs...),
objective=:likelihood, oversample=10, kwargs...)
Compute the box-least-squares periodogram.
Parameters
t
- the time for each observation. Units are irrelevant, except that they must be consistent for all temporal parameters (e.g.,duration
).Unitful.jl
units work seamlessly without needing to convert.y
- the flux value for each observationyerr
, optional - the uncertainty for each observation, if not provided, will default to onesduration
- The duration or durations to consider. Same units ast
periods
, optional - The period grid to computer the BLS power over. If not provided,autoperiod
will be called along with any extra keyword arguments (likeminimum_period
)objective
, optional - Choose between maximizing the likeilhood (:likeilhood
, default) or the signal-to-noise ratio (:snr
).oversample
, optional - The number of bins per duration that should be used. Larger values ofoversample
will lead to a finer grid.
The returned values are wrapped into a convenience type BoxLeastSquares.BLSPeriodogram
BoxLeastSquares.autoperiod
— Methodautoperiod(t, duration;
minimum_n_transit=3, frequency_factor=1.0,
[minimum_period, maximum_period])
Automatically determine a period grid from the given times and duration(s). Periods are selected such that at least minimum_n_trasnit
transits occur. The default minimum period is twice the maximum duration. The default maximum period is (maximum(t) - minimum(t)) / (minimum_n_transit - 1)
. The frequency factor changes the granularity in frequency space- a smaller frequency factor will create a finer period grid.
BoxLeastSquares.model
— FunctionBoxLeastSquares.model(t, y, [yerr]; period, duration, t0)
Evaluate the transit model on the given time grid. If yerr
is not provided, it will default to 1. The following transit parameters must be set:
period
orbital period in the same units ast
duration
the transit duration in the same units ast
t0
the transit time (middle of transit) in the same units ast
If you are using Unitful.jl
, the unit conversions will be made automatically.
BoxLeastSquares.model
— MethodBoxLeastSquares.model(::BLSPeriodogram; kwargs...)
Create a transit model using the data and best-fitting parameters from the given BLS periodogram. Any keyword parameters can be overriden.
BoxLeastSquares.params
— MethodBoxLeastSquares.params(::BLSPeriodogram)
Return the transit parameters for the best fitting period. Returns period, duration, t0, and power as well as the index of the max-power period.
BoxLeastSquares.periods
— MethodBoxLeastSquares.periods(::BLSPeriodogram)
Return the period grid for the periodogram
BoxLeastSquares.power
— MethodBoxLeastSquares.power(::BLSPeriodogram)
Return the power calculated for each period for the periodogram