NAME
keptransit  fit a transit model to a Kepler light curve
USAGE
keptransit inputfile outputfile datacol
errcol period scaled_planet_radius
epoch eccentricity scaled_semimajor_axis
inclination argument_of_periastron
limb_darkening_parameters secondary_eclipse_depth
fix_period fix_scaled_planet_radius
fix_epoch fix_eccentricity
fix_scaled_semimajor_axis
fix_inclination fix_argument_of_periastron
fix_secondary_eclipse_depth fix_flux_offset
remove_flagged_data fit_tolerance fitter
normalize clobber plot verbose
logfile status
PARAMETERS
inputfile = string
The name of a MAST standard format FITS file containing a Kepler light curve within the first data extension.
outputfile = string
The name of the output FITS file. outputfile will be an
amended version of inputfile with two extra columns called TRANSIT_MODL and PHASE.
These columns contain the transit model determined each times stamp and the orbital phase which ranges between zero and one.
datacol = string
The column in extension one of the FITS file which contains the flux data to be fit. If the data is product from the kepflatten tool then the flux column will be DETSAP_FLUX (Detrended Simple Aperture Photometry fluxes). The tool will also accept SAP_FLUX (Simple Aperture Photometry), PDCSAP_FLUX (Presearch Data Conditioning fluxes) and CBVSAP_FLUX (SAP_FLUX corrected for systematic artifacts by the PyKE tool kepcotrend). However none of these latter three options are recommended because the flux data contain either astrophysical variability, spacecrafy systematics, or both.
errcol = string
The column in the FITS file which contains the uncertainty on the flux time series data. Typically this name is DETSAP_FLUX_ERR.
period = float
An initial guess value for the orbital period of the transiting planet in days.
scaled_planet_radius = float
An initial guess value for the ratio of the planet radius to the stellar radius.
epoch = float
An initial guess value for the midtime of the first transit. The time should be given in BKJD (BJD  2454833)
eccentricity = float
An initial guess value for the eccentricity of the planet's orbit.
scaled_semimajor_axis = float
An initial guess value for the ratio of the planet radius to the orbital semimajor axis of the planet.
inclination = float
An initial guess value for the inclination of the planetary orbit in degrees relative to the line of sight. 90 degrees equates to a central transit.
argument_of_periastron = float
An initial guess value for the periastron angle of the planetary orbit in degrees.
limb_darkening_parameters = string
Values for the limb darkening parameters. The code allows for four different limb darkening laws: uniform, linear, quadratic and nonlinear. The version of the limb darkening law used depends on the number of values given here: if no values are given a uniform disk model is used; if one value is given a linear law is used; if two parameters are given a quadratic law is used; and if four parameters are given a nonlinear law is used. The definitions of the different laws are given in Mandel and Agol (2002). The format that these parameters should be given in is as values separated by spaces, for example '0.372 0.278' if you wished to use a quadratic limb darkening law appropriate for the exoplanet host star TrES2A. Limb darkening is always fixed in this version of the code. We reccommend that you do not use the fourparameter limb darkening law as this is very slow for limited gain.
secondary_eclipse_depth = float
An initial guess value for the fractional secondary eclipse depth.
fix_period = boolean
Should the period be fixed to the guess value.
fix_scaled_planet_radius = boolean
Should the planet to star radius ratio be fixed to the guess value.
fix_epoch
Should the midtime of first transit be fixed to the guess value.
fix_eccentricity
Should the eccentricity of the planet's orbit be fixed to the guess value.
fix_scaled_semimajor_axis
Should the planet radius to semimajor axis ratio be fixed to the guess value.
fix_inclination = boolean
Should the inclination be fixed to the guess value.
fix_argument_of_periastron = boolean
Should the argument of periastron be fixed to the guess value.
fix_argument_of_periastron = boolean
Should the argument of periastron be fixed to the guess value.
fix_secondary_eclipse_depth = boolean
Should the secondary eclipse depth be fixed to the guess value.
fix_flux_offset = boolean
If this parameter is yes, the code will assume that the data has been appropriately normalized and the model will have a fixed outoftransit value of one. If this parameter is set to no an additional parameter is fit for: the outoftransit flux level. The initial guess value is always 1.0 and the output value from the fit is given as an offset from one.
remove_flagged_data = boolean
Before any fitting occurs, should data with a quality flag greater than zero be removed. A quality flag not equal to zero indicates there may be issues with the data.
fit_tolerance = float
The iterative change in the chisquared value required for the fitting algorithm to be considered as converged.
fitter = float
Currently the only stable fitting algorithm is fmin.
normalize = boolean
Normalizes the light curve by dividing the flux time series by the median value of the time series. Before the median is calculated, outliers further than 3sigma from the median of the flux values are removed.
clobber = boolean
Option to overwrite the output file. If clobber = no and an existing file has the same name
as outfile then the task will stop with an error.
plot = boolean
Plot the fitted transit model and the flux time series
verbose = boolean (optional)
Option for verbose mode, in which informative messages and warnings to the shell and a logfile.
logfile = string (optional)
Name of the logfile containing error and warning messages.
status = integer
Exit status of the script. It will be nonzero if the task halted with an error. This
parameter is set by the task and should not be modified by the user.
DESCRIPTION
keptransit allows you to fit a Mandel and Agol (2002) limb darkened transit model to a Kepler light curve. The algorithm allows for eccentric orbits, secondary eclipses and for the various fitting parameters to be kept fixed. The output file is a FITS file containing two additional columns relative to the input file: the transit model values and the orbital phase of the planet, which runs from zero to one. Before running this algorithm it is expected that the data has been treated to remove stellar and instrumental variability and that the outoftransit data has been normalized to one. Additionally, accurate inital guesses for the period and time of first transit are required. A good method to find some of these (period, epoch, transit duration) is using the kepbls tool. We have found that a good way to get a reasonable fit is to initally fix everything but the period and epoch. Once the best fitting epoch and period are found, fix these and free the other parameters. The tool allows for several different limb darkening laws. Limb darkening parameters appropriate for the Kepler bandpass can be found in Claret and Bloemen (2011). We highly rerecommendhat you do not use the fourparameter nonlinear limb darkening law owing to the computational intensity of this algorithm and the nenegligible improvement over the quadratic law.
