Skip to content

Commit

Permalink
Merge pull request #7 from tboudreaux/dev
Browse files Browse the repository at this point in the history
merged dev into master
  • Loading branch information
tboudreaux authored Sep 1, 2023
2 parents e0c3985 + 1fc5f2a commit f642fb1
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 17 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,6 @@ pop = population(
df = pop.to_pandas()
pop.to_csv("TestPop.csv")
```

### Funding and Acknowledgements
We recongnize the support of NASA Grant No. 80NSSC18K0634 in the development of this software.
31 changes: 15 additions & 16 deletions docs_src/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

source_parsers = {".md": CommonMarkParser}

source_suffix = ['.rst', '.md']
source_suffix = [".rst", ".md"]

fidanka = "../../src/fidanka"

Expand All @@ -26,12 +26,12 @@

# -- Project information -----------------------------------------------------

project = 'fidanka'
copyright = '2023, Emily M. Boudreaux'
author = 'Emily M. Boudreaux & Martin Ying'
project = "fidanka"
copyright = "2023, Emily M. Boudreaux"
author = "Emily M. Boudreaux & Martin Ying"

# The full version, including alpha/beta/rc tags
release = '0.5'
release = "0.6.0a1"


# -- General configuration ---------------------------------------------------
Expand All @@ -40,15 +40,15 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx.ext.githubpages',
'sphinx_rtd_theme'
]
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx.ext.githubpages",
"sphinx_rtd_theme",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -60,11 +60,10 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

html_theme_options = {
'navigation_depth':10,
}
"navigation_depth": 10,
}

html_static_path = []

6 changes: 5 additions & 1 deletion docs_src/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Welcome to fidanka's documentation!

.. toctree::
:maxdepth: 10

Home <fidanka>
Fiducial <fidanka.fiducial>
Isochrone <fidanka.isochrone>
Expand All @@ -17,6 +17,10 @@ Welcome to fidanka's documentation!
C-Libs <fidanka.ext>
Misc <fidanka.misc>

Funding
=======
We recognize the support of NASA Grant No. 80NSSC18K0634


.. Indices and tables
.. ==================
Expand Down
40 changes: 40 additions & 0 deletions src/fidanka/isofit/fitSingle.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,46 @@ def estimate_single_star_age(
Rv=3.1,
ageBounds=[5, 15],
):
"""
Estimate the age of a single star based on its color, magnitude, and isochrones.
Parameters
----------
starColor : float
The color index of the star.
starMag : float
The apparent magnitude of the star.
isochrones : dict
A dictionary containing age-related theoretical isochrones.
FeH : float
Metallicity [Fe/H] of the star.
f1Key : str
The key for filter 1 in the isochrone data.
f2Key : str
The key for filter 2 in the isochrone data.
rFilterOrder : bool, default=False
Whether to reverse the filter order.
bcFilterSystem : str, default=None
The filter system to use for bolometric corrections.
mu : float, default=0
The distance modulus.
Av : float, default=0
The extinction in magnitudes.
Rv : float, default=3.1
The ratio of total to selective extinction.
ageBounds : list, default=[5, 15]
The lower and upper age bounds for the estimation.
Returns
-------
scipy.optimize.OptimizeResult
The results of the optimization to find the estimated age.
Notes
-----
- If `bcFilterSystem` is provided, bolometric corrections are applied to the isochrones.
- The function uses the `minimize` function from `scipy.optimize` to optimize the age estimate.
"""
logger = LoggerManager.get_logger()

if bcFilterSystem is not None:
Expand Down

0 comments on commit f642fb1

Please sign in to comment.