text:
\section{Introduction}
\label{section:intro}

Age is the most difficult stellar property to measure, and the difficulty of
age-dating is particularly acute for low mass (GKM) stars on the main sequence
(MS).
Using conventional dating methods, uncertainties on the ages of these stars
can be as large as the age of the Universe.
GKM dwarfs are difficult to age-date because most of their physical and
observable properties do not change rapidly.
This is represented in the spacing of isochrones on a Hertzsprung-Russell
diagram (HRD) or color-magnitude diagram (CMD).
On the MS, isochrones are tightly spaced and, even with very precise
measurements of effective temperature and luminosity, the position of a MS
star on the HRD may be consistent with range of isochrones spanning several
billion years \citep[see][for a review of stellar ages]{soderblom2010}.
At the main-sequence turnoff however, isochrones are spread further apart, so
that sufficiently precisely measured temperatures and luminosities can yield
ages that are extremely precise (with minimum statistical uncertainties on the
order of 5-10\%) \citep[{\it e.g.}][]{pont2004}.
The classical method for measuring stellar ages is isochrone placement, or
isochrone fitting, where surface gravity changes resulting from fusion in the
core (usually observed via luminosity, $L$, and effective temperature, $T_{\mathrm{eff}}$,
or absolute magnitude and colour) are compared with a set of models that trace
stellar evolution across the HRD, or CMD.
CMD/HRD position has been thoroughly mapped with physical models, and can be
used to calculate relatively accurate (but not necessarily precise) ages,
barring some systematic variations between different models,
\citep[{\it e.g.}][]{yi2001, dotter2008, dotter2016}.
On the MS itself, there is little differentiation between stars of different
ages in the $L$ and $T_{\mathrm{eff}}$\ plane, so ages tend to be very imprecise.
The method of inferring a star's age from its rotation period, called
`gyrochronology', is much better suited for measuring ages on the MS because
MS stars spin down relatively rapidly.

Magnetic braking in MS stars was first observed by \citet{skumanich1972} who,
studying young clusters and the Sun, found that the rotation periods of
Solar-type stars decay with the square-root of time.
It has since been established that the rotation period of a MS star depends,
to first order, only on its age and effective temperature or color
\citep[{\it e.g.}][]{barnes2003}.
The convenient characteristic of stars that allows their ages to be inferred
from their {\it current} rotation periods and independently of their
primordial ones, comes from the steep dependence of spin-down rate on rotation
period \citep{kawaler1989}.
Stars spinning with high angular velocity will experience a much greater
angular momentum loss rate than slowly spinning stars and for this reason, no
matter the initial rotation period, Solar type stars will have the same
rotation period after around the age of the Hyades, 500-700 million years
\citep{irwin2009, gallet2015}.
After this time, the age of a star can be inferred, to first order, from its
dust-corrected color ({\it e.g.}\ B-V or $G_{BP} - G_{RP}$) and {\it current} rotation period
alone \citep[See][for an analysis of how initial conditions effect gyrochronal
ages]{epstein2014}.

The relation between age, rotation period and mass has been studied in detail,
and several different models have been developed to capture the rotational
evolution of Sun-like stars.
Some of these models are theoretical and based on physical processes; modeling
angular momentum loss as a function of stellar properties as well as the
properties of the magnetic field and stellar wind \citep[{\it e.g.}][]{kawaler1988,
kawaler1989, pinsonneault1989, vansaders2013, matt2015, vansaders2016}.
Other models are empirical and capture the behavior of stars from a purely
observational standpoint, using simple functional forms that can reproduce the
data \citep[{\it e.g.}][]{barnes2003, barnes2007, mamajek2008, angus2015}.
Both types of model, theoretical and empirical, must be calibrated using
observations.
Old calibrators are especially important because new evidence suggests that
rotational evolution goes through a transition at old age or, more
specifically, at a large Rossby number, $Ro$ (the ratio of rotation period to
the convective overturn timescale).
For example, stars shown to be old from {\it Kepler}\ asteroseismic data rotate
more rapidly than expected given their age \citep{angus2015, vansaders2016}.
A new physically motivated gyrochronology model, capable of reproducing these
data, was recently introduced \citep{vansaders2016}.
It relaxes magnetic braking at a critical Rossby number of around 2,
approximately the Solar value.
This model predicts that, after stellar rotation periods lengthen enough to
move stars across this $Ro$ threshold, stars conserve angular momentum and
maintain a nearly constant rotation period from then until they evolve off the
MS.

The gyrochronology models that capture post $Ro$-threshold, rotational
evolution \citep{vansaders2016} are the current state-of-the-art in rotation
dating.
These models can be computed over a grid of stellar parameters, and
interpolated-over to predict the age of a star.
The process of measuring the age of a field star with these models is similar
to inferring an age using any set of isochrones, with the difference being
that rotation period is an additional observable dimension.
Ages calculated using these models are therefore likely to be much more
precise than using rotation-free isochrones since rotation period provides an
additional anchor-point for the age of a star.
We present here a complementary method that combines isochrones with an {\it
empirical} gyrochronology model.
The methodology is related to the \citet{vansaders2016} model in that both use
a combination of rotation periods and other observable properties that track
stellar evolution on the HRD in concert.
The main difference is that the gyrochronology model used here is an entirely
empirically calibrated one, as opposed to a physically derived one.

One major advantage of using a physically motivated gyrochronology model is
the ability to rely on physics to interpolate or extrapolate over parts of
parameter space with sparse data coverage.
However, rotational spin-down is a complex process that is not yet fully
understood and currently no physical model can accurately reproduce all the
data available.
For this reason, even physically motivated gyrochronology models cannot always
be used to reliably extrapolate into unexplored parameter space.
Physical models, when calibrated to data, can provide insight into the physics
of stars, however, if accurate and precise {\it prediction} of stellar
properties is desired, empirical models can have advantages over physical
ones.
For example, the data may reveal complex trends that cannot be reproduced with
our current understanding of the physical processes involved, but may be
captured by more flexible data-driven models.
In addition, it is relatively straightforward to build an element of
stochasticity into empirical models, {\it i.e.}\ to allow for and incorporate
outliers or noisy trends.
This is particularly important for stellar spin down because rotation periods
can be affected by additional confounding variables which are not always
observed (having a binary or planetary companion, for example).
A further advantage of empirical models is that inference is more tractable:
it can be extremely fast to fit them to data.

In this work we calibrated a new empirical gyrochronology relation, fit to the
Praesepe open cluster and the Sun, in {\it Gaia}\ $G_{BP} - G_{RP}$\ color.
{\it Gaia}\ $G$, $G_{BP}$ and $G_{RP}$ apparent magnitudes are now the most
abundant photometric measurements, available for more than a billion stars
\citep{brown2018}.
In fact, an important point of context for this work is the new
availability of data relevant to gyrochronology and stellar ages.
{\it Gaia}\ now provides broad-band photometry and parallaxes for over a billion
stars, and {\it Kepler}, \Ktwo\ and {\it TESS}\ are providing rotation periods for
hundreds of thousands of stars.
Gyrochronology is becoming one of the most readily available age-dating
methods, so continuing to improve gyrochronology relations and methods is
important.
Like any other gyrochronology relation, this new Praesepe-based model does not
perfectly reproduce all the observed data and some simple modifications could
make significant improvements, for example, by including a mixture model to
account for outliers and binaries, and by removing the period-age,
period-color separability to account for different period-color shapes seen in
clusters of different ages.
We leave these improvements for a future project and, for now, test this
new Praesepe-based model, which is built into an open source {\it Python}
package for gyrochronology called {\tt stardate}.
{\tt stardate}\ provides the framework for simultaneous gyrochronology and isochrone
fitting, and, because {\tt stardate}\ is modular, it would be straightforward to update
the gyrochronology relation in the future.

This paper is laid out as follows.
In section \ref{section:method} we describe our new age-dating model and its
implementation, in section \ref{section:results} we test this model on
simulated stars and cluster stars, and in section \ref{section:conclusion} we
discuss the implications of these tests and future pathways for development.
Throughout this paper we use the term {\it `observables'} to refer to the
following observed properties of a star: $T_{\mathrm{eff}}$, log(g), observed bulk
metallicity ($[\mathrm{Fe/H}]$), parallax ($\bar{\pi}$), photometric
colors in different passbands (${\bf m_x} = [m_J, m_H, m_K, m_B, m_V, m_G,
m_{GBP}, m_{GRP}...]$, etc) and rotation period ($P_{\mathrm{rot}}$).
The term `parameters' refers to the physical properties of that star: age
($t$), equivalent evolutionary phase (EEP), model metallicity
($\mathrm{M/H}$), distance ($D$) and V-band extinction ($A_V$).
These are the properties that generate the observables.

\section{Method}
\label{section:method}
\subsection{A new empirical gyrochronology relation}

We fit a broken power law to the 650 Myr Praesepe cluster in order to
calibrate a gyrochronology relation that takes advantage of new data available
from the \Ktwo\ and {\it Gaia}\ surveys.
This relation captures the detailed shape of Praesepe's rotation period-color
relation, and is calibrated to {\it Gaia}\ $G_{BP} - G_{RP}$\ color.
Praesepe is the ideal calibration cluster because it has the largest number of
members with precisely measured rotation periods, over a large range of colors
\citep[spanning spectral types A0 through M6,][]{rebull2017}, of any open
cluster.
It is relatively tightly clustered on the sky and many of its members were
targeted in a single \Ktwo\ campaign, from which rotation periods have been
measured via light curve frequency analysis \citep{douglas2017, rebull2017}.
We compiled rotation periods, {\it Gaia}\ photometry and {\it Gaia}\ parallaxes for
members of the 650 Myr Praesepe cluster \citep{fossati2008} by identifying
Praesepe members with measured rotation periods from \citet{douglas2017} in
the \Ktwo-{\it Gaia}\ crossmatch catalog provided at
\url{https://gaia-kepler.fun/}.
This catalog cross-matched the EPIC catalog \citep{huber2016} with the
Gaia DR2 catalog \citep{brown2018}, using a 1'' search radius.
The result was a sample of 757 stars with rotation periods, parallaxes and
{\it Gaia}\ $G$, $G_{BP}$ and $G_{RP}$-band photometry, shown in figure
\ref{fig:praesepe}\footnote{This analysis was performed in a Jupyter notebook
available here: \url{
    https://github.com/RuthAngus/stardate/blob/master/paper/code/Praesepe.ipynb}}.
Although this new model does not perfectly describe the rotation period of
every star, it provides a better representation of rotational evolution than
previous models such as the \citet{angus2015} model (shown as the blue solid
line in figure \ref{fig:praesepe}).
\begin{figure}
  \caption{
    The rotation periods of Praesepe members \citep{douglas2016},
    vs. their {\it Gaia}\ colors ($G_{BP} - G_{RP}$) with a broken power law model, fit to
    these data.
    The dashed line and shaded region shows the mean and variance model
    described in equation \ref{eqn:gyro} at 650 Myrs (lower model) and 4.56
    Gyrs (upper model).
    The solid blue line shows the \citep{angus2015} gyrochronology relation at
    650 Myrs (lower model) and 4.56 Gyrs (upper model).
    Shaded regions show the 1$\sigma$ range of the rotation period
    model (equation \ref{eqn:gyro}).
    The rotation periods of stars bluer than around 0.56 dex and redder than
    around 2.7 dex in $G_{BP} - G_{RP}$\ are modeled as a broad log-normal distribution
    with a standard deviation of 0.5 dex, added to observational
    uncertainties.
    This figure was generated in a Jupyter notebook available at
    \url{https://github.com/RuthAngus/stardate/blob/master/paper/code/Fitting_Praesepe.ipynb}
}
  \centering
    \includegraphics[width=1.1\textwidth]{praesepe}
\label{fig:praesepe}
\end{figure}
In order to fit a relation to Praesepe, we removed rotational outliers bluer
than $G_{BP} - G_{RP}$\ = 2.7 via sigma-clipping and fit a 5th-order polynomial to the
remaining FGK and early M stars.
    We found that a 5th order polynomial provided a substantially
better fit than lower-order polynomials, which were not able to capture the
sharp `elbow' in the rotation period-color relation. Additional orders
provided either a worse
fit, tending towards extreme values at the boundaries, or diminishing returns
in goodness-of-fit.
We also fit a straight line to the late M dwarfs ($G_{BP} - G_{RP}$\ $>$ 2.7), to
capture the mass-dependent initial rotation periods of low mass stars
\citep{somers2017}.
We fit a separable straight line function to the period-age relation using
the ages of Praesepe and the Sun\footnote{The fitting process was
performed in a Jupyter notebook available at
\url{https://github.com/RuthAngus/stardate/blob/master/paper/code/Fitting_Praesepe.ipynb}.}.
This new Praesepe-calibrated gyrochronology relation is,
\begin{equation}
    \log_{10}(P_\mathrm{rot}) =
    c_A\log_{10}(t) +
    \sum_{n=0}^4 c_n[\log_{10}(G_{BP}-G_{RP})]^n
\label{eqn:fgk_gyro}
\end{equation}
for stars with $G_{BP} - G_{RP}$\ $<$ 2.7 and
\begin{equation}
    \log_{10}(P_\mathrm{rot}) =
    c_A\log_{10}(t) +
    \sum_{m=0}^1 b_m[\log_{10}(G_{BP}-G_{RP})]^m
\label{eqn:m_gyro}
\end{equation}
for stars with $G_{BP} - G_{RP}$\ $>$ 2.7, where $P_{\mathrm{rot}}$ is rotation period
in days and $t$ is age in years.
Best-fit coefficient values are shown in table \ref{tab:coefficients}.
\begin{table}[h!]
  \begin{center}
      \caption{Coefficient values for equations \ref{eqn:fgk_gyro} and
      \ref{eqn:m_gyro}.}
    \label{tab:coefficients}
    \begin{tabular}{l|c}
      Coefficient & Value  \\
      \hline
      $c_A$ & 0.65 $\pm$ 0.05 \\
      $c_0$ & -4.7 $\pm$ 0.5 \\
      $c_1$ & 0.72 $\pm$ 0.05 \\
      $c_2$ & -4.9 $\pm$ 0.2 \\
      $c_3$ & 29 $\pm$ 2 \\
      $c_4$ & -38 $\pm$ 4 \\
      $b_0$ & 0.9 $\pm$ 0.5 \\
      $b_1$ & -13.6 $\pm$ 0.1 \\
    \end{tabular}
  \end{center}
\end{table}

We calibrated this new relation using Praesepe and the Sun alone, without
including other clusters, because different open clusters have slightly
different period-color relationships \citep{agueros2018, agueros2018b,
curtis2018, curtis2019} and, given that we used an age-color separable
relation, adding in extra clusters was unlikely to improve the calibration.
We did not include asteroseismic stars because most are slightly evolved and
would require a gyrochronology relation that depends on $\log g$.
This new relation, fit to Praesepe and the Sun, does not perfectly predict the
rotation periods of stars at all colors and ages, but it provides several
improvements over previous empirical gyrochronology relations.
Firstly, it uses new \Ktwo\ rotation period measurements to model the
period-color relation of Praesepe in detail, secondly, it includes a model for
the rotational behavior of M dwarfs, and thirdly, it is calibrated to {\it Gaia}\
$G_{BP} - G_{RP}$\ color: a directly observable quantity and the most widely available
photometric color index.

Equation \ref{eqn:fgk_gyro}, describing the rotational evolution of FGK and
early M stars, is most closely analogous to previously calibrated empirical
gyrochronology relations \citep[{\it e.g.}][]{barnes2003, barnes2007, mamajek2008,
barnes2010, angus2015}.
It describes stars with Sun-like magnetic dynamos that follow a
`Skumanich-like' magnetic braking law, {\it i.e.}\ their rotation period increases
with the square root of their age.
It does not describe stars hotter than around 6250 K which have a thin
convective layers and a weak magnetic dynamo, nor does it describe fully
convective stars which take a long time to converge onto the
\citet{skumanich1972} braking law \citep{krishnamurthi1997}.
In addition, stars with Rossby numbers larger than around 2 do not show
Skumanich-like magnetic braking \citep{vansaders2016, vansaders2018}, so
equation \ref{eqn:fgk_gyro} does not describe these stars.
It also does not describe the rotation periods of subgiants or giants, whose
rotation periods are influenced by their expanding radii, changing winds, and
core-to-surface differential rotation \citep[{\it e.g.}][]{vansaders2013, tayar2018}.
Finally, this relation does not describe the rotation periods of dynamically
or magnetically interacting binaries which often rotate more rapidly than
isolated stars at the same age and color \citep{douglas2016}.
In order to include non-Skumanich type stars in our combined gyrochronal and
isochronal model, we designed a composite gyrochronology relation which
describes a mean and variance model for the rotation period distributions
across the HRD.
Rotation periods are modeled differently for stars of different photometric
color, EEP, Rossby number, age and metallicity.
The rotation period model for each of these groups is described below.
\begin{itemize}
    \item{The rotation periods of late F, GK, and early M dwarfs
        (0.56 $<$ $G_{BP} - G_{RP}$\ $<$ 2.7), with Rossby numbers less than 2, are
        modeled as a log-normal distribution, with mean given by equation
        \ref{eqn:fgk_gyro}, and variance given by the squared inverse of their
        observational uncertainties.}
    \item{The rotation periods of fully convective stars ($G_{BP} - G_{RP}$\ $>$ 2.7)
        are modeled with a log-normal distribution with mean given by equation
        \ref{eqn:m_gyro}, and an extra standard deviation of
        0.5 dex, added to observational uncertainties.
        This distribution reflects the observed rotation periods of late M
        dwarfs in the Praesepe cluster which span a broad range at every
        color.
        Late M dwarfs with masses $\lesssim$ 0.3 M$_\odot$, temperatures
        $\lesssim$ 3500 and $G_{BP} - G_{RP}$ $\gtrsim$ 2.7 exhibit weak magnetic
        braking until at least after the age of Praesepe ($\sim$650 million
        years).
    \item{The rotation periods of F-type and hotter stars, with $G_{BP} - G_{RP}$\ $<$
        0.56 dex, are modeled as a log-normal distribution with mean,
        $\log_{10}(P_\mathrm{rot})=0.56$,
        and an additional standard deviation, added to observational
        uncertainties, of 0.5 dex.
        Stars more massive than around 1.25 M$_\odot$, with a temperature
        $\gtrsim$ 6250 K and a $G_{BP} - G_{RP}$\ $\lesssim$ 0.56 do not spin down
        appreciably over their main-sequence lifetimes because they do not
        have the deep convective envelope needed to generate strong magnetic
        fields.
        This model for the mean and variance of hot star rotation periods is
        based on stars hotter than 6250 K in the \citet{mcquillan2014} sample,
        which have a mean $\log_{10}(P_\mathrm{rot})$ of 0.56 dex and a
        standard deviation of around 0.5 dex.}
        Both hot and cool stars retain rotation periods that are similar to
        their primordial distribution \citep[see {\it e.g.}][]{matt2012,
        somers2017}.}
    \item{The rotation periods of stars with large Rossby numbers are
        modeled as follows.
        The age at which a star's Rossby number would exceed 2 is calculated
        by inverting equation \ref{eqn:fgk_gyro}.
        If a star's age is greater than this, its mean rotation period is
        given by $P_\mathrm{max} = 2/\tau$, where $\tau$ is the convective
        turnover timescale, calculated via stellar mass using equation 11 from
        \citet{wright2011}.}
    \item{The rotation periods of subgiants are described with a log-normal
        distribution with mean given by equation \ref{eqn:fgk_gyro},
        \ref{eqn:m_gyro} or 0.56, depending on its color, and an additional
        standard deviation of 5 dex.
        This is not an accurate model of subgiant rotation
        periods \citep[see, {\it e.g.}][]{vansaders2013} but the highly
        inflated variance makes it a weakly constraining one.
        Isochrone fitting provides precise ages for subgiants, so by inflating
        the variance of the gyrochronology relation at large EEP, we allow a
        star's position on the HRD/CMD to dominate the age information over
        its rotation period.
        This is useful because we have not yet built an accurate rotation-age
        relation for subgiants into our model.}
    \item{We model stars younger than around 250 Myrs with a log-normal
        distribution with mean function given by equation \ref{eqn:fgk_gyro},
        \ref{eqn:m_gyro} or 0.56, depending on it whether it has
        an intermediate, red, or blue color respectively and a inflated
        standard deviation of 0.5 dex.
        Rotation periods in young open clusters show a large amount of scatter
        because they have not yet converged onto the \citet{skumanich1972}
        spin-down sequence.}
    \item{Finally, we model stars with very low and high metallicites (-0.2
        $>$ [Fe/H] $>$ 0.2) with a log-normal distribution with mean given by
        equation \ref{eqn:fgk_gyro}, \ref{eqn:m_gyro} or 0.56, depending on
        its color, and a standard deviation of 0.5 dex.
        Gyrochronology is not calibrated at these extreme metallicities due to
        a lack of suitable metal poor and rich calibration stars.
        Rather than assume the same gyrochronology model can be na\"ively
        applied to these stars, we take a more conservative approach and model
        them with a broad Gaussian distribution.}
\end{itemize}
Inflating the variance of the rotation period distribtion for stars with
non-Skumanich magnetic braking behavior has two purposes: 1) in the cases of
hot stars and fully convective stars, it allows the broad distributions of
rotation periods observed in clusters and the field to be matched, and 2) it
down-weights the age-information provided by rotation periods in regions of
the HRD/CMD where rotation periods are not information-rich or the
gyrochronology model is inaccurate or uncalibrated.
If the observational uncertainties on rotation periods are 5\% on average,
which corresponds to 0.05/$\ln(10)$ $\sim$ 0.02 dex, adding 0.5 amounts to
a 25$\times$ increase in standard deviation, or a $\sim$ 600$\times$ increase
in variance.
So, practically speaking, when the standard deviation is inflated to 0.5 dex
or more, ages are almost entirely inferred via isochrone fitting.

We used the following composite gyrochronology model to infer ages from
rotation periods,
\begin{equation}
    \log_{10}(P_\mathrm{rot}) \sim \begin{cases}
        \mathcal{N}\left[(\ref{eqn:fgk_gyro}), (\sigma+\sigma_P)^2\right], & Ro < 2,
        0.56 < G_{BP} - G_{RP} < 2.7 \\
        \mathcal{N}[(\ref{eqn:m_gyro}), (\sigma+\sigma_P)^2], & Ro < 2,
        G_{BP} - G_{RP} > 2.7 \\
        \mathcal{N}[\log_{10}(P_\mathrm{max}), (\sigma+\sigma_P)^2],& Ro \geq 2 \\
        \mathcal{N}[0.56, (\sigma+\sigma_P)^2],& G_{BP} - G_{RP} < 0.56,
    \end{cases}
\label{eqn:gyro}
\end{equation}
where $\sigma$ is the relative period uncertainty, divided by $\ln(10)$, on
individual rotation period measurements and $\sigma_P$ is an additional
scatter that is a function of EEP, age, metallicity and color.
It takes a maximal value of 0.5 for hot stars and fully convective stars, 5
for subgiants and giants, and a minimal value of zero for late F, GK and early
M dwarfs.
The variance model is shown in figure \ref{fig:variance}.
Sigmoid functions were used to provide smooth transitions between regions of
low and high variance.
Sharp changes in variance would produce sharp changes in likelihood, which
would cause the posterior distributions over stellar parameters to be more
difficult to sample.
The sigmoid functions shown in figure \ref{fig:variance} reach half their
maximum values at $G_{BP} - G_{RP}$\ = 0.56 and 2.5 for hot and cool stars respectively,
EEP = 454 for subgiants, age = 250 Myrs for young stars, $[$M/H$]$ = -0.2 for
metal poor stars and 0.2 for metal rich stars.
The logistic growth rate, or steepness, of the sigmoid functions is 100
dex$^{-1}$ for both color transitions, .2 EEP$^{-1}$ for the EEP transition,
20 dex$^{-1}$ for the age transition and 5 dex$^{-1}$ for the both metallicity
transitions.
The additional standard deviation is additive, so if a star is {\it e.g.}\ hot,
evolved and metal poor, the additional standard deviation of its rotation
period rises to 6.

\begin{figure}
  \caption{
    The additional rotation period scatter, $\sigma_P$, added to the
    observational period uncertainties in the model (see equation
    \ref{eqn:gyro}).
    The standard deviation was increased for early F and hotter
    stars ($G_{BP} - G_{RP}$ $<$ 0.56), late M dwarfs ($G_{BP} - G_{RP}$\ $>$ 2.7) and evolved
    stars (EEP $\gtrsim$ 420) in order to down-weight the age-information
    supplied
    by rotation periods and reproduce observed rotation period distributions.
    We also increased the variance for stars younger than around 250 Myrs,
    because the rotation periods of these stars typically have not yet
    converged onto a tight gyrochronology sequence, and for very high and low
    metallicity stars (-0.2 $\gtrsim$ [Fe/H] $\gtrsim$ 0.2) because the
    gyrochronology relations have not been calibrated at these extreme values.
    Down-weighting the gyrochronal likelihood by the inverse variance
    ($1/\sigma^2$) allowed the ages of these stars to be mostly inferred
    via isochrone fitting.
    Sigmoid functions were used to provide smooth transitions between regions
    of low and high variance.
}
  \centering
    \includegraphics[width=1.\textwidth]{variance}
\label{fig:variance}
\end{figure}

\subsection{Simultaneously fitting gyrochronology and isochrones}
The previous part of this section describes the model for the mean and
variance of rotation periods as a function of their ages (and colors, EEPs,
masses and metallicities).
In what follows, we describe how this model was combined with a stellar
evolution model to infer stellar ages (and other parameters) via
gyrochronology and isochrone fitting simultaneously.
Our goal was to infer the age of a star from its observable properties by
estimating the posterior probability density function (PDF) over age,
\begin{equation} \label{eqn:eqn1}

    p(t|{\bf m_x}, P_{\mathrm{rot}}, \bar{\pi}),
\end{equation}
where $t$ is age, ${\bf m_x}$ is a vector of
apparent magnitudes in various bandpasses,
$P_{\mathrm{rot}}$\ is the rotation period and $\bar{\pi}$\ is parallax.
Spectroscopic properties ($T_{\mathrm{eff}}$, log(g)\ and $\mathrm{[Fe/H]}$) and/or
asteroseismic parameters ($\Delta \nu$\ and $\nu_{\mathrm{max}}$) may also be available for a star,
in which case they would appear to the right of the `$|$' in the above
equation since they are observables.
In order to calculate a posterior PDF over age, other stellar parameters must
be marginalized over.
These parameters are distance ($D$), V-band extinction ($A_V$), the
inferred metallicity, $[M/H]$\footnote{The inferred metallicity, [M/H] is a
model parameter which is different to the {\it observed} metallicity, [Fe/H]
which would appear on the right side of the $`|'$ in equation \ref{eqn:eqn1}.},
and equivalent evolutionary phase (abbreviated to EEP or
$E$).
EEP is a dimensionless number ranging from around 200 for M dwarfs up
to around 1600 for giants and is 355 for the Sun \citep[see][]{dotter2016,
choi2016}.
Stars are defined as subgiants when their EEP exceeds 454.
Mass is uniquely defined by EEP, age and metallicity.
The marginalization involves integrating over these extra parameters,
\begin{eqnarray} \label{eqn:bayes}

    & p(t|{\bf m_x},
    P_{\mathrm{rot}}, \bar{\pi})
\\ \nonumber

    & \propto \int p({\bf m_x},
    P_\mathrm{rot}, \bar{\pi}|
    t, E, [M/H], D, A_V)~p(t)\, p(E)\, p([M/H])\, p(D)\, p(A_V)\, \mathrm{d}E\,
    \mathrm{d}[M/H]\, \mathrm{d}D\, \mathrm{d}A_V.
\end{eqnarray}
This equation is a form of Bayes' rule,
\begin{equation} \label{eqn:eqn2}
\mathrm{Posterior} \propto \mathrm{Likelihood} \times \mathrm{Prior},
\end{equation}
where the likelihood of the data given the model is,
\begin{equation} \label{eqn:full_likelihood}

    p({\bf m_x}, \bar{\pi}, P_{\mathrm{rot}}|t, E, D, A_V, [M/H]),
\end{equation}
and the prior PDF over parameters is,
\begin{equation} \label{eqn:prior}
    p(t)\, p(E)\, p(D)\, p(A_V)\, p([M/H]).
\end{equation}
The priors we used are described in the appendix.

We assumed that the process of magnetic braking is independent of hydrogen
burning in the core, outside of the dependencies that are captured in the
model.
This assumption allowed us to multiply two separate likelihood
functions together: one computed using an isochronal model and one computed
using a gyrochronal model.
We assumed that the probability of observing the measured observables given
the model parameters was a Gaussian and that the observables were identically
and independently distributed.
The isochronal likelihood function was,
\begin{eqnarray} \label{eqn:isochrones_only_likelihood}

    & \mathcal{L_{\mathrm{iso}}} = p({\bf m_x},
    \bar{\pi}|t, E, [M/H], D,
    A_V) \\ \nonumber
    & = \frac{1}{\sqrt{(2\pi)^n \det(\Sigma)}}
    \exp\left( -\frac{1}{2} ({\bf O_I} - {\bf I})^T \Sigma ^{-1}
    ({\bf O_I} - {\bf I})\right),
\end{eqnarray}
where ${\bf O_I}$ is the vector of n observables: $\bar{\pi}$, ${\bf m_x}$ plus
spectroscopic and/or asteroseismic observables if available, and $\Sigma$ is
the covariance matrix of that set of observables.
${\bf I}$ is the vector of {\it model} observables that correspond to a set of
parameters: $t$, $E$, $[M/H]$, $D$ and $A_V$, calculated using an isochrone model.
We assumed there is no covariance between these observables and so this
covariance matrix consists of individual parameter variances along the
diagonal with zeros everywhere else.
The gyrochronal likelihood function was,
\begin{eqnarray} \label{eqn:gyro_likelihood}
    & \mathcal{L_{\mathrm{gyro}}} = p(P_\mathrm{rot} |t, E, [M/H], D, A_V) \\ \nonumber
    & = \frac{1}{\sqrt{(2\pi) \det(\Sigma_P)}}
    \exp\left( -\frac{1}{2} ({\bf P_O} - {\bf P_P})^T \Sigma_P ^{-1}
    ({\bf P_O} - {\bf P_P})\right),
\end{eqnarray}
where ${\bf P_O}$ is a 1-D vector of observed logarithmic rotation periods,
and ${\bf P_P}$ is the vector of corresponding logarithmic rotation periods,
predicted by the model.
$\Sigma_P$ was comprised of individual rotation period measurement
uncertainties, plus an additional variance that is a function of EEP and
$G_{BP} - G_{RP}$\
color, added in quadrature.
This variance accounts for the stochastic nature of the rotation periods of
very hot and very cool stars and allowed us to predominantly use isochrone
fitting to measure the ages of subgiants.
The full likelihood used in our model was the product of these two likelihood
functions,
\begin{equation}
    \mathcal{L}_{\mathrm{full}} = \mathcal{L}_{\mathrm{iso}} \times
    \mathcal{L}_{\mathrm{gyro}}.
\end{equation}

The inference processes proceded as follows.
First, a set of parameters: age, EEP, metallicity, distance and extinction,
and observables for a single star were passed to the isochronal likelihood
function in equation \eqref{eqn:isochrones_only_likelihood}.
Then, a set of observables corresponding to those parameters were generated
from the MIST model grid using {\tt isochrones.py} \citep{isochrones} and
compared to the measured observables via the isochronal likelihood,
$\mathcal{L}_{\mathrm{iso}}$ (also computed using {\tt isochrones.py}).
The parameters were also passed to the gyrochronology model (equation
\ref{eqn:gyro}) where $t$, $E$,
$[M/H]$, $D$ and $A_V$ were used to calculate $G_{BP} - G_{RP}$\ color and mass from the
MIST model grid and, in turn, rotation period via the gyrochronology model.
EEP and $G_{BP} - G_{RP}$\ were also used to calculate the additional rotation period
variance, added to the individual period uncertainties.
This model rotation period was compared to the measured rotation period using
gyrochronal likelhood function of equation \ref{eqn:gyro_likelihood}.
The gyrochronal log-likelihood was added to the isochronal log-likelihood to
give the full likelihood, which was then added to the log-prior to produce a
single sample from the posterior PDF.

Ages were inferred with {\tt stardate}\ using Markov Chain Monte Carlo.
The joint posterior PDF over age, mass, metallicity, distance and extinction
was sampled using the affine invariant ensemble sampler, {\tt emcee}
\citep{foreman-mackey2013} with 50 walkers.
Samples were drawn from the posterior PDF until 100 {\it independent} samples
were obtained.
We actively estimated the autocorrelation length, which indicates how many
steps were taken per independent sample, after every 100 steps using the
autocorrelation tool built into {\tt emcee}.
The MCMC concluded when {\it either} 100 times the autocorrelation length was
reached and the change in autocorrelation length over 100 samples was less
than 0.01, {\it or} the maximum of 500,000 samples was obtained.
This method is trivially parallelizable, since the inference process for each
star can be performed on a separate core.
The age of a single star can be inferred in around 1 hour on a laptop
computer.

\section{Results}
\label{section:results}

In order to demonstrate the performance of our method, we conducted three sets
of tests.
In the first we simulated observables from a set of stellar parameters for a
few hundred stars using the MIST stellar evolution models and the
gyrochronology model of equation \ref{eqn:gyro}.
The ages predicted with our model were compared to the true parameters used to
generate the data.
In the second we tested our model by measuring the ages of individual stars in
the NGC 6819 open cluster, and in the third we tested our model on {\it Kepler}\
asteroseismic stars.

\subsection{Test 1: simulated stars}
For the first test we drew masses, ages, bulk metallicities, distances and
extinctions at random for 1000 stars from the following uniform distributions:
\begin{eqnarray}
& \mathrm{EEP} \sim U(198, 480) \\
& t \sim U(0.5, 14)\mathrm{~[Gyr]} \\
& [Fe/H] \sim U(-0.2, 0.2) \\
& D \sim U(10, 1000)~\mathrm{[pc]} \\
& A_V \sim U(0, 0.1).
\end{eqnarray}
$T_{\mathrm{eff}}$, log(g), [Fe/H], parallax, and apparent magnitudes $B$, $V$, $J$, $H$, $K$,
{\it Gaia}\ $G$, $G_{BP}$ and $G_{RP}$ were generated from these
stellar parameters using the MIST stellar evolution models.
We added a small amount of noise to the `observed' stellar properties in order
to reflect optimistic observational uncertainties for isochrone-dating.
We added Gaussian noise with a standard deviation of 25 K to $T_{\mathrm{eff}}$, 0.01 dex
to [Fe/H]\ and log(g), and 10 mmags to $B$, $V$, $J$, $H$, and $K$ magnitudes.
These are just one choice of uncertainties that we could have adopted and are
extremely optimistic.
The uncertainties on predicted ages {\it will} depend strongly on all
observational uncertainties, however, since this analysis is designed to show
the relative improvement in stellar age precision when {\it rotation periods}
are included, we chose to use best-case spectroscopic parameters.
The noise added to Gaia $G$-band photometry ranged from
0.3 mmag for stars brighter than 13th magnitude, to 10 mmag for stars
around 20th magnitude \citep{evans2017, brown2018}.
Noise added to {\it Gaia}\ $G_{BP}$ and $G_{RP}$ bands ranged from 2 mmag for stars
brighter than 13th magnitude to 200 mmag for stars fainter than 17th.
Unphysical combinations of stellar parameters were discarded, resulting in a
final sample size of 841 simulated stars.
Figure \ref{fig:CMD_age} shows the position of these stars on an HRD
(with log(g)\ on the y-axis instead of luminosity to improve the visibility of
the MS), colored by their age.
Rotation periods for these stars were generated using the gyrochronology
relation described in equation \ref{eqn:gyro}.
We added 5\% Gaussian noise to all stellar rotation periods to represent
realistic measurement uncertainties of 5\%.
The median uncertainty on rotation periods calculated from {\it Kepler}\ light
curves, provided in the \citet{mcquillan2014} catalog is 1\%.
However, the \citet{aigrain2015} injection and recovery study showed that true
rotation period uncertainties are often slightly larger than this, and noise
distribution of rotation periods can be highly non-Gaussian
\citep[{\it e.g.}][]{aigrain2015, angus2018}.
\begin{figure}
  \caption{
      The simulated star sample plotted on an HRD, colored by age
    (top panel) and rotation period (bottom panel).
    HRD positions were calculated using MIST isochrones via the {\tt
    isochrones.py} {\it Python} package and rotation periods were generated
    using equation \ref{eqn:gyro}.
    This figure was generated in a Jupyter notebook available at
    \url{https://github.com/RuthAngus/stardate/blob/master/paper/code/Simulate_data.ipynb}
}
  \centering
    \includegraphics[width=1\textwidth]{simulated_CMD}
\label{fig:CMD_age}
\end{figure}
Figure \ref{fig:rotation_model} shows the rotation periods of 841
stars generated from the gyrochronology model.
\begin{figure}
  \caption{
Data simulated from the rotation period model.
    Late F, GK and early M dwarfs (stars with 0.56 $<$ $G_{BP} - G_{RP}$\ $<$ 2.7 follow
    the Praesepe-calibrated gyrochronology relation (dashed gray lines), with
    the exception of old, slowly
    rotating stars with large Rossby numbers whose rotation periods are fixed
    at 2$\times$ their convective overturn time.
    The rotation periods of early F ($G_{BP} - G_{RP}$ $<$ 0.56), late M dwarfs ($G_{BP} - G_{RP}$
    $<$ 2.7) and subgiants (EEP $\gtrsim$ 420) were generated
    from a log-normal distribution with standard deviation given by equation
    \ref{eqn:gyro}.
The top panel shows the rotation periods vs. $G_{BP} - G_{RP}$\ colors of simulated stars,
    colored by their age and the bottom panel shows the same stars colored
    by their equivalent evolutionary phase (EEP).

    The gray lines describe the mean gyrochronology model at ages 1,
    3, 5, 7, 9, 11, and 13 (rotation periods rise with age).
    This figure was generated in a Jupyter Notebook, available at
    \url{https://github.com/RuthAngus/stardate/blob/master/paper/code/Simulate_data.ipynb}
}
  \centering
    \includegraphics[width=1.\textwidth]{rotation_model_praesepe}
\label{fig:rotation_model}
\end{figure}

We took two approaches to inferring the ages of these simulated stars:
firstly using isochrone fitting {\it only}, and secondly using isochrone
fitting {\it combined with} a gyrochronology model ({\tt stardate}).
Since the posterior PDFs of stars are often multimodal, we found that the
choice of initial positions of the {\tt emcee} walkers influenced the final
outcome because walkers occasionally got stuck in local minima.
We found that the following set of initial parameters worked well, though not
perfectly: EEP = 330, $t = 9.56$ Gyr, $[M/H] = -0.05$, $D = 269$ pc and $A_V =
0.0$\footnote{These are the default initial parameters provided in {\tt stardate}.}.
Figure \ref{fig:simulation_results} shows the results of combining
gyrochronology with isochrone fitting for the simulated sample.
The stars' true ages are plotted against their predicted ages, with ages
inferred with gyrochronology and isochrone fitting
in color, and ages inferred using isochrone fitting only plotted in light
grey.
The different panels show the results for different types of stars: FGK
dwarfs that are still undergoing magnetic braking, FGK dwarfs that have ceased
magnetic braking (their Rossby number is around 2), M dwarfs, and evolved
stars.
The selection criteria for these groups are in the panel headings.
The FGK dwarfs with low Rossby numbers showed the largest improvement: the
median age precision for this group (defined as the standard deviation of the
posterior as a percentage of the median age) was 8\% when using a combination
of isochrones and gyrochronology, and 22\% using isochrone fitting alone.
This equates to an almost 3$\times$ improvement in age precision.
The age RMS of this group was 0.8 Gyr using isochrones and gyrochronology, and
2 Gyr using isochrones only.
Despite the fact that stars with Rossby numbers of 2 have stopped spinning
down and their rotation periods no longer evolve with age, the ages of these
stars can still be relatively precisely constrained with isochrone fitting.
The median age precision for stars with large Rossby numbers was 11\% with
gyrochronology and isochrone fitting, and 13\% with isochrone fitting only.
The precision of M dwarf ages did improve overall when their rotation periods
were included, but this improvement was entirely driven by the early M dwarfs.
The precision of this group improved overall from 33\% to 22\% and RMS from
5.4 Gyr to 4.6 Gyr.
The precision of ages inferred for evolved stars changed very little when
rotation periods were included in the inference process.
This is because the variance of the rotation-age relation was inflated by a
large amount in the gyrochronology model (equation \ref{eqn:gyro}), making
rotation periods almost entirely uninformative for this group.
The median age precision of subgiants from both gyrochronology and isochrone
fitting and isochrone fitting alone was 7\%.

\begin{figure}
  \caption{
The true vs. predicted ages of simulated stars.
    Ages calculated by combining gyrochronology
    and isochrone fitting with {\tt stardate}\ are shown in color and ages calculated with
    isochrone fitting only are shown in gray.
The different panels show the results for stars
    with $G_{BP} - G_{RP}$\ $<$ 2.2 (FGK dwarfs) that are still braking magnetically
    ($Ro < 2$), stars with $G_{BP} - G_{RP}$\ $<$ 2.2 that have stopped braking
    magnetically ($Ro \geq 2$),
    stars with 2.2 $<$ $G_{BP} - G_{RP}$\ (M dwarfs), and evolved stars (EEP $>$ 420).
Gyrochronology is highly effective for FGK stars and ages inferred with both
    gyrochronology and isochrone fitting are more accurate and precise than
    ages inferred via isochrone fitting only for this group.
Neither gyrochronology nor isochrone fitting can provide precise ages for
    M dwarfs, so the ages of these stars are imprecise regardless of
    age-dating method.
    This figure was generated in a Jupyter Notebook available at
    \url{https://github.com/RuthAngus/stardate/blob/master/paper/code/Results_plots.ipynb}.
}
  \centering
    \includegraphics[width=1\textwidth]{simulation_results}
\label{fig:simulation_results}
\end{figure}

An important caveat associated with these results is that they strongly depend
on the uncertainties adopted for all observables used in the analysis: $T_{\mathrm{eff}}$,
[Fe/H], log(g), $G$, $G_{BP}$, $G_{RP}$, $J$, $H$, $K$, $B$, $V$, and rotation
period.
Changing the uncertainties on these observables will affect the uncertainties
on inferred ages in different ways.
This demonstration is not intended to reflect the typical age uncertainties
that will result for all stars in reality, it merely exemplifies the increase
in stellar age precision that results from one specific choice of
uncertainties.
Needless to say, estimating the uncertainties on observables accurately can be
as important as accurately measuring the observables themselves.

This simulation experiment was designed to show the theoretical improvement in
age precision when gyrochronology is incorporated into isochrone fitting.
However, it does not demonstrate the accuracy of this method because the test
data were simulated from the same model used to infer ages.
The results of this experiment are therefore extremely accurate by design.
When applying this method to real data, the results will only be accurate if
the model is accurate.
In other words, {\tt stardate}, like any age-dating method, provides model-dependent
ages.
Stellar ages calculated with {\tt stardate}\ depend on both the accuracy of the MIST
models {\it and} the accuracy of the gyrochronology model (equation
\ref{eqn:gyro}).
In order to test the accuracy of {\tt stardate}, we applied it to real data, as described
in the following section.

\subsection{Test 2: Open clusters}
In order to test our model on real stars with known ages, we selected a sample
of stars in the 2.5 Gyr NGC 6819 cluster.
We compiled {\it Kepler}-based rotation periods \citep{meibom2015}, {\it Gaia}\
photometry and {\it Gaia}\ parallaxes for members of the NGC 6819 cluster.
Figure \ref{fig:NGC6819} shows the period-color relation of this
cluster and figure \ref{fig:NGC6819_results} shows the results of inferring
the ages of individual cluster members using a combination of gyrochronology
and isochrone fitting (via {\tt stardate}) and isochrone fitting alone.
The ages of F stars in this cluster ($G_{BP} - G_{RP}$\ $\sim$ 0.5-0.75) were relatively
precisely constrained by isochrone fitting alone because, at 2.5 Gyr, they are
approaching the MS turnoff.
For these hot stars, ages inferred with gyrochronology and isochrones were
similar to ages inferred with isochrones and similarly precise, showing that
isochrones provide a lot of age information for these stars and rotation
periods do not add significantly more information.
The G and early K stars in this cluster ($G_{BP} - G_{RP}$\ $\lesssim$ .65) were not
precisely recovered from isochrone fitting alone -- the isochrone-only age
posteriors tend towards the prior which is a uniform distribution between 0
and 13.8 Gyrs.
The median age of stars in the cluster was 4.27 $\pm$ 0.48 Gyr when only
isochrone fitting was used.
In contrast, including gyrochronology when inferring the ages of G and K stars
in this cluster significantly improved age precision.
The median age of stars in this cluster was 2.63 $\pm$ 0.16 Gyr when ages were
inferred with a combination of isochrone fitting and gyrochronology, using the
newly calibrated Praesepe-based gyrochronology model.
The previously-calibrated \citet{angus2015} model resulted in a median stellar
age of 2.66 $\pm$ 0.21 Gyr, which is still consistent with the established
cluster age of 2.5 Gyr.
The median age of stars in the cluster using uncorrected photometry was
slightly underestimated at 1.86 $\pm$ 0.22 Gyr.
This suggests that, despite the fact that V-band extinction is marginalized
over during the inference process, correcting for extinction {\it before} ages
are estimated will reduce bias introduced by dust.

\begin{figure}
  \caption{
    The {\it Kepler}-based rotation periods of members of the 2.5 Gyr NGC 6819 open
    cluster.
    The raw $G_{BP} - G_{RP}$\ colors are shown in red and the dust-corrected colors are
    shown in black.
    The dashed line shows a gyrochronology model that was fit to the Praesepe
    cluster and the Sun in this work, interpolated to 2.5 Gyrs.
    The solid blue line shows a previously calibrated gyrochronology model
    \citep{angus2015}.
    This figure was generated in a Jupyter Notebook available at:
    \url{https://github.com/RuthAngus/stardate/blob/master/paper/code/NGC6819.ipynb}
  }
  \centering
    \includegraphics[width=1\textwidth]{NGC6819}
\label{fig:NGC6819}
\end{figure}

\begin{figure}
  \caption{
    The inferred ages of members of the NGC 6819 open cluster as a function of
    their $G_{BP} - G_{RP}$\ color.
    Ages of stars inferred using a combination of isochrone fitting and
    gyrochronology (Praesepe and Sun calibration) with dereddened {\it Gaia}\ $G$,
    $G_{BP}$, and $G_{RP}$ photometry (black circles) and uncorrected, raw,
    photometry (red squares).

    Even though V-band extinction is marginalized over in the inference
    process, reddening can still bias ages.
    Blue triangles, pointing up, show ages inferred using isochrone fitting
    and gyrochronology, with the \citet{angus2015} gyrochronology model.
    Orange triangles, pointing down, show ages inferred using isochrone
    fitting only.
    The ages of F stars (stars bluer than 0.7) were precisely constrained by
    isochrones and including gyrochronology makes little difference to their
    inferred ages.
    The age precision of G and K dwarfs (stars redder than 0.7) was improved
    by including gyrochronology.
    The median age of stars inferred using the gyrochronology model
    calibrated to Praesepe and the Sun (black circles) was 2.65 $\pm$ 0.13
    which is consistent with the established cluster age (2.5 Gyr).
    This figure was generated in a Jupyter Notebook available at:
    \url{https://github.com/RuthAngus/stardate/blob/master/paper/code/NGC6819.ipynb}
}
  \centering
    \includegraphics[width=1\textwidth]{NGC6819_results}
\label{fig:NGC6819_results}
\end{figure}

We found that 5\% rotation period uncertainties resulted in the most accurate
ages for NGC 6819.
The uncertainties on the measured rotation periods, provided in
\citet{meibom2015} and shown in figure \ref{fig:NGC6819}, were likely
underestimated for some stars.
Underestimated rotation period uncertainties can result in inaccurate age
estimates.
This raises the question: how should uncertainties on rotation periods be
estimated?
The likelihood is weighted by the inverse variance, so uncertainties on the
rotation period control the relative information provided by gyrochronology,
isochrones, and the prior.
If rotation period uncertainties are either too large or too small, the
resulting age estimate will be imprecise and/or inaccurate.
It is difficult to measure uncertainties on rotation periods directly:
standard techniques such as Lomb-Scargle periodograms and autocorrelation
functions do not provide them.
    Ideally, rotation period uncertainties should capture {\it both} the
measurement precision, {\it and} the physical uncertainty introduced by the
latitudinal movement of star spots on the surface of a differentially rotating
star.
For example, \citet{donahue1996} demonstrated that the seasonal variation in
measurements of G and K star rotation periods is a function of period, $\Delta
\mathrm{P_{rot}} \propto \mathrm{P_{rot}}^{1.3\pm0.1}$.
This variation is presumably caused by a latitudinal drift in the dominant
active regions, which traces the stellar cycle over several years, in
combination with latitudinal differential rotation.
This suggests that latitudinal spot drifting does not significantly
affect stellar rotation periods when stars are young, for example the scatter
of rotation periods about the mean gyrochronology model in Praesepe is only
around 5\%.
However it is likely that this effect will become more important at older
ages.
A thorough exploration of how rotation period uncertainties, from both
measurement uncertainty and physical variation, affect stellar ages via
gyrochronology is key to understanding the power of gyrochronology as an
age-dating method.
For now, we leave this exploration for a future study.

\subsection{Test 3: Kepler asteroseismic stars}
    In order to test our method in the regime where both isochrone
fitting and gyrochronology become important, we recovered the ages of the 21
asteroseismic stars analysed in \citet{vansaders2016}.
These 21 stars were observed in {\it Kepler}'s short cadence mode and are a mixture
of dwarfs and subgiants.
Their asteroseismic ages were calculated from the analysis of the frequencies
of individual oscillation modes \citep{mathur2012, metcalfe2014,
silvaaguirre2015, ceillier2016}, and their rotation periods from their
{\it Kepler}\ light curves \citep{garcia2014}.
We crossmatched these stars with the {\it Gaia}\ catalog to obtain parallaxes and
apparant magnitudes in the {\it Gaia}\ G, $\mathrm{G_{BP}}$ and $\mathrm{G_{RP}}$
band passes.
We also added J, H and K 2MASS magnitudes from the Kepler input catalog
\citep{brown2011},
and used spectroscopic effective temperatures, spectroscopic metallicities and
rotation periods reported in table 1 of \citet{vansaders2016}.
The {\it Gaia}\ photometry is extremely precise, and we found that artificially
inflating the uncertainties on {\it Gaia}\ apparent magnitudes by a factor of 10
substantially improved the quality of fit, both in terms of MCMC convergence
and agreement with asteroseismic age measurements.
In figure \ref{fig:astero} we show the ages of these 21 stars inferred using
isochrone fitting and gyrochronology, against their asteroseismic ages,
calculated using the Asteroseismic Modeling Portal (AMP) \citep{metcalfe2009,
metcalfe2012, metcalfe2014}.
In this figure, the colored symbols show ages inferred using a combination of
gyrochronology and isochrone fitting, implemented with the {\tt stardate}\ {\it Python}
package.
The black and grey triangles show ages inferred from gyrochronology only,
where the mass and color of the stars were not inferred, but fixed to be the
asteroseismic mass and the {\it Gaia}\ $G_{BP} - G_{RP}$\ color.
These gyrochronal ages were calculated with age as the only free parameter,
without marginalizing over stellar mass, $G_{BP} - G_{RP}$\ color or extinction.
As a result, these gyrochronal ages are {\it not the same} as the ages given
by the maximum of the gyrochronal likelihood function used in the combined
age model, they simply represent an approximation to the gyrochronal age.
Grey triangles are shown for stars where gyrochronology is not applicable
because the stars are either too metal poor, too metal rich, or too evolved.
Black triangles are shown for stars where gyrochronology {\it is} applicable.
The white circles show ages inferred from isochrones only.
Dashed lines connect the three different age measurements for the same
stars.

Although the ages of all 21 stars shown in figure \ref{fig:astero} were
inferred with a joint isochronal and gyrochronal model, most (all but 8) were
either too evolved, too metal poor, or too metal rich for gyrochronology to
contribute any information to the ages.
These metal poor/rich or evolved stars lie in a regime where the variance on
their rotation period was artificially inflated because the gyrochronology
relations are not thoroughly understood or well calibrated.
The rotation periods of the remaining eight stars {\it did} contribute to
their inferred ages to some degree, however isochrones still dominated the age
information for some of them because these stars are relatively old and/or
relatively hot.

In general, there is relatively poor agreement between the asteroseismic ages
and the ages inferred using {\tt stardate}.
Much of this discrepancy is driven by differences in the isochronal ages,
which is likely attributable to differences between the MIST stellar evolution
models and those used in the AMP analysis: a combination of the Aarhus stellar
evolution code \citep[ASTEC][]{christensen-dalsgaard2008a} and the adiabatic
pulsation code \citep[ADIPLS][]{christensen-dalsgaard2008b}.
We compared non-rotating, Solar-metallicity MIST isochrones for middle-aged
stars with Solar-metallicity BaSTI isochrones \citep{pietrinferni2004,
hidalgo2018} and found that, for stars between 4 and 8 Gyrs, in the same
effective temperature range as the asteroseismic stars, the age discrepancy
between the two sets of models can be as large as 1-2 billion years.
The MIST isochrones lie above the BaSTI isochrones on the HR diagram, leading
to a systematic underprediction of ages.

The gyrochronal ages, where gyrochronology is applicable, do not show
excellent agreement with the asteroseismic ages either.
The four hot stars to the left in figure \ref{fig:astero} are rotating more
slowly than predicted by the Praesepe-based gyrochronology models, and as a
result their gyro-ages are older than their asteroseismic ones.
For these hot stars, two out of four have ages that are still consistent, or
close to consistent, with their asteroseismic ages.
The third star from the left is an anomalously slow rotator for its age and
mass and \citet{vansaders2016} also found this star to be surprisingly slowly
rotating.
In contrast, the star with a black triangle symbol (indicating that
gyrochronology is applicable) furthest to the right is {\it rapidly} rotating
for its mass and age, even when weakened braking is taken into account.
This star is around Solar mass (1.0 $\pm$ 0.03 M$_\odot$) and has an
asteroseismic age older than the Sun (7.28 $\pm$ 0.51 Gyr), yet rotates with a
period of only 19.8 $\pm$ 1.3 days.
This is KIC 9098294, a single-lined spectroscopic binary with an orbital
period of around 20 days (Latham, private communication).
It is the only clear SB1 in the \citet{vansaders2016} sample, although some
others do have binary companions with long orbital periods, for which tidal
interactions are not expected to be strong.

\begin{figure}
    \caption{ A comparison of stellar ages inferred using
    asteroseismic modeling with ages inferred using a combination of isochrone
    fitting and gyrochronology.
Colored circles show ages inferred using isochrone fitting and gyrochronology
combined via the {\tt stardate}\ software package.
Black triangles show the ages of all stars inferred via gyrochronology only
    and white circles show ages inferred via isochrone-fitting only.
  }
  \centering
    \includegraphics[width=1.2\textwidth]{asteroseismic_results_nosdss_gaia}
\label{fig:astero}
\end{figure}

\section{Conclusions}
\label{section:conclusion}

We present a statistical framework for measuring precise ages of MS stars and
subgiants by combining observables that relate, via different evolutionary
processes, to stellar age.
Specifically, we combined HRD/CMD placement with rotation periods, in a
hierarchical Bayesian model, to age-date stars based on both their hydrogen
burning and magnetic braking history.
The two methods of isochrone fitting and gyrochronology were combined by
taking the product of two likelihoods: one that contains an isochronal model
and the other a gyrochronal one.
We used the MIST stellar evolution models and computed isochronal ages and
likelihoods using the {\tt isochrones} {\it Python} package.
We fit a new broken power law gyrochronology model to the Praesepe cluster
and included a modification recommended by \citet{vansaders2016} that accounts
for weakened magnetic braking at Rossby numbers larger than 2.
The rotation periods of hot stars, cool stars, evolved stars, young stars and
metal poor and rich stars were modeled with a broad log-normal distribution.
We tested {\tt stardate}\ on simulated data and cluster stars and demonstrated that
combining gyrochronology with isochrone fitting improves the precision of age
estimates for FGK dwarfs by a factor of 3 over isochrone fitting alone,
assuming 5\% measurement uncertainties on rotation periods.
Incorporating rotation periods into stellar evolution models also improves the
precision of the equivalent evolutionary phase (EEP) parameter and, since EEP,
combined with age and metallicity, determines the mass, radius and log(g)\ of a
star, this means rotation periods can improve the precision of {\it all}
stellar parameters.
Although V-band extinction is marginalized over during inference, correcting
photometry for dust-extinction before analysis, or including it as a
prior can improve the accuracy of stellar ages measured with {\tt stardate}.
We also tested {\tt stardate}\ on a set of 21 {\it Kepler}\ asteroseismic stars
\citep{vansaders2016}.
We found that discrepancies between ages measured with {\tt stardate}\ and ages measured
with asteroseismology are likely produced by differences between the MIST and
BaSTI stellar evolution models.
Asteroseismic and cluster stars provide an opportunity for calibration but
given the high-dimensionality of the gyrochronology relations ({\it i.e.}\ rotation
period depends on age, mass, metallicity, surface gravity, etc), many stars
with precise ages, spanning a range of properties, are still needed to
reliably calibrate them.

In cases where gyrochronology predicts inaccurate stellar ages it is either
because models are not correctly calibrated, because the rotation periods or
rotation period uncertainties are themselves inaccurate, or because of
rotational outliers.
For example, {\tt stardate}\ may predict inaccurate ages for stars in close binaries
whose interactions influence their rotation period evolution.
Rotational outliers are often seen in clusters \citep[see {\it e.g.}][]{douglas2016,
rebull2016, douglas2017, rebull2017} and many of these fall above the main
sequence on a CMD, indicating that they are binaries.
In addition, measured rotation periods may not always be accurate and can, in
many cases, be a harmonic of the true rotation period.
For example, a common rotation period measurement failure mode is to measure
half the true rotation period.
The best way to prevent an erroneous or outlying rotation period from
resulting in an erroneous age measurement is to {\it allow} for outlying
rotation periods using a mixture model, a feature that could be built into
{\tt stardate}\ in the future.

The optimal way to age-date stars is by combining {\it all} their available
age-related observables.
This could ultimately include activity dating via flare rates and
chromospheric activity indices, kinematic dating and chemical dating.
Of all the established age-dating methods, gyrochronology and isochrone
fitting are two of the most complementary.
The two methods are optimal in different parts of the HRD:
gyrochronology works well for FGK dwarfs and isochrone fitting works well for
subgiants and hot stars, so combining the two methods results in consistently
precise ages across a range of masses, ages and evolutionary stages.
In addition, using both methods at once circumvents the need to decide which
method to use {\it a priori}.
It eliminates the circular process of classifying a star based on its CMD
position (M dwarf, subgiant, etc), then deciding which age-dating method to
use, then inferring an age which itself depends on the classification that was
made.
It is important to infer all stellar properties at once since they all depend
on each other.
{\tt stardate}\ is applicable to a large number of stars: FGKM dwarfs and subgiants with
a rotation period and broad-band photometry.
This already includes tens-of-thousands of {\it Kepler}\ and \Ktwo\ stars and could
include millions more from {\it TESS}, {\it LSST}, {\it WFIRST}, {\it PLATO}, {\it Gaia}, and others in
the future.

The code used in this project is available as a {\it Python} package called
{\tt stardate}, DOI: \url{ https://doi.org/10.5281/zenodo.2712419}.
It is available for download via Github\footnote{git clone
https://github.com/RuthAngus/stardate.git} or through
PyPI\footnote{pip install stardate\_code}.
Documentation is available at \url{https://stardate.readthedocs.io/en/latest/}.
All code used to produce the figures in this paper is available at
\url{https://github.com/RuthAngus/stardate}.
This paper is based on code with the following Git hash:
f739562c1546e117e9bb217e1732c62b41be8061.

Some of the data presented in this paper were obtained from the Mikulski
Archive for Space Telescopes (MAST).
STScI is operated by the Association of Universities for Research in
Astronomy, Inc., under NASA contract NAS5-26555.
Support for MAST for non-HST data is provided by the NASA Office of Space
Science via grant NNX09AF08G and by other grants and contracts.
This paper includes data collected by the Kepler mission. Funding for the
{\it Kepler}\ mission is provided by the NASA Science Mission directorate.

This work made use of the gaia-kepler.fun crossmatch database created by Megan
Bedell

This work has made use of data from the European Space Agency (ESA) mission
{\it Gaia} (\url{https://www.cosmos.esa.int/gaia}), processed by the {\it Gaia}
Data Processing and Analysis Consortium (DPAC,
\url{https://www.cosmos.esa.int/web/gaia/dpac/consortium}). Funding for the DPAC
has been provided by national institutions, in particular the institutions
participating in the {\it Gaia} Multilateral Agreement.

This research was supported in part by the National Science Foundation under
Grant No. NSF PHY-1748958.

\section{Appendix}
\label{section:appendix}

\subsection*{Priors}
\label{section:priors}

We used the default priors in the {\tt isochrones.py} {\it python} package.
The prior over age was,
\begin{equation}
p(A) = \frac{\log(10) 10^{A}}{10^{10.5} - 10^8}, ~~~ 8 < A < 10.5.
\end{equation}
where $A$, is $\log_{10}(\mathrm{Age~[yrs]})$.
The prior over EEP was uniform with an upper limit of 800.
We found that adding this upper limit reduced some multi-modality caused by
the giant branch and resulted in better performance.
The prior over true bulk metallicity was based on the galactic metallicity
distribution, as inferred using data from the Sloan Digital Sky Survey
\citep{casagrande2011}.
It is the product of a Gaussian that describes the metallicity distribution
over halo stars and two Gaussians that describe the metallicity distribution
in the thin and thick disks:
\begin{eqnarray}
    p(F) =
    & H_F \frac{1}{\sqrt{2\pi\sigma_{\mathrm{halo}}^2}}
    \exp\left(-\frac{(F-\mu_{\mathrm{halo}})^2}{2\sigma_{\mathrm{halo}}}\right)
    \\ \nonumber
    & \times (1-H_F)
    \frac{1}{\xi}
    \left[\frac{0.8}{0.15}\exp\left(-\frac{(F-0.016)^2}{2\times 0.15^2}\right)
    + \frac{0.2}{0.22}\exp\left(-\frac{(F-0.15)^2}{2\times
    0.22^2}\right)\right],
\end{eqnarray}
where $H_F = 0.001$ is the halo fraction, $\mu_\mathrm{halo}$ and
$\sigma_{\mathrm{halo}}$ are the mean and standard deviation of a Gaussian
that describes a probability distribution over metallicity in the halo, and
take values -1.5 and 0.4 respectively.
The two Gaussians inside the square brackets describe probability
distributions over metallicity in the thin and thick disks.
The values of the means and standard deviations in these Gaussians are from
\citet{casagrande2011}.
$\xi$ is the integral of everything in the square brackets from $-\infty$ to
$\infty$ and takes the value $\sim 2.507$.
The prior over distance was,
\begin{equation}
    p(D) = \frac{3}{3000^3} D^2, ~~~ 0 < D < 3000,
\end{equation}
with D in kiloparsecs, and, finally, the prior over extinction was uniform
between zero and one,
\begin{equation}
    p(A_V) = U(0, 1).
\end{equation}

\bibliographystyle{plainnat}

redpajama_set_name: RedPajamaArXiv


Usually performed by a dentist or doctor, oral cancer screenings are performed to look for any signs of cancer or precancerous conditions. The goal is to catch mouth cancer early, while there is more chance for a cure.
The next time you are at the dentist for a routine check-up, ask if they are checking for signs of cancer when examining your teeth. Book your check-up at White Rock Dental in Dallas.
It is best to catch cancer as early as possible to increase the chances of a cure. It is also easier to remove cancer and legions the sooner these conditions are discovered.
Those who use tobacco of any kind, including cigarettes, cigars, chewing tobacco, and snuff, just to name a few.
People who are heavy alcohol drinkers.
Those who have had oral cancer in the past.
People who have experienced a lot of sun exposure; there is an increase in the chance of lip cancer.
Are There Any Downsides to Oral Cancer Screenings?
You might be paying for extra, unnecessary tests. Many people have sores in their mouth that are noncancerous. If a dentist finds a sore, additional testing is required to determine if it is, in fact, cancer. Because sores in your mouth can be common, getting additional testing every time you saw one would be unfeasible.
Use your best judgment and keep an eye on any sores. If a certain sore doesn't seem to be healing the same way other sores in your mouth are, you should consult a dentist.
During an oral cancer screening, a dentist will examine the inside of your mouth for patches that are red or white, as well as mouth sores. Additionally, the dentist will feel the tissues in your mouth to check for any lumps or abnormalities.
Additional tests can consist of rinsing your mouth with a special dye that will turn abnormal cells blue.
To get an oral cancer screening, book an appointment at White Rock Dental in Dallas now!


I'm swamped with work at the moment and nothing seems to be going right! I've made a decision and now seems like I can't go back! How do you keep positive when it seems everyone is out to get you?
Tiger Print Lover, by e-mail.
Theresa, I feel you. Sometimes I think I haven't had a break since 1992! And sadly, we are not alone. According to a poll taken by YouGov, 74% of people in the UK have experienced such high levels of stress that they are unable to cope.
This causes a domino effect that may lead to smoking more, drinking more and an unhealthy relationship with food. Nervousness, depression and loneliness are also pointed as consequences of work related stress.
So in this bleak state of affairs, what can you do?
Try to take sometime to understand what's causing you stress. Is it the workload? Someone at work making you feel rotten? Have you taken way more challenges that you can bare? Did you loose support you used to rely on?
That can seem obvious, but in the darkest of times, it can be hard to switch on the light.
At work, try to reach out to a colleague or a senior manager explaining the difficulties you are having.
It's important to know what your rights at work are and if you can't do your job properly and this is affecting other areas of your life, you should be able to seek help.
Speak to a friend or family member about the difficulties you are having. Just talking about your problems with someone that can empathise can take the pressure out of a difficult time.
Going out for a nice meal and a drink or even just having a grand old time dancing to Abba are tried and tested methods that never fail.
Maybe you are spending too much time focused and concerned with work. When was the last time you watched a good tv show on Netflix, went to a spin class or read a good book?
Being active as painful as it seems is an amazing way to get your body and mind focused again.
Mental illness is real and there's no shame is seeking help when it's needed. Your GP will help you find solutions for your case – and doesn't necessarily mean medication. (Although there's no shame about that either).Therapy programs where you live may be available to you.
Don't panic Theresa! The world is not ending (at least not yet). Sit back, focus on yourself and breathe! One day at a time.


I was searching for a Property and found this listing (MLS® #E4144662). Please send me more information regarding 10607 60 Avenue, Edmonton, AB, T6H 1J4. Thank you!
I'd like to request a showing of 10607 60 Avenue, Edmonton, AB, T6H 1J4 (MLS® #E4144662). Thank you!