<commit_before>\documentclass[12pt,preprint]{aastex}

% has to be before amssymb it seems
\usepackage{color,hyperref}
\definecolor{linkcolor}{rgb}{0,0,0.5}
\hypersetup{colorlinks=true,linkcolor=linkcolor,citecolor=linkcolor,
            filecolor=linkcolor,urlcolor=linkcolor}

\usepackage{url}
\usepackage{algorithmic,algorithm}
\usepackage{multirow}

\usepackage{listings}
\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
\lstset{language=Python,
        basicstyle=\footnotesize\ttfamily,
        showspaces=false,
        showstringspaces=false,
        tabsize=2,
        breaklines=false,
        breakatwhitespace=true,
        identifierstyle=\ttfamily,
        keywordstyle=\bfseries\color[rgb]{0.133,0.545,0.133},
        commentstyle=\color[rgb]{0.133,0.545,0.133},
        stringstyle=\color[rgb]{0.627,0.126,0.941},
    }

\input{vars}

\begin{document}

\title{%
The \kplr\ Catalog:
Systematic probabilistic parameter estimation for every \kepler\ planet candidate
}

\newcommand{\nyu}{2}
\newcommand{\mpia}{3}
\author{%
    Daniel~Foreman-Mackey\altaffilmark{1,\nyu},
    David~W.~Hogg\altaffilmark{\nyu,\mpia},
    \etal
}
\altaffiltext{1}{To whom correspondence should be addressed:
                        \url{<EMAIL>}}
\altaffiltext{\nyu}{Center for Cosmology and Particle Physics,
                        Department of Physics, New York University,
                        4 Washington Place, New York, NY, 10003, USA}
\altaffiltext{\mpia}{Max-Planck-Institut f\"ur Astronomie,
                        K\"onigstuhl 17, D-69117 Heidelberg, Germany}

\begin{abstract} % should be aims, methods, results
As precise as \kepler\ is,
it provides only probabilistic information
about transiting companions in the lightcurves of stars.
The official \kepler\ best-fit values for the parameters
(periods, radii ratios, durations, impact parameters)
contain some known biases,
are not associated with full uncertainty propagation,
and cannot be used as the basis of any probabilistic population analysis.

Here we provide a catalog of probabilistic constraints on the physical parameters
for every planet candidate (KOI) from the \kepler\ transiting
planet search.
Using a physically motivated generative model with flat ``interim'' priors, we
draw samples from the posterior probability distribution conditioned on all
the available light curves from \kepler\ Quarters 0 through 16.
We release both the catalog values and full $16384$-element posterior
samplings for each system.
We compare our results to the existing KOI Catalog and find xxx.
Using these samplings, we demonstrate a computationally tractable hierarchical
inference technique for simultaneously modeling the exoplanet radius
distribution and the selection function of the \kepler\ survey and pipeline.
When applied to a sample of cool stars with well constrained properties, we
find yyy.

Access to the catalog is available on-line at \url{http://data.kplr.co} and
the code is available---under the terms of the MIT license---at
\url{https://github.com/dfm/kois}.

\end{abstract}

\keywords{% CUT THESE DOWN TO SIX
  astronomical~databases:~miscellaneous
  ---
  catalogs
  ---
  eclipses
  ---
  methods:~statistical
  ---
  planetary~systems
  ---
  planets~and~satellites:~detection
  ---
  planets~and~satellites:~fundamental~parameters
  ---
  stars:~statistics
  ---
  surveys
}

\section{Introduction}

So probabilistically righteous.

TODO: Talk about the philosophy of interim priors here.

TODO: Justify the use of non-physically motivated parameters and relate this
to the idea of sufficient statistics.

\section{Data}

The goal of this project is to propagate any information about exoplanets from
the \kepler\ light curves into a form that is more user friendly.
We target the list of all \kepler\ Objects of Interest (KOIs) listed on the
Exoplanet Archive\footnote{FIXME: URL} as planet candidates and confirmed
planets from quarters xxx--yyy.
Some of these candidates are certainly so-called false positives but we treat
them all equally so that the user can freely make their own target selection.
As our raw dataset, we start with the MAP-PDC light curves (CITE) provided by
MAST\footnote{FIXME: URL} and perform further preconditioning or
``de-trending'' to remove any remaining astrophysical or instrumental noise.

\paragraph{Target selection}
We downloaded the full list KOIs from the exoplanet archive using the \kplr\
Python module\footnote{\url{http://dan.iel.fm/kplr}} on SOME DATE and filtered
the list to only include planet candidates and confirmed planets as listed in
the database.
This list corresponds to the catalog from (SOME CITATION) generated by
searching the light curves from quarters xxx--yyy using the Transiting Planet
Search (TPS) module and then hand vetted (CITE).

\paragraph{Data selection}
Next, we downloaded all available PDC light curves (both short and long
cadence) for a given target and selected all data points within 4 transit
durations---as determined by the KOI catalog---of a transit.

\paragraph{Preconditioning}
Then, we mask the data within 1.5 transit durations and fit the maximum
likelihood line to the remaining data points.
Finally, we divide the full window by this model to generate a ``de-trended''
light curve.
This procedure has been applied successfully in the literature (Carter ETC
CITE) and it should be less destructive to transit signals than alternative
techniques like median filtering and ``robust'' regression.

\section{Model}

A model, from our perspective, is a parameterized probability for the data,
the likelihood function, and a prior probability distribution over parameters.
We will also divide the likelihood further into a \emph{deterministic physical
generative model} and a \emph{stochastic noise model}.
The form for each of these model components can be freely chosen and in the
next sections, we'll justify our specific choices.
In short, we assume independent Gaussian noise, a Mandel \& Agol (CITE) like
limb darkened light curve, and simple interim priors.

\paragraph{Noise model}
The noise in the light curves generated by the Kepler pipeline result from a
large collection of effects.
There are both astrophysical sources (stellar variability, \etc) instrumental
effects (photon noise, temperature and pointing variations, \etc).
The exact effect of each of these effects is complicated by the aperture
photometry procedure and all of the preconditioning steps discussed above.
Despite these complications, we'll assume that the error bars produced by the
Kepler pipeline are good estimates and that they are distributed independently
and normally.
This is a reasonable assumption because TODO.

\paragraph{Generative model}
For this project, we assume a quadratic limb darkened light curve model
following Mandel \& Agol (CITE) and integrate over exposure time (Kipping
CITE, Appendix XXXX).
Since we don't want to be dependent on specific stellar parameters and since
we would like to make it easy to apply any new stellar catalogs, we don't use
physical orbits.
Instead, we parameterize the orbit using only ``observable'' parameters.
In particular, we use, for the star, the mean stellar flux \fstar, and the
parameters \qone\ and \qtwo\ of a quadratic limb darkening profile
(parameterized following Kipping CITE).
For each companion, we parameterize the orbit using period \period, epoch
\epoch, transit duration \duration, radius ratio \ror, and impact parameter
\impact.
\Tab{parameters} specifies the parameters used in this \paper\ and the<commit_msg>some words<commit_after>\documentclass[12pt,preprint]{aastex}

% has to be before amssymb it seems
\usepackage{color,hyperref}
\definecolor{linkcolor}{rgb}{0,0,0.5}
\hypersetup{colorlinks=true,linkcolor=linkcolor,citecolor=linkcolor,
            filecolor=linkcolor,urlcolor=linkcolor}

\usepackage{url}
\usepackage{algorithmic,algorithm}
\usepackage{multirow}

\usepackage{listings}
\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
\lstset{language=Python,
        basicstyle=\footnotesize\ttfamily,
        showspaces=false,
        showstringspaces=false,
        tabsize=2,
        breaklines=false,
        breakatwhitespace=true,
        identifierstyle=\ttfamily,
        keywordstyle=\bfseries\color[rgb]{0.133,0.545,0.133},
        commentstyle=\color[rgb]{0.133,0.545,0.133},
        stringstyle=\color[rgb]{0.627,0.126,0.941},
    }

\input{vars}

\begin{document}

\title{%
The \kplr\ Catalog:
Systematic probabilistic parameter estimation for every \kepler\ planet candidate
}

\newcommand{\nyu}{2}
\newcommand{\mpia}{3}
\author{%
    Daniel~Foreman-Mackey\altaffilmark{1,\nyu},
    David~W.~Hogg\altaffilmark{\nyu,\mpia},
    \etal
}
\altaffiltext{1}{To whom correspondence should be addressed:
                        \url{<EMAIL>}}
\altaffiltext{\nyu}{Center for Cosmology and Particle Physics,
                        Department of Physics, New York University,
                        4 Washington Place, New York, NY, 10003, USA}
\altaffiltext{\mpia}{Max-Planck-Institut f\"ur Astronomie,
                        K\"onigstuhl 17, D-69117 Heidelberg, Germany}

\begin{abstract} % should be aims, methods, results
As precise as \kepler\ is,
it provides only probabilistic information
about transiting companions in the lightcurves of stars.
The official \kepler\ best-fit values for the parameters
(periods, radii ratios, durations, impact parameters)
contain some known biases,
are not associated with full uncertainty propagation,
and cannot be used as the basis of any probabilistic population analysis.

Here we provide a catalog of probabilistic constraints on the physical parameters
for every planet candidate (KOI) from the \kepler\ transiting
planet search.
Using a physically motivated generative model with flat ``interim'' priors, we
draw samples from the posterior probability distribution conditioned on all
the available light curves from \kepler\ Quarters 0 through 16.
We release both the catalog values and full $16384$-element posterior
samplings for each system.
We compare our results to the existing KOI Catalog and find xxx.
Using these samplings, we demonstrate a computationally tractable hierarchical
inference technique for simultaneously modeling the exoplanet radius
distribution and the selection function of the \kepler\ survey and pipeline.
When applied to a sample of cool stars with well constrained properties, we
find yyy.

Access to the catalog is available on-line at \url{http://data.kplr.co} and
the code is available---under the terms of the MIT license---at
\url{https://github.com/dfm/kois}.

\end{abstract}

\keywords{% CUT THESE DOWN TO SIX
  astronomical~databases:~miscellaneous
  ---
  catalogs
  ---
  eclipses
  ---
  methods:~statistical
  ---
  planetary~systems
  ---
  planets~and~satellites:~detection
  ---
  planets~and~satellites:~fundamental~parameters
  ---
  stars:~statistics
  ---
  surveys
}

\section{Introduction}

So probabilistically righteous.

TODO: Talk about the philosophy of interim priors here.

TODO: Justify the use of non-physically motivated parameters and relate this
to the idea of sufficient statistics.

\section{Data}

The goal of this project is to propagate any information about exoplanets from
the \kepler\ light curves into a form that is more user friendly.
We target the list of all \kepler\ Objects of Interest (KOIs) listed on the
Exoplanet Archive\footnote{FIXME: URL} as planet candidates and confirmed
planets from quarters xxx--yyy.
Some of these candidates are certainly so-called false positives but we treat
them all equally so that the user can freely make their own target selection.
As our raw dataset, we start with the MAP-PDC light curves (CITE) provided by
MAST\footnote{FIXME: URL} and perform further preconditioning or
``de-trending'' to remove any remaining astrophysical or instrumental noise.

\paragraph{Target selection}
We downloaded the full list KOIs from the exoplanet archive using the \kplr\
Python module\footnote{\url{http://dan.iel.fm/kplr}} on SOME DATE and filtered
the list to only include planet candidates and confirmed planets as listed in
the database.
This list corresponds to the catalog from (SOME CITATION) generated by
searching the light curves from quarters xxx--yyy using the Transiting Planet
Search (TPS) module and then hand vetted (CITE).

\paragraph{Data selection}
Next, we downloaded all available PDC light curves (both short and long
cadence) for a given target and selected all data points within 4 transit
durations---as determined by the KOI catalog---of a transit.

\paragraph{Preconditioning}
These light curves still include some systematic noise and stellar
variability.
To remove this signal, we mask the data within 1.5 transit durations and find
the maximum likelihood cubic polynomial trend conditioned on the remaining
measurements.
In order to avoid over-fitting, we apply a weak L2 regularization to the
likelihood:
\begin{eqnarray}
\ell(\bvec{c}) &=& -\frac{1}{2}\sum_{n=1}^N \frac{[f_n - m(t_n; \bvec{c})]^2}
                                                 {\sigma_n^2}
                   -\frac{\lambda}{2} \left | \bvec{c} \right |^2
\end{eqnarray}
where
\begin{eqnarray}
m(t_n;\bvec{c}) &=& c_0 + c_1\,t_n + c_2\,t_n^2 + c_3\,t_n^3 \quad.
\end{eqnarray}
In practice, after some extremely scientific experiments, we chose to use
$\lambda = 1$ for every light curve.

Finally, we divide the full window of observations by the predicted trend
$m(t_n;\bvec{c})$ to produce a ``de-trended'' light curve.
A similar procedure has been applied successfully in the literature (Carter ETC
CITE) and it should be less destructive to transit signals than alternative
techniques like median filtering and ``robust'' regression.

\section{Model}

A model, from our perspective, is a parameterized probability for the data,
the likelihood function, and a prior probability distribution over parameters.
We will also divide the likelihood further into a \emph{deterministic physical
generative model} and a \emph{stochastic noise model}.
The form for each of these model components can be freely chosen and in the
next sections, we'll justify our specific choices.
In short, we assume independent Gaussian noise, a Mandel \& Agol (CITE) like
limb darkened light curve, and simple interim priors.

\paragraph{Noise model}
The noise in the light curves generated by the Kepler pipeline result from a
large collection of effects.
There are both astrophysical sources (stellar variability, \etc) instrumental
effects (photon noise, temperature and pointing variations, \etc).
The exact effect of each of these effects is complicated by the aperture
photometry procedure and all of the preconditioning steps discussed above.
Despite these complications, we'll assume that the error bars produced by the
Kepler pipeline are good estimates and that they are distributed independently
and normally.
This is a reasonable assumption because TODO.

\paragraph{Generative model}
For this project, we assume a quadratic limb darkened light curve model
following Mandel \& Agol (CITE) and integrate over exposure time using an
adaptive algorithm described in Appendix (XXXX).
Since we don't want to be dependent on specific stellar parameters and since
we would like to make it easy to apply any new constraints on the stellar
parameters, we don't require physical orbits.
Instead, we parameterize the orbit using only ``observable'' parameters.
This is a somewhat controversial choice as we will discuss in Section (YYYY).

In particular, we use, for the star, the mean stellar flux \fstar, and the
parameters \qone\ and \qtwo\ of a quadratic limb darkening profile.
The limb darkening law is parameterized following Kipping (CITE) and the
coefficients are related to the standard parameterization
\begin{eqnarray}
I(\mu) &=& 1 - u_1\,(1-\mu) - u_2\,(1-\mu)^2 \\
\mu &=& \sqrt{1-r^2}
\end{eqnarray}
by
\begin{eqnarray}
q_1 &=& (u_1 + u_2)^2 \\
q_2 &=& \frac{u_1}{2\,(u_1+u_2)} \quad.
\end{eqnarray}
For each companion, we parameterize the orbit using period \period, epoch
\epoch, transit duration \duration, radius ratio \ror, and impact parameter
\impact.
\Tab{parameters} specifies the parameters used in this \paper\ and the
{'fraction_non_alphanumeric': 0.07556131260794473, 'fraction_numerical': 0.01147298297557365, 'mean_word_length': 4.272520325203252, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1823044', 'n_tokens_mistral': 4632, 'n_tokens_neox': 4322, 'n_words': 1953}