From 3d1851e41798ddd3a17e32a699e3b65fd398fa04 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Fri, 1 Sep 2023 11:19:39 -0400 Subject: [PATCH 1/2] docs(fitSingle): added docstring for estimate_single_star_age --- src/fidanka/isofit/fitSingle.py | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/fidanka/isofit/fitSingle.py b/src/fidanka/isofit/fitSingle.py index 6fc05f0..de013cb 100644 --- a/src/fidanka/isofit/fitSingle.py +++ b/src/fidanka/isofit/fitSingle.py @@ -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: From 1fc5f2a8fdb165cd16a27333ff6e908e5b60e98e Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Fri, 1 Sep 2023 14:12:40 -0400 Subject: [PATCH 2/2] docs: added NASA Grand No --- README.md | 3 +++ docs_src/source/conf.py | 31 +++++++++++++++---------------- docs_src/source/index.rst | 6 +++++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 2e8e7da..a6e8afe 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs_src/source/conf.py b/docs_src/source/conf.py index 4ea376c..8fde620 100755 --- a/docs_src/source/conf.py +++ b/docs_src/source/conf.py @@ -17,7 +17,7 @@ source_parsers = {".md": CommonMarkParser} -source_suffix = ['.rst', '.md'] +source_suffix = [".rst", ".md"] fidanka = "../../src/fidanka" @@ -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 --------------------------------------------------- @@ -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. @@ -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 = [] - diff --git a/docs_src/source/index.rst b/docs_src/source/index.rst index 6ba5a3e..94b899a 100755 --- a/docs_src/source/index.rst +++ b/docs_src/source/index.rst @@ -5,7 +5,7 @@ Welcome to fidanka's documentation! .. toctree:: :maxdepth: 10 - + Home Fiducial Isochrone @@ -17,6 +17,10 @@ Welcome to fidanka's documentation! C-Libs Misc +Funding +======= +We recognize the support of NASA Grant No. 80NSSC18K0634 + .. Indices and tables .. ==================