stardate
stardate: Combining dating methods for better stellar ages - Published in JOSS (2019)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
2 of 5 committers (40.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
age-rotation-relations
ages
astronomy
astrophysics
bayesian
field-stars
gyrochronology
hierarchical
inference
isochrone-fitting
isochrones
mcmc
rotation
stars
stellar
stellar-ages
stellar-parameters
stellar-rotation
Scientific Fields
Biology
Life Sciences -
40% confidence
Last synced: 4 months ago
·
JSON representation
Repository
Combining dating methods for better stellar ages
Basic Info
- Host: GitHub
- Owner: RuthAngus
- License: mit
- Language: Jupyter Notebook
- Default Branch: master
- Homepage: https://stardate.readthedocs.io/en/latest/index.html#
- Size: 201 MB
Statistics
- Stars: 15
- Watchers: 1
- Forks: 10
- Open Issues: 2
- Releases: 2
Topics
age-rotation-relations
ages
astronomy
astrophysics
bayesian
field-stars
gyrochronology
hierarchical
inference
isochrone-fitting
isochrones
mcmc
rotation
stars
stellar
stellar-ages
stellar-parameters
stellar-rotation
Created over 7 years ago
· Last pushed over 6 years ago
Metadata Files
Readme
License
README.rst
.. stardate documentation master file, created by
sphinx-quickstart on Sat Nov 3 16:17:18 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
stardate
====================================
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2712419.svg
:target: https://doi.org/10.5281/zenodo.2712419
.. image:: http://joss.theoj.org/papers/ee2bbcd6b8fd88492d60f2fe77f4fcdd/status.svg
:target: http://joss.theoj.org/papers/ee2bbcd6b8fd88492d60f2fe77f4fcdd
.. image:: https://travis-ci.org/RuthAngus/stardate.svg?branch=master
:target: https://travis-ci.org/RuthAngus/stardate
.. image:: https://readthedocs.org/projects/stardate/badge/?version=latest
:target: https://stardate.readthedocs.io/en/latest/?badge=latest
Checkout `the documentation `_.
*stardate* currently only works with python3.
*stardate* is a tool for measuring precise stellar ages.
it combines isochrone fitting with gyrochronology (rotation-based ages) to
increase the precision of stellar ages on the main sequence.
the best possible ages provided by *stardate* will be for stars with rotation
periods, although ages can be predicted for stars without rotation periods
too.
if you don't have rotation periods for any of your stars, you might consider
using `isochrones `_ as
*stardate* is simply an extension to *isochrones* that incorporates
gyrochronology.
*stardate* reverts back to *isochrones* when no rotation period is provided.
If you would like to contribute to this project, feel free to raise issues or
submit pull requests from the github repo.
Installation
============
Currently the best way to install *stardate* is from github.
.. code-block:: bash
git clone https://github.com/RuthAngus/stardate.git
cd stardate
python setup.py install
Dependencies
------------
The dependencies of *stardate* are
`NumPy `_,
`pandas `_,
`h5py `_,
`numba `_,
`emcee3 `_,
`tqdm `_ and
`isochrones `_.
These can be installed using pip:
.. code-block:: bash
pip install numpy pandas h5py numba "emcee==3.0rc2" tqdm isochrones
.. You'll also need to download isochrones:
.. .. code-block:: bash
.. git clone https://github.com/timothydmorton/isochrones
.. cd isochrones
.. python setup.py install
You can check out the
`isochrones `_
documentation if you run into difficulties installing that.
Example usage
-------------
::
import stardate as sd
# Create a dictionary of observables
iso_params = {"teff": (4386, 50), # Teff with uncertainty.
"logg": (4.66, .05), # logg with uncertainty.
"feh": (0.0, .02), # Metallicity with uncertainty.
"parallax": (1.48, .1), # Parallax in milliarcseconds.
"maxAV": .1} # Maximum extinction
prot, prot_err = 29, 3
# Set up the star object.
star = sd.Star(iso_params, prot=prot, prot_err=prot_err) # Here's where you add a rotation period
# Run the MCMC
star.fit(max_n=1000)
# max_n is the maximum number of MCMC samples. I recommend setting this
# much higher when running for real, or using the default value of 100000.
# Print the median age with the 16th and 84th percentile uncertainties.
age, errm, errp, samples = star.age_results()
print("stellar age = {0:.2f} + {1:.2f} - {2:.2f}".format(age, errp, errm))
>> stellar age = 2.97 + 0.55 - 0.60
If you want to just use a simple gyrochronology model without running MCMC,
you can predict a stellar age from a rotation period like this:
::
import numpy as np
from stardate.lhf import age_model
bprp = .82 # Gaia BP - RP color.
log10_period = np.log10(26)
log10_age_yrs = age_model(log10_period, bprp)
print((10**log10_age_yrs)*1e-9, "Gyr")
>> 4.565055357152765 Gyr
Or a rotation period from an age like this:
::
from stardate.lhf import gyro_model_praesepe
bprp = .82 # Gaia BP - RP color.
log10_age_yrs = np.log10(4.56*1e9)
log10_period = gyro_model_praesepe(log10_age_yrs, bprp)
print(10**log10_period, "days")
>> 25.98136488222407 days
BUT be aware that these simple relations are only applicable to FGK and early
M dwarfs on the main sequence, older than a few hundred Myrs.
If you're not sure if gyrochronology is applicable to your star, want the best
age possible, or would like proper uncertainty estimates, I recommend using
the full MCMC approach.
Owner
- Name: Ruth Angus
- Login: RuthAngus
- Kind: user
- Location: Brooklyn, NY
- Company: American Museum of Natural History
- Repositories: 136
- Profile: https://github.com/RuthAngus
JOSS Publication
stardate: Combining dating methods for better stellar ages
Published
September 18, 2019
Volume 4, Issue 41, Page 1469
Authors
Ruth Angus
Department of Astrophysics, American Museum of Natural History, New York, NY, 10024, USA, Center for Computational Astrophysics, Flatiron Institute, New York, NY, 10010, USA
Department of Astrophysics, American Museum of Natural History, New York, NY, 10024, USA, Center for Computational Astrophysics, Flatiron Institute, New York, NY, 10010, USA
Timothy D. Morton
Department of Astronomy, University of Florida, Gainesville, FL, 32611, USA, Center for Computational Astrophysics, Flatiron Institute, New York, NY, 10010, USA
Department of Astronomy, University of Florida, Gainesville, FL, 32611, USA, Center for Computational Astrophysics, Flatiron Institute, New York, NY, 10010, USA
Tags
astronomy stellar astrophysicsGitHub Events
Total
- Watch event: 2
- Fork event: 1
Last Year
- Watch event: 2
- Fork event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| RuthAngus | r****s@a****k | 696 |
| Ruth Angus | r****s@r****r | 5 |
| John Livingston | j****n | 2 |
| Arfon Smith | a****n | 2 |
| Timothy Morton | t****n@u****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 4
- Total pull requests: 6
- Average time to close issues: 4 days
- Average time to close pull requests: 17 days
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.5
- Average comments per pull request: 0.33
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- RuthAngus (2)
- bmorris3 (1)
- cpiaulet (1)
Pull Request Authors
- arfon (3)
- timothydmorton (2)
- john-livingston (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
docs/requirements.txt
pypi
- jupyter *
- pandoc *
- sphinx >=1.7.5
requirements.txt
pypi
- emcee ==3.0rc2
- h5py *
- isochrones *
- numba *
- numpy *
- pandas *
- tqdm *
setup.py
pypi
- emcee *
- h5py *
- isochrones *
- numpy *
- pandas *
- tqdm *