diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0d0e6e6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +src/ananke/_version.py export-subst diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index aef1441..07c2a0e 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: TeX and PDF # Build draft PDF uses: docker://openjournals/paperdraft:latest # openjournals/openjournals-draft-action@master with: @@ -24,7 +24,7 @@ jobs: GIT_SHA: $GITHUB_SHA JOURNAL: joss - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: paper # This is the output path where Pandoc will write the compiled diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1074e2f..072deaf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,10 +40,10 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - # - name: Test with pytest - # run: | - # conda install pytest - # pytest + - name: Test with pytest + run: | + conda install pytest + pytest src develop-post-install: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 1be5a33..6d226ea 100644 --- a/.gitignore +++ b/.gitignore @@ -69,6 +69,12 @@ instance/ .scrapy # Sphinx documentation +docs/source/* +!docs/source/*.* +docs/source/*.ebf +docs/source/*.h5 +!docs/source/_templates +!docs/source/_static docs/_build/ # PyBuilder diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..c282afe --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,37 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.9" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/source/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/source/requirements.txt + - method: pip + path: . diff --git a/.zenodo.json b/.zenodo.json new file mode 100644 index 0000000..74a84f0 --- /dev/null +++ b/.zenodo.json @@ -0,0 +1,22 @@ +{ + "access_right": "open", + "title": "py-ananke: a Python pipeline to generate synthetic star catalogs from cosmological simulations", + "creators": [ + { + "affiliation": "University of Pennsylvania", + "name": "Thob, Adrien C. R.", + "orcid": "0000-0001-7928-1973" + } + ], + "contributors": [ + { + "affiliation": "University of Pennsylvania", + "name": "Sanderson, Robyn E.", + "orcid": "0000-0003-3939-3297", + "type": "Supervisor" + } + ], + "license": "GPL-3.0-or-later", + "upload_type": "software", + "description": "Python package that offers a comprehensive pipeline designed to generate mock astrometric and photometric catalogs of synthetic stars derived from particle-based simulated star populations" +} diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..1963ea5 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,68 @@ +cff-version: "1.2.0" +authors: +- family-names: Thob + given-names: Adrien C. R. + orcid: "https://orcid.org/0000-0001-7928-1973" +- family-names: Sanderson + given-names: Robyn E. + orcid: "https://orcid.org/0000-0003-3939-3297" +- family-names: Eden + given-names: Andrew P. + orcid: "https://orcid.org/0009-0004-2146-4856" +- family-names: Nikakhtar + given-names: Farnik + orcid: "https://orcid.org/0000-0002-3641-4366" +- family-names: Panithanpaisal + given-names: Nondh + orcid: "https://orcid.org/0000-0001-5214-8822" +- family-names: Garavito-Camargo + given-names: Nicolás + orcid: "https://orcid.org/0000-0001-7107-1744" +- family-names: Sharma + given-names: Sanjib + orcid: "https://orcid.org/0000-0002-0920-809X" +contact: +- family-names: Thob + given-names: Adrien C. R. + orcid: "https://orcid.org/0000-0001-7928-1973" +doi: 10.5281/zenodo.13942954 +message: If you use this software, please cite our article in the + Journal of Open Source Software. +preferred-citation: + authors: + - family-names: Thob + given-names: Adrien C. R. + orcid: "https://orcid.org/0000-0001-7928-1973" + - family-names: Sanderson + given-names: Robyn E. + orcid: "https://orcid.org/0000-0003-3939-3297" + - family-names: Eden + given-names: Andrew P. + orcid: "https://orcid.org/0009-0004-2146-4856" + - family-names: Nikakhtar + given-names: Farnik + orcid: "https://orcid.org/0000-0002-3641-4366" + - family-names: Panithanpaisal + given-names: Nondh + orcid: "https://orcid.org/0000-0001-5214-8822" + - family-names: Garavito-Camargo + given-names: Nicolás + orcid: "https://orcid.org/0000-0001-7107-1744" + - family-names: Sharma + given-names: Sanjib + orcid: "https://orcid.org/0000-0002-0920-809X" + date-published: 2024-10-23 + doi: 10.21105/joss.06234 + issn: 2475-9066 + issue: 102 + journal: Journal of Open Source Software + publisher: + name: Open Journals + start: 6234 + title: Generating synthetic star catalogs from simulated data for + next-gen observatories with py-ananke + type: article + url: "https://joss.theoj.org/papers/10.21105/joss.06234" + volume: 9 +title: Generating synthetic star catalogs from simulated data for + next-gen observatories with py-ananke diff --git a/LICENCE b/LICENSE similarity index 100% rename from LICENCE rename to LICENSE diff --git a/README.md b/README.md index c76ae97..245547b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# `py-ananke` +# `py-ananke` +[![Documentation Status](https://readthedocs.org/projects/py-ananke/badge/?version=latest)](https://py-ananke.readthedocs.io/en/latest/?badge=latest) [![Python package](https://github.com/athob/py-ananke/actions/workflows/main.yml/badge.svg)](https://github.com/athob/py-ananke/actions/workflows/main.yml) +[![status](https://joss.theoj.org/papers/357c0445d891fc10e1b0ca4dba1e3cc0/status.svg)](https://joss.theoj.org/papers/357c0445d891fc10e1b0ca4dba1e3cc0) +[![arXiv](https://img.shields.io/badge/arXiv-2312.02268-b31b1b.svg?style=flat)](https://arxiv.org/abs/2312.02268) +[![DOI](https://zenodo.org/badge/498927304.svg)](https://zenodo.org/badge/latestdoi/498927304) Welcome to `py-ananke`, a Python package that offers `ananke` which is a comprehensive pipeline designed to generate mock astrometric and photometric catalogs of synthetic stars derived from particle-based simulated star populations. @@ -43,7 +47,9 @@ After installation, the module can be imported in Python under the name `ananke` ### Simplified use case -The repository includes a Jupyter notebook that demonstrates a simplified use case utilizing a dummy set of randomly generated particle data. You can access the notebook directly at [jupyter/testing_ananke.ipynb](jupyter/testing_ananke.ipynb). This notebook provides a step-by-step example to help you understand the functionality and usage of `py-ananke` in a straightforward manner. +The repository includes a Jupyter notebook that demonstrates a simplified use case utilizing a dummy set of randomly generated particle data. You can access the notebook directly at [jupyter/example_notebook.ipynb](jupyter/example_notebook.ipynb). This notebook provides a step-by-step example to help you understand the functionality and usage of `py-ananke` in a straightforward manner. + +Note that you will need Jupyter installed on the machine where you intend to test this notebook, which will not be automatically installed by the `py-ananke`'s installation as it is not required to run its modules. Please follow the [Project Jupyter dedicated instructions](https://jupyter.org/install) for installing its tools such as [JupyterLab](https://jupyter.org/install#jupyterlab) or [Jupyter Notebook](https://jupyter.org/install#jupyter-notebook). ## What's under the hood @@ -51,7 +57,7 @@ Work in progress... ## On-going development -`py-ananke` has recently entered its beta phase, and we are diligently working towards its submission to the [Journal of Open Source Software](https://joss.theoj.org). +Currently in beta, `py-ananke` has been [submitted for publication to The Journal of Open Source Software](https://joss.theoj.org/papers/357c0445d891fc10e1b0ca4dba1e3cc0) and is presently [under peer review](https://github.com/openjournals/joss-reviews/issues/6234). Simultaneously, an early version has been deposited on arXiv, an open-access repository for electronic preprints and postprints. You can access the arXiv submission [here](https://arxiv.org/abs/2312.02268). ### Upcoming updates @@ -67,29 +73,58 @@ These upcoming updates signify our commitment to continuously improve `py-ananke ### Contributing -You can readily access the code in this main GitHub repository, as well as its submodules repositories. We encourage users to utilize the [Github issues](https://github.com/athob/py-ananke/issues) feature to report any bugs encountered or suggest new ideas for improvement. Contributions to the project are highly valued and greatly appreciated. To contribute, we kindly request that you make your changes in a separate branch or fork of the repository. Once your contributions are ready, you can submit a [pull request](https://github.com/athob/py-ananke/pulls) to merge them into the [develop](https://github.com/athob/py-ananke/tree/develop) branch. If you choose to make your contributions in a branch, please make sure to base those changes from the develop branch in that fork, and have your pull requests originate from your forked develop branch and target this repository's develop branch. Additionally, you may need to confirm that the Workflow permissions in your fork settings are set to Read and write (Settings > Actions > General > Workflow permissions) in case the [CI/CD GitHub Action](https://github.com/athob/py-ananke/actions/workflows/main.yml) does't complete. +You can readily access the code in the [main GitHub repository](https://github.com/athob/py-ananke), as well as its submodules repositories. We encourage users to utilize the [Github issues](https://github.com/athob/py-ananke/issues) feature to report any bugs encountered or suggest new ideas for improvement. Contributions to the project are highly valued and greatly appreciated. To contribute, we kindly request that you make your changes in a separate branch or fork of the repository. Once your contributions are ready, you can submit a [pull request](https://github.com/athob/py-ananke/pulls) to merge them into the [develop](https://github.com/athob/py-ananke/tree/develop) branch. If you choose to make your contributions in a fork, please make sure to base those changes from the develop branch in that fork, and have your pull requests originate from your forked develop branch and target this repository's develop branch. Additionally, you may need to confirm that the Workflow permissions in your fork settings are set to Read and write (Settings > Actions > General > Workflow permissions) in case the [CI/CD GitHub Action](https://github.com/athob/py-ananke/actions/workflows/main.yml) doesn't complete. ## `py-ananke` & the community ### License -`py-ananke` is distributed under the [GNU General Public License (GPL) version 3](LICENCE), offering you the freedom to utilize, modify, and distribute the software. The GPL v3 ensures that you have the flexibility to adapt py-ananke to suit your specific needs, while also contributing to the open-source community. We encourage you to read the full license text to understand your rights and responsibilities when using py-ananke. +`py-ananke` is distributed under the [GNU General Public License (GPL) version 3](LICENSE), offering you the freedom to utilize, modify, and distribute the software. The GPL v3 ensures that you have the flexibility to adapt py-ananke to suit your specific needs, while also contributing to the open-source community. We encourage you to read the full license text to understand your rights and responsibilities when using py-ananke. - +To cite `py-ananke`, please use DOI `10.48550/arXiv.2312.02268` as a reference in your publications, or cite as the following: + +```text +Thob, Adrien C. R. et al. 2023, “Generating synthetic star catalogs from simulated data for next-gen observatories with py-ananke”, arXiv e-prints, doi:10.48550/arXiv.2312.02268. +``` + +Alternatively, you may use [one of the entries associated with `py-ananke` as listed by The SAO/NASA Astrophysics Data System](https://ui.adsabs.harvard.edu/abs/2023arXiv231202268T/exportcitation), such as the following BibTeX entry: + +```text +@ARTICLE{2023arXiv231202268T, + author = {{Thob}, Adrien C.~R. and {Sanderson}, Robyn E. and {Eden}, Andrew P. and {Nikakhtar}, Farnik and {Panithanpaisal}, Nondh and {Garavito-Camargo}, Nicol{\'a}s and {Sharma}, Sanjib}, + title = "{Generating synthetic star catalogs from simulated data for next-gen observatories with py-ananke}", + journal = {arXiv e-prints}, + keywords = {Astrophysics - Astrophysics of Galaxies, Astrophysics - Instrumentation and Methods for Astrophysics}, + year = 2023, + month = dec, + eid = {arXiv:2312.02268}, + pages = {arXiv:2312.02268}, + doi = {10.48550/arXiv.2312.02268}, +archivePrefix = {arXiv}, + eprint = {2312.02268}, + primaryClass = {astro-ph.GA}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv231202268T}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System}, + note = {Submitted to The Journal of Open Source Software, in review} +} +``` ### Dissemination - -`py-ananke` was featured at [EAS 2023 in Krakow](https://eas2023programme.kuoni-congress.info/presentation/generating-mock-euclid-and-roman-surveys-of-stellar-halos-of-simulated-nearby-galaxies-using-the-py-ananke-pipeline) as an e-poster, check it at [this URL](https://k-poster.kuoni-congress.info/eas-2023/poster/5bf40113-efa9-4bfc-89a5-b67ebd81f7dd). +- [`py-ananke_v0.0.2-beta2`](https://github.com/athob/py-ananke/releases/tag/v0.0.2-beta2) was featured at [EAS 2023 in Krakow](https://eas2023programme.kuoni-congress.info/presentation/generating-mock-euclid-and-roman-surveys-of-stellar-halos-of-simulated-nearby-galaxies-using-the-py-ananke-pipeline) as an e-poster, check it at [this URL](https://k-poster.kuoni-congress.info/eas-2023/poster/5bf40113-efa9-4bfc-89a5-b67ebd81f7dd). +- [`py-ananke_v0.1.0-beta2`](https://github.com/athob/py-ananke/releases/tag/v0.1.0-beta2) was featured at the 243rd AAS meeting in New Orleans. +- a Galactic Plane survey application of `py-ananke` was featured at: + 1. the [Roman@Yerkes workshop on Galactic Science with the Nancy Grace Roman Space Telescope](https://sites.google.com/cfa.harvard.edu/romanyerkes/home), + 2. [EAS 2024 in Padova](https://eas2024programme.kuoni-congress.info/presentation/synthetic-survey-catalogs-for-the-galactic-roman-infrared-plane-survey-grips-using-py-ananke) as an e-poster (available [here](https://k-poster.kuoni-congress.info/eas-2024/poster/749fd8f1-ec4c-4167-911f-914e2215eeab)), + 3. the [Challenging Theory with Roman meeting at Caltech](https://conference.ipac.caltech.edu/roman2024/) (recording available [here](https://youtu.be/93hF1ZCDzw8)), + 4. the [2024 IAU GA in Cape Town](https://astronomy2024.org/) (live streamed [here](https://m.youtube.com/watch?v=8R-Wc9tGWcg&t=7218s)). ## Acknowledgements -We extend our sincere gratitude to [Robyn Sanderson (UPenn)](https://live-sas-physics.pantheon.sas.upenn.edu/people/standing-faculty/robyn-sanderson), [Andrew Eden (FloridaTech)](mailto:Andrew%20Eden%20), [Farnik Nikakhtar (Yale)](https://physics.yale.edu/people/farnik-nikakhtar), [Nondh Panithanpaisal (UPenn/CarnegieObs)](https://nonsk131.github.io), and [Nicolas Garavito-Camargo (FlatironCCA)](https://jngaravitoc.github.io/Garavito-Camargo/) for their invaluable contributions and support during the development of this package. Their expertise, guidance, and collaboration have been instrumental in shaping the vision and advancement of this project. We also appreciate the valuable feedback and suggestions provided by the wider community, including the extended [Galaxy Dynamics @ UPenn group](web.sas.upenn.edu/dynamics/) and the participants of the "anankethon" workshop, which have significantly contributed to the refinement and enhancement of the package. +We extend our sincere gratitude to [Robyn Sanderson (UPenn)](https://live-sas-physics.pantheon.sas.upenn.edu/people/standing-faculty/robyn-sanderson), [Andrew Eden (FloridaTech)](mailto:Andrew%20Eden%20), [Farnik Nikakhtar (Yale)](https://physics.yale.edu/people/farnik-nikakhtar), [Nondh Panithanpaisal (UPenn/CarnegieObs)](https://nonsk131.github.io), and [Nicolas Garavito-Camargo (FlatironCCA)](https://jngaravitoc.github.io/Garavito-Camargo/) for their invaluable contributions and support during the development of this package. Their expertise, guidance, and collaboration have been instrumental in shaping the vision and advancement of this project. We also appreciate the valuable feedback and suggestions provided by the wider community, including the extended [Galaxy Dynamics @ UPenn group](https://web.sas.upenn.edu/dynamics/) and the participants of the "anankethon" workshop, which have significantly contributed to the refinement and enhancement of the package. diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..747ffb7 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..ee9afcf --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,110 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +package_name = 'ananke' + +import os +import sys +sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('../..')) + +import index_toc +from src import __metadata__ as md + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = md.__project__ +copyright = md.__copyright_short__.replace('Copyright', '').strip(' ') +author = md.__author__ +release = md.__version__ + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + 'sphinx_math_dollar', + 'sphinx.ext.mathjax', + 'sphinx.ext.duration', + 'sphinx.ext.doctest', + 'sphinx.ext.autodoc', + 'sphinx.ext.inheritance_diagram', + 'sphinx.ext.napoleon', + 'sphinx.ext.viewcode', + 'sphinx.ext.autosectionlabel', + 'sphinx_copybutton', + 'myst_nb', +] + +exclude_patterns = ['.ipynb_checkpoints/*'] + +napoleon_use_param = False + +myst_enable_extensions = [ + "amsmath", + "attrs_inline", + "colon_fence", + "deflist", + "dollarmath", + "fieldlist", + "html_admonition", + "html_image", + "linkify", + "replacements", + "smartquotes", + "strikethrough", + "substitution", + "tasklist", +] + +nb_execution_timeout = 100 + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'pydata_sphinx_theme' + +html_theme_options = { + "icon_links": [ + { + "name": "GitHub", + "url": md.__url__, + "icon": "fab fa-github-square", + "type": "fontawesome", + }, + ], +} + +html_sidebars = { + "**": [], +} + +# -- Options for automatic API doc + +autodoc_default_options = { + 'member-order': 'bysource', + 'special-members': '__init__', + 'ignore-module-all': True +} + +def run_apidoc(_): + try: + from sphinx.ext.apidoc import main + except ImportError: + from sphinx.apidoc import main + + sys.path.append(os.path.join(os.path.dirname(__file__), "..")) + cur_dir = os.path.abspath(os.path.dirname(__file__)) + + api_doc_dir = os.path.join(cur_dir, "modules") + module = os.path.join(cur_dir, "../..", f"src/{package_name}") + ignore = [ + ] + + main(["-M", "-f", "-e", "-T", "-d 0", "-o", api_doc_dir, module, *ignore]) + + +def setup(app): + app.connect("builder-inited", run_apidoc) diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..a730a8e --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,9 @@ +.. py-ananke documentation master file, created by + sphinx-quickstart on Wed Aug 7 07:55:17 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +py-ananke documentation +======================= + +.. include:: temp/index_toc diff --git a/docs/source/index_toc.py b/docs/source/index_toc.py new file mode 100644 index 0000000..c2e4b0f --- /dev/null +++ b/docs/source/index_toc.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python +import pathlib +import markdown +from lxml import etree + +rst_indent = " " +tmp_dir: pathlib.Path = pathlib.Path('temp') +root_dir: pathlib.Path = pathlib.Path('../..') + +README: str = (root_dir / "README.md").read_text() + +# credit to https://stackoverflow.com/a/30737066 +doc: etree._Element = etree.fromstring(f"
\n{markdown.markdown(README)}\n
") + +internal_links = [href for link in doc.xpath('//a') if not ':' in (href:=link.get('href'))] + +for href in internal_links: + source: pathlib.Path = root_dir / href + target: pathlib.Path = tmp_dir / href + target.parent.mkdir(parents=True, exist_ok=True) + target.unlink(missing_ok=True) + target.symlink_to(pathlib.Path(len(target.resolve().parent.relative_to(pathlib.Path.cwd()).parents)*'../') / source) + if source.suffix not in ['.md', '.rst', '.ipynb']: + target.with_suffix('.rst').write_text( +f"""{target.name} +{len(target.name)*'='} + +.. literalinclude:: {href} +{rst_indent}:language: none +""") + +(tmp_dir / "README.md").write_text(README) + +index_toc_lines_list = [ + ".. toctree::", + ":maxdepth: 2", + ":caption: Contents:", + "", + f"Introduction <{tmp_dir}/README.md>" + ] + [f"{tmp_dir / href}" for href in internal_links] + [ + "reference.rst" + ] + +(tmp_dir / "index_toc").write_text(("\n"+rst_indent).join(index_toc_lines_list)) diff --git a/docs/source/reference.rst b/docs/source/reference.rst new file mode 100644 index 0000000..9562446 --- /dev/null +++ b/docs/source/reference.rst @@ -0,0 +1,7 @@ +API reference +============= + +.. toctree:: + :maxdepth: 2 + + modules/ananke diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt new file mode 100644 index 0000000..e9687d3 --- /dev/null +++ b/docs/source/requirements.txt @@ -0,0 +1,8 @@ +sphinx-math-dollar +sphinx-copybutton +myst-parser>=3 +myst-nb>=1 +linkify-it-py +pydata-sphinx-theme +markdown +lxml \ No newline at end of file diff --git a/joss/paper.bib b/joss/paper.bib index 9f7841e..6a9d469 100644 --- a/joss/paper.bib +++ b/joss/paper.bib @@ -1,7 +1,7 @@ @ARTICLE{Sanderson:2020, author = {{Sanderson}, Robyn E. and {Wetzel}, Andrew and {Loebman}, Sarah and {Sharma}, Sanjib and {Hopkins}, Philip F. and {Garrison-Kimmel}, Shea and {Faucher-Gigu{\`e}re}, Claude-Andr{\'e} and {Kere{\v{s}}}, Du{\v{s}}an and {Quataert}, Eliot}, - title = "{Synthetic Gaia Surveys from the FIRE Cosmological Simulations of Milky Way-mass Galaxies}", - journal = {\apjs}, + title = {Synthetic {Gaia} Surveys from the {FIRE} Cosmological Simulations of {Milky Way}-mass Galaxies}, + journal = {The Astrophysical Journal Supplement Series}, keywords = {Astrometry, Astronomical simulations, 80, 1857, Astrophysics - Astrophysics of Galaxies, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2020, month = jan, @@ -27,7 +27,7 @@ @ARTICLE{Sanderson:2020 @ARTICLE{JWST:2006, author = {{Gardner}, Jonathan P. and {Mather}, John C. and {Clampin}, Mark and {Doyon}, Rene and {Greenhouse}, Matthew A. and {Hammel}, Heidi B. and {Hutchings}, John B. and {Jakobsen}, Peter and {Lilly}, Simon J. and {Long}, Knox S. and {Lunine}, Jonathan I. and {McCaughrean}, Mark J. and {Mountain}, Matt and {Nella}, John and {Rieke}, George H. and {Rieke}, Marcia J. and {Rix}, Hans-Walter and {Smith}, Eric P. and {Sonneborn}, George and {Stiavelli}, Massimo and {Stockman}, H.~S. and {Windhorst}, Rogier A. and {Wright}, Gillian S.}, title = "{The James Webb Space Telescope}", - journal = {\ssr}, + journal = {Space Science Reviews}, keywords = {galaxies: formation, infrared: general, planetary systems, space vehicles: instruments, stars: formation, Astrophysics}, year = 2006, month = apr, @@ -44,8 +44,8 @@ @ARTICLE{JWST:2006 @ARTICLE{Ferreira:2022, author = {{Ferreira}, Leonardo and {Adams}, Nathan and {Conselice}, Christopher J. and {Sazonova}, Elizaveta and {Austin}, Duncan and {Caruana}, Joseph and {Ferrari}, Fabricio and {Verma}, Aprajita and {Trussler}, James and {Broadhurst}, Tom and {Diego}, Jose and {Frye}, Brenda L. and {Pascale}, Massimo and {Wilkins}, Stephen M. and {Windhorst}, Rogier A. and {Zitrin}, Adi}, - title = "{Panic! at the Disks: First Rest-frame Optical Observations of Galaxy Structure at z > 3 with JWST in the SMACS 0723 Field}", - journal = {\apjl}, + title = {Panic! at the Disks: First Rest-frame Optical Observations of Galaxy Structure at z > 3 with {JWST} in the {SMACS 0723 Field}}, + journal = {The Astrophysical Journal Letters}, keywords = {Galaxy classification systems, 582, Astrophysics - Astrophysics of Galaxies}, year = 2022, month = oct, @@ -64,7 +64,7 @@ @ARTICLE{Ferreira:2022 @ARTICLE{Adams:2023, author = {{Adams}, N.~J. and {Conselice}, C.~J. and {Ferreira}, L. and {Austin}, D. and {Trussler}, J.~A.~A. and {Juod{\v{z}}balis}, I. and {Wilkins}, S.~M. and {Caruana}, J. and {Dayal}, P. and {Verma}, A. and {Vijayan}, A.~P.}, title = "{Discovery and properties of ultra-high redshift galaxies (9 < z < 12) in the JWST ERO SMACS 0723 Field}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: evolution, galaxies: formation, galaxies: high-redshift, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = jan, @@ -81,8 +81,8 @@ @ARTICLE{Adams:2023 @ARTICLE{Finkelstein:2023, author = {{Finkelstein}, Steven L. and {Bagley}, Micaela B. and {Ferguson}, Henry C. and {Wilkins}, Stephen M. and {Kartaltepe}, Jeyhan S. and {Papovich}, Casey and {Yung}, L.~Y. Aaron and {Haro}, Pablo Arrabal and {Behroozi}, Peter and {Dickinson}, Mark and {Kocevski}, Dale D. and {Koekemoer}, Anton M. and {Larson}, Rebecca L. and {Le Bail}, Aur{\'e}lien and {Morales}, Alexa M. and {P{\'e}rez-Gonz{\'a}lez}, Pablo G. and {Burgarella}, Denis and {Dav{\'e}}, Romeel and {Hirschmann}, Michaela and {Somerville}, Rachel S. and {Wuyts}, Stijn and {Bromm}, Volker and {Casey}, Caitlin M. and {Fontana}, Adriano and {Fujimoto}, Seiji and {Gardner}, Jonathan P. and {Giavalisco}, Mauro and {Grazian}, Andrea and {Grogin}, Norman A. and {Hathi}, Nimish P. and {Hutchison}, Taylor A. and {Jha}, Saurabh W. and {Jogee}, Shardha and {Kewley}, Lisa J. and {Kirkpatrick}, Allison and {Long}, Arianna S. and {Lotz}, Jennifer M. and {Pentericci}, Laura and {Pierel}, Justin D.~R. and {Pirzkal}, Nor and {Ravindranath}, Swara and {Ryan}, Russell E. and {Trump}, Jonathan R. and {Yang}, Guang and {Bhatawdekar}, Rachana and {Bisigello}, Laura and {Buat}, V{\'e}ronique and {Calabr{\`o}}, Antonello and {Castellano}, Marco and {Cleri}, Nikko J. and {Cooper}, M.~C. and {Croton}, Darren and {Daddi}, Emanuele and {Dekel}, Avishai and {Elbaz}, David and {Franco}, Maximilien and {Gawiser}, Eric and {Holwerda}, Benne W. and {Huertas-Company}, Marc and {Jaskot}, Anne E. and {Leung}, Gene C.~K. and {Lucas}, Ray A. and {Mobasher}, Bahram and {Pandya}, Viraj and {Tacchella}, Sandro and {Weiner}, Benjamin J. and {Zavala}, Jorge A.}, - title = "{CEERS Key Paper. I. An Early Look into the First 500 Myr of Galaxy Formation with JWST}", - journal = {\apjl}, + title = {{CEERS Key Paper. I.} An Early Look into the First 500 {Myr} of Galaxy Formation with {JWST}}, + journal = {The Astrophysical Journal Letters}, keywords = {Early universe, Galaxy formation, Galaxy evolution, High-redshift galaxies, 435, 595, 594, 734, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = mar, @@ -101,7 +101,7 @@ @ARTICLE{Finkelstein:2023 @ARTICLE{Kocevski:2023, author = {{Kocevski}, Dale D. and {Barro}, Guillermo and {McGrath}, Elizabeth J. and {Finkelstein}, Steven L. and {Bagley}, Micaela B. and {Ferguson}, Henry C. and {Jogee}, Shardha and {Yang}, Guang and {Dickinson}, Mark and {Hathi}, Nimish P. and {Backhaus}, Bren E. and {Bell}, Eric F. and {Bisigello}, Laura and {Buat}, V{\'e}ronique and {Burgarella}, Denis and {Casey}, Caitlin M. and {Cleri}, Nikko J. and {Cooper}, M.~C. and {Costantin}, Luca and {Croton}, Darren and {Daddi}, Emanuele and {Fontana}, Adriano and {Fujimoto}, Seiji and {Gardner}, Jonathan P. and {Gawiser}, Eric and {Giavalisco}, Mauro and {Grazian}, Andrea and {Grogin}, Norman A. and {Guo}, Yuchen and {Haro}, Pablo Arrabal and {Hirschmann}, Michaela and {Holwerda}, Benne W. and {Huertas-Company}, Marc and {Hutchison}, Taylor A. and {Iyer}, Kartheik G. and {Jones}, Brenda and {Juneau}, St{\'e}phanie and {Kartaltepe}, Jeyhan S. and {Kewley}, Lisa J. and {Kirkpatrick}, Allison and {Koekemoer}, Anton M. and {Kurczynski}, Peter and {Le Bail}, Aur{\'e}lien and {Long}, Arianna S. and {Lotz}, Jennifer M. and {Lucas}, Ray A. and {Papovich}, Casey and {Pentericci}, Laura and {P{\'e}rez-Gonz{\'a}lez}, Pablo G. and {Pirzkal}, Nor and {Rafelski}, Marc and {Ravindranath}, Swara and {Somerville}, Rachel S. and {Straughn}, Amber N. and {Tacchella}, Sandro and {Trump}, Jonathan R. and {Wilkins}, Stephen M. and {Wuyts}, Stijn and {Yung}, L.~Y. Aaron and {Zavala}, Jorge A.}, title = "{CEERS Key Paper. II. A First Look at the Resolved Host Properties of AGN at 3 < z < 5 with JWST}", - journal = {\apjl}, + journal = {The Astrophysical Journal Letters}, keywords = {AGN host galaxies, Supermassive black holes, 2017, 1663, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = mar, @@ -120,7 +120,7 @@ @ARTICLE{Kocevski:2023 @ARTICLE{Kartaltepe:2023, author = {{Kartaltepe}, Jeyhan S. and {Rose}, Caitlin and {Vanderhoof}, Brittany N. and {McGrath}, Elizabeth J. and {Costantin}, Luca and {Cox}, Isabella G. and {Yung}, L.~Y. Aaron and {Kocevski}, Dale D. and {Wuyts}, Stijn and {Ferguson}, Henry C. and {Bagley}, Micaela B. and {Finkelstein}, Steven L. and {Amor{\'\i}n}, Ricardo O. and {Andrews}, Brett H. and {Haro}, Pablo Arrabal and {Backhaus}, Bren E. and {Behroozi}, Peter and {Bisigello}, Laura and {Calabr{\`o}}, Antonello and {Casey}, Caitlin M. and {Coogan}, Rosemary T. and {Cooper}, M.~C. and {Croton}, Darren and {de la Vega}, Alexander and {Dickinson}, Mark and {Fontana}, Adriano and {Franco}, Maximilien and {Grazian}, Andrea and {Grogin}, Norman A. and {Hathi}, Nimish P. and {Holwerda}, Benne W. and {Huertas-Company}, Marc and {Iyer}, Kartheik G. and {Jogee}, Shardha and {Jung}, Intae and {Kewley}, Lisa J. and {Kirkpatrick}, Allison and {Koekemoer}, Anton M. and {Liu}, James and {Lotz}, Jennifer M. and {Lucas}, Ray A. and {Newman}, Jeffrey A. and {Pacifici}, Camilla and {Pandya}, Viraj and {Papovich}, Casey and {Pentericci}, Laura and {P{\'e}rez-Gonz{\'a}lez}, Pablo G. and {Petersen}, Jayse and {Pirzkal}, Nor and {Rafelski}, Marc and {Ravindranath}, Swara and {Simons}, Raymond C. and {Snyder}, Gregory F. and {Somerville}, Rachel S. and {Stanway}, Elizabeth R. and {Straughn}, Amber N. and {Tacchella}, Sandro and {Trump}, Jonathan R. and {Vega-Ferrero}, Jes{\'u}s and {Wilkins}, Stephen M. and {Yang}, Guang and {Zavala}, Jorge A.}, title = "{CEERS Key Paper. III. The Diversity of Galaxy Structure and Morphology at z = 3-9 with JWST}", - journal = {\apjl}, + journal = {The Astrophysical Journal Letters}, keywords = {Galaxy evolution, Galaxy classification systems, Galaxies, Disk galaxies, Irregular galaxies, Hubble classification scheme, 594, 582, 573, 391, 864, 757, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = mar, @@ -139,7 +139,7 @@ @ARTICLE{Kartaltepe:2023 @ARTICLE{PerezGonzalez:2023, author = {{P{\'e}rez-Gonz{\'a}lez}, Pablo G. and {Barro}, Guillermo and {Annunziatella}, Marianna and {Costantin}, Luca and {Garc{\'\i}a-Argum{\'a}nez}, {\'A}ngela and {McGrath}, Elizabeth J. and {M{\'e}rida}, Rosa M. and {Zavala}, Jorge A. and {Haro}, Pablo Arrabal and {Bagley}, Micaela B. and {Backhaus}, Bren E. and {Behroozi}, Peter and {Bell}, Eric F. and {Bisigello}, Laura and {Buat}, V{\'e}ronique and {Calabr{\`o}}, Antonello and {Casey}, Caitlin M. and {Cleri}, Nikko J. and {Coogan}, Rosemary T. and {Cooper}, M.~C. and {Cooray}, Asantha R. and {Dekel}, Avishai and {Dickinson}, Mark and {Elbaz}, David and {Ferguson}, Henry C. and {Finkelstein}, Steven L. and {Fontana}, Adriano and {Franco}, Maximilien and {Gardner}, Jonathan P. and {Giavalisco}, Mauro and {G{\'o}mez-Guijarro}, Carlos and {Grazian}, Andrea and {Grogin}, Norman A. and {Guo}, Yuchen and {Huertas-Company}, Marc and {Jogee}, Shardha and {Kartaltepe}, Jeyhan S. and {Kewley}, Lisa J. and {Kirkpatrick}, Allison and {Kocevski}, Dale D. and {Koekemoer}, Anton M. and {Long}, Arianna S. and {Lotz}, Jennifer M. and {Lucas}, Ray A. and {Papovich}, Casey and {Pirzkal}, Nor and {Ravindranath}, Swara and {Somerville}, Rachel S. and {Tacchella}, Sandro and {Trump}, Jonathan R. and {Wang}, Weichen and {Wilkins}, Stephen M. and {Wuyts}, Stijn and {Yang}, Guang and {Yung}, L.~Y. Aaron}, title = "{CEERS Key Paper. IV. A Triality in the Nature of HST-dark Galaxies}", - journal = {\apjl}, + journal = {The Astrophysical Journal Letters}, keywords = {Galaxy formation, Galaxy evolution, High-redshift galaxies, Stellar populations, Broad band photometry, Galaxy ages, James Webb Space Telescope, Galaxy quenching, Galaxy processes, Quenched galaxies, Starburst galaxies, Galaxy photometry, 595, 594, 734, 1622, 184, 576, 2291, 2040, 614, 2016, 1570, 611, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = mar, @@ -157,8 +157,8 @@ @ARTICLE{PerezGonzalez:2023 @ARTICLE{Harikane:2023, author = {{Harikane}, Yuichi and {Ouchi}, Masami and {Oguri}, Masamune and {Ono}, Yoshiaki and {Nakajima}, Kimihiko and {Isobe}, Yuki and {Umeda}, Hiroya and {Mawatari}, Ken and {Zhang}, Yechi}, - title = "{A Comprehensive Study of Galaxies at z 9-16 Found in the Early JWST Data: Ultraviolet Luminosity Functions and Cosmic Star Formation History at the Pre-reionization Epoch}", - journal = {\apjs}, + title = {A Comprehensive Study of Galaxies at z {\ensuremath\sim} 9-16 Found in the Early {JWST} Data: Ultraviolet Luminosity Functions and Cosmic Star Formation History at the Pre-reionization Epoch}, + journal = {The Astrophysical Journal Supplement Series}, keywords = {Galaxy evolution, Galaxy formation, High-redshift galaxies, 594, 595, 734, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = mar, @@ -177,7 +177,7 @@ @ARTICLE{Harikane:2023 @ARTICLE{Hsiao:2023, author = {{Hsiao}, Tiger Yu-Yang and {Coe}, Dan and {Abdurro'uf} and {Whitler}, Lily and {Jung}, Intae and {Khullar}, Gourav and {Meena}, Ashish Kumar and {Dayal}, Pratika and {Barrow}, Kirk S.~S. and {Santos-Olmsted}, Lillian and {Casselman}, Adam and {Vanzella}, Eros and {Nonino}, Mario and {Jim{\'e}nez-Teja}, Yolanda and {Oguri}, Masamune and {Stark}, Daniel P. and {Furtak}, Lukas J. and {Zitrin}, Adi and {Adamo}, Angela and {Brammer}, Gabriel and {Bradley}, Larry and {Diego}, Jose M. and {Zackrisson}, Erik and {Finkelstein}, Steven L. and {Windhorst}, Rogier A. and {Bhatawdekar}, Rachana and {Hutchison}, Taylor A. and {Broadhurst}, Tom and {Dimauro}, Paola and {Andrade-Santos}, Felipe and {Eldridge}, Jan J. and {Acebron}, Ana and {Avila}, Roberto J. and {Bayliss}, Matthew B. and {Ben{\'\i}tez}, Alex and {Binggeli}, Christian and {Bolan}, Patricia and {Brada{\v{c}}}, Maru{\v{s}}a and {Carnall}, Adam C. and {Conselice}, Christopher J. and {Donahue}, Megan and {Frye}, Brenda and {Fujimoto}, Seiji and {Henry}, Alaina and {James}, Bethan L. and {Kassin}, Susan A. and {Kewley}, Lisa and {Larson}, Rebecca L. and {Lauer}, Tod and {Law}, David and {Mahler}, Guillaume and {Mainali}, Ramesh and {McCandliss}, Stephan and {Nicholls}, David and {Pirzkal}, Norbert and {Postman}, Marc and {Rigby}, Jane R. and {Ryan}, Russell and {Senchyna}, Peter and {Sharon}, Keren and {Shimizu}, Ikko and {Strait}, Victoria and {Tang}, Mengtao and {Trenti}, Michele and {Vikaeus}, Anton and {Welch}, Brian}, title = "{JWST Reveals a Possible z 11 Galaxy Merger in Triply Lensed MACS0647-JD}", - journal = {\apjl}, + journal = {The Astrophysical Journal Letters}, keywords = {Galaxies, High-redshift galaxies, Strong gravitational lensing, Galaxy clusters, Early universe, 573, 734, 1643, 584, 435, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2023, month = jun, @@ -196,7 +196,7 @@ @ARTICLE{Hsiao:2023 @ARTICLE{Trussler:2023, author = {{Trussler}, James A.~A. and {Adams}, Nathan J. and {Conselice}, Christopher J. and {Ferreira}, Leonardo and {Austin}, Duncan and {Bhatawdekar}, Rachana and {Caruana}, Joseph and {Frye}, Brenda L. and {Harvey}, Tom and {Lovell}, Christopher C. and {Pascale}, Massimo and {Roper}, William J. and {Verma}, Aprajita and {Vijayan}, Aswin P. and {Wilkins}, Stephen M.}, title = "{Seeing sharper and deeper: JWST's first glimpse of the photometric and spectroscopic properties of galaxies in the epoch of reionization}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: evolution, galaxies: formation, galaxies: high-redshift, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = aug, @@ -213,8 +213,8 @@ @ARTICLE{Trussler:2023 @ARTICLE{Casey:2023, author = {{Casey}, Caitlin M. and {Kartaltepe}, Jeyhan S. and {Drakos}, Nicole E. and {Franco}, Maximilien and {Harish}, Santosh and {Paquereau}, Louise and {Ilbert}, Olivier and {Rose}, Caitlin and {Cox}, Isabella G. and {Nightingale}, James W. and {Robertson}, Brant E. and {Silverman}, John D. and {Koekemoer}, Anton M. and {Massey}, Richard and {McCracken}, Henry Joy and {Rhodes}, Jason and {Akins}, Hollis B. and {Allen}, Natalie and {Amvrosiadis}, Aristeidis and {Arango-Toro}, Rafael C. and {Bagley}, Micaela B. and {Bongiorno}, Angela and {Capak}, Peter L. and {Champagne}, Jaclyn B. and {Chartab}, Nima and {Ch{\'a}vez Ortiz}, {\'O}scar A. and {Chworowsky}, Katherine and {Cooke}, Kevin C. and {Cooper}, Olivia R. and {Darvish}, Behnam and {Ding}, Xuheng and {Faisst}, Andreas L. and {Finkelstein}, Steven L. and {Fujimoto}, Seiji and {Gentile}, Fabrizio and {Gillman}, Steven and {Gould}, Katriona M.~L. and {Gozaliasl}, Ghassem and {Hayward}, Christopher C. and {He}, Qiuhan and {Hemmati}, Shoubaneh and {Hirschmann}, Michaela and {Jahnke}, Knud and {Jin}, Shuowen and {Khostovan}, Ali Ahmad and {Kokorev}, Vasily and {Lambrides}, Erini and {Laigle}, Clotilde and {Larson}, Rebecca L. and {Leung}, Gene C.~K. and {Liu}, Daizhong and {Liaudat}, Tobias and {Long}, Arianna S. and {Magdis}, Georgios and {Mahler}, Guillaume and {Mainieri}, Vincenzo and {Manning}, Sinclaire M. and {Maraston}, Claudia and {Martin}, Crystal L. and {McCleary}, Jacqueline E. and {McKinney}, Jed and {McPartland}, Conor J.~R. and {Mobasher}, Bahram and {Pattnaik}, Rohan and {Renzini}, Alvio and {Rich}, R. Michael and {Sanders}, David B. and {Sattari}, Zahra and {Scognamiglio}, Diana and {Scoville}, Nick and {Sheth}, Kartik and {Shuntov}, Marko and {Sparre}, Martin and {Suzuki}, Tomoko L. and {Talia}, Margherita and {Toft}, Sune and {Trakhtenbrot}, Benny and {Urry}, C. Megan and {Valentino}, Francesco and {Vanderhoof}, Brittany N. and {Vardoulaki}, Eleni and {Weaver}, John R. and {Whitaker}, Katherine E. and {Wilkins}, Stephen M. and {Yang}, Lilan and {Zavala}, Jorge A.}, - title = "{COSMOS-Web: An Overview of the JWST Cosmic Origins Survey}", - journal = {\apj}, + title = {{COSMOS-Web}: An Overview of the {JWST Cosmic Origins Survey}}, + journal = {The Astrophysical Journal}, keywords = {Sky surveys, Large-scale structure of the universe, Galaxy evolution, Reionization, Weak gravitational lensing, 1464, 902, 594, 1383, 1797, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2023, month = sep, @@ -233,7 +233,7 @@ @ARTICLE{Casey:2023 @ARTICLE{Ferreira:2023, author = {{Ferreira}, Leonardo and {Conselice}, Christopher J. and {Sazonova}, Elizaveta and {Ferrari}, Fabricio and {Caruana}, Joseph and {Tohill}, Cl{\'a}r-Br{\'\i}d and {Lucatelli}, Geferson and {Adams}, Nathan and {Irodotou}, Dimitrios and {Marshall}, Madeline A. and {Roper}, Will J. and {Lovell}, Christopher C. and {Verma}, Aprajita and {Austin}, Duncan and {Trussler}, James and {Wilkins}, Stephen M.}, title = "{The JWST Hubble Sequence: The Rest-Frame Optical Evolution of Galaxy Structure at $1.5 < z < 8$}", - journal = {\apj}, + journal = {The Astrophysical Journal}, keywords = {Galaxy classification systems, 582, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = oct, @@ -286,7 +286,7 @@ @ARTICLE{Euclid:2011 @ARTICLE{EuclidCollaboration:2022, author = {{Euclid Collaboration} and {Scaramella}, R. and {Amiaux}, J. and {Mellier}, Y. and {Burigana}, C. and {Carvalho}, C.~S. and {Cuillandre}, J. -C. and {Da Silva}, A. and {Derosa}, A. and {Dinis}, J. and {Maiorano}, E. and {Maris}, M. and {Tereno}, I. and {Laureijs}, R. and {Boenke}, T. and {Buenadicha}, G. and {Dupac}, X. and {Gaspar Venancio}, L.~M. and {G{\'o}mez-{\'A}lvarez}, P. and {Hoar}, J. and {Lorenzo Alvarez}, J. and {Racca}, G.~D. and {Saavedra-Criado}, G. and {Schwartz}, J. and {Vavrek}, R. and {Schirmer}, M. and {Aussel}, H. and {Azzollini}, R. and {Cardone}, V.~F. and {Cropper}, M. and {Ealet}, A. and {Garilli}, B. and {Gillard}, W. and {Granett}, B.~R. and {Guzzo}, L. and {Hoekstra}, H. and {Jahnke}, K. and {Kitching}, T. and {Maciaszek}, T. and {Meneghetti}, M. and {Miller}, L. and {Nakajima}, R. and {Niemi}, S.~M. and {Pasian}, F. and {Percival}, W.~J. and {Pottinger}, S. and {Sauvage}, M. and {Scodeggio}, M. and {Wachter}, S. and {Zacchei}, A. and {Aghanim}, N. and {Amara}, A. and {Auphan}, T. and {Auricchio}, N. and {Awan}, S. and {Balestra}, A. and {Bender}, R. and {Bodendorf}, C. and {Bonino}, D. and {Branchini}, E. and {Brau-Nogue}, S. and {Brescia}, M. and {Candini}, G.~P. and {Capobianco}, V. and {Carbone}, C. and {Carlberg}, R.~G. and {Carretero}, J. and {Casas}, R. and {Castander}, F.~J. and {Castellano}, M. and {Cavuoti}, S. and {Cimatti}, A. and {Cledassou}, R. and {Congedo}, G. and {Conselice}, C.~J. and {Conversi}, L. and {Copin}, Y. and {Corcione}, L. and {Costille}, A. and {Courbin}, F. and {Degaudenzi}, H. and {Douspis}, M. and {Dubath}, F. and {Duncan}, C.~A.~J. and {Dusini}, S. and {Farrens}, S. and {Ferriol}, S. and {Fosalba}, P. and {Fourmanoit}, N. and {Frailis}, M. and {Franceschi}, E. and {Franzetti}, P. and {Fumana}, M. and {Gillis}, B. and {Giocoli}, C. and {Grazian}, A. and {Grupp}, F. and {Haugan}, S.~V.~H. and {Holmes}, W. and {Hormuth}, F. and {Hudelot}, P. and {Kermiche}, S. and {Kiessling}, A. and {Kilbinger}, M. and {Kohley}, R. and {Kubik}, B. and {K{\"u}mmel}, M. and {Kunz}, M. and {Kurki-Suonio}, H. and {Lahav}, O. and {Ligori}, S. and {Lilje}, P.~B. and {Lloro}, I. and {Mansutti}, O. and {Marggraf}, O. and {Markovic}, K. and {Marulli}, F. and {Massey}, R. and {Maurogordato}, S. and {Melchior}, M. and {Merlin}, E. and {Meylan}, G. and {Mohr}, J.~J. and {Moresco}, M. and {Morin}, B. and {Moscardini}, L. and {Munari}, E. and {Nichol}, R.~C. and {Padilla}, C. and {Paltani}, S. and {Peacock}, J. and {Pedersen}, K. and {Pettorino}, V. and {Pires}, S. and {Poncet}, M. and {Popa}, L. and {Pozzetti}, L. and {Raison}, F. and {Rebolo}, R. and {Rhodes}, J. and {Rix}, H. -W. and {Roncarelli}, M. and {Rossetti}, E. and {Saglia}, R. and {Schneider}, P. and {Schrabback}, T. and {Secroun}, A. and {Seidel}, G. and {Serrano}, S. and {Sirignano}, C. and {Sirri}, G. and {Skottfelt}, J. and {Stanco}, L. and {Starck}, J.~L. and {Tallada-Cresp{\'\i}}, P. and {Tavagnacco}, D. and {Taylor}, A.~N. and {Teplitz}, H.~I. and {Toledo-Moreo}, R. and {Torradeflot}, F. and {Trifoglio}, M. and {Valentijn}, E.~A. and {Valenziano}, L. and {Verdoes Kleijn}, G.~A. and {Wang}, Y. and {Welikala}, N. and {Weller}, J. and {Wetzstein}, M. and {Zamorani}, G. and {Zoubian}, J. and {Andreon}, S. and {Baldi}, M. and {Bardelli}, S. and {Boucaud}, A. and {Camera}, S. and {Di Ferdinando}, D. and {Fabbian}, G. and {Farinelli}, R. and {Galeotta}, S. and {Graci{\'a}-Carpio}, J. and {Maino}, D. and {Medinaceli}, E. and {Mei}, S. and {Neissner}, C. and {Polenta}, G. and {Renzi}, A. and {Romelli}, E. and {Rosset}, C. and {Sureau}, F. and {Tenti}, M. and {Vassallo}, T. and {Zucca}, E. and {Baccigalupi}, C. and {Balaguera-Antol{\'\i}nez}, A. and {Battaglia}, P. and {Biviano}, A. and {Borgani}, S. and {Bozzo}, E. and {Cabanac}, R. and {Cappi}, A. and {Casas}, S. and {Castignani}, G. and {Colodro-Conde}, C. and {Coupon}, J. and {Courtois}, H.~M. and {Cuby}, J. and {de la Torre}, S. and {Desai}, S. and {Dole}, H. and {Fabricius}, M. and {Farina}, M. and {Ferreira}, P.~G. and {Finelli}, F. and {Flose-Reimberg}, P. and {Fotopoulou}, S. and {Ganga}, K. and {Gozaliasl}, G. and {Hook}, I.~M. and {Keihanen}, E. and {Kirkpatrick}, C.~C. and {Liebing}, P. and {Lindholm}, V. and {Mainetti}, G. and {Martinelli}, M. and {Martinet}, N. and {Maturi}, M. and {McCracken}, H.~J. and {Metcalf}, R.~B. and {Morgante}, G. and {Nightingale}, J. and {Nucita}, A. and {Patrizii}, L. and {Potter}, D. and {Riccio}, G. and {S{\'a}nchez}, A.~G. and {Sapone}, D. and {Schewtschenko}, J.~A. and {Schultheis}, M. and {Scottez}, V. and {Teyssier}, R. and {Tutusaus}, I. and {Valiviita}, J. and {Viel}, M. and {Vriend}, W. and {Whittaker}, L.}, title = "{Euclid preparation. I. The Euclid Wide Survey}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {space vehicles, surveys, methods: numerical, dark energy, dark matter, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2022, month = jun, @@ -303,8 +303,8 @@ @ARTICLE{EuclidCollaboration:2022 @ARTICLE{Rubin:2019, author = {{Ivezi{\'c}}, {\v{Z}}eljko and {Kahn}, Steven M. and {Tyson}, J. Anthony and {Abel}, Bob and {Acosta}, Emily and {Allsman}, Robyn and {Alonso}, David and {AlSayyad}, Yusra and {Anderson}, Scott F. and {Andrew}, John and {Angel}, James Roger P. and {Angeli}, George Z. and {Ansari}, Reza and {Antilogus}, Pierre and {Araujo}, Constanza and {Armstrong}, Robert and {Arndt}, Kirk T. and {Astier}, Pierre and {Aubourg}, {\'E}ric and {Auza}, Nicole and {Axelrod}, Tim S. and {Bard}, Deborah J. and {Barr}, Jeff D. and {Barrau}, Aurelian and {Bartlett}, James G. and {Bauer}, Amanda E. and {Bauman}, Brian J. and {Baumont}, Sylvain and {Bechtol}, Ellen and {Bechtol}, Keith and {Becker}, Andrew C. and {Becla}, Jacek and {Beldica}, Cristina and {Bellavia}, Steve and {Bianco}, Federica B. and {Biswas}, Rahul and {Blanc}, Guillaume and {Blazek}, Jonathan and {Blandford}, Roger D. and {Bloom}, Josh S. and {Bogart}, Joanne and {Bond}, Tim W. and {Booth}, Michael T. and {Borgland}, Anders W. and {Borne}, Kirk and {Bosch}, James F. and {Boutigny}, Dominique and {Brackett}, Craig A. and {Bradshaw}, Andrew and {Brandt}, William Nielsen and {Brown}, Michael E. and {Bullock}, James S. and {Burchat}, Patricia and {Burke}, David L. and {Cagnoli}, Gianpietro and {Calabrese}, Daniel and {Callahan}, Shawn and {Callen}, Alice L. and {Carlin}, Jeffrey L. and {Carlson}, Erin L. and {Chandrasekharan}, Srinivasan and {Charles-Emerson}, Glenaver and {Chesley}, Steve and {Cheu}, Elliott C. and {Chiang}, Hsin-Fang and {Chiang}, James and {Chirino}, Carol and {Chow}, Derek and {Ciardi}, David R. and {Claver}, Charles F. and {Cohen-Tanugi}, Johann and {Cockrum}, Joseph J. and {Coles}, Rebecca and {Connolly}, Andrew J. and {Cook}, Kem H. and {Cooray}, Asantha and {Covey}, Kevin R. and {Cribbs}, Chris and {Cui}, Wei and {Cutri}, Roc and {Daly}, Philip N. and {Daniel}, Scott F. and {Daruich}, Felipe and {Daubard}, Guillaume and {Daues}, Greg and {Dawson}, William and {Delgado}, Francisco and {Dellapenna}, Alfred and {de Peyster}, Robert and {de Val-Borro}, Miguel and {Digel}, Seth W. and {Doherty}, Peter and {Dubois}, Richard and {Dubois-Felsmann}, Gregory P. and {Durech}, Josef and {Economou}, Frossie and {Eifler}, Tim and {Eracleous}, Michael and {Emmons}, Benjamin L. and {Fausti Neto}, Angelo and {Ferguson}, Henry and {Figueroa}, Enrique and {Fisher-Levine}, Merlin and {Focke}, Warren and {Foss}, Michael D. and {Frank}, James and {Freemon}, Michael D. and {Gangler}, Emmanuel and {Gawiser}, Eric and {Geary}, John C. and {Gee}, Perry and {Geha}, Marla and {Gessner}, Charles J.~B. and {Gibson}, Robert R. and {Gilmore}, D. Kirk and {Glanzman}, Thomas and {Glick}, William and {Goldina}, Tatiana and {Goldstein}, Daniel A. and {Goodenow}, Iain and {Graham}, Melissa L. and {Gressler}, William J. and {Gris}, Philippe and {Guy}, Leanne P. and {Guyonnet}, Augustin and {Haller}, Gunther and {Harris}, Ron and {Hascall}, Patrick A. and {Haupt}, Justine and {Hernandez}, Fabio and {Herrmann}, Sven and {Hileman}, Edward and {Hoblitt}, Joshua and {Hodgson}, John A. and {Hogan}, Craig and {Howard}, James D. and {Huang}, Dajun and {Huffer}, Michael E. and {Ingraham}, Patrick and {Innes}, Walter R. and {Jacoby}, Suzanne H. and {Jain}, Bhuvnesh and {Jammes}, Fabrice and {Jee}, M. James and {Jenness}, Tim and {Jernigan}, Garrett and {Jevremovi{\'c}}, Darko and {Johns}, Kenneth and {Johnson}, Anthony S. and {Johnson}, Margaret W.~G. and {Jones}, R. Lynne and {Juramy-Gilles}, Claire and {Juri{\'c}}, Mario and {Kalirai}, Jason S. and {Kallivayalil}, Nitya J. and {Kalmbach}, Bryce and {Kantor}, Jeffrey P. and {Karst}, Pierre and {Kasliwal}, Mansi M. and {Kelly}, Heather and {Kessler}, Richard and {Kinnison}, Veronica and {Kirkby}, David and {Knox}, Lloyd and {Kotov}, Ivan V. and {Krabbendam}, Victor L. and {Krughoff}, K. Simon and {Kub{\'a}nek}, Petr and {Kuczewski}, John and {Kulkarni}, Shri and {Ku}, John and {Kurita}, Nadine R. and {Lage}, Craig S. and {Lambert}, Ron and {Lange}, Travis and {Langton}, J. Brian and {Le Guillou}, Laurent and {Levine}, Deborah and {Liang}, Ming and {Lim}, Kian-Tat and {Lintott}, Chris J. and {Long}, Kevin E. and {Lopez}, Margaux and {Lotz}, Paul J. and {Lupton}, Robert H. and {Lust}, Nate B. and {MacArthur}, Lauren A. and {Mahabal}, Ashish and {Mandelbaum}, Rachel and {Markiewicz}, Thomas W. and {Marsh}, Darren S. and {Marshall}, Philip J. and {Marshall}, Stuart and {May}, Morgan and {McKercher}, Robert and {McQueen}, Michelle and {Meyers}, Joshua and {Migliore}, Myriam and {Miller}, Michelle and {Mills}, David J. and {Miraval}, Connor and {Moeyens}, Joachim and {Moolekamp}, Fred E. and {Monet}, David G. and {Moniez}, Marc and {Monkewitz}, Serge and {Montgomery}, Christopher and {Morrison}, Christopher B. and {Mueller}, Fritz and {Muller}, Gary P. and {Mu{\~n}oz Arancibia}, Freddy and {Neill}, Douglas R. and {Newbry}, Scott P. and {Nief}, Jean-Yves and {Nomerotski}, Andrei and {Nordby}, Martin and {O'Connor}, Paul and {Oliver}, John and {Olivier}, Scot S. and {Olsen}, Knut and {O'Mullane}, William and {Ortiz}, Sandra and {Osier}, Shawn and {Owen}, Russell E. and {Pain}, Reynald and {Palecek}, Paul E. and {Parejko}, John K. and {Parsons}, James B. and {Pease}, Nathan M. and {Peterson}, J. Matt and {Peterson}, John R. and {Petravick}, Donald L. and {Libby Petrick}, M.~E. and {Petry}, Cathy E. and {Pierfederici}, Francesco and {Pietrowicz}, Stephen and {Pike}, Rob and {Pinto}, Philip A. and {Plante}, Raymond and {Plate}, Stephen and {Plutchak}, Joel P. and {Price}, Paul A. and {Prouza}, Michael and {Radeka}, Veljko and {Rajagopal}, Jayadev and {Rasmussen}, Andrew P. and {Regnault}, Nicolas and {Reil}, Kevin A. and {Reiss}, David J. and {Reuter}, Michael A. and {Ridgway}, Stephen T. and {Riot}, Vincent J. and {Ritz}, Steve and {Robinson}, Sean and {Roby}, William and {Roodman}, Aaron and {Rosing}, Wayne and {Roucelle}, Cecille and {Rumore}, Matthew R. and {Russo}, Stefano and {Saha}, Abhijit and {Sassolas}, Benoit and {Schalk}, Terry L. and {Schellart}, Pim and {Schindler}, Rafe H. and {Schmidt}, Samuel and {Schneider}, Donald P. and {Schneider}, Michael D. and {Schoening}, William and {Schumacher}, German and {Schwamb}, Megan E. and {Sebag}, Jacques and {Selvy}, Brian and {Sembroski}, Glenn H. and {Seppala}, Lynn G. and {Serio}, Andrew and {Serrano}, Eduardo and {Shaw}, Richard A. and {Shipsey}, Ian and {Sick}, Jonathan and {Silvestri}, Nicole and {Slater}, Colin T. and {Smith}, J. Allyn and {Smith}, R. Chris and {Sobhani}, Shahram and {Soldahl}, Christine and {Storrie-Lombardi}, Lisa and {Stover}, Edward and {Strauss}, Michael A. and {Street}, Rachel A. and {Stubbs}, Christopher W. and {Sullivan}, Ian S. and {Sweeney}, Donald and {Swinbank}, John D. and {Szalay}, Alexander and {Takacs}, Peter and {Tether}, Stephen A. and {Thaler}, Jon J. and {Thayer}, John Gregg and {Thomas}, Sandrine and {Thornton}, Adam J. and {Thukral}, Vaikunth and {Tice}, Jeffrey and {Trilling}, David E. and {Turri}, Max and {Van Berg}, Richard and {Vanden Berk}, Daniel and {Vetter}, Kurt and {Virieux}, Francoise and {Vucina}, Tomislav and {Wahl}, William and {Walkowicz}, Lucianne and {Walsh}, Brian and {Walter}, Christopher W. and {Wang}, Daniel L. and {Wang}, Shin-Yawn and {Warner}, Michael and {Wiecha}, Oliver and {Willman}, Beth and {Winters}, Scott E. and {Wittman}, David and {Wolff}, Sidney C. and {Wood-Vasey}, W. Michael and {Wu}, Xiuqin and {Xin}, Bo and {Yoachim}, Peter and {Zhan}, Hu}, - title = "{LSST: From Science Drivers to Reference Design and Anticipated Data Products}", - journal = {\apj}, + title = {{LSST}: From Science Drivers to Reference Design and Anticipated Data Products}, + journal = {The Astrophysical Journal}, keywords = {astrometry, cosmology: observations, Galaxy: general, methods: observational, stars: general, surveys, Astrophysics}, year = 2019, month = mar, @@ -371,16 +371,50 @@ @ARTICLE{Han:2023 adsnote = {Provided by the SAO/NASA Astrophysics Data System} } +@ARTICLE{Sanderson:2024, + author = {{Sanderson}, Robyn E. and {Hickox}, Ryan and {Hirata}, Christopher M. and {Holman}, Matthew J. and {Lu}, Jessica R. and {Villar}, Ashley}, + title = "{Recommendations for Early Definition Science with the Nancy Grace Roman Space Telescope}", + journal = {arXiv e-prints}, + keywords = {Astrophysics - Astrophysics of Galaxies}, + year = 2024, + month = apr, + eid = {arXiv:2404.14342}, + pages = {arXiv:2404.14342}, + doi = {10.48550/arXiv.2404.14342}, +archivePrefix = {arXiv}, + eprint = {2404.14342}, + primaryClass = {astro-ph.GA}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv240414342S}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + ############################### ############################### #######Simulation biblio####### ############################### ############################### +@ARTICLE{Crain:2023, + author = {{Crain}, Robert A. and {van de Voort}, Freeke}, + title = {Hydrodynamical Simulations of the Galaxy Population: Enduring Successes and Outstanding Challenges}, + journal = {Annual Review of Astronomy and Astrophysics}, + keywords = {Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, + year = 2023, + month = aug, + volume = {61}, + pages = {473-515}, + doi = {10.1146/annurev-astro-041923-043618}, +archivePrefix = {arXiv}, + eprint = {2309.17075}, + primaryClass = {astro-ph.GA}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2023ARA&A..61..473C}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + @ARTICLE{Stinson:2010, author = {{Stinson}, G.~S. and {Bailin}, J. and {Couchman}, H. and {Wadsley}, J. and {Shen}, S. and {Nickerson}, S. and {Brook}, C. and {Quinn}, T.}, title = "{Cosmological galaxy formation simulations using smoothed particle hydrodynamics}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: evolution, galaxies: formation, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies}, year = 2010, month = oct, @@ -398,7 +432,7 @@ @ARTICLE{Stinson:2010 @ARTICLE{Stinson:2013, author = {{Stinson}, G.~S. and {Brook}, C. and {Macci{\`o}}, A.~V. and {Wadsley}, J. and {Quinn}, T.~R. and {Couchman}, H.~M.~P.}, title = "{Making Galaxies In a Cosmological Context: the need for early stellar feedback}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {hydrodynamics, galaxies: formation, galaxies: ISM, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2013, month = jan, @@ -416,7 +450,7 @@ @ARTICLE{Stinson:2013 @ARTICLE{Hirschmann:2014, author = {{Hirschmann}, Michaela and {Dolag}, Klaus and {Saro}, Alexandro and {Bachmann}, Lisa and {Borgani}, Stefano and {Burkert}, Andreas}, title = "{Cosmological simulations of black hole growth: AGN luminosities and downsizing}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: active, galaxies: evolution, quasars: general, quasars: supermassive black holes, galaxies: statistics, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2014, month = aug, @@ -434,7 +468,7 @@ @ARTICLE{Hirschmann:2014 @ARTICLE{Dubois:2014, author = {{Dubois}, Y. and {Pichon}, C. and {Welker}, C. and {Le Borgne}, D. and {Devriendt}, J. and {Laigle}, C. and {Codis}, S. and {Pogosyan}, D. and {Arnouts}, S. and {Benabed}, K. and {Bertin}, E. and {Blaizot}, J. and {Bouchet}, F. and {Cardoso}, J. -F. and {Colombi}, S. and {de Lapparent}, V. and {Desjacques}, V. and {Gavazzi}, R. and {Kassin}, S. and {Kimm}, T. and {McCracken}, H. and {Milliard}, B. and {Peirani}, S. and {Prunet}, S. and {Rouberol}, S. and {Silk}, J. and {Slyz}, A. and {Sousbie}, T. and {Teyssier}, R. and {Tresse}, L. and {Treyer}, M. and {Vibert}, D. and {Volonteri}, M.}, title = "{Dancing in the dark: galactic properties trace spin swings along the cosmic web}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: evolution, galaxies: formation, galaxies: kinematics and dynamics, cosmology: theory, large-scale structure of Universe, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2014, month = oct, @@ -452,7 +486,7 @@ @ARTICLE{Dubois:2014 @ARTICLE{Vogelsberger:2014, author = {{Vogelsberger}, Mark and {Genel}, Shy and {Springel}, Volker and {Torrey}, Paul and {Sijacki}, Debora and {Xu}, Dandan and {Snyder}, Greg and {Nelson}, Dylan and {Hernquist}, Lars}, title = "{Introducing the Illustris Project: simulating the coevolution of dark and visible matter in the Universe}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, cosmology: theory, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2014, month = oct, @@ -470,7 +504,7 @@ @ARTICLE{Vogelsberger:2014 @ARTICLE{Hopkins:2014, author = {{Hopkins}, Philip F. and {Kere{\v{s}}}, Du{\v{s}}an and {O{\~n}orbe}, Jos{\'e} and {Faucher-Gigu{\`e}re}, Claude-Andr{\'e} and {Quataert}, Eliot and {Murray}, Norman and {Bullock}, James S.}, title = "{Galaxies on FIRE (Feedback In Realistic Environments): stellar feedback explains cosmologically inefficient star formation}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {stars: formation, galaxies: active, galaxies: evolution, galaxies: formation, cosmology: theory, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies}, year = 2014, month = nov, @@ -488,7 +522,7 @@ @ARTICLE{Hopkins:2014 @ARTICLE{Schaye:2015, author = {{Schaye}, Joop and {Crain}, Robert A. and {Bower}, Richard G. and {Furlong}, Michelle and {Schaller}, Matthieu and {Theuns}, Tom and {Dalla Vecchia}, Claudio and {Frenk}, Carlos S. and {McCarthy}, I.~G. and {Helly}, John C. and {Jenkins}, Adrian and {Rosas-Guevara}, Y.~M. and {White}, Simon D.~M. and {Baes}, Maarten and {Booth}, C.~M. and {Camps}, Peter and {Navarro}, Julio F. and {Qu}, Yan and {Rahmati}, Alireza and {Sawala}, Till and {Thomas}, Peter A. and {Trayford}, James}, title = "{The EAGLE project: simulating the evolution and assembly of galaxies and their environments}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: evolution, galaxies: formation, cosmology: theory, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2015, month = jan, @@ -506,7 +540,7 @@ @ARTICLE{Schaye:2015 @ARTICLE{Crain:2015, author = {{Crain}, Robert A. and {Schaye}, Joop and {Bower}, Richard G. and {Furlong}, Michelle and {Schaller}, Matthieu and {Theuns}, Tom and {Dalla Vecchia}, Claudio and {Frenk}, Carlos S. and {McCarthy}, Ian G. and {Helly}, John C. and {Jenkins}, Adrian and {Rosas-Guevara}, Yetli M. and {White}, Simon D.~M. and {Trayford}, James W.}, title = "{The EAGLE simulations of galaxy formation: calibration of subgrid physics and model variations}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: evolution, galaxies: formation, galaxies: haloes, cosmology: theory, Astrophysics - Astrophysics of Galaxies}, year = 2015, month = jun, @@ -524,7 +558,7 @@ @ARTICLE{Crain:2015 @ARTICLE{Khandai:2015, author = {{Khandai}, Nishikanta and {Di Matteo}, Tiziana and {Croft}, Rupert and {Wilkins}, Stephen and {Feng}, Yu and {Tucker}, Evan and {DeGraf}, Colin and {Liu}, Mao-Sheng}, title = "{The MassiveBlack-II simulation: the evolution of haloes and galaxies to z {\ensuremath{\sim}} 0}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: evolution, galaxies: formation, quasars: general, cosmology: theory, large-scale structure of Universe, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies}, year = 2015, month = jun, @@ -542,7 +576,7 @@ @ARTICLE{Khandai:2015 @ARTICLE{Wang:2015, author = {{Wang}, Liang and {Dutton}, Aaron A. and {Stinson}, Gregory S. and {Macci{\`o}}, Andrea V. and {Penzo}, Camilla and {Kang}, Xi and {Keller}, Ben W. and {Wadsley}, James}, title = "{NIHAO project - I. Reproducing the inefficiency of galaxy formation across cosmic time with a large sample of cosmological hydrodynamical simulations}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: dwarf, galaxies: evolution, galaxies: formation, galaxies: spiral, cosmology: theory, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2015, month = nov, @@ -560,7 +594,7 @@ @ARTICLE{Wang:2015 @ARTICLE{Dolag:2015, author = {{Dolag}, K. and {Gaensler}, B.~M. and {Beck}, A.~M. and {Beck}, M.~C.}, title = "{Constraints on the distribution and energetics of fast radio bursts using cosmological hydrodynamic simulations}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {hydrodynamics, methods: numerical, intergalactic medium, large-scale structure of Universe, radio continuum: general, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - High Energy Astrophysical Phenomena}, year = 2015, month = aug, @@ -578,7 +612,7 @@ @ARTICLE{Dolag:2015 @ARTICLE{Dolag:2016, author = {{Dolag}, K. and {Komatsu}, E. and {Sunyaev}, R.}, title = "{SZ effects in the Magneticum Pathfinder simulation: comparison with the Planck, SPT, and ACT results}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {hydrodynamics, methods: numerical, galaxies: clusters: general, cosmic background radiation, cosmology: theory, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - High Energy Astrophysical Phenomena}, year = 2016, month = dec, @@ -596,7 +630,7 @@ @ARTICLE{Dolag:2016 @ARTICLE{Feng:2016, author = {{Feng}, Yu and {Di-Matteo}, Tiziana and {Croft}, Rupert A. and {Bird}, Simeon and {Battaglia}, Nicholas and {Wilkins}, Stephen}, title = "{The BlueTides simulation: first galaxies and reionization}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {Galaxy: formation, dark ages, reionization, first stars, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies}, year = 2016, month = jan, @@ -614,7 +648,7 @@ @ARTICLE{Feng:2016 @ARTICLE{Dave:2016, author = {{Dav{\'e}}, Romeel and {Thompson}, Robert and {Hopkins}, Philip F.}, title = "{MUFASA: galaxy formation simulations with meshless hydrodynamics}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: evolution, galaxies: formation, Astrophysics - Astrophysics of Galaxies}, year = 2016, month = nov, @@ -632,7 +666,7 @@ @ARTICLE{Dave:2016 @ARTICLE{Tremmel:2017, author = {{Tremmel}, M. and {Karcher}, M. and {Governato}, F. and {Volonteri}, M. and {Quinn}, T.~R. and {Pontzen}, A. and {Anderson}, L. and {Bellovary}, J.}, title = "{The Romulus cosmological simulations: a physical approach to the formation, dynamics and accretion models of SMBHs}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: general, quasars: supermassive black holes, Astrophysics - Astrophysics of Galaxies}, year = 2017, month = sep, @@ -650,7 +684,7 @@ @ARTICLE{Tremmel:2017 @ARTICLE{Nelson:2018, author = {{Nelson}, Dylan and {Pillepich}, Annalisa and {Springel}, Volker and {Weinberger}, Rainer and {Hernquist}, Lars and {Pakmor}, R{\"u}diger and {Genel}, Shy and {Torrey}, Paul and {Vogelsberger}, Mark and {Kauffmann}, Guinevere and {Marinacci}, Federico and {Naiman}, Jill}, title = "{First results from the IllustrisTNG simulations: the galaxy colour bimodality}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: evolution, galaxies: formation, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2018, month = mar, @@ -668,7 +702,7 @@ @ARTICLE{Nelson:2018 @ARTICLE{Pillepich:2018, author = {{Pillepich}, Annalisa and {Nelson}, Dylan and {Hernquist}, Lars and {Springel}, Volker and {Pakmor}, R{\"u}diger and {Torrey}, Paul and {Weinberger}, Rainer and {Genel}, Shy and {Naiman}, Jill P. and {Marinacci}, Federico and {Vogelsberger}, Mark}, title = "{First results from the IllustrisTNG simulations: the stellar mass content of groups and clusters of galaxies}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: clusters: general, galaxies: general, galaxies: groups: general, cosmology: theory, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2018, month = mar, @@ -686,7 +720,7 @@ @ARTICLE{Pillepich:2018 @ARTICLE{Springel:2018, author = {{Springel}, Volker and {Pakmor}, R{\"u}diger and {Pillepich}, Annalisa and {Weinberger}, Rainer and {Nelson}, Dylan and {Hernquist}, Lars and {Vogelsberger}, Mark and {Genel}, Shy and {Torrey}, Paul and {Marinacci}, Federico and {Naiman}, Jill}, title = "{First results from the IllustrisTNG simulations: matter and galaxy clustering}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxy formation, large-scale structure of Universe, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2018, month = mar, @@ -704,7 +738,7 @@ @ARTICLE{Springel:2018 @ARTICLE{Henden:2018, author = {{Henden}, Nicholas A. and {Puchwein}, Ewald and {Shen}, Sijing and {Sijacki}, Debora}, title = "{The FABLE simulations: a feedback model for galaxies, groups, and clusters}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: clusters: general, galaxies: clusters: intracluster medium, galaxies: groups: general, X-rays: galaxies: clusters, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2018, month = oct, @@ -722,7 +756,7 @@ @ARTICLE{Henden:2018 @ARTICLE{Hopkins:2018, author = {{Hopkins}, Philip F. and {Wetzel}, Andrew and {Kere{\v{s}}}, Du{\v{s}}an and {Faucher-Gigu{\`e}re}, Claude-Andr{\'e} and {Quataert}, Eliot and {Boylan-Kolchin}, Michael and {Murray}, Norman and {Hayward}, Christopher C. and {Garrison-Kimmel}, Shea and {Hummels}, Cameron and {Feldmann}, Robert and {Torrey}, Paul and {Ma}, Xiangcheng and {Angl{\'e}s-Alc{\'a}zar}, Daniel and {Su}, Kung-Yi and {Orr}, Matthew and {Schmitz}, Denise and {Escala}, Ivanna and {Sanderson}, Robyn and {Grudi{\'c}}, Michael Y. and {Hafen}, Zachary and {Kim}, Ji-Hoon and {Fitts}, Alex and {Bullock}, James S. and {Wheeler}, Coral and {Chan}, T.~K. and {Elbert}, Oliver D. and {Narayanan}, Desika}, title = "{FIRE-2 simulations: physics versus numerics in galaxy formation}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, stars: formation, galaxies: active, galaxies: evolution, galaxies: formation, cosmology: theory, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2018, month = oct, @@ -740,7 +774,7 @@ @ARTICLE{Hopkins:2018 @ARTICLE{Pfeffer:2018, author = {{Pfeffer}, Joel and {Kruijssen}, J.~M. Diederik and {Crain}, Robert A. and {Bastian}, Nate}, title = "{The E-MOSAICS project: simulating the formation and co-evolution of galaxies and their star cluster populations}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, stars: formation, globular clusters: general, galaxies: evolution, galaxies: formation, galaxies: star clusters: general, Astrophysics - Astrophysics of Galaxies}, year = 2018, month = apr, @@ -758,7 +792,7 @@ @ARTICLE{Pfeffer:2018 @ARTICLE{Kruijssen:2019, author = {{Kruijssen}, J.~M. Diederik and {Pfeffer}, Joel L. and {Crain}, Robert A. and {Bastian}, Nate}, title = "{The E-MOSAICS project: tracing galaxy formation and assembly with the age-metallicity distribution of globular clusters}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {globular clusters: general, galaxies: evolution, galaxies: formation, galaxies: haloes, galaxies: star formation, Astrophysics - Astrophysics of Galaxies}, year = 2019, month = jul, @@ -776,7 +810,7 @@ @ARTICLE{Kruijssen:2019 @ARTICLE{Peeples:2019, author = {{Peeples}, Molly S. and {Corlies}, Lauren and {Tumlinson}, Jason and {O'Shea}, Brian W. and {Lehner}, Nicolas and {O'Meara}, John M. and {Howk}, J. Christopher and {Earl}, Nicholas and {Smith}, Britton D. and {Wise}, John H. and {Hummels}, Cameron B.}, title = "{Figuring Out Gas \& Galaxies in Enzo (FOGGIE). I. Resolving Simulated Circumgalactic Absorption at 2 {\ensuremath{\leq}} z {\ensuremath{\leq}} 2.5}", - journal = {\apj}, + journal = {The Astrophysical Journal}, keywords = {galaxies: evolution, hydrodynamics, intergalactic medium, quasars: absorption lines, Astrophysics - Astrophysics of Galaxies}, year = 2019, month = mar, @@ -795,7 +829,7 @@ @ARTICLE{Peeples:2019 @ARTICLE{Dave:2019, author = {{Dav{\'e}}, Romeel and {Angl{\'e}s-Alc{\'a}zar}, Daniel and {Narayanan}, Desika and {Li}, Qi and {Rafieferantsoa}, Mika H. and {Appleby}, Sarah}, title = "{SIMBA: Cosmological simulations with black hole growth and feedback}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: evolution, galaxies: formation, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2019, month = jun, @@ -813,7 +847,7 @@ @ARTICLE{Dave:2019 @ARTICLE{Bastian:2020, author = {{Bastian}, Nate and {Pfeffer}, Joel and {Kruijssen}, J.~M. Diederik and {Crain}, Robert A. and {Trujillo-Gomez}, Sebastian and {Reina-Campos}, Marta}, title = "{The globular cluster system mass-halo mass relation in the E-MOSAICS simulations}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: star clusters: general, Astrophysics - Astrophysics of Galaxies}, year = 2020, month = oct, @@ -831,7 +865,7 @@ @ARTICLE{Bastian:2020 @ARTICLE{Applebaum:2021, author = {{Applebaum}, Elaad and {Brooks}, Alyson M. and {Christensen}, Charlotte R. and {Munshi}, Ferah and {Quinn}, Thomas R. and {Shen}, Sijing and {Tremmel}, Michael}, title = "{Ultrafaint Dwarfs in a Milky Way Context: Introducing the Mint Condition DC Justice League Simulations}", - journal = {\apj}, + journal = {The Astrophysical Journal}, keywords = {Dwarf galaxies, Galaxy evolution, Hydrodynamical simulations, Galaxy quenching, 416, 594, 767, 2040, Astrophysics - Astrophysics of Galaxies}, year = 2021, month = jan, @@ -850,7 +884,7 @@ @ARTICLE{Applebaum:2021 @ARTICLE{Agertz:2021, author = {{Agertz}, Oscar and {Renaud}, Florent and {Feltzing}, Sofia and {Read}, Justin I. and {Ryde}, Nils and {Andersson}, Eric P. and {Rey}, Martin P. and {Bensby}, Thomas and {Feuillet}, Diane K.}, title = "{VINTERGATAN - I. The origins of chemically, kinematically, and structurally distinct discs in a simulated Milky Way-mass galaxy}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, Galaxy: abundances, Galaxy: formation, galaxies: evolution, galaxies: formation, galaxies: structure, Astrophysics - Astrophysics of Galaxies}, year = 2021, month = jun, @@ -868,7 +902,7 @@ @ARTICLE{Agertz:2021 @ARTICLE{Dubois:2021, author = {{Dubois}, Yohan and {Beckmann}, Ricarda and {Bournaud}, Fr{\'e}d{\'e}ric and {Choi}, Hoseung and {Devriendt}, Julien and {Jackson}, Ryan and {Kaviraj}, Sugata and {Kimm}, Taysun and {Kraljic}, Katarina and {Laigle}, Clotilde and {Martin}, Garreth and {Park}, Min-Jung and {Peirani}, S{\'e}bastien and {Pichon}, Christophe and {Volonteri}, Marta and {Yi}, Sukyoung K.}, title = "{Introducing the NEWHORIZON simulation: Galaxy properties with resolved internal dynamics across cosmic time}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {galaxies: general, galaxies: evolution, galaxies: stellar content, galaxies: kinematics and dynamics, methods: numerical, Astrophysics - Astrophysics of Galaxies}, year = 2021, month = jul, @@ -886,7 +920,7 @@ @ARTICLE{Dubois:2021 @ARTICLE{Hopkins:2023, author = {{Hopkins}, Philip F. and {Wetzel}, Andrew and {Wheeler}, Coral and {Sanderson}, Robyn and {Grudi{\'c}}, Michael Y. and {Sameie}, Omid and {Boylan-Kolchin}, Michael and {Orr}, Matthew and {Ma}, Xiangcheng and {Faucher-Gigu{\`e}re}, Claude-Andr{\'e} and {Kere{\v{s}}}, Du{\v{s}}an and {Quataert}, Eliot and {Su}, Kung-Yi and {Moreno}, Jorge and {Feldmann}, Robert and {Bullock}, James S. and {Loebman}, Sarah R. and {Angl{\'e}s-Alc{\'a}zar}, Daniel and {Stern}, Jonathan and {Necib}, Lina and {Choban}, Caleb R. and {Hayward}, Christopher C.}, title = "{FIRE-3: updated stellar evolution models, yields, and microphysics and fitting functions for applications in galaxy simulations}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, stars: formation, ISM: structure, galaxies: evolution, galaxies: formation, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - High Energy Astrophysical Phenomena, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Solar and Stellar Astrophysics}, year = 2023, month = feb, @@ -904,7 +938,7 @@ @ARTICLE{Hopkins:2023 @ARTICLE{Rey:2023, author = {{Rey}, Martin P. and {Agertz}, Oscar and {Starkenburg}, Tjitske K. and {Renaud}, Florent and {Joshi}, Gandhali D. and {Pontzen}, Andrew and {Martin}, Nicolas F. and {Feuillet}, Diane K. and {Read}, Justin I.}, title = "{VINTERGATAN-GM: The cosmological imprints of early mergers on Milky-Way-mass galaxies}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, Galaxy: formation, Galaxy: halo, galaxies: formation, galaxies: kinematics and dynamics, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2023, month = may, @@ -922,7 +956,7 @@ @ARTICLE{Rey:2023 @ARTICLE{Feldmann:2023, author = {{Feldmann}, Robert and {Quataert}, Eliot and {Faucher-Gigu{\`e}re}, Claude-Andr{\'e} and {Hopkins}, Philip F. and {{\c{C}}atmabacak}, Onur and {Kere{\v{s}}}, Du{\v{s}}an and {Bassini}, Luigi and {Bernardini}, Mauro and {Bullock}, James S. and {Cenci}, Elia and {Gensior}, Jindra and {Liang}, Lichen and {Moreno}, Jorge and {Wetzel}, Andrew}, title = "{FIREbox: simulating galaxies at high dynamic range in a cosmological volume}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: numerical, galaxies: evolution, galaxies: ISM, galaxies: star formation, galaxies: stellar content, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2023, month = jul, @@ -940,7 +974,7 @@ @ARTICLE{Feldmann:2023 @ARTICLE{Schaye:2023, author = {{Schaye}, Joop and {Kugel}, Roi and {Schaller}, Matthieu and {Helly}, John C. and {Braspenning}, Joey and {Elbers}, Willem and {McCarthy}, Ian G. and {van Daalen}, Marcel P. and {Vandenbroucke}, Bert and {Frenk}, Carlos S. and {Kwan}, Juliana and {Salcido}, Jaime and {Bah{\'e}}, Yannick M. and {Borrow}, Josh and {Chaikin}, Evgenii and {Hahn}, Oliver and {Hu{\v{s}}ko}, Filip and {Jenkins}, Adrian and {Lacey}, Cedric G. and {Nobels}, Folkert S.~J.}, title = "{The FLAMINGO project: cosmological hydrodynamical simulations for large-scale structure and galaxy cluster surveys}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {large-scale structure of Universe, cosmology: theory, methods: numerical, galaxies: clusters: general, galaxies: formation, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = aug, @@ -955,7 +989,7 @@ @ARTICLE{Schaye:2023 @ARTICLE{Pakmor:2023, author = {{Pakmor}, R{\"u}diger and {Springel}, Volker and {Coles}, Jonathan P. and {Guillet}, Thomas and {Pfrommer}, Christoph and {Bose}, Sownak and {Barrera}, Monica and {Delgado}, Ana Maria and {Ferlito}, Fulvio and {Frenk}, Carlos and {Hadzhiyska}, Boryana and {Hern{\'a}ndez-Aguayo}, C{\'e}sar and {Hernquist}, Lars and {Kannan}, Rahul and {White}, Simon D.~M.}, title = "{The MillenniumTNG Project: the hydrodynamical full physics simulation and a first look at its galaxy clusters}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {hydrodynamics, methods: numerical, galaxies: clusters: general, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = sep, @@ -980,8 +1014,8 @@ @ARTICLE{Pakmor:2023 @ARTICLE{Wetzel:2016, author = {{Wetzel}, Andrew R. and {Hopkins}, Philip F. and {Kim}, Ji-hoon and {Faucher-Gigu{\`e}re}, Claude-Andr{\'e} and {Kere{\v{s}}}, Du{\v{s}}an and {Quataert}, Eliot}, - title = "{Reconciling Dwarf Galaxies with {\ensuremath{\Lambda}}CDM Cosmology: Simulating a Realistic Population of Satellites around a Milky Way-mass Galaxy}", - journal = {\apjl}, + title = {Reconciling Dwarf Galaxies with {\ensuremath{\Lambda}}{CDM} Cosmology: Simulating a Realistic Population of Satellites around a {Milky Way}-mass Galaxy}, + journal = {The Astrophysical Journal Letters}, keywords = {cosmology: theory, galaxies: dwarf, galaxies: formation, galaxies: star formation, Local Group, methods: numerical, Astrophysics - Astrophysics of Galaxies}, year = 2016, month = aug, @@ -1000,7 +1034,7 @@ @ARTICLE{Wetzel:2016 @ARTICLE{Gaia:2018, author = {{Gaia Collaboration} and {Brown}, A.~G.~A. and {Vallenari}, A. and {Prusti}, T. and {de Bruijne}, J.~H.~J. and {Babusiaux}, C. and {Bailer-Jones}, C.~A.~L. and {Biermann}, M. and {Evans}, D.~W. and {Eyer}, L. and {Jansen}, F. and {Jordi}, C. and {Klioner}, S.~A. and {Lammers}, U. and {Lindegren}, L. and {Luri}, X. and {Mignard}, F. and {Panem}, C. and {Pourbaix}, D. and {Randich}, S. and {Sartoretti}, P. and {Siddiqui}, H.~I. and {Soubiran}, C. and {van Leeuwen}, F. and {Walton}, N.~A. and {Arenou}, F. and {Bastian}, U. and {Cropper}, M. and {Drimmel}, R. and {Katz}, D. and {Lattanzi}, M.~G. and {Bakker}, J. and {Cacciari}, C. and {Casta{\~n}eda}, J. and {Chaoul}, L. and {Cheek}, N. and {De Angeli}, F. and {Fabricius}, C. and {Guerra}, R. and {Holl}, B. and {Masana}, E. and {Messineo}, R. and {Mowlavi}, N. and {Nienartowicz}, K. and {Panuzzo}, P. and {Portell}, J. and {Riello}, M. and {Seabroke}, G.~M. and {Tanga}, P. and {Th{\'e}venin}, F. and {Gracia-Abril}, G. and {Comoretto}, G. and {Garcia-Reinaldos}, M. and {Teyssier}, D. and {Altmann}, M. and {Andrae}, R. and {Audard}, M. and {Bellas-Velidis}, I. and {Benson}, K. and {Berthier}, J. and {Blomme}, R. and {Burgess}, P. and {Busso}, G. and {Carry}, B. and {Cellino}, A. and {Clementini}, G. and {Clotet}, M. and {Creevey}, O. and {Davidson}, M. and {De Ridder}, J. and {Delchambre}, L. and {Dell'Oro}, A. and {Ducourant}, C. and {Fern{\'a}ndez-Hern{\'a}ndez}, J. and {Fouesneau}, M. and {Fr{\'e}mat}, Y. and {Galluccio}, L. and {Garc{\'\i}a-Torres}, M. and {Gonz{\'a}lez-N{\'u}{\~n}ez}, J. and {Gonz{\'a}lez-Vidal}, J.~J. and {Gosset}, E. and {Guy}, L.~P. and {Halbwachs}, J. -L. and {Hambly}, N.~C. and {Harrison}, D.~L. and {Hern{\'a}ndez}, J. and {Hestroffer}, D. and {Hodgkin}, S.~T. and {Hutton}, A. and {Jasniewicz}, G. and {Jean-Antoine-Piccolo}, A. and {Jordan}, S. and {Korn}, A.~J. and {Krone-Martins}, A. and {Lanzafame}, A.~C. and {Lebzelter}, T. and {L{\"o}ffler}, W. and {Manteiga}, M. and {Marrese}, P.~M. and {Mart{\'\i}n-Fleitas}, J.~M. and {Moitinho}, A. and {Mora}, A. and {Muinonen}, K. and {Osinde}, J. and {Pancino}, E. and {Pauwels}, T. and {Petit}, J. -M. and {Recio-Blanco}, A. and {Richards}, P.~J. and {Rimoldini}, L. and {Robin}, A.~C. and {Sarro}, L.~M. and {Siopis}, C. and {Smith}, M. and {Sozzetti}, A. and {S{\"u}veges}, M. and {Torra}, J. and {van Reeven}, W. and {Abbas}, U. and {Abreu Aramburu}, A. and {Accart}, S. and {Aerts}, C. and {Altavilla}, G. and {{\'A}lvarez}, M.~A. and {Alvarez}, R. and {Alves}, J. and {Anderson}, R.~I. and {Andrei}, A.~H. and {Anglada Varela}, E. and {Antiche}, E. and {Antoja}, T. and {Arcay}, B. and {Astraatmadja}, T.~L. and {Bach}, N. and {Baker}, S.~G. and {Balaguer-N{\'u}{\~n}ez}, L. and {Balm}, P. and {Barache}, C. and {Barata}, C. and {Barbato}, D. and {Barblan}, F. and {Barklem}, P.~S. and {Barrado}, D. and {Barros}, M. and {Barstow}, M.~A. and {Bartholom{\'e} Mu{\~n}oz}, S. and {Bassilana}, J. -L. and {Becciani}, U. and {Bellazzini}, M. and {Berihuete}, A. and {Bertone}, S. and {Bianchi}, L. and {Bienaym{\'e}}, O. and {Blanco-Cuaresma}, S. and {Boch}, T. and {Boeche}, C. and {Bombrun}, A. and {Borrachero}, R. and {Bossini}, D. and {Bouquillon}, S. and {Bourda}, G. and {Bragaglia}, A. and {Bramante}, L. and {Breddels}, M.~A. and {Bressan}, A. and {Brouillet}, N. and {Br{\"u}semeister}, T. and {Brugaletta}, E. and {Bucciarelli}, B. and {Burlacu}, A. and {Busonero}, D. and {Butkevich}, A.~G. and {Buzzi}, R. and {Caffau}, E. and {Cancelliere}, R. and {Cannizzaro}, G. and {Cantat-Gaudin}, T. and {Carballo}, R. and {Carlucci}, T. and {Carrasco}, J.~M. and {Casamiquela}, L. and {Castellani}, M. and {Castro-Ginard}, A. and {Charlot}, P. and {Chemin}, L. and {Chiavassa}, A. and {Cocozza}, G. and {Costigan}, G. and {Cowell}, S. and {Crifo}, F. and {Crosta}, M. and {Crowley}, C. and {Cuypers}, J. and {Dafonte}, C. and {Damerdji}, Y. and {Dapergolas}, A. and {David}, P. and {David}, M. and {de Laverny}, P. and {De Luise}, F. and {De March}, R. and {de Martino}, D. and {de Souza}, R. and {de Torres}, A. and {Debosscher}, J. and {del Pozo}, E. and {Delbo}, M. and {Delgado}, A. and {Delgado}, H.~E. and {Di Matteo}, P. and {Diakite}, S. and {Diener}, C. and {Distefano}, E. and {Dolding}, C. and {Drazinos}, P. and {Dur{\'a}n}, J. and {Edvardsson}, B. and {Enke}, H. and {Eriksson}, K. and {Esquej}, P. and {Eynard Bontemps}, G. and {Fabre}, C. and {Fabrizio}, M. and {Faigler}, S. and {Falc{\~a}o}, A.~J. and {Farr{\`a}s Casas}, M. and {Federici}, L. and {Fedorets}, G. and {Fernique}, P. and {Figueras}, F. and {Filippi}, F. and {Findeisen}, K. and {Fonti}, A. and {Fraile}, E. and {Fraser}, M. and {Fr{\'e}zouls}, B. and {Gai}, M. and {Galleti}, S. and {Garabato}, D. and {Garc{\'\i}a-Sedano}, F. and {Garofalo}, A. and {Garralda}, N. and {Gavel}, A. and {Gavras}, P. and {Gerssen}, J. and {Geyer}, R. and {Giacobbe}, P. and {Gilmore}, G. and {Girona}, S. and {Giuffrida}, G. and {Glass}, F. and {Gomes}, M. and {Granvik}, M. and {Gueguen}, A. and {Guerrier}, A. and {Guiraud}, J. and {Guti{\'e}rrez-S{\'a}nchez}, R. and {Haigron}, R. and {Hatzidimitriou}, D. and {Hauser}, M. and {Haywood}, M. and {Heiter}, U. and {Helmi}, A. and {Heu}, J. and {Hilger}, T. and {Hobbs}, D. and {Hofmann}, W. and {Holland}, G. and {Huckle}, H.~E. and {Hypki}, A. and {Icardi}, V. and {Jan{\ss}en}, K. and {Jevardat de Fombelle}, G. and {Jonker}, P.~G. and {Juh{\'a}sz}, {\'A}. L. and {Julbe}, F. and {Karampelas}, A. and {Kewley}, A. and {Klar}, J. and {Kochoska}, A. and {Kohley}, R. and {Kolenberg}, K. and {Kontizas}, M. and {Kontizas}, E. and {Koposov}, S.~E. and {Kordopatis}, G. and {Kostrzewa-Rutkowska}, Z. and {Koubsky}, P. and {Lambert}, S. and {Lanza}, A.~F. and {Lasne}, Y. and {Lavigne}, J. -B. and {Le Fustec}, Y. and {Le Poncin-Lafitte}, C. and {Lebreton}, Y. and {Leccia}, S. and {Leclerc}, N. and {Lecoeur-Taibi}, I. and {Lenhardt}, H. and {Leroux}, F. and {Liao}, S. and {Licata}, E. and {Lindstr{\o}m}, H.~E.~P. and {Lister}, T.~A. and {Livanou}, E. and {Lobel}, A. and {L{\'o}pez}, M. and {Managau}, S. and {Mann}, R.~G. and {Mantelet}, G. and {Marchal}, O. and {Marchant}, J.~M. and {Marconi}, M. and {Marinoni}, S. and {Marschalk{\'o}}, G. and {Marshall}, D.~J. and {Martino}, M. and {Marton}, G. and {Mary}, N. and {Massari}, D. and {Matijevi{\v{c}}}, G. and {Mazeh}, T. and {McMillan}, P.~J. and {Messina}, S. and {Michalik}, D. and {Millar}, N.~R. and {Molina}, D. and {Molinaro}, R. and {Moln{\'a}r}, L. and {Montegriffo}, P. and {Mor}, R. and {Morbidelli}, R. and {Morel}, T. and {Morris}, D. and {Mulone}, A.~F. and {Muraveva}, T. and {Musella}, I. and {Nelemans}, G. and {Nicastro}, L. and {Noval}, L. and {O'Mullane}, W. and {Ord{\'e}novic}, C. and {Ord{\'o}{\~n}ez-Blanco}, D. and {Osborne}, P. and {Pagani}, C. and {Pagano}, I. and {Pailler}, F. and {Palacin}, H. and {Palaversa}, L. and {Panahi}, A. and {Pawlak}, M. and {Piersimoni}, A.~M. and {Pineau}, F. -X. and {Plachy}, E. and {Plum}, G. and {Poggio}, E. and {Poujoulet}, E. and {Pr{\v{s}}a}, A. and {Pulone}, L. and {Racero}, E. and {Ragaini}, S. and {Rambaux}, N. and {Ramos-Lerate}, M. and {Regibo}, S. and {Reyl{\'e}}, C. and {Riclet}, F. and {Ripepi}, V. and {Riva}, A. and {Rivard}, A. and {Rixon}, G. and {Roegiers}, T. and {Roelens}, M. and {Romero-G{\'o}mez}, M. and {Rowell}, N. and {Royer}, F. and {Ruiz-Dern}, L. and {Sadowski}, G. and {Sagrist{\`a} Sell{\'e}s}, T. and {Sahlmann}, J. and {Salgado}, J. and {Salguero}, E. and {Sanna}, N. and {Santana-Ros}, T. and {Sarasso}, M. and {Savietto}, H. and {Schultheis}, M. and {Sciacca}, E. and {Segol}, M. and {Segovia}, J.~C. and {S{\'e}gransan}, D. and {Shih}, I. -C. and {Siltala}, L. and {Silva}, A.~F. and {Smart}, R.~L. and {Smith}, K.~W. and {Solano}, E. and {Solitro}, F. and {Sordo}, R. and {Soria Nieto}, S. and {Souchay}, J. and {Spagna}, A. and {Spoto}, F. and {Stampa}, U. and {Steele}, I.~A. and {Steidelm{\"u}ller}, H. and {Stephenson}, C.~A. and {Stoev}, H. and {Suess}, F.~F. and {Surdej}, J. and {Szabados}, L. and {Szegedi-Elek}, E. and {Tapiador}, D. and {Taris}, F. and {Tauran}, G. and {Taylor}, M.~B. and {Teixeira}, R. and {Terrett}, D. and {Teyssandier}, P. and {Thuillot}, W. and {Titarenko}, A. and {Torra Clotet}, F. and {Turon}, C. and {Ulla}, A. and {Utrilla}, E. and {Uzzi}, S. and {Vaillant}, M. and {Valentini}, G. and {Valette}, V. and {van Elteren}, A. and {Van Hemelryck}, E. and {van Leeuwen}, M. and {Vaschetto}, M. and {Vecchiato}, A. and {Veljanoski}, J. and {Viala}, Y. and {Vicente}, D. and {Vogt}, S. and {von Essen}, C. and {Voss}, H. and {Votruba}, V. and {Voutsinas}, S. and {Walmsley}, G. and {Weiler}, M. and {Wertz}, O. and {Wevers}, T. and {Wyrzykowski}, {\L}. and {Yoldas}, A. and {{\v{Z}}erjal}, M. and {Ziaeepour}, H. and {Zorec}, J. and {Zschocke}, S. and {Zucker}, S. and {Zurbach}, C. and {Zwitter}, T.}, title = "{Gaia Data Release 2. Summary of the contents and survey properties}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {catalogs, astrometry, techniques: radial velocities, stars: fundamental parameters, stars: variables: general, minor planets, asteroids: general, Astrophysics - Astrophysics of Galaxies, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2018, month = aug, @@ -1018,7 +1052,7 @@ @ARTICLE{Gaia:2018 @ARTICLE{Kroupa:2001, author = {{Kroupa}, Pavel}, title = "{On the variation of the initial mass function}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {BINARIES: GENERAL, STARS: FORMATION, STARS: KINEMATICS, STARS: LUMINOSITY FUNCTION, MASS FUNCTION, GLOBULAR CLUSTERS: GENERAL, OPEN CLUSTERS AND ASSOCIATIONS: GENERAL, Astrophysics}, year = 2001, month = apr, @@ -1046,7 +1080,7 @@ @ARTICLE{Kroupa:2001 @ARTICLE{numpy:2020, author = {{Harris}, Charles R. and {Millman}, K. Jarrod and {van der Walt}, St{\'e}fan J. and {Gommers}, Ralf and {Virtanen}, Pauli and {Cournapeau}, David and {Wieser}, Eric and {Taylor}, Julian and {Berg}, Sebastian and {Smith}, Nathaniel J. and {Kern}, Robert and {Picus}, Matti and {Hoyer}, Stephan and {van Kerkwijk}, Marten H. and {Brett}, Matthew and {Haldane}, Allan and {del R{\'\i}o}, Jaime Fern{\'a}ndez and {Wiebe}, Mark and {Peterson}, Pearu and {G{\'e}rard-Marchant}, Pierre and {Sheppard}, Kevin and {Reddy}, Tyler and {Weckesser}, Warren and {Abbasi}, Hameer and {Gohlke}, Christoph and {Oliphant}, Travis E.}, title = "{Array programming with NumPy}", - journal = {\nat}, + journal = {Nature}, keywords = {Computer Science - Mathematical Software, Statistics - Computation}, year = 2020, month = sep, @@ -1079,6 +1113,15 @@ @ARTICLE{scipy:2020 adsnote = {Provided by the SAO/NASA Astrophysics Data System} } +@ARTICLE{scikit-learn:2011, + author = {Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V. and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P. and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.}, + title = {Scikit-learn: Machine Learning in {P}ython}, + journal = {Journal of Machine Learning Research}, + volume = {12}, + pages = {2825--2830}, + year = {2011} +} + @SOFTWARE{pandas:2023, author = {{The pandas development team}}, title = {pandas-dev/pandas: Pandas}, @@ -1111,7 +1154,7 @@ @MISC{ebfpy:2020 @ARTICLE{astropy:2013, author = {{Astropy Collaboration} and {Robitaille}, Thomas P. and {Tollerud}, Erik J. and {Greenfield}, Perry and {Droettboom}, Michael and {Bray}, Erik and {Aldcroft}, Tom and {Davis}, Matt and {Ginsburg}, Adam and {Price-Whelan}, Adrian M. and {Kerzendorf}, Wolfgang E. and {Conley}, Alexander and {Crighton}, Neil and {Barbary}, Kyle and {Muna}, Demitri and {Ferguson}, Henry and {Grollier}, Fr{\'e}d{\'e}ric and {Parikh}, Madhura M. and {Nair}, Prasanth H. and {Unther}, Hans M. and {Deil}, Christoph and {Woillez}, Julien and {Conseil}, Simon and {Kramer}, Roban and {Turner}, James E.~H. and {Singer}, Leo and {Fox}, Ryan and {Weaver}, Benjamin A. and {Zabalza}, Victor and {Edwards}, Zachary I. and {Azalee Bostroem}, K. and {Burke}, D.~J. and {Casey}, Andrew R. and {Crawford}, Steven M. and {Dencheva}, Nadia and {Ely}, Justin and {Jenness}, Tim and {Labrie}, Kathleen and {Lim}, Pey Lian and {Pierfederici}, Francesco and {Pontzen}, Andrew and {Ptak}, Andy and {Refsdal}, Brian and {Servillat}, Mathieu and {Streicher}, Ole}, title = "{Astropy: A community Python package for astronomy}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {methods: data analysis, methods: miscellaneous, virtual observatory tools, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2013, month = oct, @@ -1129,7 +1172,7 @@ @ARTICLE{astropy:2013 @ARTICLE{astropy:2018, author = {{Astropy Collaboration} and {Price-Whelan}, A.~M. and {Sip{\H{o}}cz}, B.~M. and {G{\"u}nther}, H.~M. and {Lim}, P.~L. and {Crawford}, S.~M. and {Conseil}, S. and {Shupe}, D.~L. and {Craig}, M.~W. and {Dencheva}, N. and {Ginsburg}, A. and {VanderPlas}, J.~T. and {Bradley}, L.~D. and {P{\'e}rez-Su{\'a}rez}, D. and {de Val-Borro}, M. and {Aldcroft}, T.~L. and {Cruz}, K.~L. and {Robitaille}, T.~P. and {Tollerud}, E.~J. and {Ardelean}, C. and {Babej}, T. and {Bach}, Y.~P. and {Bachetti}, M. and {Bakanov}, A.~V. and {Bamford}, S.~P. and {Barentsen}, G. and {Barmby}, P. and {Baumbach}, A. and {Berry}, K.~L. and {Biscani}, F. and {Boquien}, M. and {Bostroem}, K.~A. and {Bouma}, L.~G. and {Brammer}, G.~B. and {Bray}, E.~M. and {Breytenbach}, H. and {Buddelmeijer}, H. and {Burke}, D.~J. and {Calderone}, G. and {Cano Rodr{\'\i}guez}, J.~L. and {Cara}, M. and {Cardoso}, J.~V.~M. and {Cheedella}, S. and {Copin}, Y. and {Corrales}, L. and {Crichton}, D. and {D'Avella}, D. and {Deil}, C. and {Depagne}, {\'E}. and {Dietrich}, J.~P. and {Donath}, A. and {Droettboom}, M. and {Earl}, N. and {Erben}, T. and {Fabbro}, S. and {Ferreira}, L.~A. and {Finethy}, T. and {Fox}, R.~T. and {Garrison}, L.~H. and {Gibbons}, S.~L.~J. and {Goldstein}, D.~A. and {Gommers}, R. and {Greco}, J.~P. and {Greenfield}, P. and {Groener}, A.~M. and {Grollier}, F. and {Hagen}, A. and {Hirst}, P. and {Homeier}, D. and {Horton}, A.~J. and {Hosseinzadeh}, G. and {Hu}, L. and {Hunkeler}, J.~S. and {Ivezi{\'c}}, {\v{Z}}. and {Jain}, A. and {Jenness}, T. and {Kanarek}, G. and {Kendrew}, S. and {Kern}, N.~S. and {Kerzendorf}, W.~E. and {Khvalko}, A. and {King}, J. and {Kirkby}, D. and {Kulkarni}, A.~M. and {Kumar}, A. and {Lee}, A. and {Lenz}, D. and {Littlefair}, S.~P. and {Ma}, Z. and {Macleod}, D.~M. and {Mastropietro}, M. and {McCully}, C. and {Montagnac}, S. and {Morris}, B.~M. and {Mueller}, M. and {Mumford}, S.~J. and {Muna}, D. and {Murphy}, N.~A. and {Nelson}, S. and {Nguyen}, G.~H. and {Ninan}, J.~P. and {N{\"o}the}, M. and {Ogaz}, S. and {Oh}, S. and {Parejko}, J.~K. and {Parley}, N. and {Pascual}, S. and {Patil}, R. and {Patil}, A.~A. and {Plunkett}, A.~L. and {Prochaska}, J.~X. and {Rastogi}, T. and {Reddy Janga}, V. and {Sabater}, J. and {Sakurikar}, P. and {Seifert}, M. and {Sherbert}, L.~E. and {Sherwood-Taylor}, H. and {Shih}, A.~Y. and {Sick}, J. and {Silbiger}, M.~T. and {Singanamalla}, S. and {Singer}, L.~P. and {Sladen}, P.~H. and {Sooley}, K.~A. and {Sornarajah}, S. and {Streicher}, O. and {Teuben}, P. and {Thomas}, S.~W. and {Tremblay}, G.~R. and {Turner}, J.~E.~H. and {Terr{\'o}n}, V. and {van Kerkwijk}, M.~H. and {de la Vega}, A. and {Watkins}, L.~L. and {Weaver}, B.~A. and {Whitmore}, J.~B. and {Woillez}, J. and {Zabalza}, V. and {Astropy Contributors}}, title = "{The Astropy Project: Building an Open-science Project and Status of the v2.0 Core Package}", - journal = {\aj}, + journal = {The Astronomical Journal}, keywords = {methods: data analysis, methods: miscellaneous, methods: statistical, reference systems, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2018, month = sep, @@ -1148,7 +1191,7 @@ @ARTICLE{astropy:2018 @ARTICLE{astropy:2022, author = {{Astropy Collaboration} and {Price-Whelan}, Adrian M. and {Lim}, Pey Lian and {Earl}, Nicholas and {Starkman}, Nathaniel and {Bradley}, Larry and {Shupe}, David L. and {Patil}, Aarya A. and {Corrales}, Lia and {Brasseur}, C.~E. and {N{\"o}the}, Maximilian and {Donath}, Axel and {Tollerud}, Erik and {Morris}, Brett M. and {Ginsburg}, Adam and {Vaher}, Eero and {Weaver}, Benjamin A. and {Tocknell}, James and {Jamieson}, William and {van Kerkwijk}, Marten H. and {Robitaille}, Thomas P. and {Merry}, Bruce and {Bachetti}, Matteo and {G{\"u}nther}, H. Moritz and {Aldcroft}, Thomas L. and {Alvarado-Montes}, Jaime A. and {Archibald}, Anne M. and {B{\'o}di}, Attila and {Bapat}, Shreyas and {Barentsen}, Geert and {Baz{\'a}n}, Juanjo and {Biswas}, Manish and {Boquien}, M{\'e}d{\'e}ric and {Burke}, D.~J. and {Cara}, Daria and {Cara}, Mihai and {Conroy}, Kyle E. and {Conseil}, Simon and {Craig}, Matthew W. and {Cross}, Robert M. and {Cruz}, Kelle L. and {D'Eugenio}, Francesco and {Dencheva}, Nadia and {Devillepoix}, Hadrien A.~R. and {Dietrich}, J{\"o}rg P. and {Eigenbrot}, Arthur Davis and {Erben}, Thomas and {Ferreira}, Leonardo and {Foreman-Mackey}, Daniel and {Fox}, Ryan and {Freij}, Nabil and {Garg}, Suyog and {Geda}, Robel and {Glattly}, Lauren and {Gondhalekar}, Yash and {Gordon}, Karl D. and {Grant}, David and {Greenfield}, Perry and {Groener}, Austen M. and {Guest}, Steve and {Gurovich}, Sebastian and {Handberg}, Rasmus and {Hart}, Akeem and {Hatfield-Dodds}, Zac and {Homeier}, Derek and {Hosseinzadeh}, Griffin and {Jenness}, Tim and {Jones}, Craig K. and {Joseph}, Prajwel and {Kalmbach}, J. Bryce and {Karamehmetoglu}, Emir and {Ka{\l}uszy{\'n}ski}, Miko{\l}aj and {Kelley}, Michael S.~P. and {Kern}, Nicholas and {Kerzendorf}, Wolfgang E. and {Koch}, Eric W. and {Kulumani}, Shankar and {Lee}, Antony and {Ly}, Chun and {Ma}, Zhiyuan and {MacBride}, Conor and {Maljaars}, Jakob M. and {Muna}, Demitri and {Murphy}, N.~A. and {Norman}, Henrik and {O'Steen}, Richard and {Oman}, Kyle A. and {Pacifici}, Camilla and {Pascual}, Sergio and {Pascual-Granado}, J. and {Patil}, Rohit R. and {Perren}, Gabriel I. and {Pickering}, Timothy E. and {Rastogi}, Tanuj and {Roulston}, Benjamin R. and {Ryan}, Daniel F. and {Rykoff}, Eli S. and {Sabater}, Jose and {Sakurikar}, Parikshit and {Salgado}, Jes{\'u}s and {Sanghi}, Aniket and {Saunders}, Nicholas and {Savchenko}, Volodymyr and {Schwardt}, Ludwig and {Seifert-Eckert}, Michael and {Shih}, Albert Y. and {Jain}, Anany Shrey and {Shukla}, Gyanendra and {Sick}, Jonathan and {Simpson}, Chris and {Singanamalla}, Sudheesh and {Singer}, Leo P. and {Singhal}, Jaladh and {Sinha}, Manodeep and {Sip{\H{o}}cz}, Brigitta M. and {Spitler}, Lee R. and {Stansby}, David and {Streicher}, Ole and {{\v{S}}umak}, Jani and {Swinbank}, John D. and {Taranu}, Dan S. and {Tewary}, Nikita and {Tremblay}, Grant R. and {de Val-Borro}, Miguel and {Van Kooten}, Samuel J. and {Vasovi{\'c}}, Zlatan and {Verma}, Shresth and {de Miranda Cardoso}, Jos{\'e} Vin{\'\i}cius and {Williams}, Peter K.~G. and {Wilson}, Tom J. and {Winkel}, Benjamin and {Wood-Vasey}, W.~M. and {Xue}, Rui and {Yoachim}, Peter and {Zhang}, Chen and {Zonca}, Andrea and {Astropy Project Contributors}}, title = "{The Astropy Project: Sustaining and Growing a Community-oriented Open-source Project and the Latest Major Release (v5.0) of the Core Package}", - journal = {\apj}, + journal = {The Astrophysical Journal}, keywords = {Astronomy software, Open source software, Astronomy data analysis, 1855, 1866, 1858, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2022, month = aug, @@ -1164,10 +1207,53 @@ @ARTICLE{astropy:2022 adsnote = {Provided by the SAO/NASA Astrophysics Data System} } +@ARTICLE{astroquery:2019, + author = {{Ginsburg}, Adam and {Sip{\H{o}}cz}, Brigitta M. and {Brasseur}, C.~E. and {Cowperthwaite}, Philip S. and {Craig}, Matthew W. and {Deil}, Christoph and {Guillochon}, James and {Guzman}, Giannina and {Liedtke}, Simon and {Lian Lim}, Pey and {Lockhart}, Kelly E. and {Mommert}, Michael and {Morris}, Brett M. and {Norman}, Henrik and {Parikh}, Madhura and {Persson}, Magnus V. and {Robitaille}, Thomas P. and {Segovia}, Juan-Carlos and {Singer}, Leo P. and {Tollerud}, Erik J. and {de Val-Borro}, Miguel and {Valtchanov}, Ivan and {Woillez}, Julien and {Astroquery Collaboration} and {a subset of astropy Collaboration}}, + title = "{astroquery: An Astronomical Web-querying Package in Python}", + journal = {The Astronomical Journal}, + keywords = {astronomical databases: miscellaneous, virtual observatory tools, Astrophysics - Instrumentation and Methods for Astrophysics}, + year = 2019, + month = mar, + volume = {157}, + number = {3}, + eid = {98}, + pages = {98}, + doi = {10.3847/1538-3881/aafc33}, +archivePrefix = {arXiv}, + eprint = {1901.04520}, + primaryClass = {astro-ph.IM}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2019AJ....157...98G}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@MISC{svo_fps:2012, + author = {{Rodrigo}, Carlos and {Solano}, Enrique and {Bayo}, Amelia}, + title = "{SVO Filter Profile Service Version 1.0}", + howpublished = {IVOA Working Draft 15 October 2012}, + year = 2012, + month = oct, + pages = {1015}, + doi = {10.5479/ADS/bib/2012ivoa.rept.1015R}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2012ivoa.rept.1015R}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@INPROCEEDINGS{svo_fps:2020, + author = {{Rodrigo}, C. and {Solano}, E.}, + title = "{The SVO Filter Profile Service}", + booktitle = {XIV.0 Scientific Meeting (virtual) of the Spanish Astronomical Society}, + year = 2020, + month = jul, + eid = {182}, + pages = {182}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2020sea..confE.182R}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + @ARTICLE{vaex:2018, author = {{Breddels}, Maarten A. and {Veljanoski}, Jovan}, title = "{Vaex: big data exploration in the era of Gaia}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {methods: numerical, methods: statistical, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2018, month = oct, @@ -1216,10 +1302,19 @@ @INBOOK{pytest url = "https://doi.org/10.1007/978-1-4842-2677-3_5" } +@MISC{docstring_parser, + author = {{Kurczewski}, Marcin et al.}, + title = {\verb|docstring_parser| v0.16}, + year = {2024}, + publisher = {GitHub}, + journal = {GitHub repository}, + url = {https://github.com/rr-/docstring_parser} +} + @ARTICLE{EnBiD:2006, author = {{Sharma}, Sanjib and {Steinmetz}, Matthias}, title = "{Multidimensional density estimation and phase-space structure of dark matter haloes}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {methods: data analysis, methods: numerical, galaxies: haloes, galaxies: structure, dark matter, Astrophysics}, year = 2006, month = dec, @@ -1251,8 +1346,8 @@ @MISC{EnBiDCode:2011 @ARTICLE{Galaxia:2011, author = {{Sharma}, Sanjib and {Bland-Hawthorn}, Joss and {Johnston}, Kathryn V. and {Binney}, James}, - title = "{Galaxia: A Code to Generate a Synthetic Survey of the Milky Way}", - journal = {\apj}, + title = {{Galaxia}: A Code to Generate a Synthetic Survey of the {Milky Way}}, + journal = {The Astrophysical Journal}, keywords = {Galaxy: stellar content, Galaxy: structure, methods: data analysis, methods: numerical, Astrophysics - Astrophysics of Galaxies}, year = 2011, month = mar, @@ -1270,7 +1365,7 @@ @ARTICLE{Galaxia:2011 @MISC{GalaxiaCode:2011, author = {{Sharma}, Sanjib and {Bland-Hawthorn}, Joss and {Johnston}, Kathryn V. and {Binney}, James}, - title = "{Galaxia: A Code to Generate a Synthetic Survey of the Milky Way}", + title = {{Galaxia}: A Code to Generate a Synthetic Survey of the {Milky Way}}, keywords = {Software}, howpublished = {Astrophysics Source Code Library, record ascl:1101.007}, year = 2011, @@ -1286,7 +1381,7 @@ @MISC{GalaxiaCode:2011 @ARTICLE{Bressan:2012, author = {{Bressan}, Alessandro and {Marigo}, Paola and {Girardi}, L{\'e}o. and {Salasnich}, Bernardo and {Dal Cero}, Claudia and {Rubele}, Stefano and {Nanni}, Ambra}, title = "{PARSEC: stellar tracks and isochrones with the PAdova and TRieste Stellar Evolution Code}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {stars: evolution, Hertzsprung{\ensuremath{-}}Russell and colour magnitude diagrams, stars: interiors, stars: low-mass, Astrophysics - Solar and Stellar Astrophysics}, year = 2012, month = nov, @@ -1304,7 +1399,7 @@ @ARTICLE{Bressan:2012 @ARTICLE{Tang:2014, author = {{Tang}, Jing and {Bressan}, Alessandro and {Rosenfield}, Philip and {Slemer}, Alessandra and {Marigo}, Paola and {Girardi}, L{\'e}o and {Bianchi}, Luciana}, title = "{New PARSEC evolutionary tracks of massive stars at low metallicity: testing canonical stellar evolution in nearby star-forming dwarf galaxies}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {stars: evolution, Hertzsprung-Russell and colour-magnitude diagrams, stars: interiors, stars: massive, Astrophysics - Solar and Stellar Astrophysics}, year = 2014, month = dec, @@ -1322,7 +1417,7 @@ @ARTICLE{Tang:2014 @ARTICLE{Chen:2014, author = {{Chen}, Yang and {Girardi}, L{\'e}o and {Bressan}, Alessandro and {Marigo}, Paola and {Barbieri}, Mauro and {Kong}, Xu}, title = "{Improving PARSEC models for very low mass stars}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {stars: evolution, Hertzsprung-Russell and colour-magnitude diagrams, stars: low-mass, Astrophysics - Solar and Stellar Astrophysics}, year = 2014, month = nov, @@ -1340,7 +1435,7 @@ @ARTICLE{Chen:2014 @ARTICLE{Chen:2015, author = {{Chen}, Yang and {Bressan}, Alessandro and {Girardi}, L{\'e}o and {Marigo}, Paola and {Kong}, Xu and {Lanza}, Antonio}, title = "{PARSEC evolutionary tracks of massive stars up to 350 M$_{{\ensuremath{\odot}}}$ at metallicities 0.0001 {\ensuremath{\leq}} Z {\ensuremath{\leq}} 0.04}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {stars: evolution, Hertzsprung-Russell and colour-magnitude diagrams, stars: massive, stars: mass-loss, supergiants, stars: Wolf-Rayet, Astrophysics - Solar and Stellar Astrophysics}, year = 2015, month = sep, @@ -1358,7 +1453,7 @@ @ARTICLE{Chen:2015 @ARTICLE{Marigo:2013, author = {{Marigo}, Paola and {Bressan}, Alessandro and {Nanni}, Ambra and {Girardi}, L{\'e}o and {Pumo}, Maria Letizia}, title = "{Evolution of thermally pulsing asymptotic giant branch stars - I. The COLIBRI code}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {equation of state, stars: abundances, stars: AGB and post-AGB, stars: carbon, stars: evolution, stars: mass-loss, Astrophysics - Solar and Stellar Astrophysics}, year = 2013, month = sep, @@ -1376,7 +1471,7 @@ @ARTICLE{Marigo:2013 @ARTICLE{Rosenfield:2016, author = {{Rosenfield}, Philip and {Marigo}, Paola and {Girardi}, L{\'e}o and {Dalcanton}, Julianne J. and {Bressan}, Alessandro and {Williams}, Benjamin F. and {Dolphin}, Andrew}, title = "{Evolution of Thermally Pulsing Asymptotic Giant Branch Stars. V. Constraining the Mass Loss and Lifetimes of Intermediate-mass, Low-metallicity AGB Stars}", - journal = {\apj}, + journal = {The Astrophysical Journal}, keywords = {galaxies: dwarf, galaxies: stellar content, stars: AGB and post-AGB, stars: evolution, stars: general, stars: mass-loss, Astrophysics - Solar and Stellar Astrophysics, Astrophysics - Astrophysics of Galaxies}, year = 2016, month = may, @@ -1394,8 +1489,8 @@ @ARTICLE{Rosenfield:2016 @ARTICLE{Marigo:2017, author = {{Marigo}, Paola and {Girardi}, L{\'e}o and {Bressan}, Alessandro and {Rosenfield}, Philip and {Aringer}, Bernhard and {Chen}, Yang and {Dussin}, Marco and {Nanni}, Ambra and {Pastorelli}, Giada and {Rodrigues}, Tha{\'\i}se S. and {Trabucchi}, Michele and {Bladh}, Sara and {Dalcanton}, Julianne and {Groenewegen}, Martin A.~T. and {Montalb{\'a}n}, Josefina and {Wood}, Peter R.}, - title = "{A New Generation of PARSEC-COLIBRI Stellar Isochrones Including the TP-AGB Phase}", - journal = {\apj}, + title = {A New Generation of {PARSEC-COLIBRI} Stellar Isochrones Including the {TP-AGB} Phase}, + journal = {The Astrophysical Journal}, keywords = {stars: abundances, stars: AGB and post-AGB, stars: carbon, stars: evolution, stars: general, stars: mass loss, Astrophysics - Solar and Stellar Astrophysics}, year = 2017, month = jan, @@ -1414,7 +1509,7 @@ @ARTICLE{Marigo:2017 @ARTICLE{Girardi:2002, author = {{Girardi}, L. and {Bertelli}, G. and {Bressan}, A. and {Chiosi}, C. and {Groenewegen}, M.~A.~T. and {Marigo}, P. and {Salasnich}, B. and {Weiss}, A.}, title = "{Theoretical isochrones in several photometric systems. I. Johnson-Cousins-Glass, HST/WFPC2, HST/NICMOS, Washington, and ESO Imaging Survey filter sets}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {stars: fundamental parameters, Hertzprung-Russell (HR) and C-M diagrams, Astrophysics}, year = 2002, month = aug, @@ -1431,7 +1526,7 @@ @ARTICLE{Girardi:2002 @ARTICLE{Girardi:2008, author = {{Girardi}, L{\'e}o and {Dalcanton}, Julianne and {Williams}, Benjamin and {de Jong}, Roelof and {Gallart}, Carme and {Monelli}, Matteo and {Groenewegen}, Martin A.~T. and {Holtzman}, Jon A. and {Olsen}, Knut A.~G. and {Seth}, Anil C. and {Weisz}, Daniel R. and {ANGST/ANGRRR Collaboration}}, title = "{Revised Bolometric Corrections and Interstellar Extinction Coefficients for the ACS and WFPC2 Photometric Systems}", - journal = {\pasp}, + journal = {Publications of the Astronomical Society of the Pacific}, keywords = {Astrophysics}, year = 2008, month = may, @@ -1449,7 +1544,7 @@ @ARTICLE{Girardi:2008 @ARTICLE{Marigo:2008, author = {{Marigo}, P. and {Girardi}, L. and {Bressan}, A. and {Groenewegen}, M.~A.~T. and {Silva}, L. and {Granato}, G.~L.}, title = "{Evolution of asymptotic giant branch stars. II. Optical to far-infrared isochrones with improved TP-AGB models}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {astronomical data bases: miscellaneous, stars: AGB and post-AGB, stars: carbon, stars: evolution, galaxies: Magellanic Clouds, stars: Hertzsprung-Russell (HR) and C-M diagrams, Astrophysics}, year = 2008, month = may, @@ -1467,7 +1562,7 @@ @ARTICLE{Marigo:2008 @ARTICLE{Groenewegen:2006, author = {{Groenewegen}, M.~A.~T.}, title = "{The mid- and far-infrared colours of AGB and post-AGB stars}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {stars: circumstellar matter, stars: mass-loss, stars: AGB and post-AGB, Astrophysics}, year = 2006, month = mar, @@ -1485,7 +1580,7 @@ @ARTICLE{Groenewegen:2006 @ARTICLE{Trabucchi:2019, author = {{Trabucchi}, Michele and {Wood}, Peter R. and {Montalb{\'a}n}, Josefina and {Marigo}, Paola and {Pastorelli}, Giada and {Girardi}, L{\'e}o}, title = "{Modelling long-period variables - I. A new grid of O-rich and C-rich pulsation models}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {stars: AGB and post-AGB, stars: oscillations, stars: variables: general, Astrophysics - Solar and Stellar Astrophysics}, year = 2019, month = jan, @@ -1503,7 +1598,7 @@ @ARTICLE{Trabucchi:2019 @ARTICLE{Trabucchi:2021, author = {{Trabucchi}, Michele and {Wood}, Peter R. and {Mowlavi}, Nami and {Pastorelli}, Giada and {Marigo}, Paola and {Girardi}, L{\'e}o and {Lebzelter}, Thomas}, title = "{Modelling long-period variables - II. Fundamental mode pulsation in the non-linear regime}", - journal = {\mnras}, + journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {stars: AGB and post-AGB, stars: oscillations, stars: variables: general, Astrophysics - Solar and Stellar Astrophysics}, year = 2021, month = nov, @@ -1518,6 +1613,21 @@ @ARTICLE{Trabucchi:2021 adsnote = {Provided by the SAO/NASA Astrophysics Data System} } +@ARTICLE{swiftsimio:2020, + author = {{Borrow}, Josh and {Borrisov}, Alexei}, + title = "{swiftsimio: A Python library for reading SWIFT data}", + journal = {The Journal of Open Source Software}, + keywords = {Python, cosmology, i/o, simulations, astronomy}, + year = 2020, + month = aug, + volume = {5}, + number = {52}, + eid = {2430}, + pages = {2430}, + doi = {10.21105/joss.02430}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2020JOSS....5.2430B}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} ################################# @@ -1546,7 +1656,7 @@ @ARTICLE{Necib:2020 @ARTICLE{Ostdiek:2020, author = {{Ostdiek}, B. and {Necib}, L. and {Cohen}, T. and {Freytsis}, M. and {Lisanti}, M. and {Garrison-Kimmmel}, S. and {Wetzel}, A. and {Sanderson}, R.~E. and {Hopkins}, P.~F.}, title = "{Cataloging accreted stars within Gaia DR2 using deep learning}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {Galaxy: kinematics and dynamics, Galaxy: halo, solar neighborhood, catalogs, methods: data analysis, Astrophysics - Astrophysics of Galaxies, High Energy Physics - Phenomenology, Statistics - Machine Learning}, year = 2020, month = apr, @@ -1564,7 +1674,7 @@ @ARTICLE{Ostdiek:2020 @ARTICLE{Nikakhtar:2021, author = {{Nikakhtar}, Farnik and {Sheth}, Ravi K. and {Zehavi}, Idit}, title = "{Laguerre reconstruction of the correlation function on baryon acoustic oscillation scales}", - journal = {\prd}, + journal = {Physical Review D}, keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics}, year = 2021, month = aug, @@ -1600,7 +1710,7 @@ @ARTICLE{Bazarov:2022 @ARTICLE{Miller:2022, author = {{Miller}, Andrew C. and {Anderson}, Lauren and {Leistedt}, Boris and {Cunningham}, John P. and {Hogg}, David W. and {Blei}, David M.}, - title = "{Mapping Interstellar Dust with Gaussian Processes}", + title = {Mapping Interstellar Dust with {Gaussian} Processes}, journal = {arXiv e-prints}, keywords = {Astrophysics - Astrophysics of Galaxies, Statistics - Applications}, year = 2022, @@ -1617,8 +1727,8 @@ @ARTICLE{Miller:2022 @ARTICLE{Shipp:2023, author = {{Shipp}, Nora and {Panithanpaisal}, Nondh and {Necib}, Lina and {Sanderson}, Robyn and {Erkal}, Denis and {Li}, Ting S. and {Santistevan}, Isaiah B. and {Wetzel}, Andrew and {Cullinane}, Lara R. and {Ji}, Alexander P. and {Koposov}, Sergey E. and {Kuehn}, Kyler and {Lewis}, Geraint F. and {Pace}, Andrew B. and {Zucker}, Daniel B. and {Bland-Hawthorn}, Joss and {Cunningham}, Emily C. and {Kim}, Stacy Y. and {Lilleengen}, Sophia and {Moreno}, Jorge and {Sharma}, Sanjib and {S Collaboration} and {FIRE Collaboration}}, - title = "{Streams on FIRE: Populations of Detectable Stellar Streams in the Milky Way and FIRE}", - journal = {\apj}, + title = {Streams on {FIRE}: Populations of Detectable Stellar Streams in the {Milky Way} and {FIRE}}, + journal = {The Astrophysical Journal}, keywords = {Stellar streams, Milky Way Galaxy, Milky Way dynamics, Astronomical simulations, Dwarf galaxies, Tidal disruption, 2166, 1054, 1051, 1857, 416, 1696, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = jun, @@ -1637,7 +1747,7 @@ @ARTICLE{Shipp:2023 @ARTICLE{DES:2015, author = {{Flaugher}, B. and {Diehl}, H.~T. and {Honscheid}, K. and {Abbott}, T.~M.~C. and {Alvarez}, O. and {Angstadt}, R. and {Annis}, J.~T. and {Antonik}, M. and {Ballester}, O. and {Beaufore}, L. and {Bernstein}, G.~M. and {Bernstein}, R.~A. and {Bigelow}, B. and {Bonati}, M. and {Boprie}, D. and {Brooks}, D. and {Buckley-Geer}, E.~J. and {Campa}, J. and {Cardiel-Sas}, L. and {Castander}, F.~J. and {Castilla}, J. and {Cease}, H. and {Cela-Ruiz}, J.~M. and {Chappa}, S. and {Chi}, E. and {Cooper}, C. and {da Costa}, L.~N. and {Dede}, E. and {Derylo}, G. and {DePoy}, D.~L. and {de Vicente}, J. and {Doel}, P. and {Drlica-Wagner}, A. and {Eiting}, J. and {Elliott}, A.~E. and {Emes}, J. and {Estrada}, J. and {Fausti Neto}, A. and {Finley}, D.~A. and {Flores}, R. and {Frieman}, J. and {Gerdes}, D. and {Gladders}, M.~D. and {Gregory}, B. and {Gutierrez}, G.~R. and {Hao}, J. and {Holland}, S.~E. and {Holm}, S. and {Huffman}, D. and {Jackson}, C. and {James}, D.~J. and {Jonas}, M. and {Karcher}, A. and {Karliner}, I. and {Kent}, S. and {Kessler}, R. and {Kozlovsky}, M. and {Kron}, R.~G. and {Kubik}, D. and {Kuehn}, K. and {Kuhlmann}, S. and {Kuk}, K. and {Lahav}, O. and {Lathrop}, A. and {Lee}, J. and {Levi}, M.~E. and {Lewis}, P. and {Li}, T.~S. and {Mandrichenko}, I. and {Marshall}, J.~L. and {Martinez}, G. and {Merritt}, K.~W. and {Miquel}, R. and {Mu{\~n}oz}, F. and {Neilsen}, E.~H. and {Nichol}, R.~C. and {Nord}, B. and {Ogando}, R. and {Olsen}, J. and {Palaio}, N. and {Patton}, K. and {Peoples}, J. and {Plazas}, A.~A. and {Rauch}, J. and {Reil}, K. and {Rheault}, J. -P. and {Roe}, N.~A. and {Rogers}, H. and {Roodman}, A. and {Sanchez}, E. and {Scarpine}, V. and {Schindler}, R.~H. and {Schmidt}, R. and {Schmitt}, R. and {Schubnell}, M. and {Schultz}, K. and {Schurter}, P. and {Scott}, L. and {Serrano}, S. and {Shaw}, T.~M. and {Smith}, R.~C. and {Soares-Santos}, M. and {Stefanik}, A. and {Stuermer}, W. and {Suchyta}, E. and {Sypniewski}, A. and {Tarle}, G. and {Thaler}, J. and {Tighe}, R. and {Tran}, C. and {Tucker}, D. and {Walker}, A.~R. and {Wang}, G. and {Watson}, M. and {Weaverdyck}, C. and {Wester}, W. and {Woods}, R. and {Yanny}, B. and {DES Collaboration}}, title = "{The Dark Energy Camera}", - journal = {\aj}, + journal = {The Astronomical Journal}, keywords = {atlases, catalogs, cosmology: observations, instrumentation: detectors, instrumentation: photometers, surveys, Astrophysics - Instrumentation and Methods for Astrophysics}, year = 2015, month = nov, @@ -1656,7 +1766,7 @@ @ARTICLE{DES:2015 @ARTICLE{DES:2018, author = {{Abbott}, T.~M.~C. and {Abdalla}, F.~B. and {Allam}, S. and {Amara}, A. and {Annis}, J. and {Asorey}, J. and {Avila}, S. and {Ballester}, O. and {Banerji}, M. and {Barkhouse}, W. and {Baruah}, L. and {Baumer}, M. and {Bechtol}, K. and {Becker}, M.~R. and {Benoit-L{\'e}vy}, A. and {Bernstein}, G.~M. and {Bertin}, E. and {Blazek}, J. and {Bocquet}, S. and {Brooks}, D. and {Brout}, D. and {Buckley-Geer}, E. and {Burke}, D.~L. and {Busti}, V. and {Campisano}, R. and {Cardiel-Sas}, L. and {Carnero Rosell}, A. and {Carrasco Kind}, M. and {Carretero}, J. and {Castander}, F.~J. and {Cawthon}, R. and {Chang}, C. and {Chen}, X. and {Conselice}, C. and {Costa}, G. and {Crocce}, M. and {Cunha}, C.~E. and {D'Andrea}, C.~B. and {da Costa}, L.~N. and {Das}, R. and {Daues}, G. and {Davis}, T.~M. and {Davis}, C. and {De Vicente}, J. and {DePoy}, D.~L. and {DeRose}, J. and {Desai}, S. and {Diehl}, H.~T. and {Dietrich}, J.~P. and {Dodelson}, S. and {Doel}, P. and {Drlica-Wagner}, A. and {Eifler}, T.~F. and {Elliott}, A.~E. and {Evrard}, A.~E. and {Farahi}, A. and {Fausti Neto}, A. and {Fernandez}, E. and {Finley}, D.~A. and {Flaugher}, B. and {Foley}, R.~J. and {Fosalba}, P. and {Friedel}, D.~N. and {Frieman}, J. and {Garc{\'\i}a-Bellido}, J. and {Gaztanaga}, E. and {Gerdes}, D.~W. and {Giannantonio}, T. and {Gill}, M.~S.~S. and {Glazebrook}, K. and {Goldstein}, D.~A. and {Gower}, M. and {Gruen}, D. and {Gruendl}, R.~A. and {Gschwend}, J. and {Gupta}, R.~R. and {Gutierrez}, G. and {Hamilton}, S. and {Hartley}, W.~G. and {Hinton}, S.~R. and {Hislop}, J.~M. and {Hollowood}, D. and {Honscheid}, K. and {Hoyle}, B. and {Huterer}, D. and {Jain}, B. and {James}, D.~J. and {Jeltema}, T. and {Johnson}, M.~W.~G. and {Johnson}, M.~D. and {Kacprzak}, T. and {Kent}, S. and {Khullar}, G. and {Klein}, M. and {Kovacs}, A. and {Koziol}, A.~M.~G. and {Krause}, E. and {Kremin}, A. and {Kron}, R. and {Kuehn}, K. and {Kuhlmann}, S. and {Kuropatkin}, N. and {Lahav}, O. and {Lasker}, J. and {Li}, T.~S. and {Li}, R.~T. and {Liddle}, A.~R. and {Lima}, M. and {Lin}, H. and {L{\'o}pez-Reyes}, P. and {MacCrann}, N. and {Maia}, M.~A.~G. and {Maloney}, J.~D. and {Manera}, M. and {March}, M. and {Marriner}, J. and {Marshall}, J.~L. and {Martini}, P. and {McClintock}, T. and {McKay}, T. and {McMahon}, R.~G. and {Melchior}, P. and {Menanteau}, F. and {Miller}, C.~J. and {Miquel}, R. and {Mohr}, J.~J. and {Morganson}, E. and {Mould}, J. and {Neilsen}, E. and {Nichol}, R.~C. and {Nogueira}, F. and {Nord}, B. and {Nugent}, P. and {Nunes}, L. and {Ogando}, R.~L.~C. and {Old}, L. and {Pace}, A.~B. and {Palmese}, A. and {Paz-Chinch{\'o}n}, F. and {Peiris}, H.~V. and {Percival}, W.~J. and {Petravick}, D. and {Plazas}, A.~A. and {Poh}, J. and {Pond}, C. and {Porredon}, A. and {Pujol}, A. and {Refregier}, A. and {Reil}, K. and {Ricker}, P.~M. and {Rollins}, R.~P. and {Romer}, A.~K. and {Roodman}, A. and {Rooney}, P. and {Ross}, A.~J. and {Rykoff}, E.~S. and {Sako}, M. and {Sanchez}, M.~L. and {Sanchez}, E. and {Santiago}, B. and {Saro}, A. and {Scarpine}, V. and {Scolnic}, D. and {Serrano}, S. and {Sevilla-Noarbe}, I. and {Sheldon}, E. and {Shipp}, N. and {Silveira}, M.~L. and {Smith}, M. and {Smith}, R.~C. and {Smith}, J.~A. and {Soares-Santos}, M. and {Sobreira}, F. and {Song}, J. and {Stebbins}, A. and {Suchyta}, E. and {Sullivan}, M. and {Swanson}, M.~E.~C. and {Tarle}, G. and {Thaler}, J. and {Thomas}, D. and {Thomas}, R.~C. and {Troxel}, M.~A. and {Tucker}, D.~L. and {Vikram}, V. and {Vivas}, A.~K. and {Walker}, A.~R. and {Wechsler}, R.~H. and {Weller}, J. and {Wester}, W. and {Wolf}, R.~C. and {Wu}, H. and {Yanny}, B. and {Zenteno}, A. and {Zhang}, Y. and {Zuntz}, J. and {DES Collaboration} and {Juneau}, S. and {Fitzpatrick}, M. and {Nikutta}, R. and {Nidever}, D. and {Olsen}, K. and {Scott}, A. and {NOAO Data Lab}}, title = "{The Dark Energy Survey: Data Release 1}", - journal = {\apjs}, + journal = {The Astrophysical Journal Supplement Series}, keywords = {astronomical databases: miscellaneous, catalogs, cosmology: observations, surveys, techniques: image processing, techniques: photometric, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies, Astrophysics - Solar and Stellar Astrophysics}, year = 2018, month = dec, @@ -1675,7 +1785,7 @@ @ARTICLE{DES:2018 @ARTICLE{DES:2021, author = {{Abbott}, T.~M.~C. and {Adam{\'o}w}, M. and {Aguena}, M. and {Allam}, S. and {Amon}, A. and {Annis}, J. and {Avila}, S. and {Bacon}, D. and {Banerji}, M. and {Bechtol}, K. and {Becker}, M.~R. and {Bernstein}, G.~M. and {Bertin}, E. and {Bhargava}, S. and {Bridle}, S.~L. and {Brooks}, D. and {Burke}, D.~L. and {Carnero Rosell}, A. and {Carrasco Kind}, M. and {Carretero}, J. and {Castander}, F.~J. and {Cawthon}, R. and {Chang}, C. and {Choi}, A. and {Conselice}, C. and {Costanzi}, M. and {Crocce}, M. and {da Costa}, L.~N. and {Davis}, T.~M. and {De Vicente}, J. and {DeRose}, J. and {Desai}, S. and {Diehl}, H.~T. and {Dietrich}, J.~P. and {Drlica-Wagner}, A. and {Eckert}, K. and {Elvin-Poole}, J. and {Everett}, S. and {Evrard}, A.~E. and {Ferrero}, I. and {Fert{\'e}}, A. and {Flaugher}, B. and {Fosalba}, P. and {Friedel}, D. and {Frieman}, J. and {Garc{\'\i}a-Bellido}, J. and {Gaztanaga}, E. and {Gelman}, L. and {Gerdes}, D.~W. and {Giannantonio}, T. and {Gill}, M.~S.~S. and {Gruen}, D. and {Gruendl}, R.~A. and {Gschwend}, J. and {Gutierrez}, G. and {Hartley}, W.~G. and {Hinton}, S.~R. and {Hollowood}, D.~L. and {Honscheid}, K. and {Huterer}, D. and {James}, D.~J. and {Jeltema}, T. and {Johnson}, M.~D. and {Kent}, S. and {Kron}, R. and {Kuehn}, K. and {Kuropatkin}, N. and {Lahav}, O. and {Li}, T.~S. and {Lidman}, C. and {Lin}, H. and {MacCrann}, N. and {Maia}, M.~A.~G. and {Manning}, T.~A. and {Maloney}, J.~D. and {March}, M. and {Marshall}, J.~L. and {Martini}, P. and {Melchior}, P. and {Menanteau}, F. and {Miquel}, R. and {Morgan}, R. and {Myles}, J. and {Neilsen}, E. and {Ogando}, R.~L.~C. and {Palmese}, A. and {Paz-Chinch{\'o}n}, F. and {Petravick}, D. and {Pieres}, A. and {Plazas}, A.~A. and {Pond}, C. and {Rodriguez-Monroy}, M. and {Romer}, A.~K. and {Roodman}, A. and {Rykoff}, E.~S. and {Sako}, M. and {Sanchez}, E. and {Santiago}, B. and {Scarpine}, V. and {Serrano}, S. and {Sevilla-Noarbe}, I. and {Smith}, J. Allyn and {Smith}, M. and {Soares-Santos}, M. and {Suchyta}, E. and {Swanson}, M.~E.~C. and {Tarle}, G. and {Thomas}, D. and {To}, C. and {Tremblay}, P.~E. and {Troxel}, M.~A. and {Tucker}, D.~L. and {Turner}, D.~J. and {Varga}, T.~N. and {Walker}, A.~R. and {Wechsler}, R.~H. and {Weller}, J. and {Wester}, W. and {Wilkinson}, R.~D. and {Yanny}, B. and {Zhang}, Y. and {Nikutta}, R. and {Fitzpatrick}, M. and {Jacques}, A. and {Scott}, A. and {Olsen}, K. and {Huang}, L. and {Herrera}, D. and {Juneau}, S. and {Nidever}, D. and {Weaver}, B.~A. and {Adean}, C. and {Correia}, V. and {de Freitas}, M. and {Freitas}, F.~N. and {Singulani}, C. and {Vila-Verde}, G. and {Linea Science Server}}, title = "{The Dark Energy Survey Data Release 2}", - journal = {\apjs}, + journal = {The Astrophysical Journal Supplement Series}, keywords = {Dark energy, Cosmology, Extragalactic astronomy, Surveys, Redshift surveys, Optical astronomy, Near infrared astronomy, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies, Astrophysics - Solar and Stellar Astrophysics}, year = 2021, month = aug, @@ -1693,25 +1803,27 @@ @ARTICLE{DES:2021 @ARTICLE{Nguyen:2023, author = {{Nguyen}, Tri and {Ou}, Xiaowei and {Panithanpaisal}, Nondh and {Shipp}, Nora and {Necib}, Lina and {Sanderson}, Robyn and {Wetzel}, Andrew}, - title = "{Synthetic Gaia DR3 surveys from the FIRE cosmological simulations of Milky-Way-mass galaxies}", - journal = {arXiv e-prints}, - keywords = {Astrophysics - Astrophysics of Galaxies}, - year = 2023, - month = jun, - eid = {arXiv:2306.16475}, - pages = {arXiv:2306.16475}, - doi = {10.48550/arXiv.2306.16475}, + title = {Synthetic {Gaia DR3} Surveys from the {FIRE} Cosmological Simulations of {Milky Way}-mass Galaxies}, + journal = {The Astrophysical Journal}, + keywords = {Hydrodynamical simulations, Gaia, the Milky Way, Milky Way dynamics, 767, 2360, 1054, 1051, Astrophysics - Astrophysics of Galaxies}, + year = 2024, + month = may, + volume = {966}, + number = {1}, + eid = {108}, + pages = {108}, + doi = {10.3847/1538-4357/ad35ba}, archivePrefix = {arXiv}, eprint = {2306.16475}, primaryClass = {astro-ph.GA}, - adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230616475N}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2024ApJ...966..108N}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{Gaia:2021, author = {{Gaia Collaboration} and {Brown}, A.~G.~A. and {Vallenari}, A. and {Prusti}, T. and {de Bruijne}, J.~H.~J. and {Babusiaux}, C. and {Biermann}, M. and {Creevey}, O.~L. and {Evans}, D.~W. and {Eyer}, L. and {Hutton}, A. and {Jansen}, F. and {Jordi}, C. and {Klioner}, S.~A. and {Lammers}, U. and {Lindegren}, L. and {Luri}, X. and {Mignard}, F. and {Panem}, C. and {Pourbaix}, D. and {Randich}, S. and {Sartoretti}, P. and {Soubiran}, C. and {Walton}, N.~A. and {Arenou}, F. and {Bailer-Jones}, C.~A.~L. and {Bastian}, U. and {Cropper}, M. and {Drimmel}, R. and {Katz}, D. and {Lattanzi}, M.~G. and {van Leeuwen}, F. and {Bakker}, J. and {Cacciari}, C. and {Casta{\~n}eda}, J. and {De Angeli}, F. and {Ducourant}, C. and {Fabricius}, C. and {Fouesneau}, M. and {Fr{\'e}mat}, Y. and {Guerra}, R. and {Guerrier}, A. and {Guiraud}, J. and {Jean-Antoine Piccolo}, A. and {Masana}, E. and {Messineo}, R. and {Mowlavi}, N. and {Nicolas}, C. and {Nienartowicz}, K. and {Pailler}, F. and {Panuzzo}, P. and {Riclet}, F. and {Roux}, W. and {Seabroke}, G.~M. and {Sordo}, R. and {Tanga}, P. and {Th{\'e}venin}, F. and {Gracia-Abril}, G. and {Portell}, J. and {Teyssier}, D. and {Altmann}, M. and {Andrae}, R. and {Bellas-Velidis}, I. and {Benson}, K. and {Berthier}, J. and {Blomme}, R. and {Brugaletta}, E. and {Burgess}, P.~W. and {Busso}, G. and {Carry}, B. and {Cellino}, A. and {Cheek}, N. and {Clementini}, G. and {Damerdji}, Y. and {Davidson}, M. and {Delchambre}, L. and {Dell'Oro}, A. and {Fern{\'a}ndez-Hern{\'a}ndez}, J. and {Galluccio}, L. and {Garc{\'\i}a-Lario}, P. and {Garcia-Reinaldos}, M. and {Gonz{\'a}lez-N{\'u}{\~n}ez}, J. and {Gosset}, E. and {Haigron}, R. and {Halbwachs}, J. -L. and {Hambly}, N.~C. and {Harrison}, D.~L. and {Hatzidimitriou}, D. and {Heiter}, U. and {Hern{\'a}ndez}, J. and {Hestroffer}, D. and {Hodgkin}, S.~T. and {Holl}, B. and {Jan{\ss}en}, K. and {Jevardat de Fombelle}, G. and {Jordan}, S. and {Krone-Martins}, A. and {Lanzafame}, A.~C. and {L{\"o}ffler}, W. and {Lorca}, A. and {Manteiga}, M. and {Marchal}, O. and {Marrese}, P.~M. and {Moitinho}, A. and {Mora}, A. and {Muinonen}, K. and {Osborne}, P. and {Pancino}, E. and {Pauwels}, T. and {Petit}, J. -M. and {Recio-Blanco}, A. and {Richards}, P.~J. and {Riello}, M. and {Rimoldini}, L. and {Robin}, A.~C. and {Roegiers}, T. and {Rybizki}, J. and {Sarro}, L.~M. and {Siopis}, C. and {Smith}, M. and {Sozzetti}, A. and {Ulla}, A. and {Utrilla}, E. and {van Leeuwen}, M. and {van Reeven}, W. and {Abbas}, U. and {Abreu Aramburu}, A. and {Accart}, S. and {Aerts}, C. and {Aguado}, J.~J. and {Ajaj}, M. and {Altavilla}, G. and {{\'A}lvarez}, M.~A. and {{\'A}lvarez Cid-Fuentes}, J. and {Alves}, J. and {Anderson}, R.~I. and {Anglada Varela}, E. and {Antoja}, T. and {Audard}, M. and {Baines}, D. and {Baker}, S.~G. and {Balaguer-N{\'u}{\~n}ez}, L. and {Balbinot}, E. and {Balog}, Z. and {Barache}, C. and {Barbato}, D. and {Barros}, M. and {Barstow}, M.~A. and {Bartolom{\'e}}, S. and {Bassilana}, J. -L. and {Bauchet}, N. and {Baudesson-Stella}, A. and {Becciani}, U. and {Bellazzini}, M. and {Bernet}, M. and {Bertone}, S. and {Bianchi}, L. and {Blanco-Cuaresma}, S. and {Boch}, T. and {Bombrun}, A. and {Bossini}, D. and {Bouquillon}, S. and {Bragaglia}, A. and {Bramante}, L. and {Breedt}, E. and {Bressan}, A. and {Brouillet}, N. and {Bucciarelli}, B. and {Burlacu}, A. and {Busonero}, D. and {Butkevich}, A.~G. and {Buzzi}, R. and {Caffau}, E. and {Cancelliere}, R. and {C{\'a}novas}, H. and {Cantat-Gaudin}, T. and {Carballo}, R. and {Carlucci}, T. and {Carnerero}, M.~I. and {Carrasco}, J.~M. and {Casamiquela}, L. and {Castellani}, M. and {Castro-Ginard}, A. and {Castro Sampol}, P. and {Chaoul}, L. and {Charlot}, P. and {Chemin}, L. and {Chiavassa}, A. and {Cioni}, M. -R.~L. and {Comoretto}, G. and {Cooper}, W.~J. and {Cornez}, T. and {Cowell}, S. and {Crifo}, F. and {Crosta}, M. and {Crowley}, C. and {Dafonte}, C. and {Dapergolas}, A. and {David}, M. and {David}, P. and {de Laverny}, P. and {De Luise}, F. and {De March}, R. and {De Ridder}, J. and {de Souza}, R. and {de Teodoro}, P. and {de Torres}, A. and {del Peloso}, E.~F. and {del Pozo}, E. and {Delbo}, M. and {Delgado}, A. and {Delgado}, H.~E. and {Delisle}, J. -B. and {Di Matteo}, P. and {Diakite}, S. and {Diener}, C. and {Distefano}, E. and {Dolding}, C. and {Eappachen}, D. and {Edvardsson}, B. and {Enke}, H. and {Esquej}, P. and {Fabre}, C. and {Fabrizio}, M. and {Faigler}, S. and {Fedorets}, G. and {Fernique}, P. and {Fienga}, A. and {Figueras}, F. and {Fouron}, C. and {Fragkoudi}, F. and {Fraile}, E. and {Franke}, F. and {Gai}, M. and {Garabato}, D. and {Garcia-Gutierrez}, A. and {Garc{\'\i}a-Torres}, M. and {Garofalo}, A. and {Gavras}, P. and {Gerlach}, E. and {Geyer}, R. and {Giacobbe}, P. and {Gilmore}, G. and {Girona}, S. and {Giuffrida}, G. and {Gomel}, R. and {Gomez}, A. and {Gonzalez-Santamaria}, I. and {Gonz{\'a}lez-Vidal}, J.~J. and {Granvik}, M. and {Guti{\'e}rrez-S{\'a}nchez}, R. and {Guy}, L.~P. and {Hauser}, M. and {Haywood}, M. and {Helmi}, A. and {Hidalgo}, S.~L. and {Hilger}, T. and {H{\l}adczuk}, N. and {Hobbs}, D. and {Holland}, G. and {Huckle}, H.~E. and {Jasniewicz}, G. and {Jonker}, P.~G. and {Juaristi Campillo}, J. and {Julbe}, F. and {Karbevska}, L. and {Kervella}, P. and {Khanna}, S. and {Kochoska}, A. and {Kontizas}, M. and {Kordopatis}, G. and {Korn}, A.~J. and {Kostrzewa-Rutkowska}, Z. and {Kruszy{\'n}ska}, K. and {Lambert}, S. and {Lanza}, A.~F. and {Lasne}, Y. and {Le Campion}, J. -F. and {Le Fustec}, Y. and {Lebreton}, Y. and {Lebzelter}, T. and {Leccia}, S. and {Leclerc}, N. and {Lecoeur-Taibi}, I. and {Liao}, S. and {Licata}, E. and {Lindstr{\o}m}, E.~P. and {Lister}, T.~A. and {Livanou}, E. and {Lobel}, A. and {Madrero Pardo}, P. and {Managau}, S. and {Mann}, R.~G. and {Marchant}, J.~M. and {Marconi}, M. and {Marcos Santos}, M.~M.~S. and {Marinoni}, S. and {Marocco}, F. and {Marshall}, D.~J. and {Martin Polo}, L. and {Mart{\'\i}n-Fleitas}, J.~M. and {Masip}, A. and {Massari}, D. and {Mastrobuono-Battisti}, A. and {Mazeh}, T. and {McMillan}, P.~J. and {Messina}, S. and {Michalik}, D. and {Millar}, N.~R. and {Mints}, A. and {Molina}, D. and {Molinaro}, R. and {Moln{\'a}r}, L. and {Montegriffo}, P. and {Mor}, R. and {Morbidelli}, R. and {Morel}, T. and {Morris}, D. and {Mulone}, A.~F. and {Munoz}, D. and {Muraveva}, T. and {Murphy}, C.~P. and {Musella}, I. and {Noval}, L. and {Ord{\'e}novic}, C. and {Orr{\`u}}, G. and {Osinde}, J. and {Pagani}, C. and {Pagano}, I. and {Palaversa}, L. and {Palicio}, P.~A. and {Panahi}, A. and {Pawlak}, M. and {Pe{\~n}alosa Esteller}, X. and {Penttil{\"a}}, A. and {Piersimoni}, A.~M. and {Pineau}, F. -X. and {Plachy}, E. and {Plum}, G. and {Poggio}, E. and {Poretti}, E. and {Poujoulet}, E. and {Pr{\v{s}}a}, A. and {Pulone}, L. and {Racero}, E. and {Ragaini}, S. and {Rainer}, M. and {Raiteri}, C.~M. and {Rambaux}, N. and {Ramos}, P. and {Ramos-Lerate}, M. and {Re Fiorentin}, P. and {Regibo}, S. and {Reyl{\'e}}, C. and {Ripepi}, V. and {Riva}, A. and {Rixon}, G. and {Robichon}, N. and {Robin}, C. and {Roelens}, M. and {Rohrbasser}, L. and {Romero-G{\'o}mez}, M. and {Rowell}, N. and {Royer}, F. and {Rybicki}, K.~A. and {Sadowski}, G. and {Sagrist{\`a} Sell{\'e}s}, A. and {Sahlmann}, J. and {Salgado}, J. and {Salguero}, E. and {Samaras}, N. and {Sanchez Gimenez}, V. and {Sanna}, N. and {Santove{\~n}a}, R. and {Sarasso}, M. and {Schultheis}, M. and {Sciacca}, E. and {Segol}, M. and {Segovia}, J.~C. and {S{\'e}gransan}, D. and {Semeux}, D. and {Shahaf}, S. and {Siddiqui}, H.~I. and {Siebert}, A. and {Siltala}, L. and {Slezak}, E. and {Smart}, R.~L. and {Solano}, E. and {Solitro}, F. and {Souami}, D. and {Souchay}, J. and {Spagna}, A. and {Spoto}, F. and {Steele}, I.~A. and {Steidelm{\"u}ller}, H. and {Stephenson}, C.~A. and {S{\"u}veges}, M. and {Szabados}, L. and {Szegedi-Elek}, E. and {Taris}, F. and {Tauran}, G. and {Taylor}, M.~B. and {Teixeira}, R. and {Thuillot}, W. and {Tonello}, N. and {Torra}, F. and {Torra}, J. and {Turon}, C. and {Unger}, N. and {Vaillant}, M. and {van Dillen}, E. and {Vanel}, O. and {Vecchiato}, A. and {Viala}, Y. and {Vicente}, D. and {Voutsinas}, S. and {Weiler}, M. and {Wevers}, T. and {Wyrzykowski}, {\L}. and {Yoldas}, A. and {Yvard}, P. and {Zhao}, H. and {Zorec}, J. and {Zucker}, S. and {Zurbach}, C. and {Zwitter}, T.}, title = "{Gaia Early Data Release 3. Summary of the contents and survey properties}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {catalogs, astrometry, parallaxes, proper motions, techniques: photometric, techniques: radial velocities, Astrophysics - Astrophysics of Galaxies}, year = 2021, month = may, @@ -1729,7 +1841,7 @@ @ARTICLE{Gaia:2021 @ARTICLE{Gaia:2023, author = {{Gaia Collaboration} and {Vallenari}, A. and {Brown}, A.~G.~A. and {Prusti}, T. and {de Bruijne}, J.~H.~J. and {Arenou}, F. and {Babusiaux}, C. and {Biermann}, M. and {Creevey}, O.~L. and {Ducourant}, C. and {Evans}, D.~W. and {Eyer}, L. and {Guerra}, R. and {Hutton}, A. and {Jordi}, C. and {Klioner}, S.~A. and {Lammers}, U.~L. and {Lindegren}, L. and {Luri}, X. and {Mignard}, F. and {Panem}, C. and {Pourbaix}, D. and {Randich}, S. and {Sartoretti}, P. and {Soubiran}, C. and {Tanga}, P. and {Walton}, N.~A. and {Bailer-Jones}, C.~A.~L. and {Bastian}, U. and {Drimmel}, R. and {Jansen}, F. and {Katz}, D. and {Lattanzi}, M.~G. and {van Leeuwen}, F. and {Bakker}, J. and {Cacciari}, C. and {Casta{\~n}eda}, J. and {De Angeli}, F. and {Fabricius}, C. and {Fouesneau}, M. and {Fr{\'e}mat}, Y. and {Galluccio}, L. and {Guerrier}, A. and {Heiter}, U. and {Masana}, E. and {Messineo}, R. and {Mowlavi}, N. and {Nicolas}, C. and {Nienartowicz}, K. and {Pailler}, F. and {Panuzzo}, P. and {Riclet}, F. and {Roux}, W. and {Seabroke}, G.~M. and {Sordo}, R. and {Th{\'e}venin}, F. and {Gracia-Abril}, G. and {Portell}, J. and {Teyssier}, D. and {Altmann}, M. and {Andrae}, R. and {Audard}, M. and {Bellas-Velidis}, I. and {Benson}, K. and {Berthier}, J. and {Blomme}, R. and {Burgess}, P.~W. and {Busonero}, D. and {Busso}, G. and {C{\'a}novas}, H. and {Carry}, B. and {Cellino}, A. and {Cheek}, N. and {Clementini}, G. and {Damerdji}, Y. and {Davidson}, M. and {de Teodoro}, P. and {Nu{\~n}ez Campos}, M. and {Delchambre}, L. and {Dell'Oro}, A. and {Esquej}, P. and {Fern{\'a}ndez-Hern{\'a}ndez}, J. and {Fraile}, E. and {Garabato}, D. and {Garc{\'\i}a-Lario}, P. and {Gosset}, E. and {Haigron}, R. and {Halbwachs}, J. -L. and {Hambly}, N.~C. and {Harrison}, D.~L. and {Hern{\'a}ndez}, J. and {Hestroffer}, D. and {Hodgkin}, S.~T. and {Holl}, B. and {Jan{\ss}en}, K. and {Jevardat de Fombelle}, G. and {Jordan}, S. and {Krone-Martins}, A. and {Lanzafame}, A.~C. and {L{\"o}ffler}, W. and {Marchal}, O. and {Marrese}, P.~M. and {Moitinho}, A. and {Muinonen}, K. and {Osborne}, P. and {Pancino}, E. and {Pauwels}, T. and {Recio-Blanco}, A. and {Reyl{\'e}}, C. and {Riello}, M. and {Rimoldini}, L. and {Roegiers}, T. and {Rybizki}, J. and {Sarro}, L.~M. and {Siopis}, C. and {Smith}, M. and {Sozzetti}, A. and {Utrilla}, E. and {van Leeuwen}, M. and {Abbas}, U. and {{\'A}brah{\'a}m}, P. and {Abreu Aramburu}, A. and {Aerts}, C. and {Aguado}, J.~J. and {Ajaj}, M. and {Aldea-Montero}, F. and {Altavilla}, G. and {{\'A}lvarez}, M.~A. and {Alves}, J. and {Anders}, F. and {Anderson}, R.~I. and {Anglada Varela}, E. and {Antoja}, T. and {Baines}, D. and {Baker}, S.~G. and {Balaguer-N{\'u}{\~n}ez}, L. and {Balbinot}, E. and {Balog}, Z. and {Barache}, C. and {Barbato}, D. and {Barros}, M. and {Barstow}, M.~A. and {Bartolom{\'e}}, S. and {Bassilana}, J. -L. and {Bauchet}, N. and {Becciani}, U. and {Bellazzini}, M. and {Berihuete}, A. and {Bernet}, M. and {Bertone}, S. and {Bianchi}, L. and {Binnenfeld}, A. and {Blanco-Cuaresma}, S. and {Blazere}, A. and {Boch}, T. and {Bombrun}, A. and {Bossini}, D. and {Bouquillon}, S. and {Bragaglia}, A. and {Bramante}, L. and {Breedt}, E. and {Bressan}, A. and {Brouillet}, N. and {Brugaletta}, E. and {Bucciarelli}, B. and {Burlacu}, A. and {Butkevich}, A.~G. and {Buzzi}, R. and {Caffau}, E. and {Cancelliere}, R. and {Cantat-Gaudin}, T. and {Carballo}, R. and {Carlucci}, T. and {Carnerero}, M.~I. and {Carrasco}, J.~M. and {Casamiquela}, L. and {Castellani}, M. and {Castro-Ginard}, A. and {Chaoul}, L. and {Charlot}, P. and {Chemin}, L. and {Chiaramida}, V. and {Chiavassa}, A. and {Chornay}, N. and {Comoretto}, G. and {Contursi}, G. and {Cooper}, W.~J. and {Cornez}, T. and {Cowell}, S. and {Crifo}, F. and {Cropper}, M. and {Crosta}, M. and {Crowley}, C. and {Dafonte}, C. and {Dapergolas}, A. and {David}, M. and {David}, P. and {de Laverny}, P. and {De Luise}, F. and {De March}, R. and {De Ridder}, J. and {de Souza}, R. and {de Torres}, A. and {del Peloso}, E.~F. and {del Pozo}, E. and {Delbo}, M. and {Delgado}, A. and {Delisle}, J. -B. and {Demouchy}, C. and {Dharmawardena}, T.~E. and {Di Matteo}, P. and {Diakite}, S. and {Diener}, C. and {Distefano}, E. and {Dolding}, C. and {Edvardsson}, B. and {Enke}, H. and {Fabre}, C. and {Fabrizio}, M. and {Faigler}, S. and {Fedorets}, G. and {Fernique}, P. and {Fienga}, A. and {Figueras}, F. and {Fournier}, Y. and {Fouron}, C. and {Fragkoudi}, F. and {Gai}, M. and {Garcia-Gutierrez}, A. and {Garcia-Reinaldos}, M. and {Garc{\'\i}a-Torres}, M. and {Garofalo}, A. and {Gavel}, A. and {Gavras}, P. and {Gerlach}, E. and {Geyer}, R. and {Giacobbe}, P. and {Gilmore}, G. and {Girona}, S. and {Giuffrida}, G. and {Gomel}, R. and {Gomez}, A. and {Gonz{\'a}lez-N{\'u}{\~n}ez}, J. and {Gonz{\'a}lez-Santamar{\'\i}a}, I. and {Gonz{\'a}lez-Vidal}, J.~J. and {Granvik}, M. and {Guillout}, P. and {Guiraud}, J. and {Guti{\'e}rrez-S{\'a}nchez}, R. and {Guy}, L.~P. and {Hatzidimitriou}, D. and {Hauser}, M. and {Haywood}, M. and {Helmer}, A. and {Helmi}, A. and {Sarmiento}, M.~H. and {Hidalgo}, S.~L. and {Hilger}, T. and {H{\l}adczuk}, N. and {Hobbs}, D. and {Holland}, G. and {Huckle}, H.~E. and {Jardine}, K. and {Jasniewicz}, G. and {Jean-Antoine Piccolo}, A. and {Jim{\'e}nez-Arranz}, {\'O}. and {Jorissen}, A. and {Juaristi Campillo}, J. and {Julbe}, F. and {Karbevska}, L. and {Kervella}, P. and {Khanna}, S. and {Kontizas}, M. and {Kordopatis}, G. and {Korn}, A.~J. and {K{\'o}sp{\'a}l}, {\'A}. and {Kostrzewa-Rutkowska}, Z. and {Kruszy{\'n}ska}, K. and {Kun}, M. and {Laizeau}, P. and {Lambert}, S. and {Lanza}, A.~F. and {Lasne}, Y. and {Le Campion}, J. -F. and {Lebreton}, Y. and {Lebzelter}, T. and {Leccia}, S. and {Leclerc}, N. and {Lecoeur-Taibi}, I. and {Liao}, S. and {Licata}, E.~L. and {Lindstr{\o}m}, H.~E.~P. and {Lister}, T.~A. and {Livanou}, E. and {Lobel}, A. and {Lorca}, A. and {Loup}, C. and {Madrero Pardo}, P. and {Magdaleno Romeo}, A. and {Managau}, S. and {Mann}, R.~G. and {Manteiga}, M. and {Marchant}, J.~M. and {Marconi}, M. and {Marcos}, J. and {Marcos Santos}, M.~M.~S. and {Mar{\'\i}n Pina}, D. and {Marinoni}, S. and {Marocco}, F. and {Marshall}, D.~J. and {Martin Polo}, L. and {Mart{\'\i}n-Fleitas}, J.~M. and {Marton}, G. and {Mary}, N. and {Masip}, A. and {Massari}, D. and {Mastrobuono-Battisti}, A. and {Mazeh}, T. and {McMillan}, P.~J. and {Messina}, S. and {Michalik}, D. and {Millar}, N.~R. and {Mints}, A. and {Molina}, D. and {Molinaro}, R. and {Moln{\'a}r}, L. and {Monari}, G. and {Mongui{\'o}}, M. and {Montegriffo}, P. and {Montero}, A. and {Mor}, R. and {Mora}, A. and {Morbidelli}, R. and {Morel}, T. and {Morris}, D. and {Muraveva}, T. and {Murphy}, C.~P. and {Musella}, I. and {Nagy}, Z. and {Noval}, L. and {Oca{\~n}a}, F. and {Ogden}, A. and {Ordenovic}, C. and {Osinde}, J.~O. and {Pagani}, C. and {Pagano}, I. and {Palaversa}, L. and {Palicio}, P.~A. and {Pallas-Quintela}, L. and {Panahi}, A. and {Payne-Wardenaar}, S. and {Pe{\~n}alosa Esteller}, X. and {Penttil{\"a}}, A. and {Pichon}, B. and {Piersimoni}, A.~M. and {Pineau}, F. -X. and {Plachy}, E. and {Plum}, G. and {Poggio}, E. and {Pr{\v{s}}a}, A. and {Pulone}, L. and {Racero}, E. and {Ragaini}, S. and {Rainer}, M. and {Raiteri}, C.~M. and {Rambaux}, N. and {Ramos}, P. and {Ramos-Lerate}, M. and {Re Fiorentin}, P. and {Regibo}, S. and {Richards}, P.~J. and {Rios Diaz}, C. and {Ripepi}, V. and {Riva}, A. and {Rix}, H. -W. and {Rixon}, G. and {Robichon}, N. and {Robin}, A.~C. and {Robin}, C. and {Roelens}, M. and {Rogues}, H.~R.~O. and {Rohrbasser}, L. and {Romero-G{\'o}mez}, M. and {Rowell}, N. and {Royer}, F. and {Ruz Mieres}, D. and {Rybicki}, K.~A. and {Sadowski}, G. and {S{\'a}ez N{\'u}{\~n}ez}, A. and {Sagrist{\`a} Sell{\'e}s}, A. and {Sahlmann}, J. and {Salguero}, E. and {Samaras}, N. and {Sanchez Gimenez}, V. and {Sanna}, N. and {Santove{\~n}a}, R. and {Sarasso}, M. and {Schultheis}, M. and {Sciacca}, E. and {Segol}, M. and {Segovia}, J.~C. and {S{\'e}gransan}, D. and {Semeux}, D. and {Shahaf}, S. and {Siddiqui}, H.~I. and {Siebert}, A. and {Siltala}, L. and {Silvelo}, A. and {Slezak}, E. and {Slezak}, I. and {Smart}, R.~L. and {Snaith}, O.~N. and {Solano}, E. and {Solitro}, F. and {Souami}, D. and {Souchay}, J. and {Spagna}, A. and {Spina}, L. and {Spoto}, F. and {Steele}, I.~A. and {Steidelm{\"u}ller}, H. and {Stephenson}, C.~A. and {S{\"u}veges}, M. and {Surdej}, J. and {Szabados}, L. and {Szegedi-Elek}, E. and {Taris}, F. and {Taylor}, M.~B. and {Teixeira}, R. and {Tolomei}, L. and {Tonello}, N. and {Torra}, F. and {Torra}, J. and {Torralba Elipe}, G. and {Trabucchi}, M. and {Tsounis}, A.~T. and {Turon}, C. and {Ulla}, A. and {Unger}, N. and {Vaillant}, M.~V. and {van Dillen}, E. and {van Reeven}, W. and {Vanel}, O. and {Vecchiato}, A. and {Viala}, Y. and {Vicente}, D. and {Voutsinas}, S. and {Weiler}, M. and {Wevers}, T. and {Wyrzykowski}, {\L}. and {Yoldas}, A. and {Yvard}, P. and {Zhao}, H. and {Zorec}, J. and {Zucker}, S. and {Zwitter}, T.}, title = "{Gaia Data Release 3. Summary of the content and survey properties}", - journal = {\aap}, + journal = {Astronomy & Astrophysics}, keywords = {techniques: photometric, techniques: spectroscopic, techniques: radial velocities, catalogs, astrometry, parallaxes, Astrophysics - Astrophysics of Galaxies}, year = 2023, month = jun, diff --git a/joss/paper.md b/joss/paper.md index 6d02c8f..599c829 100644 --- a/joss/paper.md +++ b/joss/paper.md @@ -1,5 +1,5 @@ --- -title: Generating synthetic star catalogs from simulated data for next-gen observatories with ``py-ananke`` +title: Generating synthetic star catalogs from simulated data for next-gen observatories with py-ananke tags: - Python - C++ @@ -61,114 +61,41 @@ We find ourselves on the brink of an exciting era in observational astrophysics, We introduce ``py-ananke``, a ``Python`` pipeline designed to generate synthetic resolved stellar surveys from cosmological simulations, adaptable to various instruments. Building upon its predecessor, ``ananke`` by @Sanderson:2020, which produced Gaia DR2 mock star surveys, the ``py-ananke`` package offers a user-friendly "plug & play" experience. The pipeline employs cutting-edge phase-space density estimation and initial mass function sampling to convert particle data into synthetic stars, while interpolating pre-computed stellar isochrone tracks for photometry. Additionally, it includes modules for estimating interstellar reddening, dust-induced extinctions, and for quantifying errors through dedicated modeling approaches. ``py-ananke`` promises to serve as a vital bridge between computational astrophysics and observational astronomy, facilitating preparations and making scientific predictions for the next generation of telescopes. - # Statement of need -The upcoming decade holds promise for groundbreaking discoveries, thanks to a multitude of recent and forthcoming observational facilities. The James Webb Space Telescope [@JWST:2006], for instance, with its exceptional specifications, has already delved into early universe galaxies with unprecedented detail, revealing their rich diversity [@Ferreira:2022;@Adams:2023;@Finkelstein:2023;@Kocevski:2023;@Kartaltepe:2023;@PerezGonzalez:2023;@Harikane:2023;@Hsiao:2023;@Trussler:2023;@Casey:2023;@Ferreira:2023;@Eisenstein:2023]. The recently launched Euclid Telescope [@Euclid:2011] promises to shed light on the universe's accelerating expansion by surveying an immense number of galaxies [@EuclidCollaboration:2022]. The Vera Rubin Observatory [@Rubin:2019], with first light expected soon, will precisely map the Milky Way (MW) up to the virial radius and nearby galaxies, providing exceptional stellar astrometry data. Furthermore, the Nancy Grace Roman Space Telescope [@Roman:2019], set to launch in the next couple of years, will offer a wide field of view for deep-sky near-infrared exploration, facilitating the study of resolved stellar populations in nearby galaxies [@Dey:2023;@Han:2023]. However, these observatories will generate an unprecedented amount of raw data, necessitating community preparedness. +The upcoming decade holds promise for groundbreaking discoveries, thanks to a multitude of recent and forthcoming observational facilities. The James Webb Space Telescope [@JWST:2006], for instance, with its exceptional specifications, has already delved into early universe galaxies with unprecedented detail, revealing their rich diversity [@Ferreira:2022;@Adams:2023;@Finkelstein:2023;@Harikane:2023;@Casey:2023;@Eisenstein:2023]. The recently launched Euclid Telescope [@Euclid:2011] promises to shed light on the universe's accelerating expansion by surveying an immense number of galaxies [@EuclidCollaboration:2022]. The Vera Rubin Observatory [@Rubin:2019], with first light expected soon, will precisely map the Milky Way (MW) up to the virial radius and nearby galaxies, providing exceptional stellar astrometry data. Furthermore, the Nancy Grace Roman Space Telescope [@Roman:2019], set to launch in the next couple of years, will offer a wide field of view for deep-sky near-infrared exploration, facilitating the study of resolved stellar populations in nearby galaxies [@Dey:2023;@Han:2023] and our own [@Sanderson:2024]. However, these observatories will generate an unprecedented amount of raw data, necessitating community preparedness. -In parallel, a number of projects have emerged over the last decade in computational astrophysics, continuously surpassing hardware and software limits to simulate galaxy formation in a cosmological context realistically [@Stinson:2010;@Stinson:2013;@Hirschmann:2014;@Dubois:2014;@Vogelsberger:2014;@Hopkins:2014;@Schaye:2015;@Crain:2015;@Khandai:2015;@Wang:2015;@Dolag:2015;@Dolag:2016;@Feng:2016;@Dave:2016;@Tremmel:2017;@Nelson:2018;@Pillepich:2018;@Springel:2018;@Henden:2018;@Hopkins:2018;@Pfeffer:2018;@Kruijssen:2019;@Peeples:2019;@Dave:2019;@Bastian:2020;@Agertz:2021;@Dubois:2021;@Applebaum:2021;@Hopkins:2023;@Rey:2023;@Feldmann:2023;@Schaye:2023;@Pakmor:2023]. These simulations serve as invaluable test beds for tools developed in anticipation of the next-generation telescope era, but also for our own models. However, translating these simulations into mock observables is challenging due to the representation of stellar populations as star particles, with each particle representing a total stellar mass between $10^3$ and $10^8$ times the mass of the Sun. To compare simulations with real data, one must break down these particles into individual stars consistently. Since the simulation resolution is not "one star particle per star" in the vast majority of these simulations, producing mock observables necessarily requires a series of assumptions that can have different effects on the final prediction. +In parallel, a number of projects have emerged over the last decade in computational astrophysics, continuously surpassing hardware and software limits to simulate galaxy formation in a cosmological context realistically [see @Crain:2023 for a recent review]. These simulations serve as invaluable test beds in anticipation of the next-generation telescope era, but also for our own models. However, translating these simulations into mock observables is challenging due to the representation of stellar populations as star particles, with each particle representing a total stellar mass between $10^3$ and $10^8$ times the mass of the Sun. To compare simulations with real data, one must break down these particles into individual stars consistently. Since the simulation resolution is not "one star particle per star" in the vast majority of these simulations, producing mock observables necessarily requires a series of assumptions that can have different effects on the final prediction. -This challenge was addressed by @Sanderson:2020 when producing a mock Gaia DR2 catalog from Milky-Way-mass simulated galaxies in the latte suite of FIRE simulations [@Wetzel:2016] using the so-called ``ananke`` pipeline. They used phase-space density estimation and initial mass function sampling to transform particle data into individual synthetic stars, retaining parent particle age and metallicity. Photometry was determined by interpolating pre-computed stellar isochrone tracks from the Padova database [@Marigo:2017] based on star mass, age, and metallicity. Additional post-processing included estimating interstellar reddening, per-band dust extinctions using metal-enriched gas distribution, and error quantification based on a model described by functions calibrated to [@Gaia:2018] characterizations. Each different step of the process, and its associated assumptions, was modularized and its assumptions documented, both to understand and isolate the effect of each assumption on the final product and to retain enough information at each step that a change to one assumption did not necessarily require re-producing the predictions from scratch. +This challenge was addressed by @Sanderson:2020 when producing a mock Gaia DR2 catalog from Milky-Way-mass simulated galaxies in the latte suite of FIRE simulations [@Wetzel:2016] using the so-called ``ananke`` pipeline. They used phase-space density estimation and initial mass function sampling to transform particle data into individual synthetic stars, retaining parent particle age and metallicity. Photometry was determined by interpolating pre-computed stellar isochrone tracks from the Padova database [@Marigo:2017] based on star mass, age, and metallicity. Additional post-processing included estimating interstellar reddening, per-band dust extinctions using metal-enriched gas distribution, and error quantification based on a model described by functions calibrated to [@Gaia:2018] characterizations. The ``ananke`` pipeline by @Sanderson:2020, though powerful, lacks user-friendliness and flexibility. It is challenging to integrate into other pipelines and expand beyond the Gaia photometric system. The development of ``py-ananke`` aims to make this framework more accessible to a wider community. By providing a self-contained and easily installable ``Python`` package, it streamlines the ``ananke`` pipeline, automating tasks previously requiring manual intervention. ``py-ananke`` also expands ``ananke``'s photometric system support and employs a modular implementation for future enhancements, promising a smoother upgrade path for users. -# Overview of ``py-ananke``'s framework and infrastructure +# ``py-ananke``'s framework ![Schematic illustrating the inner framework of the ``py-ananke`` pipeline. The modules ``py-EnBiD-ananke`` and ``py-Galaxia-ananke`` are referred to by their import names ``EnBiD_ananke`` and ``Galaxia_ananke``, with their respective ``C++`` backend softwares ``EnBiD`` and ``galaxia-ananke``. The pipeline framework is illustrated from input to final output from left to right, showcasing the different objects and their purposes.\label{fig:framework}](ananke_framework.pdf) -The implementation of ``py-ananke`` is designed to streamline the ``ananke`` pipeline, and to prevent the need for the user to manually handle the interface between ``Python`` and the ``C++`` backend software. It notably introduces dedicated wrapper submodules (hosted in repositories that are separate from that of ``py-ananke``, but linked as ``git`` submodules), namely ``py-EnBiD-ananke`` and ``py-Galaxia-ananke``, specifically developed to handle the installation and utilization of these ``C++`` subroutines, namely ``EnBiD`` [@EnBiD:2006;@EnBiDCode:2011] and a modified version of ``Galaxia`` [@Galaxia:2011;@GalaxiaCode:2011] called ``galaxia-ananke``. These submodules relieve users from the need to directly manage the ``C++`` software while isolating the ``C++`` wrapping process. This allows ``py-ananke`` to focus on processing inputs and outputs using pure ``Python``. \autoref{fig:framework} illustrates the inner framework process of the full pipeline, showcasing the various module and submodule classes and where they are used in an input to output fashion from left to right. - -## ``py-EnBiD-ananke`` - -The full description of ``EnBiD`` is detailed in @EnBiD:2006, but to summarize, ``EnBiD`` uses a binary space partitioning tree to estimate the space density of a discrete data sample of particles given their coordinates in that space. The tree is recursively built by successively splitting spatial volumes in equally sample-populated volumic tree-nodes until each leaf node contains one single particle. The densities at the location of each particle are estimated using the volume of the leaf node that contains that particle and smoothed using kernel smoothing methods. - -The ``py-EnBiD-ananke`` submodule handles the installation of ``EnBiD`` and interfaces with its pipeline. The installation pulls the archived source code of ``EnBiD`` from its SourceForge repository and builds its executable which gets added to the packaged data. Note that for this version of ``py-ananke``, the ``EnBiD`` pipeline is configured to determine 3D space densities for a set of particles, which ``py-ananke`` uses twice to get separate estimates of the position and velocity densities. In this situation, ``py-ananke`` combines both densities into a 6D phase space density, but future versions will consider the native implementation for determining true 6D phase space densities. - -``py-EnBiD-ananke`` consists of a collection of functions that are combined into the pipeline-function ``enbid`` that takes particles 3D coordinates as input and returns their densities. The role of each sub-function is to write the files that are given as input to the ``EnBiD`` pipeline, to run the ``EnBiD`` pipeline and to read the pipeline's output files, for which various operational constants and templates are defined in a dedicated module file. - -## ``py-Galaxia-ananke`` - -The full description of ``Galaxia`` is detailed in @Galaxia:2011, but to summarize, ``Galaxia`` uses a given galactic model to generate a population of synthetic stars that composes it, with its associated astrometric and photometric catalog. The original pipeline had a more general purpose as the input galactic model can be generated via an N-Body simulation as much as it can be specified as a set of density distributions. However, for our purpose with our modified version ``galaxia-ananke``, the pipeline uses cosmological simulation star particle data provided by the user, specifically the mass, position, velocity, age, metallicity & abundances, as well as phase space densities for each star particle. - -``galaxia-ananke`` generates the synthetic stars by sampling phase space to reproduce the distribution representing overlapping phase space kernels centered at each particle, invertly scaled with the particle density, and by sampling mass to reproduce a @Kroupa:2001 initial mass function. Each synthetic star carries the other properties of the parent particle such as age and metallicity, with which the masses are used to interpolate photometry from pre-computed isochrone tracks (details on those are described in \autoref{sec:dependencies} Dependencies). Finally, astrometry is determined by converting the phase space coordinates to celestial coordinates given a user-specified observer phase space position. - -The ``py-Galaxia-ananke`` submodule handles the installation of ``galaxia-ananke``, a modified version of ``Galaxia``, and interfaces with its pipeline. The ``galaxia-ananke`` source code lives in a separate repository which is linked as a ``git`` submodule in the repository of ``py-Galaxia-ananke``. At installation, ``py-Galaxia-ananke`` builds and packages the executable of ``galaxia-ananke`` from its source code directly from its ``git`` submodule, as well as the operational data for ``galaxia-ananke`` which includes the collections of isochrones sets. All the resulting ``galaxia-ananke`` packaged data is eventually placed in a dedicated cache folder that is created in the site-specific directory of the running ``Python`` installation. - -``py-Galaxia-ananke`` consists of mainly three classes, with one function utilizing them to run the ``galaxia-ananke`` pipeline. It also includes a submodule that interfaces via dedicated objects with the data from the collection of isochrones sets/photometric systems. The three classes of ``py-Galaxia-ananke`` serve the following roles: - -- ``Input`` objects are used to store the input star particles data, and have methods that write the input files that ``galaxia-ananke`` requires -- ``Survey`` objects receive ``Input`` objects and the selection of photometric systems to simulate, and have methods that run the ``galaxia-ananke`` pipeline and return ``Output`` objects -- ``Output`` objects serve as the main interface with ``galaxia-ananke``'s output files, and have methods that turn them into ``HDF5`` files and associated ``vaex`` dataframes - -## ``py-ananke`` - -The implementation of ``py-ananke`` involves six classes, with only one - ``Ananke`` - being relevant to the end user: - -- ``Ananke`` objects serve as the user interface, connecting all of ``py-ananke``'s classes and the ``py-Galaxia-ananke`` classes (described in the previous subsection) to execute the full pipeline via its method ``run`` -- ``Universe`` objects store the particle data and various parameters provided to ``Ananke`` -- ``Observer`` objects store the observing configuration, including the position in space -- ``DensitiesDriver`` objects utilize the particle data from the ``Universe`` class to compute and store phase space densities, employing ``py-EnBiD-ananke`` -- ``ExtinctionDriver`` objects are utilized by ``Ananke`` objects for post-processing to estimate and append extinctions in the output catalogs of ``py-Galaxia-ananke``, only if the user specified dust column densities per star particle -- ``ErrorModelDriver`` objects are utilized by ``Ananke`` objects for post-processing to determine and append errors on the quantities in the output catalogs of ``py-Galaxia-ananke`` - -The latter two driver classes require respectively extinction coefficients and error models that are photometric-system-dependents and can be specified by the user. Also, ``py-ananke`` is designed with dedicated source files to contain default implementations, which currently only hold default for the Gaia photometric system. Future updates will continue to expand this further. - -# Dependencies -\label{sec:dependencies} - -``py-ananke`` makes use of the following ``Python`` packages: - -- ``astropy`` [@astropy:2013;@astropy:2018;@astropy:2022] -- ``ebfpy`` [@ebfpy:2020] -- ``h5py`` [@h5py:2013] - -- ``numpy`` [@numpy:2020] -- ``pandas`` [@pandas:2023] -- ``pytest`` [@pytest] -- ``scipy`` [@scipy:2020] -- ``vaex`` [@vaex:2018] - -It also uses adapted versions of the ``C++`` packages: - -- ``EnBiD`` [@EnBiD:2006;@EnBiDCode:2011] integrated in ``py-EnBiD-ananke`` -- ``Galaxia`` [@Galaxia:2011;@GalaxiaCode:2011] integrated as ``galaxia-ananke`` in ``py-Galaxia-ananke`` - -Lastly, the ``galaxia-ananke`` ``C++`` submodule uses sets of pre-computed stellar isochrones generated by the Padova database[^1], using: - -- PARSEC version 1.2S [@Bressan:2012;@Tang:2014;@Chen:2014;@Chen:2015] and COLIBRI PR16 [@Marigo:2013;@Rosenfield:2016] evolutionary tracks as in @Marigo:2017 (the solar metallicity is assumed to be 0.0152), with the mass-loss on the red giant branch using the Reimers formula with $\eta_{Reimers}=0.2$, and $\eta_{inTPC}=10$ for the resolution of the thermal pulse cycles in the COLIBRI section, -- specific choices of photometric systems for the corresponding instrument[^2] with OBC bolometric corrections as described in @Girardi:2002, @Girardi:2008 and @Marigo:2008, -- circumstellar dust compositions with a combination of 60% Silicate + 40% AlOx around O-rich M stars, and a combination of 85% AMC + 15% SiC around C-rich C stars, as in @Groenewegen:2006, -- periods from @Trabucchi:2019 and @Trabucchi:2021 for long-period variability during the red and asymptotic giant branch phases. - -[^1]: [http://stev.oapd.inaf.it/cgi-bin/cmd](http://stev.oapd.inaf.it/cgbi-bin/cmd) -[^2]: further described in [http://stev.oapd.inaf.it/cmd/photsys.html](http://stev.oapd.inaf.it/cmd/photsys.html) +The implementation of ``py-ananke`` is designed to streamline the ``ananke`` pipeline, and to prevent the need for the user to manually handle the interface between ``Python`` and the ``C++`` backend software. It notably introduces dedicated wrapper submodules (hosted in repositories that are separate from that of ``py-ananke``, but linked as ``git`` submodules), namely ``py-EnBiD-ananke`` and ``py-Galaxia-ananke``, specifically developed to handle the installation and utilization of these ``C++`` subroutines, namely ``EnBiD`` [@EnBiD:2006] and a modified version of ``Galaxia`` [@Galaxia:2011] called ``galaxia-ananke``. \autoref{fig:framework} illustrates the inner framework process of the full pipeline, showcasing the various module and submodule classes and where they are used in an input to output fashion from left to right. # Past and Ongoing Applications -@Sanderson:2020's data have now been in public use for 5 years and have delivered on the promise of this technique, leading to the discovery of a new stellar stream [@Necib:2020], the development and validation of new machine learning methods for inferring the origins of stars [@Ostdiek:2020], insights into the formation history of the MW [@Nikakhtar:2021], searches for dark matter subhalos [@Bazarov:2022], and inference of the MW's interstellar dust distribution [@Miller:2022]. +@Sanderson:2020's data have been in public use for 5 years and delivered on the promise of this technique, leading to the discovery of a new stellar stream [@Necib:2020], the development and validation of new machine learning methods for inferring the origins of stars [@Ostdiek:2020], insights into the formation history of the MW [@Nikakhtar:2021], searches for dark matter subhalos [@Bazarov:2022], and inference of the MW's interstellar dust distribution [@Miller:2022]. -In addition, a number of studies have also made use of the existing ``ananke`` pipeline that generated @Sanderson:2020's data, often through the extensive effort to adapt it to other photometric systems: +Likewise, a number of studies made use of @Sanderson:2020's existing ``ananke`` pipeline, often through the extensive effort to adapt it to other photometric systems: - @Shipp:2023 investigated the detectability of MW stellar streams in the Dark Energy Survey [@DES:2015;@DES:2018;@DES:2021], for which they produced mock star catalogs mimicking DECam photometry from disrupted star clusters identified around simulated MW-mass galaxies - @Nguyen:2023 produced a synthetic survey mimicking the third data release of Gaia [@Gaia:2021;@Gaia:2023], similar to how @Sanderson:2020 produced a synthetic survey of the second data release of Gaia [@Gaia:2018] -These studies required significant effort caused by the challenges of using ``ananke``, which ``py-ananke`` is designed to alleviate. Current ongoing projects are already using the new ``py-ananke`` package, and are benefiting significantly from his ergonomicity. - -# Author Contributions - -As the lead developer on ``py-ananke``, ACRT adapted ``ananke`` by integrating its routines into a self-contained fully installable ``Python`` package, and implemented the new modular and object-oriented infrastructure ``py-ananke`` relies on, including the submodule ``py-EnBiD-ananke`` and ``py-Galaxia-ananke`` submodules, preparing all the associated repository overarching organization. RES, ``ananke``'s original developer, supervised ACRT throughout ``py-ananke``'s development and helped to disseminate early in-development versions of the software to collaborators. SS is the original developer of the ``C++`` softwares ``EnBiD`` and ``Galaxia`` which ``ananke`` relies heavily upon. APE tested the package for their own projects under the supervision of NGC. FN also tested the package for their projects and implemented fixes to the source code during testing. ACRT, NP and NGC added sets of isochrones to those in the ``galaxia-ananke`` ``C++`` submodule that had previously been assembled by RES. +These studies required significant effort caused by the challenges of using ``ananke``, which ``py-ananke`` is designed to alleviate. Current ongoing projects are already using the new ``py-ananke`` package, and are benefiting significantly from its ergonomics. # Acknowledgements -ACRT and RES acknowledge support from the Research Corporation through the Scialog Fellows program on Time Domain Astronomy, from NSF grant AST-2007232, from NASA grant 19-ATP19-0068, and from HST-AR-15809 from the Space Telescope Science Institute (STScI), which is operated by AURA, Inc., under NASA contract NAS5-26555. - -Development of this code package made use of resources provided by the Frontera computing project at the Texas Advanced Computing Center (TACC). Frontera is made possible by National Science Foundation award OAC-1818253. Simulations used as test data for the package, and which form part of the example suite, were run using Early Science Allocation 1923870 and analyzed using computing resources supported by the Scientific Computing Core at the Flatiron Institute. This work used additional computational resources from the University of Texas at Austin and TACC, the NASA Advanced Supercomputing (NAS) Division and the NASA Center for Climate Simulation (NCCS), and the Extreme Science and Engineering Discovery Environment (XSEDE), which was supported by National Science Foundation grant number OCI-1053575. - -Package development and testing was performed in part at the Aspen Center for Physics, which is supported by National Science Foundation grant PHY-1607611, and at the Kavli Insitute for Theoretical Physics workshop "Dynamical Models for Stars and Gas in Galaxies in the Gaia Era" and the 2019 Santa Barbara Gaia Sprint, supported in part by the National Science Foundation under Grant No. NSF PHY-1748958 and by the Heising-Simons Foundation. +ACRT and RES acknowledge support from the Research Corporation through the Scialog Fellows program on Time Domain Astronomy, from National Science Foundation (NSF) grant AST-2007232, from NASA grant 19-ATP19-0068, and from HST-AR-15809 from the Space Telescope Science Institute (STScI), operated by AURA, Inc., under NASA contract NAS5-26555. -The authors are grateful to Anthony Brown and Jos de Bruijne for their cooperation in building the Gaia error models encoded in this package. We also gratefully acknowledge the input and encouragement of the many participants of the Gaia Sprints (2017--2019), and of the Gaia Challenge series (2012-2019). +Package development used resources provided by the Frontera computing project at the Texas Advanced Computing Center (TACC). Frontera is made possible by NSF award OAC-1818253. Simulations used as test data for the package, and which form part of the example suite, were run using Early Science Allocation 1923870 and analyzed using computing resources supported by the Scientific Computing Core at the Flatiron Institute. This work used additional computational resources from the University of Texas at Austin and TACC, the NASA Advanced Supercomputing (NAS) Division and the NASA Center for Climate Simulation (NCCS), and the Extreme Science and Engineering Discovery Environment (XSEDE), which was supported by NSF grant number OCI-1053575. -The authors thank the extended [Galaxy Dynamics @ UPenn group](http://web.sas.upenn.edu/dynamics/) and the attendees of the "anankethon" workshops for the valuable feedback and suggestions they provided which have contributed to the refinement and enhancement of the package. +Package development and testing was performed in part at the Aspen Center for Physics, supported by NSF grant PHY-1607611, and at the Kavli Institute for Theoretical Physics workshop "Dynamical Models for Stars and Gas in Galaxies in the Gaia Era" and 2019 Santa Barbara Gaia Sprint, supported in part by the NSF under Grant No. NSF PHY-1748958 and by the Heising-Simons Foundation. +The authors are grateful to Anthony Brown and Jos de Bruijne for their cooperation in building the Gaia error models. We also acknowledge the input and encouragement of the participants of the Gaia Sprints (2017--2019), Gaia Challenge series (2012-2019) and "anankethon" workshops. We also thank Josh Borrow and the other developers of ``swiftsimio`` [@swiftsimio:2020] for their help in preparing our documentation inspired by the latter. # References diff --git a/jupyter/example_notebook.ipynb b/jupyter/example_notebook.ipynb new file mode 100644 index 0000000..8b68d17 --- /dev/null +++ b/jupyter/example_notebook.ipynb @@ -0,0 +1,827 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "f28a6e79", + "metadata": {}, + "source": [ + "# Example with dummy data\n", + "\n", + "This notebook shows a simplified use case utilizing a dummy set of randomly generated particle data. It is by default set to simulate a catalog of stars with Gaia DR2 astrometry & photometry, but you may change the parameters defined below to your liking. In short, the pipeline is accessible via the class `Ananke`, which method `run` can eventually be called after creation of an `Ananke` object to run the full ananke pipeline. The method `run` is designed to returns the catalog in the form of an `Output` object of the submodule `Galaxia_ananke` which can be used as a `vaex` dataframe.\n", + "\n", + "Below are the packages that this notebook must import:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "f130bf6c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'0.2.0b3.dev1'" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import numpy as np\n", + "import ananke as an\n", + "an.__version__" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "d0809afe", + "metadata": {}, + "source": [ + "We define here some dummy input data. `Ananke` has a method `make_dummy_particles_input` to produce such data in a dictionary formatted output. Below we show how to call it and the keys that compose that dictionary." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "f4dafbb1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['pos3', 'vel3', 'mass', 'age', 'feh', 'helium', 'carbon', 'nitrogen', 'oxygen', 'neon', 'magnesium', 'silicon', 'sulphur', 'calcium', 'alpha', 'parentid', 'partitionid', 'dform', 'id', 'log10_NH'])" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.random.seed(0)\n", + "p = an.Ananke.make_dummy_particles_input()\n", + "p.keys()" + ] + }, + { + "cell_type": "markdown", + "id": "51f0f1ae", + "metadata": {}, + "source": [ + "The input data must be formatted as a dictionary of equal-length arrays. The dictionary must have the following entries:\n", + "- key `pos3`: particle position coordinates in $kpc$ (shape Nx3)\n", + "- key `vel3`: particle velocity coordinates in $km.s^{-1}$ (shape Nx3)\n", + "- key `mass`: particle stellar mass in solar masses\n", + "- key `age`: particle log10 stellar age in years\n", + "- key `feh`: particle stellar metallicity \\[Fe/H\\] in dex relative to solar\n", + "\n", + "Additionally, the following entries can optionally be added:\n", + "- key `parentid`: index to give to the parent particle\n", + "- key `id`: additional index to classify the parent particle\n", + "- key `log10_NH`: log10 hydrogen column densities between Observer position and particle in $cm^{-2}$ - must be provided to estimate extinctions\n", + "- key `dform`: particle formation distance\n", + "- keys `helium`, `carbon`, `nitrogen`, `oxygen`, `neon`, `magnesium`, `silicon`, `sulphur`, `calcium`: particle various chemical abundances \\[X/H\\]\n", + "- key `alpha`: particle alpha chemical abundances \\[Mg/Fe\\]\n", + "\n", + "Ananke will compute the phase space densities that are used to determine particle smoothing lengths, but one can include pre-computed densities with the following entries:\n", + "- key `rho_pos`: particle density in position space in $kpc^{-3}$\n", + "- key `rho_vel`: particle density in velocity space in $km^{-3}.s^{3}$\n", + "\n", + "At any time, you may access this format via the helper of the `Ananke.make_dummy_particles_input` method using\n", + "\n", + "`help(an.Ananke.make_dummy_particles_input)`" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "55c50b11", + "metadata": {}, + "source": [ + "We define below some parameters for Ananke such as\n", + " - the observer position `observer`\n", + " - the shell of particles to mask `rshell`\n", + " - the sampling factor `fsample`\n", + " - the photometric system of choice `photo_sys` (in our case Gaia DR2)\n", + " - the CMD `cmd_magnames` and its box limits `cmd_box`" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "1ecc74b8", + "metadata": {}, + "outputs": [], + "source": [ + "D = 200 # *units.kpc\n", + "\n", + "observer = np.nan*np.ones(3)\n", + "while not np.linalg.norm(observer)<1:\n", + " observer = 2*np.random.rand(3)-1\n", + "\n", + "observer *= D/np.linalg.norm(observer)\n", + "\n", + "rshell = [0, 2*D]\n", + "\n", + "fsample = 0.01\n", + "\n", + "photo_sys = 'padova/GAIA__DR2'\n", + "\n", + "cmd_magnames = {'magnitude': 'G',\n", + " 'color_minuend': 'Gbp',\n", + " 'color_subtrahend': 'Grp'}\n", + "\n", + "cmd_box = {\n", + " 'abs_mag_lim_lo': -1000,\n", + " 'abs_mag_lim_hi': 1000,\n", + " # 'app_mag_lim_lo' : -1000,\n", + " 'app_mag_lim_hi': 30,\n", + " # 'color_lim_lo' : -1000,\n", + " # 'color_lim_hi' : 1000\n", + " }" + ] + }, + { + "cell_type": "markdown", + "id": "8e3b700c", + "metadata": {}, + "source": [ + "For more details regarding these parameters and more, you may consult the docstring associated to the class `Ananke` via the lines:\n", + "\n", + "`help(an.Ananke.__init__)`\n", + "\n", + "or\n", + "\n", + "`help(an.Ananke)`\n", + "\n", + "Note that among those are 3 special parameters, `d_params`, `e_params` and `err_params`, which receive dictionaries of subparameters to configure the sub-steps of the pipeline corresponding respectively to the phase space density estimation, the extinction mapping and the instrument error modeling. Each have further documentation that can be accessed calling the following methods:\n", + "\n", + "`an.display_density_docs()` for `d_params`\n", + "\n", + "`an.display_extinction_docs()` for `e_params`\n", + "\n", + "`an.display_errormodel_docs()` for `err_params`" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "1f132dcb", + "metadata": {}, + "source": [ + "We show below how to create the `Ananke` pipeline object before calling `run`, using the parameters we defined above." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "f56bb9c8", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/utils.py:26: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access\n", + " self._record_of_all_used_keys = set()\n", + "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/utils.py:26: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access\n", + " self._record_of_all_used_keys = set()\n" + ] + } + ], + "source": [ + "name = 'sim'\n", + "ananke = an.Ananke(p, name, fsample=fsample,\n", + " observer=observer, rshell=rshell,\n", + " photo_sys=photo_sys, cmd_magnames=cmd_magnames,\n", + " **cmd_box)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "fb2ba696", + "metadata": {}, + "source": [ + "As mentioned above, the `Ananke` method `run` runs the pipeline once it has been created. Some additional parameters can be provided to this method, which are listed in its docstring (accessible by calling `help(ananke.run)`). Those include:\n", + "- `input_dir`, `output_dir`, `i_o_dir` - Optional arguments to specify paths for the directories where `ananke` should generate input and output data. If the `i_o_dir` keyword argument is provided, it overrides any path given to the `input_dir` and `output_dir` keyword arguments.\n", + "- `k_factor` – Scaling factor applied to the kernels lengths to adjust all the kernels sizes uniformly. Lower values reduces the kernels extents, while higher values increases them. Default to 1 (no adjustment).\n", + "- `surveyname` – Optional name `Galaxia` should use for the output files. Default to `'survey'`.\n", + "- `n_jobs` – Number of independent catalog generations ran in parallel. Default to 1.\n", + "- `verbose` – Verbose boolean flag to allow pipeline to print what it's doing to stdout. Default to `True`.\n", + "- `rand_seed` – Seed to be used by `Galaxia`'s pseudorandom number generator. Default to 17052\n", + "- `nstart` – Index at which to start indexing synthetic stars. Default to 0\n", + "For our example however, we will use the method as it is.\n", + "\n", + "\n", + "\n", + "
\n", + "
Warning
\n", + "

Some of the `run` method parameters are currently not properly implemented, using them may lead to unexpected results

\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "f04f19ca", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dimensions = 3\n", + "Normalization constant of Kernel type 3: 0.596831\n", + "Reading ASCII format file: to_enbid \n", + "Read 300000 records\n", + "Allocated 3.8147 MByte for particle storage.\n", + "Type = 1 Particles = 100000\n", + "Total particles = 100000\n", + "Allocated 22.1252 MByte for Binary-Tree and Entropy bins.\n", + "\n", + "Scaling Co-ordinates as x[i]=x[i]/h[i] with h[i]->\n", + "1 1 1 \n", + "\n", + "Starting to Build Tree .......\n", + "Particle Type = 1 First node number = 1\n", + " Last node number = 199999\n", + "Total number of nodes = 199999\n", + "Treebuild time = 0.143194 s \n", + "\n", + "Density Calculation. Smoothing .....\n", + "Evaluated = 1 % Time Left = 0.888813 s of 0.897800 s Par no = 96805 Density = 4.540411e-02 \n", + "Evaluated = 2 % Time Left = 0.893996 s of 0.912250 s Par no = 55454 Density = 4.964532e-03 \n", + "Evaluated = 3 % Time Left = 0.930738 s of 0.959533 s Par no = 27717 Density = 1.827217e-01 \n", + "Evaluated = 4 % Time Left = 1.008973 s of 1.051025 s Par no = 42234 Density = 2.712376e-02 \n", + "Evaluated = 5 % Time Left = 0.984836 s of 1.036680 s Par no = 99785 Density = 2.988043e-01 \n", + "Evaluated = 6 % Time Left = 0.996750 s of 1.060383 s Par no = 88021 Density = 1.791133e-01 \n", + "Evaluated = 7 % Time Left = 1.023016 s of 1.100029 s Par no = 75708 Density = 1.165058e-01 \n", + "Evaluated = 8 % Time Left = 0.995487 s of 1.082062 s Par no = 45579 Density = 7.255407e-02 \n", + "Evaluated = 9 % Time Left = 0.962557 s of 1.057767 s Par no = 30351 Density = 8.828938e-02 \n", + "Evaluated = 10 % Time Left = 0.965734 s of 1.073050 s Par no = 89176 Density = 1.775999e-01 \n", + "Evaluated = 11 % Time Left = 0.946205 s of 1.063164 s Par no = 60361 Density = 8.299880e-02 \n", + "Evaluated = 12 % Time Left = 0.933669 s of 1.061000 s Par no = 90082 Density = 2.203585e-01 \n", + "Evaluated = 13 % Time Left = 0.918602 s of 1.055877 s Par no = 26814 Density = 1.910994e-02 \n", + "Evaluated = 14 % Time Left = 0.905944 s of 1.053436 s Par no = 74297 Density = 2.157650e-02 \n", + "Evaluated = 15 % Time Left = 0.897210 s of 1.055553 s Par no = 94905 Density = 9.119637e-02 \n", + "Evaluated = 16 % Time Left = 0.891172 s of 1.060931 s Par no = 51653 Density = 9.666827e-02 \n", + "Evaluated = 17 % Time Left = 0.874028 s of 1.053059 s Par no = 39308 Density = 1.287774e-01 \n", + "Evaluated = 18 % Time Left = 0.864283 s of 1.054017 s Par no = 7800 Density = 4.130107e-02 \n", + "Evaluated = 19 % Time Left = 0.854753 s of 1.055263 s Par no = 42838 Density = 5.914271e-02 \n", + "Evaluated = 20 % Time Left = 0.843553 s of 1.054455 s Par no = 49016 Density = 1.554842e-01 \n", + "Evaluated = 21 % Time Left = 0.835967 s of 1.058200 s Par no = 29173 Density = 5.981785e-02 \n", + "Evaluated = 22 % Time Left = 0.821485 s of 1.053200 s Par no = 14018 Density = 4.713366e-02 \n", + "Evaluated = 23 % Time Left = 0.810552 s of 1.052678 s Par no = 90617 Density = 4.088210e-02 \n", + "Evaluated = 24 % Time Left = 0.801872 s of 1.055108 s Par no = 20588 Density = 1.273882e-01 \n", + "Evaluated = 25 % Time Left = 0.791734 s of 1.055660 s Par no = 15465 Density = 1.274245e-01 \n", + "Evaluated = 26 % Time Left = 0.790790 s of 1.068650 s Par no = 99360 Density = 2.044210e-01 \n", + "Evaluated = 27 % Time Left = 0.778580 s of 1.066563 s Par no = 71132 Density = 2.079416e-02 \n", + "Evaluated = 28 % Time Left = 0.767180 s of 1.065543 s Par no = 6665 Density = 4.366049e-03 \n", + "Evaluated = 29 % Time Left = 0.759258 s of 1.069393 s Par no = 44439 Density = 1.463732e-01 \n", + "Evaluated = 30 % Time Left = 0.751458 s of 1.073527 s Par no = 6386 Density = 1.825200e-01 \n", + "Evaluated = 31 % Time Left = 0.739453 s of 1.071687 s Par no = 2716 Density = 1.495580e-01 \n", + "Evaluated = 32 % Time Left = 0.732647 s of 1.077438 s Par no = 69470 Density = 6.785184e-02 \n", + "Evaluated = 33 % Time Left = 0.730429 s of 1.090209 s Par no = 95884 Density = 1.793627e-01 \n", + "Evaluated = 34 % Time Left = 0.720346 s of 1.091450 s Par no = 73768 Density = 1.295312e-02 \n", + "Evaluated = 35 % Time Left = 0.710935 s of 1.093763 s Par no = 47898 Density = 1.088661e-01 \n", + "Evaluated = 36 % Time Left = 0.696809 s of 1.088781 s Par no = 66396 Density = 3.959183e-02 \n", + "Evaluated = 37 % Time Left = 0.685564 s of 1.088214 s Par no = 16463 Density = 1.572218e-01 \n", + "Evaluated = 38 % Time Left = 0.676055 s of 1.090429 s Par no = 55669 Density = 1.712036e-01 \n", + "Evaluated = 39 % Time Left = 0.671103 s of 1.100187 s Par no = 97705 Density = 1.234432e-01 \n", + "Evaluated = 40 % Time Left = 0.658281 s of 1.097152 s Par no = 43442 Density = 6.719712e-02 \n", + "Evaluated = 41 % Time Left = 0.648281 s of 1.098800 s Par no = 10242 Density = 2.102901e-01 \n", + "Evaluated = 42 % Time Left = 0.640820 s of 1.104881 s Par no = 40929 Density = 1.391802e-01 \n", + "Evaluated = 43 % Time Left = 0.630903 s of 1.106867 s Par no = 5720 Density = 6.551559e-02 \n", + "Evaluated = 44 % Time Left = 0.619685 s of 1.106600 s Par no = 66730 Density = 9.093650e-02 \n", + "Evaluated = 45 % Time Left = 0.614802 s of 1.117842 s Par no = 48819 Density = 2.248662e-01 \n", + "Evaluated = 46 % Time Left = 0.605400 s of 1.121133 s Par no = 32014 Density = 9.211309e-02 \n", + "Evaluated = 47 % Time Left = 0.593500 s of 1.119832 s Par no = 31533 Density = 2.932795e-02 \n", + "Evaluated = 48 % Time Left = 0.580861 s of 1.117062 s Par no = 86677 Density = 1.263195e-01 \n", + "Evaluated = 49 % Time Left = 0.570218 s of 1.118096 s Par no = 81951 Density = 8.802204e-02 \n", + "Evaluated = 50 % Time Left = 0.559764 s of 1.119550 s Par no = 80149 Density = 1.559104e-01 \n", + "Evaluated = 51 % Time Left = 0.547019 s of 1.116388 s Par no = 25229 Density = 5.093939e-02 \n", + "Evaluated = 52 % Time Left = 0.535691 s of 1.116046 s Par no = 89731 Density = 4.987880e-02 \n", + "Evaluated = 53 % Time Left = 0.522565 s of 1.111864 s Par no = 76366 Density = 1.511494e-01 \n", + "Evaluated = 54 % Time Left = 0.511908 s of 1.112869 s Par no = 73159 Density = 1.548675e-02 \n", + "Evaluated = 55 % Time Left = 0.502202 s of 1.116029 s Par no = 54007 Density = 8.763470e-02 \n", + "Evaluated = 56 % Time Left = 0.490118 s of 1.113930 s Par no = 36235 Density = 5.465964e-02 \n", + "Evaluated = 57 % Time Left = 0.478003 s of 1.111660 s Par no = 62068 Density = 4.050222e-02 \n", + "Evaluated = 58 % Time Left = 0.465324 s of 1.107940 s Par no = 37661 Density = 2.656841e-02 \n", + "Evaluated = 59 % Time Left = 0.454209 s of 1.107854 s Par no = 67914 Density = 1.940649e-01 \n", + "Evaluated = 60 % Time Left = 0.443570 s of 1.108952 s Par no = 64732 Density = 5.859731e-02 \n", + "Evaluated = 61 % Time Left = 0.431286 s of 1.105890 s Par no = 88788 Density = 7.161247e-03 \n", + "Evaluated = 62 % Time Left = 0.419723 s of 1.104563 s Par no = 44083 Density = 2.877787e-02 \n", + "Evaluated = 63 % Time Left = 0.407457 s of 1.101265 s Par no = 14045 Density = 3.265437e-02 \n", + "Evaluated = 64 % Time Left = 0.396103 s of 1.100316 s Par no = 93621 Density = 5.216302e-02 \n", + "Evaluated = 65 % Time Left = 0.385967 s of 1.102795 s Par no = 9132 Density = 8.411557e-02 \n", + "Evaluated = 66 % Time Left = 0.374832 s of 1.102480 s Par no = 702 Density = 1.110411e-02 \n", + "Evaluated = 67 % Time Left = 0.364467 s of 1.104479 s Par no = 45670 Density = 2.465222e-02 \n", + "Evaluated = 68 % Time Left = 0.352413 s of 1.101324 s Par no = 53860 Density = 1.580593e-02 \n", + "Evaluated = 69 % Time Left = 0.340855 s of 1.099568 s Par no = 79719 Density = 4.454536e-02 \n", + "Evaluated = 70 % Time Left = 0.328840 s of 1.096171 s Par no = 96401 Density = 1.035200e-02 \n", + "Evaluated = 71 % Time Left = 0.317045 s of 1.093297 s Par no = 48105 Density = 3.704987e-02 \n", + "Evaluated = 72 % Time Left = 0.305846 s of 1.092344 s Par no = 75056 Density = 2.642116e-02 \n", + "Evaluated = 73 % Time Left = 0.294781 s of 1.091822 s Par no = 97912 Density = 1.775965e-01 \n", + "Evaluated = 74 % Time Left = 0.284168 s of 1.092997 s Par no = 87879 Density = 7.451773e-02 \n", + "Evaluated = 75 % Time Left = 0.273578 s of 1.094357 s Par no = 85159 Density = 1.462781e-02 \n", + "Evaluated = 76 % Time Left = 0.262678 s of 1.094536 s Par no = 78132 Density = 5.302110e-02 \n", + "Evaluated = 77 % Time Left = 0.251385 s of 1.093026 s Par no = 21990 Density = 3.497640e-03 \n", + "Evaluated = 78 % Time Left = 0.240011 s of 1.091010 s Par no = 16462 Density = 2.482335e-02 \n", + "Evaluated = 79 % Time Left = 0.228880 s of 1.089954 s Par no = 22311 Density = 3.571432e-02 \n", + "Evaluated = 80 % Time Left = 0.217506 s of 1.087585 s Par no = 43269 Density = 1.776266e-02 \n", + "Evaluated = 81 % Time Left = 0.207566 s of 1.092510 s Par no = 43142 Density = 1.532303e-02 \n", + "Evaluated = 82 % Time Left = 0.196555 s of 1.092035 s Par no = 52197 Density = 3.049044e-02 \n", + "Evaluated = 83 % Time Left = 0.185608 s of 1.091878 s Par no = 74476 Density = 1.449572e-01 \n", + "Evaluated = 84 % Time Left = 0.174773 s of 1.092398 s Par no = 8891 Density = 1.050831e-02 \n", + "Evaluated = 85 % Time Left = 0.163702 s of 1.091422 s Par no = 1559 Density = 1.452041e-03 \n", + "Evaluated = 86 % Time Left = 0.152853 s of 1.091883 s Par no = 20602 Density = 2.028735e-01 \n", + "Evaluated = 87 % Time Left = 0.141906 s of 1.091667 s Par no = 54383 Density = 2.137116e-01 \n", + "Evaluated = 88 % Time Left = 0.131495 s of 1.095884 s Par no = 70246 Density = 2.757094e-03 \n", + "Evaluated = 89 % Time Left = 0.120677 s of 1.097165 s Par no = 51472 Density = 5.058417e-04 \n", + "Evaluated = 90 % Time Left = 0.109524 s of 1.095347 s Par no = 66269 Density = 3.630537e-02 \n", + "Evaluated = 91 % Time Left = 0.098713 s of 1.096935 s Par no = 62858 Density = 1.776033e-01 \n", + "Evaluated = 92 % Time Left = 0.087916 s of 1.099087 s Par no = 84061 Density = 1.439860e-01 \n", + "Evaluated = 93 % Time Left = 0.077034 s of 1.100645 s Par no = 78610 Density = 4.029672e-03 \n", + "Evaluated = 94 % Time Left = 0.066108 s of 1.101979 s Par no = 3871 Density = 1.597447e-01 \n", + "Evaluated = 95 % Time Left = 0.055286 s of 1.105945 s Par no = 68736 Density = 1.582606e-01 \n", + "Evaluated = 96 % Time Left = 0.044355 s of 1.109157 s Par no = 30472 Density = 6.743145e-02 \n", + "Evaluated = 97 % Time Left = 0.033248 s of 1.108635 s Par no = 86838 Density = 1.353215e-03 \n", + "Evaluated = 98 % Time Left = 0.022185 s of 1.109796 s Par no = 92913 Density = 5.211162e-02 \n", + "Evaluated = 99 % Time Left = 0.011119 s of 1.112996 s Par no = 30015 Density = 9.179291e-04 \n", + "Evaluated = 100 % Time Left = -0.000011 s of 1.117604 s Par no = 86525 Density = 1.579017e-04 \n", + "\n", + "Total Smoothing Time = 1.11765 s\n", + "1 3\n", + "\n", + "writing snapshot file ....\n", + "to_enbid_d3n64.est\n", + "done with snapshot.\n", + "\n", + "Total Time = 1.58844 s \n", + "\n", + "Dimensions = 3\n", + "Normalization constant of Kernel type 3: 0.596831\n", + "Reading ASCII format file: to_enbid \n", + "Read 300000 records\n", + "Allocated 3.8147 MByte for particle storage.\n", + "Type = 1 Particles = 100000\n", + "Total particles = 100000\n", + "Allocated 22.1252 MByte for Binary-Tree and Entropy bins.\n", + "\n", + "Scaling Co-ordinates as x[i]=x[i]/h[i] with h[i]->\n", + "1 1 1 \n", + "\n", + "Starting to Build Tree .......\n", + "Particle Type = 1 First node number = 1\n", + " Last node number = 199999\n", + "Total number of nodes = 199999\n", + "Treebuild time = 0.136763 s \n", + "\n", + "Density Calculation. Smoothing .....\n", + "Evaluated = 1 % Time Left = 0.892080 s of 0.901100 s Par no = 3379 Density = 1.586355e-02 \n", + "Evaluated = 2 % Time Left = 0.887773 s of 0.905900 s Par no = 75725 Density = 4.756319e-02 \n", + "Evaluated = 3 % Time Left = 1.027155 s of 1.058933 s Par no = 95160 Density = 6.928090e-03 \n", + "Evaluated = 4 % Time Left = 0.996830 s of 1.038375 s Par no = 40983 Density = 2.235913e-02 \n", + "Evaluated = 5 % Time Left = 0.991676 s of 1.043880 s Par no = 79587 Density = 2.321368e-02 \n", + "Evaluated = 6 % Time Left = 0.997157 s of 1.060817 s Par no = 62143 Density = 2.106821e-02 \n", + "Evaluated = 7 % Time Left = 0.961198 s of 1.033557 s Par no = 48098 Density = 2.322558e-02 \n", + "Evaluated = 8 % Time Left = 0.951546 s of 1.034300 s Par no = 73424 Density = 1.566558e-02 \n", + "Evaluated = 9 % Time Left = 0.940020 s of 1.033000 s Par no = 41738 Density = 1.527212e-02 \n", + "Evaluated = 10 % Time Left = 0.930662 s of 1.034080 s Par no = 34821 Density = 3.462067e-02 \n", + "Evaluated = 11 % Time Left = 0.930412 s of 1.045418 s Par no = 99566 Density = 5.806165e-02 \n", + "Evaluated = 12 % Time Left = 0.930751 s of 1.057683 s Par no = 59443 Density = 1.071449e-02 \n", + "Evaluated = 13 % Time Left = 0.913095 s of 1.049546 s Par no = 7663 Density = 2.551240e-03 \n", + "Evaluated = 14 % Time Left = 0.917278 s of 1.066614 s Par no = 69540 Density = 2.717029e-02 \n", + "Evaluated = 15 % Time Left = 0.908152 s of 1.068427 s Par no = 28859 Density = 1.270314e-02 \n", + "Evaluated = 16 % Time Left = 0.891308 s of 1.061094 s Par no = 77774 Density = 2.211896e-02 \n", + "Evaluated = 17 % Time Left = 0.878476 s of 1.058418 s Par no = 65109 Density = 3.644556e-03 \n", + "Evaluated = 18 % Time Left = 0.861345 s of 1.050433 s Par no = 17146 Density = 6.157028e-03 \n", + "Evaluated = 19 % Time Left = 0.852702 s of 1.052732 s Par no = 79145 Density = 2.474514e-02 \n", + "Evaluated = 20 % Time Left = 0.840181 s of 1.050240 s Par no = 84563 Density = 3.054690e-02 \n", + "Evaluated = 21 % Time Left = 0.843901 s of 1.068243 s Par no = 35101 Density = 3.370794e-02 \n", + "Evaluated = 22 % Time Left = 0.835313 s of 1.070927 s Par no = 31911 Density = 1.401559e-03 \n", + "Evaluated = 23 % Time Left = 0.820331 s of 1.065378 s Par no = 96514 Density = 1.869492e-02 \n", + "Evaluated = 24 % Time Left = 0.813085 s of 1.069862 s Par no = 41208 Density = 4.063115e-02 \n", + "Evaluated = 25 % Time Left = 0.799555 s of 1.066088 s Par no = 50899 Density = 1.130457e-03 \n", + "Evaluated = 26 % Time Left = 0.789820 s of 1.067338 s Par no = 25354 Density = 2.573581e-02 \n", + "Evaluated = 27 % Time Left = 0.776453 s of 1.063648 s Par no = 38397 Density = 1.824382e-02 \n", + "Evaluated = 28 % Time Left = 0.771071 s of 1.070946 s Par no = 99925 Density = 5.098955e-02 \n", + "Evaluated = 29 % Time Left = 0.762490 s of 1.073945 s Par no = 67233 Density = 3.835664e-02 \n", + "Evaluated = 30 % Time Left = 0.754326 s of 1.077623 s Par no = 21415 Density = 1.821073e-02 \n", + "Evaluated = 31 % Time Left = 0.740437 s of 1.073113 s Par no = 39830 Density = 5.986182e-03 \n", + "Evaluated = 32 % Time Left = 0.728516 s of 1.071362 s Par no = 62656 Density = 1.851001e-03 \n", + "Evaluated = 33 % Time Left = 0.718556 s of 1.072488 s Par no = 48049 Density = 1.832367e-02 \n", + "Evaluated = 34 % Time Left = 0.708457 s of 1.073435 s Par no = 71467 Density = 3.566542e-02 \n", + "Evaluated = 35 % Time Left = 0.696604 s of 1.071714 s Par no = 94467 Density = 8.080338e-03 \n", + "Evaluated = 36 % Time Left = 0.684517 s of 1.069575 s Par no = 24663 Density = 3.556317e-02 \n", + "Evaluated = 37 % Time Left = 0.675828 s of 1.072759 s Par no = 55355 Density = 2.436876e-02 \n", + "Evaluated = 38 % Time Left = 0.666608 s of 1.075192 s Par no = 77628 Density = 3.192216e-02 \n", + "Evaluated = 39 % Time Left = 0.654754 s of 1.073385 s Par no = 6428 Density = 3.955819e-02 \n", + "Evaluated = 40 % Time Left = 0.644130 s of 1.073568 s Par no = 29219 Density = 3.686058e-04 \n", + "Evaluated = 41 % Time Left = 0.632240 s of 1.071612 s Par no = 11475 Density = 1.075123e-02 \n", + "Evaluated = 42 % Time Left = 0.625072 s of 1.077729 s Par no = 25064 Density = 3.927625e-02 \n", + "Evaluated = 43 % Time Left = 0.612986 s of 1.075433 s Par no = 14672 Density = 1.066699e-02 \n", + "Evaluated = 44 % Time Left = 0.602582 s of 1.076059 s Par no = 46917 Density = 2.114631e-02 \n", + "Evaluated = 45 % Time Left = 0.591244 s of 1.075009 s Par no = 35522 Density = 9.714150e-03 \n", + "Evaluated = 46 % Time Left = 0.581810 s of 1.077446 s Par no = 10564 Density = 2.478037e-03 \n", + "Evaluated = 47 % Time Left = 0.570323 s of 1.076102 s Par no = 90836 Density = 3.490644e-02 \n", + "Evaluated = 48 % Time Left = 0.559521 s of 1.076023 s Par no = 91231 Density = 8.647473e-03 \n", + "Evaluated = 49 % Time Left = 0.551406 s of 1.081210 s Par no = 16819 Density = 9.508127e-03 \n", + "Evaluated = 50 % Time Left = 0.540048 s of 1.080118 s Par no = 30766 Density = 4.927925e-03 \n", + "Evaluated = 51 % Time Left = 0.531778 s of 1.085284 s Par no = 9459 Density = 7.940475e-03 \n", + "Evaluated = 52 % Time Left = 0.520130 s of 1.083627 s Par no = 76505 Density = 8.072356e-03 \n", + "Evaluated = 53 % Time Left = 0.509478 s of 1.084019 s Par no = 52019 Density = 3.462386e-03 \n", + "Evaluated = 54 % Time Left = 0.499046 s of 1.084906 s Par no = 56938 Density = 1.337130e-02 \n", + "Evaluated = 55 % Time Left = 0.487966 s of 1.084393 s Par no = 33321 Density = 2.006831e-02 \n", + "Evaluated = 56 % Time Left = 0.477613 s of 1.085509 s Par no = 4046 Density = 2.271462e-02 \n", + "Evaluated = 57 % Time Left = 0.466864 s of 1.085754 s Par no = 68529 Density = 3.147267e-02 \n", + "Evaluated = 58 % Time Left = 0.458616 s of 1.091969 s Par no = 23845 Density = 3.357711e-02 \n", + "Evaluated = 59 % Time Left = 0.447998 s of 1.092705 s Par no = 57420 Density = 3.986822e-02 \n", + "Evaluated = 60 % Time Left = 0.437418 s of 1.093573 s Par no = 89896 Density = 3.369183e-03 \n", + "Evaluated = 61 % Time Left = 0.425843 s of 1.091933 s Par no = 39610 Density = 1.535302e-03 \n", + "Evaluated = 62 % Time Left = 0.414487 s of 1.090784 s Par no = 26107 Density = 4.015532e-03 \n", + "Evaluated = 63 % Time Left = 0.402833 s of 1.088767 s Par no = 98943 Density = 1.799383e-03 \n", + "Evaluated = 64 % Time Left = 0.391194 s of 1.086681 s Par no = 99085 Density = 1.412553e-02 \n", + "Evaluated = 65 % Time Left = 0.380237 s of 1.086423 s Par no = 17 Density = 1.179375e-02 \n", + "Evaluated = 66 % Time Left = 0.367965 s of 1.082282 s Par no = 3087 Density = 1.429490e-02 \n", + "Evaluated = 67 % Time Left = 0.358527 s of 1.086478 s Par no = 86468 Density = 2.256122e-02 \n", + "Evaluated = 68 % Time Left = 0.347217 s of 1.085087 s Par no = 52080 Density = 4.635496e-03 \n", + "Evaluated = 69 % Time Left = 0.335607 s of 1.082638 s Par no = 26417 Density = 1.433997e-02 \n", + "Evaluated = 70 % Time Left = 0.324454 s of 1.081550 s Par no = 79634 Density = 7.429452e-03 \n", + "Evaluated = 71 % Time Left = 0.313491 s of 1.081039 s Par no = 97643 Density = 2.184668e-04 \n", + "Evaluated = 72 % Time Left = 0.302889 s of 1.081785 s Par no = 78794 Density = 5.369595e-03 \n", + "Evaluated = 73 % Time Left = 0.291475 s of 1.079578 s Par no = 45708 Density = 1.294336e-02 \n", + "Evaluated = 74 % Time Left = 0.279958 s of 1.076803 s Par no = 66525 Density = 2.125199e-03 \n", + "Evaluated = 75 % Time Left = 0.268972 s of 1.075932 s Par no = 21984 Density = 8.619656e-04 \n", + "Evaluated = 76 % Time Left = 0.257868 s of 1.074495 s Par no = 43799 Density = 2.740289e-03 \n", + "Evaluated = 77 % Time Left = 0.246918 s of 1.073601 s Par no = 63854 Density = 3.854665e-03 \n", + "Evaluated = 78 % Time Left = 0.235597 s of 1.070942 s Par no = 91160 Density = 2.256671e-03 \n", + "Evaluated = 79 % Time Left = 0.224715 s of 1.070120 s Par no = 1891 Density = 1.555006e-04 \n", + "Evaluated = 80 % Time Left = 0.214112 s of 1.070611 s Par no = 17306 Density = 9.342227e-04 \n", + "Evaluated = 81 % Time Left = 0.203401 s of 1.070590 s Par no = 83119 Density = 2.469888e-02 \n", + "Evaluated = 82 % Time Left = 0.192605 s of 1.070085 s Par no = 73346 Density = 1.956386e-03 \n", + "Evaluated = 83 % Time Left = 0.181832 s of 1.069663 s Par no = 98412 Density = 4.288590e-03 \n", + "Evaluated = 84 % Time Left = 0.171185 s of 1.069971 s Par no = 52509 Density = 8.264857e-03 \n", + "Evaluated = 85 % Time Left = 0.160706 s of 1.071444 s Par no = 76716 Density = 3.547589e-02 \n", + "Evaluated = 86 % Time Left = 0.150307 s of 1.073700 s Par no = 95957 Density = 2.923764e-02 \n", + "Evaluated = 87 % Time Left = 0.139398 s of 1.072372 s Par no = 3295 Density = 1.361911e-02 \n", + "Evaluated = 88 % Time Left = 0.128705 s of 1.072627 s Par no = 4026 Density = 3.781490e-02 \n", + "Evaluated = 89 % Time Left = 0.118087 s of 1.073613 s Par no = 78656 Density = 6.492402e-02 \n", + "Evaluated = 90 % Time Left = 0.107702 s of 1.077129 s Par no = 9255 Density = 4.661644e-02 \n", + "Evaluated = 91 % Time Left = 0.097031 s of 1.078237 s Par no = 89389 Density = 2.612382e-03 \n", + "Evaluated = 92 % Time Left = 0.086066 s of 1.075957 s Par no = 91357 Density = 1.136847e-02 \n", + "Evaluated = 93 % Time Left = 0.075423 s of 1.077625 s Par no = 75212 Density = 1.186542e-02 \n", + "Evaluated = 94 % Time Left = 0.064795 s of 1.080093 s Par no = 79246 Density = 4.605766e-02 \n", + "Evaluated = 95 % Time Left = 0.054280 s of 1.085808 s Par no = 93038 Density = 2.164083e-02 \n", + "Evaluated = 96 % Time Left = 0.043545 s of 1.088903 s Par no = 65384 Density = 2.308048e-02 \n", + "Evaluated = 97 % Time Left = 0.032629 s of 1.088001 s Par no = 32352 Density = 1.225704e-03 \n", + "Evaluated = 98 % Time Left = 0.021788 s of 1.089967 s Par no = 16971 Density = 3.436726e-02 \n", + "Evaluated = 99 % Time Left = 0.010898 s of 1.090921 s Par no = 22517 Density = 2.430708e-02 \n", + "Evaluated = 100 % Time Left = -0.000011 s of 1.092271 s Par no = 42877 Density = 2.940734e-06 \n", + "\n", + "Total Smoothing Time = 1.09234 s\n", + "1 3\n", + "\n", + "writing snapshot file ....\n", + "to_enbid_d3n64.est\n", + "done with snapshot.\n", + "\n", + "Total Time = 1.54018 s \n", + "\n", + "Executing JOB 1/1 = /home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/bin/galaxia -r --hdim=6 --nfile=sim --ngen=0 /home/athob/Software/repos/py-ananke/jupyter/survey_params\n", + "JOB 1/1 | CODEDATAPATH=/home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/GalaxiaData/\n", + "JOB 1/1 | Reading Parameter file- /home/athob/Software/repos/py-ananke/jupyter/survey_params\n", + "JOB 1/1 | --------------------------------------------------------\n", + "JOB 1/1 | outputFile survey \n", + "JOB 1/1 | outputDir /home/athob/Software/repos/py-ananke/jupyter\n", + "JOB 1/1 | photoCateg padova \n", + "JOB 1/1 | photoSys GAIA__DR2 \n", + "JOB 1/1 | magcolorNames G,Gbp-Grp \n", + "JOB 1/1 | appMagLimits[0] -1000 \n", + "JOB 1/1 | appMagLimits[1] 30 \n", + "JOB 1/1 | absMagLimits[0] -1000 \n", + "JOB 1/1 | absMagLimits[1] 1000 \n", + "JOB 1/1 | colorLimits[0] -1000 \n", + "JOB 1/1 | colorLimits[1] 1000 \n", + "JOB 1/1 | geometryOption 0 \n", + "JOB 1/1 | surveyArea 207.455 \n", + "JOB 1/1 | fSample 0.01 \n", + "JOB 1/1 | popID 10 \n", + "JOB 1/1 | warpFlareOn 0 \n", + "JOB 1/1 | longitude 76.273 \n", + "JOB 1/1 | latitude 13.4725 \n", + "JOB 1/1 | starType 0 \n", + "JOB 1/1 | photoError 0 \n", + "JOB 1/1 | seed 17052 \n", + "JOB 1/1 | r_max 400 \n", + "JOB 1/1 | r_min 0 \n", + "JOB 1/1 | nres 64 \n", + "JOB 1/1 | nstart 0 \n", + "JOB 1/1 | rSun[0] 194.95682580382555 \n", + "JOB 1/1 | rSun[1] -34.20370085093144 \n", + "JOB 1/1 | rSun[2] 28.66954691997796 \n", + "JOB 1/1 | vSun[0] 12.9 \n", + "JOB 1/1 | vSun[1] 245.6 \n", + "JOB 1/1 | vSun[2] 7.78 \n", + "JOB 1/1 | --------------------------------------------------------\n", + "JOB 1/1 | Reading Halo Sat File=/home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/GalaxiaData/nbody1/filenames/sim.txt\n", + "JOB 1/1 | nbody1/sim/\n", + "JOB 1/1 | \n", + "JOB 1/1 | \t1\t1\n", + "JOB 1/1 | \n", + "JOB 1/1 | path nbody1/sim/ sats 1 x[0] 1\n", + "JOB 1/1 | Halo 1 Sat 0 fname nbody1/sim/sim.ebf 0\n", + "JOB 1/1 | nbody1/sim/sim.ebf 0\n", + "JOB 1/1 | No of Satellites =1\n", + "JOB 1/1 | Generating catalog. Max allowed stars is 18446744073709551615\n", + "JOB 1/1 | Source numbering will start at 0\n", + "JOB 1/1 | Writing to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.ebf\n", + "JOB 1/1 | Using geometry: All Sky\n", + "JOB 1/1 | setting center to 194.957 -34.2037 28.6695 12.9 245.6 7.78\n", + "JOB 1/1 | Reading Isochrones from dir- /home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/GalaxiaData/Isochrones/padova/GAIA__DR2\n", + "JOB 1/1 | Isochrone Grid Size: (Age bins=71,Feh bins=34,Alpha bins=1)\n", + "JOB 1/1 | Time Isochrone Reading 3.20769 \n", + "JOB 1/1 | ------------------------------\n", + "JOB 1/1 | nbody1/sim/sim.ebf Sat No=0\n", + "JOB 1/1 | Particles=100000\n", + "JOB 1/1 | Satellite Info\n", + "JOB 1/1 | Particles=100000 Mass=5.49989e+08 0.379706\n", + "JOB 1/1 | Total Stars=2280137 accepted=1614163 rejected=665974\n", + "JOB 1/1 | -----------Done---------------\n", + "JOB 1/1 | Total stars written 1614163 \n", + "JOB 1/1 | 31\n", + "JOB 1/1 | File written- /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.ebf\n", + "JOB 1/1 | Calculating magnitudes in GAIA__DR2 system................\n", + "JOB 1/1 | initializing isochrone data\n", + "JOB 1/1 | interpolating on isochrone tables\n", + "JOB 1/1 | Appending spherical coordinates................\n", + "JOB 1/1 | Total Time= 7.44586 \n", + "Exported the following quantities from /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.ebf to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5 for partition 0\n", + "['age', 'alpha', 'calcium', 'carbon', 'dec', 'dform', 'dmod', 'feh', 'gaia__dr2_g', 'gaia__dr2_gbp', 'gaia__dr2_grp', 'glat', 'glon', 'grav', 'helium', 'lum', 'mact', 'magnesium', 'mtip', 'neon', 'nitrogen', 'oxygen', 'parentid', 'partid', 'partitionid', 'px', 'py', 'pz', 'ra', 'rad', 'satid', 'silicon', 'smass', 'sulphur', 'teff', 'vx', 'vy', 'vz']\n", + "Running convert_cartesian_to_galactic post-processing pipeline\n", + "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "['mul', 'vr', 'mub']\n", + "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "('glon', 'glat', 'rad')\n", + "Running convert_galactic_to_icrs post-processing pipeline\n", + "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "['mudec', 'mura']\n", + "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "('ra', 'dec')\n", + "Running last_conversions post-processing pipeline\n", + "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "['pi']\n", + "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "('teff', 'lum')\n", + "Running observed_magnitudes post-processing pipeline\n", + "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "['gaia__dr2_grp_Intrinsic', 'gaia__dr2_g_Intrinsic', 'gaia__dr2_gbp_Intrinsic']\n", + "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "('gaia__dr2_g', 'gaia__dr2_gbp', 'gaia__dr2_grp')\n", + "Running extinctions post-processing pipeline\n", + "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "['A_0', 'E(B-V)', 'A_gaia__dr2_g', 'A_gaia__dr2_gbp', 'log10_NH', 'A_gaia__dr2_grp']\n", + "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "('gaia__dr2_g', 'gaia__dr2_gbp', 'gaia__dr2_grp')\n", + "Running error_modeling post-processing pipeline\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/utils.py:26: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access\n", + " self._record_of_all_used_keys = set()\n", + "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/_default_error_model.py:37: RuntimeWarning: overflow encountered in power\n", + " grvs = rpmag + 132.32 - 377.28*ggrp + 402.32*ggrp**2 - 190.97*ggrp**3 + 34.026*ggrp**4\n", + "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/_default_error_model.py:37: RuntimeWarning: overflow encountered in multiply\n", + " grvs = rpmag + 132.32 - 377.28*ggrp + 402.32*ggrp**2 - 190.97*ggrp**3 + 34.026*ggrp**4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "['mura_Sig', 'ra_Err', 'vr_Sig', 'vr_Err', 'pi_Sig', 'gaia__dr2_grp_Sig', 'mura_Err', 'dec_Err', 'mudec_Err', 'gaia__dr2_g_Sig', 'gaia__dr2_g_Err', 'dec_Sig', 'gaia__dr2_gbp_Sig', 'pi_Err', 'ra_Sig', 'gaia__dr2_grp_Err', 'gaia__dr2_gbp_Err', 'mudec_Sig']\n", + "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "('mura', 'dec', 'gaia__dr2_grp', 'pi', 'gaia__dr2_g', 'ra', 'mudec', 'gaia__dr2_gbp', 'vr')\n", + "Running convert_icrs_to_galactic post-processing pipeline\n", + "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.0.h5\n", + "('glon', 'glat', 'mul', 'mub')\n" + ] + } + ], + "source": [ + "survey = ananke.run()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "1664586c", + "metadata": {}, + "source": [ + "The output is saved as a `vaex` dataframe, with its columns organized in alphabetical order. The photometry is stored in columns that are named according to their associated photometric system and filter name. The keys are in the lowercase format `photosys_filtername` where `photo_sys` is the photometric system and `filtername` is the filter name. In this example, the apparent photometry in filters `gbp`, `grp` & `g` of the Gaia DR2 system (identified as `GAIA__DR2` in Galaxia) are respectively under keys `gaia__dr2_gbp`, `gaia__dr2_grp` & `gaia__dr2_g`. Beside these, the columns include:\n", + "\n", + "- key `A_0` for the reference extinction which extinction coefficients are based on (at $\\lambda = 550 \\, nm$ in the case of Gaia DR2)\n", + "- key `A_{filter_name}` for the extinction value in each filter designated by `filter_name` (here `A_gaia__dr2_g`, `A_gaia__dr2_gbp` & `A_gaia__dr2_grp`)\n", + "- key `E(B-V)` for the reddening index\n", + "- key `age` for the $log_{10}$ stellar age in years\n", + "- key `alpha`, `calcium`, `carbon`, `helium`, `magnesium`, `neon`, `nitrogen`, `oxygen`, `silicon`, `sulphur` for the various chemical abundances as given as input\n", + "- key `dec`, `ra` for the astrometric declination and right ascension celestial coordinates in degrees\n", + "- key `dform` for the formation distance as given as input\n", + "- key `dmod` for the distance modulus\n", + "- key `feh` for the stellar metallicity \\[Fe/H\\] in dex relative to solar\n", + "- key `{filter_name}_Intrinsic` for the intrinsic stellar photometry in each filter designated by `filter_name` (here `gaia__dr2_g_Intrinsic`, `gaia__dr2_gbp_Intrinsic` & `gaia__dr2_grp_Intrinsic`)\n", + "- key `glat`, `glon` for the astrometric galactic latitude and longitude celestrial coordinates in degrees\n", + "- key `grav` for the $log_{10}$ surface gravity in CGS units\n", + "- key `log10_NH` for the $log_{10}$ hydrogen column density between Observer position and star in $cm^{-2}$\n", + "- key `lum` for the stellar luminosity in solar luminosities\n", + "- key `mact`, `mtip`, `smass` for respectively the current stellar mass, the mass of that same star at tip of giant branch for its given age \\& metallicity and its stellar mass on zero-age main sequence, all in solar masses\n", + "- key `mub`, `mudec`, `mul`, `mura` for the astrometric proper motions, respectively in the direction of the galactic latitude, declination, galactic longitude and right ascension, all in milliarcseconds per year\n", + "- key `parentid` for the parent particle index as given as input\n", + "- key `partid` for the flag that identifies stars that are *not* central relatively to their parent particle\n", + "- key `pi` for the star parallax in milliarcseconds\n", + "- key `px`, `py`, `pz` for the star position cartesian coordinates in $kpc$ relative to the Observer's position\n", + "- key `rad` for the star distance to the Observer in $kpc$\n", + "- key `satid` for the index ``id`` the population the parent particle is part of\n", + "- key `teff` for the star effective temperature in Kelvin\n", + "- key `vr` for the star astrometric radial velocity in $km.s^{-1}$\n", + "- key `vx`, `vy`, `vz` for the star velocity cartesian coordinates in $km.s^{-1}$ relative to the Observer's velocity\n", + "\n", + "Additionally, astrometric and photometric quantities `X` all have associated columns identified as:\n", + "- key `{X}_Sig` for the standard error on the quantity `X`\n", + "- key `{X}_Err` for the actual drawn gaussian error on the quantity `X`\n", + "\n", + "Taking the photometry as an example of the latter, the standard errors are stored under `gaia__dr2_g_Sig`, `gaia__dr2_gbp_Sig` & `gaia__dr2_grp_Sig`, while the drawn errors are under `gaia__dr2_g_Err`, `gaia__dr2_gbp_Err` & `gaia__dr2_grp_Err`." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "42e393f6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
# A_0 A_gaia__dr2_g A_gaia__dr2_gbp A_gaia__dr2_grp E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaia__dr2_g gaia__dr2_g_Err gaia__dr2_g_Intrinsic gaia__dr2_g_Sig gaia__dr2_gbp gaia__dr2_gbp_Err gaia__dr2_gbp_Intrinsic gaia__dr2_gbp_Sig gaia__dr2_grp gaia__dr2_grp_Err gaia__dr2_grp_Intrinsic gaia__dr2_grp_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid partitionid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz
0 0.70939701296666070.5278885380814685 0.71256760915600690.407016783412282370.2288377461182776510.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.87123488088669 -0.8867433071136475nan nan 7.6075797 nan nan nan 8.22037 nan nan nan 6.875088 nan nan nan 4.7529893-0.7315406799316406 21.7574676703088630.08502915 0.52380776-0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 0 0 nan nan nan -142.0352559796068 46.20841677042607 0.6925918281909844 nan nan nan 149.3643578805275 0 -0.75635123252868650.5240775107307198 -1.09243309497833254399.992 nan nan nan 67.38685760498046 -300.3354850769043 55.13861343383789
1 0.39135261514935490.291449450794676550.39321103421034010.224569255687789760.1262427790804370510.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.87527071994942 -0.8867433071136475nan nan 7.8151436 nan nan nan 8.465081 nan nan nan 7.0564466 nan nan nan 4.767861 -0.7315406799316406 21.4991465551046660.07226164 0.507031 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 0 nan nan nan -142.2608617629229346.417971376138425-0.11534282804241658nan nan nan 149.6422205133747 0 -0.75635123252868650.5073366488986605 -1.09243309497833254295.465 nan nan nan 67.7484200428451 -298.2995731452656452.69162146715175
2 7.392986027528272 4.395135897711333 6.739848191949818 3.857969371581923 2.3848342024284745 10.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.888157433594138-0.8867433071136475nan nan 8.512117 nan nan nan 9.277008 nan nan nan 7.679845 nan nan nan 4.8335814-0.7315406799316406 22.7753982002354580.0408450140.44261116-0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 0 nan nan nan -142.9270461828407447.20842184009032 1.8396875936103667 nan nan nan 150.532920232173440 -0.75635123252868650.4436048636953867 -1.09243309497833254001.0637nan nan nan 68.03093236871236 -301.4758806839234 56.09200627357448
3 3.61298885133904162.2818297625233486 3.40331815399628251.9506143576453838 1.1654802746254973 10.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.867217518655195-0.8867433071136475nan nan 9.037168 nan nan nan 9.901029 nan nan nan 8.152237 nan nan nan 4.8903975-0.7315406799316406 22.46444493629801 0.0273405150.39295405-0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 0 nan nan nan -141.2934587641680447.56378569643568 1.0770165239203249 nan nan nan 149.088279767092730 -0.75635123252868650.39350367992526536-1.09243309497833253854.4998nan nan nan 69.12724120992327 -301.7392038777155755.1029961513569
4 0.70147951758135430.5867886042288581 0.74836651046096590.4149519539856739 0.2262837153488239710.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.86868071849355 -0.8867433071136475nan nan 4.9383516 nan nan nan 5.201803 nan nan nan 4.5038996 nan nan nan 4.4819903-0.7315406799316406 21.7525933094733330.8118422 0.7637918 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 0 nan nan nan -141.8805554620098 46.1152954631301 0.7600375956495602 nan nan nan 149.188773542136970 -0.75635123252868650.7644402589837288 -1.09243309497833256018.22 nan nan nan 67.38594209547328 -300.6020691055117 52.577100775679746
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1,614,15814.0600445122027228.423013661152801 12.8688065734146347.057230806575605 4.535498229742814 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.61548082188761 -0.8060703873634338nan nan 5.2621174 nan nan nan 5.553659 nan nan nan 4.7985764 nan nan nan 4.550951 -0.0512677356600761423.0545650104414430.59976685 0.74945873-0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 0 nan nan nan -186.4785170051024797.15110580779618 8.115853991105647 nan nan nan 210.424432398200480 -1.247308373451233 0.7500223134586655 -0.99559468030929575835.22 nan nan nan 15.3421637420611 -165.14197870135874-22.75520995737303
1,614,15911.0639231289692436.45510528739357 9.91050274374604 5.5781547672436895 3.5690074609578204 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.61577240657062 -0.8060703873634338nan nan 7.930956 nan nan nan 8.61342 nan nan nan 7.150438 nan nan nan 4.7677984-0.0512677356600761422.9504874645149 0.06644254 0.5040816 -0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 0 nan nan nan -186.1230486764739397.82701074897133 8.855589130749113 nan nan nan 210.452690026896730 -1.247308373451233 0.504675216060176 -0.99559468030929574213.1426nan nan nan 14.420329840561417-164.29459688870557-23.616658988980973
1,614,1602.62021510950831571.9979343957376579 2.682412465734748 1.5085576559312066 0.8452306804865534 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.60797143158025 -0.8060703873634338nan nan 5.420544 nan nan nan 5.727753 nan nan nan 4.9413347 nan nan nan 4.574493 -0.0512677356600761422.32491526151538 0.51845455 0.7332436 -0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 0 nan nan nan -185.4155407018892 97.54207904767259 8.937050140256144 nan nan nan 209.697998998382870 -1.247308373451233 0.7337202617485947 -0.99559468030929575735.347 nan nan nan 15.215907684749888-163.1710353003309 -24.28579876779026
1,614,16120.11053022532025 12.915669131356063 18.55864938118823 9.438526458834994 6.487267814619435 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.62280870754291 -0.8060703873634338nan nan 4.007981 nan nan nan 4.2347775 nan nan nan 3.6183882 nan nan nan 4.2465305-0.0512677356600761423.2100018360011441.9032125 0.86141604-0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 0 nan nan nan -187.1486728471890397.44088694333617 7.677616529567153 nan nan nan 211.135733575212920 -1.247308373451233 0.8632034883204436 -0.99559468030929576314.5522nan nan nan 14.154347672917513-163.58046604010096-22.627405955186447
1,614,1626.453998533061608 4.090151594340529 6.058586091870591 3.4826187148728667 2.0819350106650347 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.61092186109904 -0.8060703873634338nan nan -0.38972253 nan nan nan 0.14156544 nan nan nan -1.0621885 nan nan nan 1.9115392-0.0512677356600761422.71640717719426 126.867645 0.918 -0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 0 nan nan nan -185.7446220327249297.5570866189969 8.628931734904029 nan nan nan 209.983114146237820 -1.247308373451233 0.9262041245678233 -0.99559468030929574627.436 nan nan nan 14.454929312951862-163.59304101770525-24.333362842441787
" + ], + "text/plain": [ + "# A_0 A_gaia__dr2_g A_gaia__dr2_gbp A_gaia__dr2_grp E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaia__dr2_g gaia__dr2_g_Err gaia__dr2_g_Intrinsic gaia__dr2_g_Sig gaia__dr2_gbp gaia__dr2_gbp_Err gaia__dr2_gbp_Intrinsic gaia__dr2_gbp_Sig gaia__dr2_grp gaia__dr2_grp_Err gaia__dr2_grp_Intrinsic gaia__dr2_grp_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid partitionid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz\n", + "0 0.7093970129666607 0.5278885380814685 0.7125676091560069 0.40701678341228237 0.22883774611827765 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.87123488088669 -0.8867433071136475 nan nan 7.6075797 nan nan nan 8.22037 nan nan nan 6.875088 nan nan nan 4.7529893 -0.7315406799316406 21.757467670308863 0.08502915 0.52380776 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 0 0 nan nan nan -142.0352559796068 46.20841677042607 0.6925918281909844 nan nan nan 149.3643578805275 0 -0.7563512325286865 0.5240775107307198 -1.0924330949783325 4399.992 nan nan nan 67.38685760498046 -300.3354850769043 55.13861343383789\n", + "1 0.3913526151493549 0.29144945079467655 0.3932110342103401 0.22456925568778976 0.12624277908043705 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.87527071994942 -0.8867433071136475 nan nan 7.8151436 nan nan nan 8.465081 nan nan nan 7.0564466 nan nan nan 4.767861 -0.7315406799316406 21.499146555104666 0.07226164 0.507031 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 0 nan nan nan -142.26086176292293 46.417971376138425 -0.11534282804241658 nan nan nan 149.6422205133747 0 -0.7563512325286865 0.5073366488986605 -1.0924330949783325 4295.465 nan nan nan 67.7484200428451 -298.29957314526564 52.69162146715175\n", + "2 7.392986027528272 4.395135897711333 6.739848191949818 3.857969371581923 2.3848342024284745 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.888157433594138 -0.8867433071136475 nan nan 8.512117 nan nan nan 9.277008 nan nan nan 7.679845 nan nan nan 4.8335814 -0.7315406799316406 22.775398200235458 0.040845014 0.44261116 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 0 nan nan nan -142.92704618284074 47.20842184009032 1.8396875936103667 nan nan nan 150.53292023217344 0 -0.7563512325286865 0.4436048636953867 -1.0924330949783325 4001.0637 nan nan nan 68.03093236871236 -301.4758806839234 56.09200627357448\n", + "3 3.6129888513390416 2.2818297625233486 3.4033181539962825 1.9506143576453838 1.1654802746254973 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.867217518655195 -0.8867433071136475 nan nan 9.037168 nan nan nan 9.901029 nan nan nan 8.152237 nan nan nan 4.8903975 -0.7315406799316406 22.46444493629801 0.027340515 0.39295405 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 0 nan nan nan -141.29345876416804 47.56378569643568 1.0770165239203249 nan nan nan 149.08827976709273 0 -0.7563512325286865 0.39350367992526536 -1.0924330949783325 3854.4998 nan nan nan 69.12724120992327 -301.73920387771557 55.1029961513569\n", + "4 0.7014795175813543 0.5867886042288581 0.7483665104609659 0.4149519539856739 0.22628371534882397 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.86868071849355 -0.8867433071136475 nan nan 4.9383516 nan nan nan 5.201803 nan nan nan 4.5038996 nan nan nan 4.4819903 -0.7315406799316406 21.752593309473333 0.8118422 0.7637918 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 0 nan nan nan -141.8805554620098 46.1152954631301 0.7600375956495602 nan nan nan 149.18877354213697 0 -0.7563512325286865 0.7644402589837288 -1.0924330949783325 6018.22 nan nan nan 67.38594209547328 -300.6020691055117 52.577100775679746\n", + "... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...\n", + "1,614,158 14.060044512202722 8.423013661152801 12.868806573414634 7.057230806575605 4.535498229742814 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.61548082188761 -0.8060703873634338 nan nan 5.2621174 nan nan nan 5.553659 nan nan nan 4.7985764 nan nan nan 4.550951 -0.05126773566007614 23.054565010441443 0.59976685 0.74945873 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 0 nan nan nan -186.47851700510247 97.15110580779618 8.115853991105647 nan nan nan 210.42443239820048 0 -1.247308373451233 0.7500223134586655 -0.9955946803092957 5835.22 nan nan nan 15.3421637420611 -165.14197870135874 -22.75520995737303\n", + "1,614,159 11.063923128969243 6.45510528739357 9.91050274374604 5.5781547672436895 3.5690074609578204 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.61577240657062 -0.8060703873634338 nan nan 7.930956 nan nan nan 8.61342 nan nan nan 7.150438 nan nan nan 4.7677984 -0.05126773566007614 22.9504874645149 0.06644254 0.5040816 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 0 nan nan nan -186.12304867647393 97.82701074897133 8.855589130749113 nan nan nan 210.45269002689673 0 -1.247308373451233 0.504675216060176 -0.9955946803092957 4213.1426 nan nan nan 14.420329840561417 -164.29459688870557 -23.616658988980973\n", + "1,614,160 2.6202151095083157 1.9979343957376579 2.682412465734748 1.5085576559312066 0.8452306804865534 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.60797143158025 -0.8060703873634338 nan nan 5.420544 nan nan nan 5.727753 nan nan nan 4.9413347 nan nan nan 4.574493 -0.05126773566007614 22.32491526151538 0.51845455 0.7332436 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 0 nan nan nan -185.4155407018892 97.54207904767259 8.937050140256144 nan nan nan 209.69799899838287 0 -1.247308373451233 0.7337202617485947 -0.9955946803092957 5735.347 nan nan nan 15.215907684749888 -163.1710353003309 -24.28579876779026\n", + "1,614,161 20.11053022532025 12.915669131356063 18.55864938118823 9.438526458834994 6.487267814619435 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.62280870754291 -0.8060703873634338 nan nan 4.007981 nan nan nan 4.2347775 nan nan nan 3.6183882 nan nan nan 4.2465305 -0.05126773566007614 23.210001836001144 1.9032125 0.86141604 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 0 nan nan nan -187.14867284718903 97.44088694333617 7.677616529567153 nan nan nan 211.13573357521292 0 -1.247308373451233 0.8632034883204436 -0.9955946803092957 6314.5522 nan nan nan 14.154347672917513 -163.58046604010096 -22.627405955186447\n", + "1,614,162 6.453998533061608 4.090151594340529 6.058586091870591 3.4826187148728667 2.0819350106650347 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.61092186109904 -0.8060703873634338 nan nan -0.38972253 nan nan nan 0.14156544 nan nan nan -1.0621885 nan nan nan 1.9115392 -0.05126773566007614 22.71640717719426 126.867645 0.918 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 0 nan nan nan -185.74462203272492 97.5570866189969 8.628931734904029 nan nan nan 209.98311414623782 0 -1.247308373451233 0.9262041245678233 -0.9955946803092957 4627.436 nan nan nan 14.454929312951862 -163.59304101770525 -24.333362842441787" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "survey" + ] + }, + { + "cell_type": "markdown", + "id": "a9a28a5d", + "metadata": {}, + "source": [ + "Please refer to [`vaex`'s documentation](https://vaex.io/docs/tutorial.html) for further help on how to use `vaex` dataframes: the following line for example isolate only the rows with non-NaN photometry." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "09f840d5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
# A_0 A_gaia__dr2_g A_gaia__dr2_gbp A_gaia__dr2_grp E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaia__dr2_g gaia__dr2_g_Err gaia__dr2_g_Intrinsic gaia__dr2_g_Sig gaia__dr2_gbp gaia__dr2_gbp_Err gaia__dr2_gbp_Intrinsic gaia__dr2_gbp_Sig gaia__dr2_grp gaia__dr2_grp_Err gaia__dr2_grp_Intrinsic gaia__dr2_grp_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid partitionid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz
0 0.05681650709265598 0.04671342391859208 0.05985558882052393 0.03353577934926581 0.0183279055137599958.97172737121582 -0.6125200986862183 -0.12460324913263321-0.3605270683765411441.517887-4.3651322762456503e-073.7339328e-070.0 20.938860082853388-0.534867227077484120.610794 -0.013108958690914031 -0.36166972 0.014190837 20.934616 -0.09105875752639689 0.026959075 0.32711947 20.067835 0.010476073807142064-0.9150356 0.32711947 -6.450095 159.083742.5680106 -0.6886086463928223 20.661052845931597108.469862.1231031 -1.1473873853683472 1.9929105 1.9060571825344517 -0.4903980049570771-0.152088201656149722.1212947 2.637362501364926 3.216868859449929 3.107170100412025 2.1212947 -0.44875627756118774-1.4166113138198853 -0.40134233236312866138 1 0 0.004700138418892006-0.00178961182501974541.3442158 -143.0240526190031954.66209816691588 -17.31002173887193564.3859947.738775790567222e-07 3.7339328e-07154.089134776509 0 -0.4361392557621002 2.123614686399606 -1.2804145812988281 5266.821 nan nan nan -13.980939858346646-241.322783466562 -112.49946999755836
1 0.30908957284836036 0.2261170869376632 0.30842259877311534 0.176280263594307 0.09970631382205172 10.0699920654296880.5896989703178406 -0.9664415121078491 -0.9518471360206604 37.240967-2.2831375342149955e-072.49317e-07 0.0 21.769605166840982-0.801622748374939 20.222652 -0.013217448221518976 -1.7598503 0.011413363 21.307426 0.2680249694291372 -1.0386255 0.24083452 19.243824 -0.13966843269274323-2.5623941 0.24083452 -0.91259795169.442461.0347817 -0.3274851739406585721.396662669202907558.4033 0.8450456 -0.211923792958259580.86665446-3.1047273926896426 -2.7124202720419555-2.542487626107496 1.4928615 1.1050811506348799-1.871713888922517 -2.04588855812214 1.4928615 -0.3413775563240051 -0.13905183970928192-0.8814153671264648 212 1 0 -1.1660510794203147 -1.1704777679639904 0.89754117-222.0501127897472 41.38527019482137 -3.597976571347208378.53204 4.2180988179474246e-07 2.49317e-07 225.902498026130270 -0.7138696312904358 0.8677262727803007-1.077961802482605 4132.9897nan nan nan -64.76429401098572 -249.0524176755581 44.549935511279955
2 0.0406538637706599160.03188868360172066 0.04180280722924421 0.0237006066992031530.0131141496034386819.613767623901367 -0.1432933509349823 -1.0196176767349243 -0.6505561470985413 27.4685279.93141102529504e-07 5.270746e-07 0.0 21.241844522741097-0.596523582935333320.921713 -0.029182178287689993 -0.3228382 0.01705969 21.876608 0.38537958340209455 0.20757976 0.4235812 21.28318 1.0115375512029108 -0.99390167 0.4235812 -8.830861 175.768262.0586061 -0.7592963576316833 20.51568014237018 118.698241.196 -0.7398169040679932 1.1982795 -1.6438476299687612 -2.044957683093608 -1.7305400665725954 2.8642974 1.322617557411089 -0.519326655124296 -0.5989357582041593 2.8642974 -1.3291157484054565 -0.7577531337738037 -0.45060980319976807252 1 0 1.5601152190393899 1.554470646021109 1.8974684 -174.5839585087630612.917886544408068-27.19747265375267375.42295 -1.738821925276305e-07 5.270746e-07 177.1613188032741 0 -0.6941993832588196 1.2002945213596574-0.5894879698753357 4637.9014nan nan nan 31.915626870159116 -254.29642034774957-98.61775218664684
3 0.7877962999055037 0.5726781831841866 0.7836102802990144 0.4485485017244748 0.25412783867919475 9.8711519241333 1.162867546081543 -0.7159809470176697 -0.6287623643875122 34.62386 6.854075293976649e-08 7.639342e-08 0.0 20.79343262014924 -1.236360788345337 19.04199 0.00854874852791074 -2.3326683 0.005850956 19.920134 -0.005622249308989237-1.6512849 0.09372754 18.088743 -0.04331449085765518-3.1099238 0.09372754 -14.482033 160.587080.940722350.7711513042449951 21.80299225153633 876.2868 0.92662406-0.073493219912052150.952725230.054731965395574934-0.3829754121816991-0.121577310622802570.53407407 0.64182105128261120.5179379203937897 0.16962703533504497 0.53407407-0.9232337474822998 -0.6347827315330505 -1.0434234142303467 281 1 0 -0.24483446567030384-0.25177373072009146 0.2750163 -131.5961068632097746.37566245119917 -36.03787463886429 58.8145943.7359391102072234e-08 7.639342e-08 144.107480089783620 0.0109169194474816320.9538811072032849-1.0917985439300537 4282.4487nan nan nan -43.91235726362427 -298.9974724791462738.90182804530409
4 0.13204413245379326 0.10562465807915085 0.1371534826791068 0.07738767519745451 0.0425948814367075059.037848472595215 -0.20741142332553864-0.2963399291038513 0.24989141523838043 27.7544523.672289535219167e-07 4.3264754e-070.0 21.63436699581625 -0.934876859188079820.762663 -0.0013426168529036332-0.9759861 0.015354784 21.672022 0.4177469420941861 -0.51724565 0.36540693 20.407366 0.2875173851348014 -1.5919065 0.36540693 -6.714385 176.974952.1116366 -0.6755844354629517 21.027297422390884203.311841.8348202 -1.142288327217102 1.8366443 0.2197378023917316 -1.2259053978924448-1.02247116836483 2.41159 1.66267235620017 1.144517339975177 1.067175358322312 2.41159 -0.6697758436203003 -0.6329840421676636 -1.5521866083145142 343 1 0 2.2433125652881225 2.238601418881787 1.5575311 -210.5129725482945611.124849238363767-24.81775149965351478.14718 -7.645186432301977e-08 4.3264754e-07212.2625606912201 0 -0.3810194134712219 1.8352900976292204-0.6407454609870911 4914.369 nan nan nan -8.48732751191461 -211.68435438026214-55.59752034953253
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1,1640.0190252846766197460.0151172110311543190.0196869320953960740.0111316669991528210.00613718860536120810.3731727600097661.5368380546569824 -1.5263926982879639 -0.673753559589386 39.989857-2.514573920310201e-07 4.0399456e-070.0 21.230698985230248-1.226879239082336420.69277 -0.006136069764179247 -0.54691136 0.014802344 22.025711 0.8299667035764402 -0.054642305 0.3470864 20.100964 0.04999640531206987 -1.1908631 0.3470864 -10.55544 156.8341 1.8550684 -0.6782917976379395 20.185909478706662141.691970.798 0.3099588453769684 0.806828141.8727959735562256 0.3528067027517523 0.5241191460758158 2.2718804 1.657140857015031 2.475683344755806 2.3005029186373935 2.2718804 -0.6692771315574646 0.04717090725898743 -1.0167276859283447 99731 1 0 -1.8038561145794871 -1.80952973403217 1.4543804 -159.3008121376062468.16420594881328 -32.28748077755431558.55993 -8.166342547243272e-07 4.0399456e-07176.254330827058230 -0.643153190612793 0.8070930497545803-0.7373723983764648 4771.282 nan nan nan 78.74606945448743 -255.8375414814521817.808940561402192
1,1650.11785906487249752 0.08847483112601966 0.11882245467274986 0.06779467873028361 0.03801905318467662 9.395322799682617 -0.3845840394496918 -0.28358957171440125-0.4808520078659057634.8023389.918108029871799e-08 1.2833371e-070.0 21.730687168195804-0.761027336120605519.584963 0.0065751865905664285 -2.2407725 0.007908253 20.062742 -0.20591638105879556 -1.5808507 0.1435723 19.184309 0.3899514815920368 -3.0041256 0.1435723 -11.4430685163.642681.1658815 -0.9921388030052185 20.977941305794033803.1406 1.433 -1.1456114053726196 1.4167645 -0.7985102470481145 -1.2350411854691319-1.0666535865725877 0.83854187 0.94813715112474410.10609397613329813-0.0146139763786017380.83854187-0.9093115329742432 -0.06070816144347191-0.573256254196167 99823 1 0 0.6270305330302726 0.6225237923805556 0.46200135-208.6765215243252761.24792880191641 -44.02164751433754563.986168-1.9273868544824463e-071.2833371e-07221.8898485012178 0 -0.5603996515274048 1.446258238190986 -0.6158600449562073 4276.7935nan nan nan 6.244157910757682 -225.91754656015348-22.142693836095198
1,1661.917877604633994 1.3702206129213375 1.8937630206087055 1.0859833201809104 0.6186701950432238 9.400785446166992 0.5861782431602478 -0.661990225315094 -0.446218341588974 28.715738-4.908052626167452e-07 4.5137742e-070.0 21.56765254830313 -1.074138998985290520.798689 -0.005518799886512156 -2.133665 0.015706312 22.023201 0.09706545298345842 -1.5352793 0.3772023 20.511465 0.7137742476844009 -2.8559453 0.3772023 -10.957019 172.460341.279352 -0.9261223077774048 22.189399202694215671.834661.323 -0.4879607856273651 1.3253865 5.462758179344159 5.667542559168328 5.871416168223197 2.502292 -2.8435501239471252.409661008791584 2.2750541663028017 2.502292 0.23867693543434143 -1.0438926219940186 -1.0675371885299683 99881 1 0 -1.883078373748392 -1.8879365077565704 1.6249586 -200.3407015330409426.516403301143548-39.12458260932041 71.24494 1.7179552430969074e-07 4.5137742e-07205.840349055119470 -0.306485772132873541.33023236613604050.5969148278236389 4453.539 nan nan nan 45.99363716354691 -245.2196565089809 -10.463755036288688
1,1670.3890935817655473 0.3459109855134188 0.42844236806758407 0.2332652879275749 0.12551405863404752 8.76700210571289 1.2602565288543701 -0.6482102274894714 -0.646274745464325 18.708971-1.1252965856256632e-074.4515681e-070.0 21.967123504012505-1.156763672828674320.788153 -0.0028946091431594823-1.521986 0.015590355 20.725286 -0.3056262783830847 -1.3646538 0.3733 20.2418 -0.16204777931782613-1.7965397 0.3733 -19.303923 178.783282.6245642 -0.3065233826637268 21.496632381861513296.858952.3255537 0.10349282622337341 2.2348108 -0.9703733499833618 -1.8985779016318194-1.6164166274595297 2.4722178 1.65693549818205850.287161386587223570.15742234829525623 2.4722178 -0.099911376833915710.01162821426987648 -0.6298919320106506 99944 1 0 -1.469024973955347 -1.4730667784191478 1.6025645 -233.4515586679823 4.958240307345907 -81.78993982121428 68.41039 -8.61161514396646e-07 4.4515681e-07247.414245037373770 -0.135934576392173772.32588572372793 -0.7227007746696472 6840.3525nan nan nan 65.61290171740593 -354.48857930707965-69.47010348297734
1,1680.13128025060982007 0.10877511186828413 0.1389290640965563 0.07761901232932501 0.0423484679386516368.829378128051758 0.945320188999176 -1.3487151861190796 -0.3256357312202453635.68073 -6.829164901717445e-08 5.0387865e-070.0 21.449059479615702-1.558529853820800820.904022 -0.004349176003901913 -0.6494634 0.01665563 21.971952 0.678119222946501 -0.29415557 0.40957612 20.778925 0.42905685318463965 -1.1768098 0.40957612 -13.799286 159.736652.465999 -0.0697977319359779421.024777711937936144.352342.104846 -0.6132096648216248 2.0921621 -2.4980094064001293 -2.2022274170596026-1.9733394462256058 2.7541013 0.4840052154049758-1.2745613005915613-1.501391448026907 2.7541013 -0.40418189764022827-0.7111912369728088 -0.6041487455368042 99991 1 0 -0.46944864982128426-0.4745794854764945 1.8139632 -177.5605876092853665.5525804310451 -46.48781414288353 58.6055034.792514094889688e-07 5.0387865e-07194.900025492832160 -0.5130423903465271 2.1051179373093634-0.105139151215553285345.2173nan nan nan -31.301481977818145-304.94776329404436-3.899390631479074
" + ], + "text/plain": [ + "# A_0 A_gaia__dr2_g A_gaia__dr2_gbp A_gaia__dr2_grp E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaia__dr2_g gaia__dr2_g_Err gaia__dr2_g_Intrinsic gaia__dr2_g_Sig gaia__dr2_gbp gaia__dr2_gbp_Err gaia__dr2_gbp_Intrinsic gaia__dr2_gbp_Sig gaia__dr2_grp gaia__dr2_grp_Err gaia__dr2_grp_Intrinsic gaia__dr2_grp_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid partitionid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz\n", + "0 0.05681650709265598 0.04671342391859208 0.05985558882052393 0.03353577934926581 0.018327905513759995 8.97172737121582 -0.6125200986862183 -0.12460324913263321 -0.36052706837654114 41.517887 -4.3651322762456503e-07 3.7339328e-07 0.0 20.938860082853388 -0.5348672270774841 20.610794 -0.013108958690914031 -0.36166972 0.014190837 20.934616 -0.09105875752639689 0.026959075 0.32711947 20.067835 0.010476073807142064 -0.9150356 0.32711947 -6.450095 159.08374 2.5680106 -0.6886086463928223 20.661052845931597 108.46986 2.1231031 -1.1473873853683472 1.9929105 1.9060571825344517 -0.4903980049570771 -0.15208820165614972 2.1212947 2.637362501364926 3.216868859449929 3.107170100412025 2.1212947 -0.44875627756118774 -1.4166113138198853 -0.40134233236312866 138 1 0 0.004700138418892006 -0.0017896118250197454 1.3442158 -143.02405261900319 54.66209816691588 -17.310021738871935 64.385994 7.738775790567222e-07 3.7339328e-07 154.089134776509 0 -0.4361392557621002 2.123614686399606 -1.2804145812988281 5266.821 nan nan nan -13.980939858346646 -241.322783466562 -112.49946999755836\n", + "1 0.30908957284836036 0.2261170869376632 0.30842259877311534 0.176280263594307 0.09970631382205172 10.069992065429688 0.5896989703178406 -0.9664415121078491 -0.9518471360206604 37.240967 -2.2831375342149955e-07 2.49317e-07 0.0 21.769605166840982 -0.801622748374939 20.222652 -0.013217448221518976 -1.7598503 0.011413363 21.307426 0.2680249694291372 -1.0386255 0.24083452 19.243824 -0.13966843269274323 -2.5623941 0.24083452 -0.91259795 169.44246 1.0347817 -0.32748517394065857 21.396662669202907 558.4033 0.8450456 -0.21192379295825958 0.86665446 -3.1047273926896426 -2.7124202720419555 -2.542487626107496 1.4928615 1.1050811506348799 -1.871713888922517 -2.04588855812214 1.4928615 -0.3413775563240051 -0.13905183970928192 -0.8814153671264648 212 1 0 -1.1660510794203147 -1.1704777679639904 0.89754117 -222.0501127897472 41.38527019482137 -3.5979765713472083 78.53204 4.2180988179474246e-07 2.49317e-07 225.90249802613027 0 -0.7138696312904358 0.8677262727803007 -1.077961802482605 4132.9897 nan nan nan -64.76429401098572 -249.0524176755581 44.549935511279955\n", + "2 0.040653863770659916 0.03188868360172066 0.04180280722924421 0.023700606699203153 0.013114149603438681 9.613767623901367 -0.1432933509349823 -1.0196176767349243 -0.6505561470985413 27.468527 9.93141102529504e-07 5.270746e-07 0.0 21.241844522741097 -0.5965235829353333 20.921713 -0.029182178287689993 -0.3228382 0.01705969 21.876608 0.38537958340209455 0.20757976 0.4235812 21.28318 1.0115375512029108 -0.99390167 0.4235812 -8.830861 175.76826 2.0586061 -0.7592963576316833 20.51568014237018 118.69824 1.196 -0.7398169040679932 1.1982795 -1.6438476299687612 -2.044957683093608 -1.7305400665725954 2.8642974 1.322617557411089 -0.519326655124296 -0.5989357582041593 2.8642974 -1.3291157484054565 -0.7577531337738037 -0.45060980319976807 252 1 0 1.5601152190393899 1.554470646021109 1.8974684 -174.58395850876306 12.917886544408068 -27.197472653752673 75.42295 -1.738821925276305e-07 5.270746e-07 177.1613188032741 0 -0.6941993832588196 1.2002945213596574 -0.5894879698753357 4637.9014 nan nan nan 31.915626870159116 -254.29642034774957 -98.61775218664684\n", + "3 0.7877962999055037 0.5726781831841866 0.7836102802990144 0.4485485017244748 0.25412783867919475 9.8711519241333 1.162867546081543 -0.7159809470176697 -0.6287623643875122 34.62386 6.854075293976649e-08 7.639342e-08 0.0 20.79343262014924 -1.236360788345337 19.04199 0.00854874852791074 -2.3326683 0.005850956 19.920134 -0.005622249308989237 -1.6512849 0.09372754 18.088743 -0.04331449085765518 -3.1099238 0.09372754 -14.482033 160.58708 0.94072235 0.7711513042449951 21.80299225153633 876.2868 0.92662406 -0.07349321991205215 0.95272523 0.054731965395574934 -0.3829754121816991 -0.12157731062280257 0.53407407 0.6418210512826112 0.5179379203937897 0.16962703533504497 0.53407407 -0.9232337474822998 -0.6347827315330505 -1.0434234142303467 281 1 0 -0.24483446567030384 -0.25177373072009146 0.2750163 -131.59610686320977 46.37566245119917 -36.03787463886429 58.814594 3.7359391102072234e-08 7.639342e-08 144.10748008978362 0 0.010916919447481632 0.9538811072032849 -1.0917985439300537 4282.4487 nan nan nan -43.91235726362427 -298.99747247914627 38.90182804530409\n", + "4 0.13204413245379326 0.10562465807915085 0.1371534826791068 0.07738767519745451 0.042594881436707505 9.037848472595215 -0.20741142332553864 -0.2963399291038513 0.24989141523838043 27.754452 3.672289535219167e-07 4.3264754e-07 0.0 21.63436699581625 -0.9348768591880798 20.762663 -0.0013426168529036332 -0.9759861 0.015354784 21.672022 0.4177469420941861 -0.51724565 0.36540693 20.407366 0.2875173851348014 -1.5919065 0.36540693 -6.714385 176.97495 2.1116366 -0.6755844354629517 21.027297422390884 203.31184 1.8348202 -1.142288327217102 1.8366443 0.2197378023917316 -1.2259053978924448 -1.02247116836483 2.41159 1.66267235620017 1.144517339975177 1.067175358322312 2.41159 -0.6697758436203003 -0.6329840421676636 -1.5521866083145142 343 1 0 2.2433125652881225 2.238601418881787 1.5575311 -210.51297254829456 11.124849238363767 -24.817751499653514 78.14718 -7.645186432301977e-08 4.3264754e-07 212.2625606912201 0 -0.3810194134712219 1.8352900976292204 -0.6407454609870911 4914.369 nan nan nan -8.48732751191461 -211.68435438026214 -55.59752034953253\n", + "... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...\n", + "1,164 0.019025284676619746 0.015117211031154319 0.019686932095396074 0.011131666999152821 0.006137188605361208 10.373172760009766 1.5368380546569824 -1.5263926982879639 -0.673753559589386 39.989857 -2.514573920310201e-07 4.0399456e-07 0.0 21.230698985230248 -1.2268792390823364 20.69277 -0.006136069764179247 -0.54691136 0.014802344 22.025711 0.8299667035764402 -0.054642305 0.3470864 20.100964 0.04999640531206987 -1.1908631 0.3470864 -10.55544 156.8341 1.8550684 -0.6782917976379395 20.185909478706662 141.69197 0.798 0.3099588453769684 0.80682814 1.8727959735562256 0.3528067027517523 0.5241191460758158 2.2718804 1.657140857015031 2.475683344755806 2.3005029186373935 2.2718804 -0.6692771315574646 0.04717090725898743 -1.0167276859283447 99731 1 0 -1.8038561145794871 -1.80952973403217 1.4543804 -159.30081213760624 68.16420594881328 -32.287480777554315 58.55993 -8.166342547243272e-07 4.0399456e-07 176.25433082705823 0 -0.643153190612793 0.8070930497545803 -0.7373723983764648 4771.282 nan nan nan 78.74606945448743 -255.83754148145218 17.808940561402192\n", + "1,165 0.11785906487249752 0.08847483112601966 0.11882245467274986 0.06779467873028361 0.03801905318467662 9.395322799682617 -0.3845840394496918 -0.28358957171440125 -0.48085200786590576 34.802338 9.918108029871799e-08 1.2833371e-07 0.0 21.730687168195804 -0.7610273361206055 19.584963 0.0065751865905664285 -2.2407725 0.007908253 20.062742 -0.20591638105879556 -1.5808507 0.1435723 19.184309 0.3899514815920368 -3.0041256 0.1435723 -11.4430685 163.64268 1.1658815 -0.9921388030052185 20.977941305794033 803.1406 1.433 -1.1456114053726196 1.4167645 -0.7985102470481145 -1.2350411854691319 -1.0666535865725877 0.83854187 0.9481371511247441 0.10609397613329813 -0.014613976378601738 0.83854187 -0.9093115329742432 -0.06070816144347191 -0.573256254196167 99823 1 0 0.6270305330302726 0.6225237923805556 0.46200135 -208.67652152432527 61.24792880191641 -44.021647514337545 63.986168 -1.9273868544824463e-07 1.2833371e-07 221.8898485012178 0 -0.5603996515274048 1.446258238190986 -0.6158600449562073 4276.7935 nan nan nan 6.244157910757682 -225.91754656015348 -22.142693836095198\n", + "1,166 1.917877604633994 1.3702206129213375 1.8937630206087055 1.0859833201809104 0.6186701950432238 9.400785446166992 0.5861782431602478 -0.661990225315094 -0.446218341588974 28.715738 -4.908052626167452e-07 4.5137742e-07 0.0 21.56765254830313 -1.0741389989852905 20.798689 -0.005518799886512156 -2.133665 0.015706312 22.023201 0.09706545298345842 -1.5352793 0.3772023 20.511465 0.7137742476844009 -2.8559453 0.3772023 -10.957019 172.46034 1.279352 -0.9261223077774048 22.189399202694215 671.83466 1.323 -0.4879607856273651 1.3253865 5.462758179344159 5.667542559168328 5.871416168223197 2.502292 -2.843550123947125 2.409661008791584 2.2750541663028017 2.502292 0.23867693543434143 -1.0438926219940186 -1.0675371885299683 99881 1 0 -1.883078373748392 -1.8879365077565704 1.6249586 -200.34070153304094 26.516403301143548 -39.12458260932041 71.24494 1.7179552430969074e-07 4.5137742e-07 205.84034905511947 0 -0.30648577213287354 1.3302323661360405 0.5969148278236389 4453.539 nan nan nan 45.99363716354691 -245.2196565089809 -10.463755036288688\n", + "1,167 0.3890935817655473 0.3459109855134188 0.42844236806758407 0.2332652879275749 0.12551405863404752 8.76700210571289 1.2602565288543701 -0.6482102274894714 -0.646274745464325 18.708971 -1.1252965856256632e-07 4.4515681e-07 0.0 21.967123504012505 -1.1567636728286743 20.788153 -0.0028946091431594823 -1.521986 0.015590355 20.725286 -0.3056262783830847 -1.3646538 0.3733 20.2418 -0.16204777931782613 -1.7965397 0.3733 -19.303923 178.78328 2.6245642 -0.3065233826637268 21.496632381861513 296.85895 2.3255537 0.10349282622337341 2.2348108 -0.9703733499833618 -1.8985779016318194 -1.6164166274595297 2.4722178 1.6569354981820585 0.28716138658722357 0.15742234829525623 2.4722178 -0.09991137683391571 0.01162821426987648 -0.6298919320106506 99944 1 0 -1.469024973955347 -1.4730667784191478 1.6025645 -233.4515586679823 4.958240307345907 -81.78993982121428 68.41039 -8.61161514396646e-07 4.4515681e-07 247.41424503737377 0 -0.13593457639217377 2.32588572372793 -0.7227007746696472 6840.3525 nan nan nan 65.61290171740593 -354.48857930707965 -69.47010348297734\n", + "1,168 0.13128025060982007 0.10877511186828413 0.1389290640965563 0.07761901232932501 0.042348467938651636 8.829378128051758 0.945320188999176 -1.3487151861190796 -0.32563573122024536 35.68073 -6.829164901717445e-08 5.0387865e-07 0.0 21.449059479615702 -1.5585298538208008 20.904022 -0.004349176003901913 -0.6494634 0.01665563 21.971952 0.678119222946501 -0.29415557 0.40957612 20.778925 0.42905685318463965 -1.1768098 0.40957612 -13.799286 159.73665 2.465999 -0.06979773193597794 21.024777711937936 144.35234 2.104846 -0.6132096648216248 2.0921621 -2.4980094064001293 -2.2022274170596026 -1.9733394462256058 2.7541013 0.4840052154049758 -1.2745613005915613 -1.501391448026907 2.7541013 -0.40418189764022827 -0.7111912369728088 -0.6041487455368042 99991 1 0 -0.46944864982128426 -0.4745794854764945 1.8139632 -177.56058760928536 65.5525804310451 -46.48781414288353 58.605503 4.792514094889688e-07 5.0387865e-07 194.90002549283216 0 -0.5130423903465271 2.1051179373093634 -0.10513915121555328 5345.2173 nan nan nan -31.301481977818145 -304.94776329404436 -3.899390631479074" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "survey[~survey.gaia__dr2_g.isna()]" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + }, + "vscode": { + "interpreter": { + "hash": "93aa337d3be5595eae1049f286a1f242db5cd4d40fd613efbe29fb4c796799bf" + } + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/jupyter/testing_ananke.ipynb b/jupyter/testing_ananke.ipynb deleted file mode 100644 index 9c54d4c..0000000 --- a/jupyter/testing_ananke.ipynb +++ /dev/null @@ -1,1021 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "f130bf6c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'0.1.0b1'" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "import numpy as np\n", - "import ananke as an\n", - "an.__version__" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "d0809afe", - "metadata": {}, - "source": [ - "We define here some dummy input data. Py-ananke has a method to produce such data." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "f4dafbb1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "dict_keys(['pos3', 'vel3', 'mass', 'age', 'feh', 'helium', 'carbon', 'nitrogen', 'oxygen', 'neon', 'magnesium', 'silicon', 'sulphur', 'calcium', 'alpha', 'parentid', 'dform', 'id', 'log10_NH'])" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.random.seed(0)\n", - "p = an.Ananke.make_dummy_particles_input()\n", - "p.keys()" - ] - }, - { - "cell_type": "markdown", - "id": "51f0f1ae", - "metadata": {}, - "source": [ - "The input data must be formatted as a dictionary of equal-length arrays. The dictionary must have the following entries:\n", - "- key `pos3`: particle position coordinates in $kpc$ (shape Nx3)\n", - "- key `vel3`: particle velocity coordinates in $km.s^{-1}$ (shape Nx3)\n", - "- key `mass`: particle stellar mass in solar masses\n", - "- key `age`: particle log10 stellar age in years\n", - "- key `feh`: particle stellar metallicity \\[Fe/H\\] in dex relative to solar\n", - "\n", - "Additionally, the following entries can optionally be added:\n", - "- key `parentid`: index to give to the parent particle\n", - "- key `id`: additional index to classify the parent particle\n", - "- key `log10_NH`: log10 hydrogen column densities between Observer position and particle in $cm^{-2}$ - must be provided to estimate extinctions\n", - "- key `dform`: particle formation distance\n", - "- keys `helium`, `carbon`, `nitrogen`, `oxygen`, `neon`, `magnesium`, `silicon`, `sulphur`, `calcium`: particle various chemical abundances \\[X/H\\]\n", - "- key `alpha`: particle alpha chemical abundances \\[Mg/Fe\\]\n", - "\n", - "Ananke will compute the phase space densities that are used to determine particle smoothing lengths, but one can include pre-computed densities with the following entries:\n", - "- key `rho_pos`: particle density in position space in $kpc^{-3}$\n", - "- key `rho_vel`: particle density in velocity space in $km^{-3}.s^{3}$" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "55c50b11", - "metadata": {}, - "source": [ - "We can define here some parameters for Ananke such as\n", - " - the observer position `observer`\n", - " - the shell of particles to mask `rshell`\n", - " - the sampling factor `fsample`\n", - " - the photometric system of choise `photo_sys`\n", - " - the CMD `cmd_magnames` and its box limits `cmd_box`" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "1ecc74b8", - "metadata": {}, - "outputs": [], - "source": [ - "D = 200 # *units.kpc\n", - "\n", - "observer = np.nan*np.ones(3)\n", - "while not np.linalg.norm(observer)<1:\n", - " observer = 2*np.random.rand(3)-1\n", - "\n", - "observer *= D/np.linalg.norm(observer)\n", - "\n", - "rshell = [0, 2*D]\n", - "\n", - "fsample = 0.01\n", - "\n", - "photo_sys = 'padova/GAIADR2'\n", - "\n", - "cmd_magnames = {'magnitude': 'Gmag',\n", - " 'color_minuend': 'G_BPmag',\n", - " 'color_subtrahend': 'G_RPmag'}\n", - "\n", - "cmd_box = {\n", - " 'abs_mag_lim_lo': -1000,\n", - " 'abs_mag_lim_hi': 1000,\n", - " # 'app_mag_lim_lo' : -1000,\n", - " 'app_mag_lim_hi': 30,\n", - " # 'color_lim_lo' : -1000,\n", - " # 'color_lim_hi' : 1000\n", - " }" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "For more details regarding these parameters and more, you may consult the docstring associated to the class `Ananke`:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Help on class Ananke in module ananke.Ananke:\n", - "\n", - "class Ananke(builtins.object)\n", - " | Ananke(particles, name, ngb=64, d_params={}, e_params={}, err_params={}, **kwargs) -> None\n", - " | \n", - " | Represents a single ananke pipeline.\n", - " | \n", - " | Methods defined here:\n", - " | \n", - " | __init__(self, particles, name, ngb=64, d_params={}, e_params={}, err_params={}, **kwargs) -> None\n", - " | Parameters\n", - " | ----------\n", - " | particles : dict\n", - " | A dictionary of same-length arrays representing particles\n", - " | data of a stellar population - see notes for formatting\n", - " | \n", - " | name : str\n", - " | Name for the pipeline\n", - " | \n", - " | ngb : int\n", - " | Number of neighbours to use in kernel density estimation\n", - " | \n", - " | d_params : dict\n", - " | Parameters to configure the kernel density estimation. Use\n", - " | class method display_density_docs to find what parameters can\n", - " | be defined\n", - " | \n", - " | e_params : dict\n", - " | Parameters to configure the extinction pipeline. Use class\n", - " | method display_extinction_docs to find what parameters can be\n", - " | defined\n", - " | \n", - " | err_params : dict\n", - " | Parameters to configure the error model pipeline. Use class\n", - " | method display_errormodel_docs to find what parameters can be\n", - " | defined\n", - " | \n", - " | observer : array-like shape (3,)\n", - " | Coordinates for the observer position in kpc. Default to\n", - " | [0. 0. 0.].\n", - " | \n", - " | rshell : array-like shape (2,)\n", - " | Range in kpc of distances from the observer position of the\n", - " | particles that are to be considered. Default to\n", - " | [ 0 500].\n", - " | \n", - " | photo_sys : string or list\n", - " | Name(s) of the photometric system(s) Galaxia should use to\n", - " | generate the survey. Default to ['padova/GAIADR2'].\n", - " | Available photometric systems can be queried with the class\n", - " | method display_available_photometric_systems.\n", - " | \n", - " | cmd_magnames : string or dict\n", - " | Names of the filters Galaxia should use for the color-magnitude\n", - " | diagram box selection.\n", - " | The input can be given as string in which case it must meet the\n", - " | following format:\n", - " | \"band1,band2-band3\"\n", - " | where band1 is the magnitude filter and (band2, band3) are the\n", - " | filters that define the band2-band3 color index.\n", - " | Alternatively, a dictionary can be passed with the following\n", - " | format:\n", - " | dict('magnitude': band1,\n", - " | 'color_minuend': band2,\n", - " | 'color_subtrahend': band3)\n", - " | The filter names must correspond to filters that are part of\n", - " | the first chosen photometric system in photo_sys. Default to\n", - " | Gmag,G_BPmag-G_RPmag.\n", - " | \n", - " | app_mag_lim_lo : float\n", - " | app_mag_lim_hi : float\n", - " | abs_mag_lim_lo : float\n", - " | abs_mag_lim_hi : float\n", - " | color_lim_lo : float\n", - " | color_lim_hi : float\n", - " | These allow to specify the limits of the chosen color-magnitude\n", - " | diagram box selection (lo for lower and hi for upper). app_mag,\n", - " | abs_mag and color represent respectively limits in apparent\n", - " | magnitudes, absolute magnitudes and color index. Default values\n", - " | follow those set in:\n", - " | {'app_mag': [-1000, 1000], 'abs_mag': [-1000, 20], 'color': [-1000, 1000]}.\n", - " | \n", - " | fsample : float\n", - " | Sampling rate from 0 to 1 for the resulting synthetic star\n", - " | survey. 1 returns a full sample while any value below returns\n", - " | partial surveys. Default to 1.\n", - " | \n", - " | Notes\n", - " | -----\n", - " | The input particles must include same-length arrays for every key of\n", - " | the list of keys return by property required_particles_keys.\n", - " | Particular attention should be given to arrays of keys 'pos3' and\n", - " | 'vel3' that must be shaped as (Nx3) arrays of, respectively,\n", - " | position and velocity vectors. Use the class method\n", - " | make_dummy_particles_input to generate a dummy example of such input\n", - " | dictionary.\n", - " | \n", - " | run(self, **kwargs)\n", - " | Method to run the pipeline\n", - " | \n", - " | Parameters\n", - " | ----------\n", - " | input_dir : string\n", - " | output_dir : string\n", - " | i_o_dir : string\n", - " | Optional arguments to specify paths for the directories where\n", - " | ananke should generate input and output data. If the i_o_dir\n", - " | keyword argument is provided, it overrides any path given to\n", - " | the input_dir and output_dir keyword arguments.\n", - " | \n", - " | k_factor : float\n", - " | Scaling factor applied to the kernels lengths to adjust all\n", - " | the kernels sizes uniformly. Lower values reduces the kernels\n", - " | extents, while higher values increases them.\n", - " | Default to 1 (no adjustment).\n", - " | \n", - " | surveyname : string\n", - " | Optional name Galaxia should use for the output files. Default\n", - " | to 'survey'.\n", - " | \n", - " | **kwargs\n", - " | Additional parameters used by the method make_survey of\n", - " | Galaxia's Survey objects\n", - " | \n", - " | Returns\n", - " | -------\n", - " | galaxia_output : :obj:`Galaxia.Output`\n", - " | Handler with utilities to utilize the output survey and its data.\n", - " | \n", - " | ----------------------------------------------------------------------\n", - " | Class methods defined here:\n", - " | \n", - " | display_EnBiD_docs() from builtins.type\n", - " | Print the EnBiD.run_enbid docstring\n", - " | \n", - " | display_available_photometric_systems() from builtins.type\n", - " | Return a nested dictionary of all photometric systems that are\n", - " | available in Galaxia.\n", - " | \n", - " | Returns\n", - " | -------\n", - " | available_photo_systems : dict\n", - " | Dictionary of dictionaries of Isochrone objects.\n", - " | \n", - " | display_density_docs() from builtins.type\n", - " | Print the DensitiesDriver constructor docstring\n", - " | \n", - " | display_errormodel_docs() from builtins.type\n", - " | Print the ErrorModelDriver constructor docstring\n", - " | \n", - " | display_extinction_docs() from builtins.type\n", - " | Print the ExtinctionDriver constructor docstring\n", - " | \n", - " | make_dummy_particles_input(n_parts=100000, with_densities=False) from builtins.type\n", - " | Generate an example dummy input particles dictionary for Ananke\n", - " | made of randomly generated arrays.\n", - " | \n", - " | Parameters\n", - " | ----------\n", - " | n_parts : int\n", - " | Number of particles the example include. Default to 10**5.\n", - " | \n", - " | Returns\n", - " | -------\n", - " | p : dict\n", - " | Dummy example input particles for Ananke.\n", - " | \n", - " | ----------------------------------------------------------------------\n", - " | Readonly properties defined here:\n", - " | \n", - " | densities\n", - " | \n", - " | errors\n", - " | \n", - " | extinctions\n", - " | \n", - " | galaxia_catalogue_keys\n", - " | \n", - " | galaxia_catalogue_mag_and_astrometrics\n", - " | \n", - " | galaxia_catalogue_mag_names\n", - " | \n", - " | galaxia_isochrones\n", - " | \n", - " | intrinsic_catalogue_mag_names\n", - " | \n", - " | name\n", - " | \n", - " | ngb\n", - " | \n", - " | observer\n", - " | \n", - " | observer_position\n", - " | \n", - " | observer_velocity\n", - " | \n", - " | parameters\n", - " | \n", - " | particle_masses\n", - " | \n", - " | particle_positions\n", - " | \n", - " | particle_velocities\n", - " | \n", - " | particles\n", - " | \n", - " | photo_sys\n", - " | \n", - " | universe\n", - " | \n", - " | universe_rshell\n", - " | \n", - " | ----------------------------------------------------------------------\n", - " | Data descriptors defined here:\n", - " | \n", - " | __dict__\n", - " | dictionary for instance variables (if defined)\n", - " | \n", - " | __weakref__\n", - " | list of weak references to the object (if defined)\n", - "\n" - ] - } - ], - "source": [ - "help(an.Ananke)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "1f132dcb", - "metadata": {}, - "source": [ - "Preparing now the pipeline with GAIA photometry" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "f56bb9c8", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/utils.py:23: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access\n", - " self._record_of_all_used_keys = set()\n", - "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/utils.py:23: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access\n", - " self._record_of_all_used_keys = set()\n" - ] - } - ], - "source": [ - "name = 'sim'\n", - "ananke = an.Ananke(p, name, fsample=fsample,\n", - " observer=observer, rshell=rshell,\n", - " photo_sys=photo_sys, cmd_magnames=cmd_magnames,\n", - " **cmd_box)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "fb2ba696", - "metadata": {}, - "source": [ - "The method `run` runs the pipeline:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "f04f19ca", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dimensions = 3\n", - "Normalization constant of Kernel type 3: 0.596831\n", - "Reading ASCII format file: to_enbid \n", - "Read 300000 records\n", - "Allocated 3.8147 MByte for particle storage.\n", - "Type = 1 Particles = 100000\n", - "Total particles = 100000\n", - "Allocated 22.1252 MByte for Binary-Tree and Entropy bins.\n", - "\n", - "Scaling Co-ordinates as x[i]=x[i]/h[i] with h[i]->\n", - "1 1 1 \n", - "\n", - "Starting to Build Tree .......\n", - "Particle Type = 1 First node number = 1\n", - " Last node number = 199999\n", - "Total number of nodes = 199999\n", - "Treebuild time = 0.082261 s \n", - "\n", - "Density Calculation. Smoothing .....\n", - "Evaluated = 1 % Time Left = 0.590628 s of 0.596600 s Par no = 96805 Density = 4.540410e-02 \n", - "Evaluated = 2 % Time Left = 0.570354 s of 0.582000 s Par no = 55454 Density = 4.964532e-03 \n", - "Evaluated = 3 % Time Left = 0.593375 s of 0.611733 s Par no = 27717 Density = 1.827217e-01 \n", - "Evaluated = 4 % Time Left = 0.600330 s of 0.625350 s Par no = 42234 Density = 2.712376e-02 \n", - "Evaluated = 5 % Time Left = 0.591711 s of 0.622860 s Par no = 99785 Density = 2.988041e-01 \n", - "Evaluated = 6 % Time Left = 0.590094 s of 0.627767 s Par no = 88021 Density = 1.791133e-01 \n", - "Evaluated = 7 % Time Left = 0.596349 s of 0.641243 s Par no = 75708 Density = 1.165058e-01 \n", - "Evaluated = 8 % Time Left = 0.589656 s of 0.640938 s Par no = 45579 Density = 7.255407e-02 \n", - "Evaluated = 9 % Time Left = 0.571090 s of 0.627578 s Par no = 30351 Density = 8.828940e-02 \n", - "Evaluated = 10 % Time Left = 0.569640 s of 0.632940 s Par no = 89176 Density = 1.775999e-01 \n", - "Evaluated = 11 % Time Left = 0.567514 s of 0.637664 s Par no = 60361 Density = 8.299880e-02 \n", - "Evaluated = 12 % Time Left = 0.561258 s of 0.637800 s Par no = 90082 Density = 2.203585e-01 \n", - "Evaluated = 13 % Time Left = 0.558373 s of 0.641815 s Par no = 26814 Density = 1.910994e-02 \n", - "Evaluated = 14 % Time Left = 0.552943 s of 0.642964 s Par no = 74297 Density = 2.157650e-02 \n", - "Evaluated = 15 % Time Left = 0.551173 s of 0.648447 s Par no = 94905 Density = 9.119637e-02 \n", - "Evaluated = 16 % Time Left = 0.546739 s of 0.650887 s Par no = 51653 Density = 9.666827e-02 \n", - "Evaluated = 17 % Time Left = 0.539825 s of 0.650400 s Par no = 39308 Density = 1.287775e-01 \n", - "Evaluated = 18 % Time Left = 0.533167 s of 0.650211 s Par no = 7800 Density = 4.130106e-02 \n", - "Evaluated = 19 % Time Left = 0.527474 s of 0.651211 s Par no = 42838 Density = 5.914273e-02 \n", - "Evaluated = 20 % Time Left = 0.524185 s of 0.655240 s Par no = 49016 Density = 1.554842e-01 \n", - "Evaluated = 21 % Time Left = 0.516947 s of 0.654371 s Par no = 29173 Density = 5.981781e-02 \n", - "Evaluated = 22 % Time Left = 0.508068 s of 0.651377 s Par no = 14018 Density = 4.713365e-02 \n", - "Evaluated = 23 % Time Left = 0.500356 s of 0.649822 s Par no = 90617 Density = 4.088211e-02 \n", - "Evaluated = 24 % Time Left = 0.495273 s of 0.651683 s Par no = 20588 Density = 1.273882e-01 \n", - "Evaluated = 25 % Time Left = 0.488687 s of 0.651592 s Par no = 15465 Density = 1.274245e-01 \n", - "Evaluated = 26 % Time Left = 0.483931 s of 0.653969 s Par no = 99360 Density = 2.044210e-01 \n", - "Evaluated = 27 % Time Left = 0.476145 s of 0.652263 s Par no = 71132 Density = 2.079416e-02 \n", - "Evaluated = 28 % Time Left = 0.468888 s of 0.651243 s Par no = 6665 Density = 4.366050e-03 \n", - "Evaluated = 29 % Time Left = 0.463366 s of 0.652638 s Par no = 44439 Density = 1.463732e-01 \n", - "Evaluated = 30 % Time Left = 0.456032 s of 0.651483 s Par no = 6386 Density = 1.825201e-01 \n", - "Evaluated = 31 % Time Left = 0.450272 s of 0.652577 s Par no = 2716 Density = 1.495581e-01 \n", - "Evaluated = 32 % Time Left = 0.443834 s of 0.652706 s Par no = 69470 Density = 6.785186e-02 \n", - "Evaluated = 33 % Time Left = 0.438754 s of 0.654867 s Par no = 95884 Density = 1.793627e-01 \n", - "Evaluated = 34 % Time Left = 0.432831 s of 0.655815 s Par no = 73768 Density = 1.295311e-02 \n", - "Evaluated = 35 % Time Left = 0.426733 s of 0.656523 s Par no = 47898 Density = 1.088661e-01 \n", - "Evaluated = 36 % Time Left = 0.420251 s of 0.656653 s Par no = 66396 Density = 3.959182e-02 \n", - "Evaluated = 37 % Time Left = 0.413728 s of 0.656722 s Par no = 16463 Density = 1.572219e-01 \n", - "Evaluated = 38 % Time Left = 0.408387 s of 0.658700 s Par no = 55669 Density = 1.712036e-01 \n", - "Evaluated = 39 % Time Left = 0.404082 s of 0.662441 s Par no = 97705 Density = 1.234431e-01 \n", - "Evaluated = 40 % Time Left = 0.397426 s of 0.662388 s Par no = 43442 Density = 6.719717e-02 \n", - "Evaluated = 41 % Time Left = 0.391084 s of 0.662866 s Par no = 10242 Density = 2.102901e-01 \n", - "Evaluated = 42 % Time Left = 0.387222 s of 0.667636 s Par no = 40929 Density = 1.391801e-01 \n", - "Evaluated = 43 % Time Left = 0.381637 s of 0.669551 s Par no = 5720 Density = 6.551556e-02 \n", - "Evaluated = 44 % Time Left = 0.375578 s of 0.670686 s Par no = 66730 Density = 9.093650e-02 \n", - "Evaluated = 45 % Time Left = 0.370003 s of 0.672744 s Par no = 48819 Density = 2.248662e-01 \n", - "Evaluated = 46 % Time Left = 0.364324 s of 0.674687 s Par no = 32014 Density = 9.211303e-02 \n", - "Evaluated = 47 % Time Left = 0.357665 s of 0.674853 s Par no = 31533 Density = 2.932794e-02 \n", - "Evaluated = 48 % Time Left = 0.350533 s of 0.674115 s Par no = 86677 Density = 1.263196e-01 \n", - "Evaluated = 49 % Time Left = 0.344265 s of 0.675043 s Par no = 81951 Density = 8.802203e-02 \n", - "Evaluated = 50 % Time Left = 0.337824 s of 0.675662 s Par no = 80149 Density = 1.559105e-01 \n", - "Evaluated = 51 % Time Left = 0.330924 s of 0.675369 s Par no = 25229 Density = 5.093940e-02 \n", - "Evaluated = 52 % Time Left = 0.324279 s of 0.675596 s Par no = 89731 Density = 4.987879e-02 \n", - "Evaluated = 53 % Time Left = 0.316943 s of 0.674360 s Par no = 76366 Density = 1.511493e-01 \n", - "Evaluated = 54 % Time Left = 0.310216 s of 0.674396 s Par no = 73159 Density = 1.548675e-02 \n", - "Evaluated = 55 % Time Left = 0.303693 s of 0.674887 s Par no = 54007 Density = 8.763468e-02 \n", - "Evaluated = 56 % Time Left = 0.297082 s of 0.675202 s Par no = 36235 Density = 5.465964e-02 \n", - "Evaluated = 57 % Time Left = 0.290033 s of 0.674511 s Par no = 62068 Density = 4.050222e-02 \n", - "Evaluated = 58 % Time Left = 0.282844 s of 0.673453 s Par no = 37661 Density = 2.656841e-02 \n", - "Evaluated = 59 % Time Left = 0.276319 s of 0.673964 s Par no = 67914 Density = 1.940650e-01 \n", - "Evaluated = 60 % Time Left = 0.269729 s of 0.674340 s Par no = 64732 Density = 5.859733e-02 \n", - "Evaluated = 61 % Time Left = 0.262394 s of 0.672823 s Par no = 88788 Density = 7.161247e-03 \n", - "Evaluated = 62 % Time Left = 0.255738 s of 0.673013 s Par no = 44083 Density = 2.877788e-02 \n", - "Evaluated = 63 % Time Left = 0.248780 s of 0.672397 s Par no = 14045 Density = 3.265437e-02 \n", - "Evaluated = 64 % Time Left = 0.241568 s of 0.671042 s Par no = 93621 Density = 5.216304e-02 \n", - "Evaluated = 65 % Time Left = 0.234591 s of 0.670280 s Par no = 9132 Density = 8.411558e-02 \n", - "Evaluated = 66 % Time Left = 0.228130 s of 0.670991 s Par no = 702 Density = 1.110411e-02 \n", - "Evaluated = 67 % Time Left = 0.221760 s of 0.672021 s Par no = 45670 Density = 2.465222e-02 \n", - "Evaluated = 68 % Time Left = 0.215103 s of 0.672218 s Par no = 53860 Density = 1.580594e-02 \n", - "Evaluated = 69 % Time Left = 0.208238 s of 0.671758 s Par no = 79719 Density = 4.454534e-02 \n", - "Evaluated = 70 % Time Left = 0.201322 s of 0.671096 s Par no = 96401 Density = 1.035200e-02 \n", - "Evaluated = 71 % Time Left = 0.194243 s of 0.669825 s Par no = 48105 Density = 3.704985e-02 \n", - "Evaluated = 72 % Time Left = 0.187338 s of 0.669089 s Par no = 75056 Density = 2.642116e-02 \n", - "Evaluated = 73 % Time Left = 0.180439 s of 0.668316 s Par no = 97912 Density = 1.775965e-01 \n", - "Evaluated = 74 % Time Left = 0.173617 s of 0.667784 s Par no = 87879 Density = 7.451770e-02 \n", - "Evaluated = 75 % Time Left = 0.166961 s of 0.667869 s Par no = 85159 Density = 1.462781e-02 \n", - "Evaluated = 76 % Time Left = 0.160378 s of 0.668271 s Par no = 78132 Density = 5.302111e-02 \n", - "Evaluated = 77 % Time Left = 0.153640 s of 0.668029 s Par no = 21990 Density = 3.497640e-03 \n", - "Evaluated = 78 % Time Left = 0.146645 s of 0.666600 s Par no = 16462 Density = 2.482335e-02 \n", - "Evaluated = 79 % Time Left = 0.139919 s of 0.666314 s Par no = 22311 Density = 3.571433e-02 \n", - "Evaluated = 80 % Time Left = 0.133088 s of 0.665473 s Par no = 43269 Density = 1.776266e-02 \n", - "Evaluated = 81 % Time Left = 0.126557 s of 0.666127 s Par no = 43142 Density = 1.532303e-02 \n", - "Evaluated = 82 % Time Left = 0.119841 s of 0.665818 s Par no = 52197 Density = 3.049044e-02 \n", - "Evaluated = 83 % Time Left = 0.113016 s of 0.664841 s Par no = 74476 Density = 1.449572e-01 \n", - "Evaluated = 84 % Time Left = 0.106371 s of 0.664862 s Par no = 8891 Density = 1.050831e-02 \n", - "Evaluated = 85 % Time Left = 0.099763 s of 0.665134 s Par no = 1559 Density = 1.452041e-03 \n", - "Evaluated = 86 % Time Left = 0.093057 s of 0.664742 s Par no = 20602 Density = 2.028736e-01 \n", - "Evaluated = 87 % Time Left = 0.086542 s of 0.665761 s Par no = 54383 Density = 2.137116e-01 \n", - "Evaluated = 88 % Time Left = 0.080118 s of 0.667705 s Par no = 70246 Density = 2.757094e-03 \n", - "Evaluated = 89 % Time Left = 0.073544 s of 0.668643 s Par no = 51472 Density = 5.058417e-04 \n", - "Evaluated = 90 % Time Left = 0.066893 s of 0.668994 s Par no = 66269 Density = 3.630538e-02 \n", - "Evaluated = 91 % Time Left = 0.060323 s of 0.670326 s Par no = 62858 Density = 1.776032e-01 \n", - "Evaluated = 92 % Time Left = 0.053737 s of 0.671796 s Par no = 84061 Density = 1.439860e-01 \n", - "Evaluated = 93 % Time Left = 0.047102 s of 0.672985 s Par no = 78610 Density = 4.029671e-03 \n", - "Evaluated = 94 % Time Left = 0.040401 s of 0.673457 s Par no = 3871 Density = 1.597447e-01 \n", - "Evaluated = 95 % Time Left = 0.033718 s of 0.674504 s Par no = 68736 Density = 1.582606e-01 \n", - "Evaluated = 96 % Time Left = 0.027035 s of 0.676036 s Par no = 30472 Density = 6.743146e-02 \n", - "Evaluated = 97 % Time Left = 0.020272 s of 0.675956 s Par no = 86838 Density = 1.353215e-03 \n", - "Evaluated = 98 % Time Left = 0.013518 s of 0.676245 s Par no = 92913 Density = 5.211164e-02 \n", - "Evaluated = 99 % Time Left = 0.006771 s of 0.677746 s Par no = 30015 Density = 9.179293e-04 \n", - "Evaluated = 100 % Time Left = -0.000007 s of 0.679011 s Par no = 86525 Density = 1.579017e-04 \n", - "\n", - "Total Smoothing Time = 0.679053 s\n", - "1 3\n", - "\n", - "writing snapshot file ....\n", - "to_enbid_d3n64.est\n", - "done with snapshot.\n", - "\n", - "Total Time = 0.948418 s \n", - "\n", - "Dimensions = 3\n", - "Normalization constant of Kernel type 3: 0.596831\n", - "Reading ASCII format file: to_enbid \n", - "Read 300000 records\n", - "Allocated 3.8147 MByte for particle storage.\n", - "Type = 1 Particles = 100000\n", - "Total particles = 100000\n", - "Allocated 22.1252 MByte for Binary-Tree and Entropy bins.\n", - "\n", - "Scaling Co-ordinates as x[i]=x[i]/h[i] with h[i]->\n", - "1 1 1 \n", - "\n", - "Starting to Build Tree .......\n", - "Particle Type = 1 First node number = 1\n", - " Last node number = 199999\n", - "Total number of nodes = 199999\n", - "Treebuild time = 0.089948 s \n", - "\n", - "Density Calculation. Smoothing .....\n", - "Evaluated = 1 % Time Left = 0.632901 s of 0.639300 s Par no = 3379 Density = 1.586355e-02 \n", - "Evaluated = 2 % Time Left = 0.618080 s of 0.630700 s Par no = 75725 Density = 4.756318e-02 \n", - "Evaluated = 3 % Time Left = 0.629136 s of 0.648600 s Par no = 95160 Density = 6.928094e-03 \n", - "Evaluated = 4 % Time Left = 0.613698 s of 0.639275 s Par no = 40983 Density = 2.235913e-02 \n", - "Evaluated = 5 % Time Left = 0.619089 s of 0.651680 s Par no = 79587 Density = 2.321367e-02 \n", - "Evaluated = 6 % Time Left = 0.620879 s of 0.660517 s Par no = 62143 Density = 2.106817e-02 \n", - "Evaluated = 7 % Time Left = 0.626548 s of 0.673714 s Par no = 48098 Density = 2.322558e-02 \n", - "Evaluated = 8 % Time Left = 0.640428 s of 0.696125 s Par no = 73424 Density = 1.566558e-02 \n", - "Evaluated = 9 % Time Left = 0.636659 s of 0.699633 s Par no = 41738 Density = 1.527213e-02 \n", - "Evaluated = 10 % Time Left = 0.633332 s of 0.703710 s Par no = 34821 Density = 3.462068e-02 \n", - "Evaluated = 11 % Time Left = 0.628713 s of 0.706427 s Par no = 99566 Density = 5.806166e-02 \n", - "Evaluated = 12 % Time Left = 0.618237 s of 0.702550 s Par no = 59443 Density = 1.071450e-02 \n", - "Evaluated = 13 % Time Left = 0.603720 s of 0.693938 s Par no = 7663 Density = 2.551241e-03 \n", - "Evaluated = 14 % Time Left = 0.600537 s of 0.698307 s Par no = 69540 Density = 2.717031e-02 \n", - "Evaluated = 15 % Time Left = 0.588879 s of 0.692807 s Par no = 28859 Density = 1.270313e-02 \n", - "Evaluated = 16 % Time Left = 0.577997 s of 0.688100 s Par no = 77774 Density = 2.211896e-02 \n", - "Evaluated = 17 % Time Left = 0.570364 s of 0.687194 s Par no = 65109 Density = 3.644557e-03 \n", - "Evaluated = 18 % Time Left = 0.562550 s of 0.686044 s Par no = 17146 Density = 6.157029e-03 \n", - "Evaluated = 19 % Time Left = 0.559921 s of 0.691268 s Par no = 79145 Density = 2.474514e-02 \n", - "Evaluated = 20 % Time Left = 0.552257 s of 0.690330 s Par no = 84563 Density = 3.054690e-02 \n", - "Evaluated = 21 % Time Left = 0.546128 s of 0.691310 s Par no = 35101 Density = 3.370794e-02 \n", - "Evaluated = 22 % Time Left = 0.539803 s of 0.692064 s Par no = 31911 Density = 1.401559e-03 \n", - "Evaluated = 23 % Time Left = 0.531902 s of 0.690791 s Par no = 96514 Density = 1.869493e-02 \n", - "Evaluated = 24 % Time Left = 0.524646 s of 0.690333 s Par no = 41208 Density = 4.063115e-02 \n", - "Evaluated = 25 % Time Left = 0.518180 s of 0.690916 s Par no = 50899 Density = 1.130457e-03 \n", - "Evaluated = 26 % Time Left = 0.509079 s of 0.687954 s Par no = 25354 Density = 2.573581e-02 \n", - "Evaluated = 27 % Time Left = 0.504523 s of 0.691137 s Par no = 38397 Density = 1.824381e-02 \n", - "Evaluated = 28 % Time Left = 0.501306 s of 0.696268 s Par no = 99925 Density = 5.098959e-02 \n", - "Evaluated = 29 % Time Left = 0.496604 s of 0.699452 s Par no = 67233 Density = 3.835663e-02 \n", - "Evaluated = 30 % Time Left = 0.490723 s of 0.701043 s Par no = 21415 Density = 1.821073e-02 \n", - "Evaluated = 31 % Time Left = 0.481704 s of 0.698132 s Par no = 39830 Density = 5.986182e-03 \n", - "Evaluated = 32 % Time Left = 0.472995 s of 0.695591 s Par no = 62656 Density = 1.851001e-03 \n", - "Evaluated = 33 % Time Left = 0.467537 s of 0.697827 s Par no = 48049 Density = 1.832368e-02 \n", - "Evaluated = 34 % Time Left = 0.460628 s of 0.697932 s Par no = 71467 Density = 3.566542e-02 \n", - "Evaluated = 35 % Time Left = 0.453660 s of 0.697949 s Par no = 94467 Density = 8.080336e-03 \n", - "Evaluated = 36 % Time Left = 0.444653 s of 0.694781 s Par no = 24663 Density = 3.556317e-02 \n", - "Evaluated = 37 % Time Left = 0.436702 s of 0.693189 s Par no = 55355 Density = 2.436876e-02 \n", - "Evaluated = 38 % Time Left = 0.430921 s of 0.695045 s Par no = 77628 Density = 3.192216e-02 \n", - "Evaluated = 39 % Time Left = 0.424467 s of 0.695859 s Par no = 6428 Density = 3.955819e-02 \n", - "Evaluated = 40 % Time Left = 0.417839 s of 0.696410 s Par no = 29219 Density = 3.686058e-04 \n", - "Evaluated = 41 % Time Left = 0.410806 s of 0.696293 s Par no = 11475 Density = 1.075123e-02 \n", - "Evaluated = 42 % Time Left = 0.405459 s of 0.699079 s Par no = 25064 Density = 3.927625e-02 \n", - "Evaluated = 43 % Time Left = 0.398023 s of 0.698298 s Par no = 14672 Density = 1.066700e-02 \n", - "Evaluated = 44 % Time Left = 0.389843 s of 0.696161 s Par no = 46917 Density = 2.114632e-02 \n", - "Evaluated = 45 % Time Left = 0.381940 s of 0.694449 s Par no = 35522 Density = 9.714152e-03 \n", - "Evaluated = 46 % Time Left = 0.374895 s of 0.694263 s Par no = 10564 Density = 2.478037e-03 \n", - "Evaluated = 47 % Time Left = 0.368288 s of 0.694896 s Par no = 90836 Density = 3.490644e-02 \n", - "Evaluated = 48 % Time Left = 0.361128 s of 0.694490 s Par no = 91231 Density = 8.647470e-03 \n", - "Evaluated = 49 % Time Left = 0.354368 s of 0.694853 s Par no = 16819 Density = 9.508128e-03 \n", - "Evaluated = 50 % Time Left = 0.346226 s of 0.692466 s Par no = 30766 Density = 4.927925e-03 \n", - "Evaluated = 51 % Time Left = 0.339114 s of 0.692084 s Par no = 9459 Density = 7.940474e-03 \n", - "Evaluated = 52 % Time Left = 0.331468 s of 0.690573 s Par no = 76505 Density = 8.072357e-03 \n", - "Evaluated = 53 % Time Left = 0.323793 s of 0.688936 s Par no = 52019 Density = 3.462384e-03 \n", - "Evaluated = 54 % Time Left = 0.317117 s of 0.689400 s Par no = 56938 Density = 1.337130e-02 \n", - "Evaluated = 55 % Time Left = 0.309353 s of 0.687465 s Par no = 33321 Density = 2.006831e-02 \n", - "Evaluated = 56 % Time Left = 0.302223 s of 0.686886 s Par no = 4046 Density = 2.271462e-02 \n", - "Evaluated = 57 % Time Left = 0.295626 s of 0.687518 s Par no = 68529 Density = 3.147267e-02 \n", - "Evaluated = 58 % Time Left = 0.290047 s of 0.690603 s Par no = 23845 Density = 3.357711e-02 \n", - "Evaluated = 59 % Time Left = 0.283626 s of 0.691788 s Par no = 57420 Density = 3.986824e-02 \n", - "Evaluated = 60 % Time Left = 0.276589 s of 0.691490 s Par no = 89896 Density = 3.369184e-03 \n", - "Evaluated = 61 % Time Left = 0.269347 s of 0.690651 s Par no = 39610 Density = 1.535303e-03 \n", - "Evaluated = 62 % Time Left = 0.261843 s of 0.689077 s Par no = 26107 Density = 4.015531e-03 \n", - "Evaluated = 63 % Time Left = 0.255427 s of 0.690362 s Par no = 98943 Density = 1.799383e-03 \n", - "Evaluated = 64 % Time Left = 0.248246 s of 0.689591 s Par no = 99085 Density = 1.412552e-02 \n", - "Evaluated = 65 % Time Left = 0.241601 s of 0.690308 s Par no = 17 Density = 1.179374e-02 \n", - "Evaluated = 66 % Time Left = 0.234212 s of 0.688880 s Par no = 3087 Density = 1.429490e-02 \n", - "Evaluated = 67 % Time Left = 0.227811 s of 0.690358 s Par no = 86468 Density = 2.256122e-02 \n", - "Evaluated = 68 % Time Left = 0.220711 s of 0.689744 s Par no = 52080 Density = 4.635496e-03 \n", - "Evaluated = 69 % Time Left = 0.213353 s of 0.688258 s Par no = 26417 Density = 1.433998e-02 \n", - "Evaluated = 70 % Time Left = 0.206625 s of 0.688773 s Par no = 79634 Density = 7.429455e-03 \n", - "Evaluated = 71 % Time Left = 0.200057 s of 0.689875 s Par no = 97643 Density = 2.184667e-04 \n", - "Evaluated = 72 % Time Left = 0.193911 s of 0.692564 s Par no = 78794 Density = 5.369597e-03 \n", - "Evaluated = 73 % Time Left = 0.186578 s of 0.691055 s Par no = 45708 Density = 1.294337e-02 \n", - "Evaluated = 74 % Time Left = 0.179391 s of 0.689991 s Par no = 66525 Density = 2.125199e-03 \n", - "Evaluated = 75 % Time Left = 0.172306 s of 0.689253 s Par no = 21984 Density = 8.619656e-04 \n", - "Evaluated = 76 % Time Left = 0.165276 s of 0.688678 s Par no = 43799 Density = 2.740287e-03 \n", - "Evaluated = 77 % Time Left = 0.158029 s of 0.687113 s Par no = 63854 Density = 3.854666e-03 \n", - "Evaluated = 78 % Time Left = 0.150915 s of 0.686010 s Par no = 91160 Density = 2.256671e-03 \n", - "Evaluated = 79 % Time Left = 0.143910 s of 0.685318 s Par no = 1891 Density = 1.555007e-04 \n", - "Evaluated = 80 % Time Left = 0.137057 s of 0.685321 s Par no = 17306 Density = 9.342229e-04 \n", - "Evaluated = 81 % Time Left = 0.130219 s of 0.685399 s Par no = 83119 Density = 2.469887e-02 \n", - "Evaluated = 82 % Time Left = 0.123395 s of 0.685565 s Par no = 73346 Density = 1.956386e-03 \n", - "Evaluated = 83 % Time Left = 0.116338 s of 0.684383 s Par no = 98412 Density = 4.288589e-03 \n", - "Evaluated = 84 % Time Left = 0.109608 s of 0.685095 s Par no = 52509 Density = 8.264861e-03 \n", - "Evaluated = 85 % Time Left = 0.102951 s of 0.686385 s Par no = 76716 Density = 3.547589e-02 \n", - "Evaluated = 86 % Time Left = 0.096300 s of 0.687905 s Par no = 95957 Density = 2.923765e-02 \n", - "Evaluated = 87 % Time Left = 0.089411 s of 0.687830 s Par no = 3295 Density = 1.361911e-02 \n", - "Evaluated = 88 % Time Left = 0.082562 s of 0.688074 s Par no = 4026 Density = 3.781492e-02 \n", - "Evaluated = 89 % Time Left = 0.075762 s of 0.688812 s Par no = 78656 Density = 6.492403e-02 \n", - "Evaluated = 90 % Time Left = 0.069022 s of 0.690293 s Par no = 9255 Density = 4.661644e-02 \n", - "Evaluated = 91 % Time Left = 0.062205 s of 0.691238 s Par no = 89389 Density = 2.612382e-03 \n", - "Evaluated = 92 % Time Left = 0.055205 s of 0.690143 s Par no = 91357 Density = 1.136847e-02 \n", - "Evaluated = 93 % Time Left = 0.048362 s of 0.690988 s Par no = 75212 Density = 1.186542e-02 \n", - "Evaluated = 94 % Time Left = 0.041550 s of 0.692622 s Par no = 79246 Density = 4.605766e-02 \n", - "Evaluated = 95 % Time Left = 0.034671 s of 0.693556 s Par no = 93038 Density = 2.164084e-02 \n", - "Evaluated = 96 % Time Left = 0.027734 s of 0.693532 s Par no = 65384 Density = 2.308048e-02 \n", - "Evaluated = 97 % Time Left = 0.020774 s of 0.692684 s Par no = 32352 Density = 1.225704e-03 \n", - "Evaluated = 98 % Time Left = 0.013860 s of 0.693363 s Par no = 16971 Density = 3.436725e-02 \n", - "Evaluated = 99 % Time Left = 0.006934 s of 0.694066 s Par no = 22517 Density = 2.430708e-02 \n", - "Evaluated = 100 % Time Left = -0.000007 s of 0.695291 s Par no = 42877 Density = 2.940733e-06 \n", - "\n", - "Total Smoothing Time = 0.695326 s\n", - "1 3\n", - "\n", - "writing snapshot file ....\n", - "to_enbid_d3n64.est\n", - "done with snapshot.\n", - "\n", - "Total Time = 0.968987 s \n", - "\n", - "/home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/bin/galaxia -r --hdim=6 --nfile=sim /home/athob/Software/repos/py-ananke/jupyter/survey_params\n", - "CODEDATAPATH=/home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/GalaxiaData/\n", - "Reading Parameter file- /home/athob/Software/repos/py-ananke/jupyter/survey_params\n", - "--------------------------------------------------------\n", - "outputFile survey \n", - "outputDir /home/athob/Software/repos/py-ananke/jupyter\n", - "photoCateg padova \n", - "photoSys GAIADR2 \n", - "magcolorNames Gmag,G_BPmag-G_RPmag \n", - "appMagLimits[0] -1000 \n", - "appMagLimits[1] 30 \n", - "absMagLimits[0] -1000 \n", - "absMagLimits[1] 1000 \n", - "colorLimits[0] -1000 \n", - "colorLimits[1] 1000 \n", - "geometryOption 0 \n", - "surveyArea 207.455 \n", - "fSample 0.01 \n", - "popID 10 \n", - "warpFlareOn 0 \n", - "longitude 76.273 \n", - "latitude 13.4725 \n", - "starType 0 \n", - "photoError 0 \n", - "seed 17052 \n", - "r_max 400 \n", - "r_min 0 \n", - "nres 64 \n", - "nstart 0 \n", - "rSun[0] 194.95682580382552 \n", - "rSun[1] -34.20370085093144 \n", - "rSun[2] 28.669546919977957 \n", - "vSun[0] 0.0 \n", - "vSun[1] 0.0 \n", - "vSun[2] 0.0 \n", - "--------------------------------------------------------\n", - "Reading Halo Sat File=/home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/GalaxiaData/nbody1/filenames/sim.txt\n", - "Halo 1 Sat 0 fname nbody1/sim/sim.ebf 0\n", - "nbody1/sim/sim.ebf 0\n", - "No of Satellites =1\n", - "Generating catalog. Max allowed stars is 18446744073709551615\n", - "Source numbering will start at 0\n", - "Writing to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.ebf\n", - "Using geometry: All Sky\n", - "setting center to 194.957 -34.2037 28.6695 0 0 0\n", - "Reading Isochrones from dir- /home/athob/miniconda3/envs/main/.cache/Galaxia_ananke/GalaxiaData/Isochrones/padova/GAIADR2\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "nbody1/sim/\n", - "\n", - "\t1\t1\n", - "\n", - "path nbody1/sim/ sats 1 x[0] 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Isochrone Grid Size: (Age bins=71,Feh bins=34,Alpha bins=1)\n", - "Time Isochrone Reading 1.78174 \n", - "------------------------------\n", - "nbody1/sim/sim.ebf Sat No=0\n", - "Particles=100000\n", - "Satellite Info\n", - "Particles=100000 Mass=5.49989e+08 0.379706\n", - "Total Stars=2280137 accepted=1614163 rejected=665974\n", - "-----------Done---------------\n", - "Total stars written 1614163 \n", - "30\n", - "File written- /home/athob/Software/repos/py-ananke/jupyter/survey.sim.ebf\n", - "Calculating magnitudes in GAIADR2 system................\n", - "initializing isochrone data\n", - "interpolating on isochrone tables\n", - "Appending spherical coordinates................\n", - "Total Time= 4.15359 \n", - "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "['age', 'alpha', 'calcium', 'carbon', 'dec', 'dform', 'dmod', 'feh', 'gaiadr2_g_bpmag', 'gaiadr2_g_rpmag', 'gaiadr2_gmag', 'glat', 'glon', 'grav', 'helium', 'lum', 'mact', 'magnesium', 'mtip', 'neon', 'nitrogen', 'oxygen', 'parentid', 'partid', 'px', 'py', 'pz', 'ra', 'rad', 'satid', 'silicon', 'smass', 'sulphur', 'teff', 'vx', 'vy', 'vz']\n", - "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "['mul', 'mub', 'vr']\n", - "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "('glon', 'glat', 'rad')\n", - "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "['mura', 'mudec']\n", - "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "('ra', 'dec')\n", - "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "['pi']\n", - "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "('grav', 'lum')\n", - "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "['gaiadr2_gmag_Intrinsic', 'gaiadr2_g_rpmag_Intrinsic', 'gaiadr2_g_bpmag_Intrinsic']\n", - "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "('gaiadr2_gmag', 'gaiadr2_g_bpmag', 'gaiadr2_g_rpmag')\n", - "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "['A_0', 'log10_NH', 'A_gaiadr2_gmag', 'A_gaiadr2_g_rpmag', 'A_gaiadr2_g_bpmag', 'E(B-V)']\n", - "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "('gaiadr2_gmag', 'gaiadr2_g_bpmag', 'gaiadr2_g_rpmag')\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/_default_error_model.py:37: RuntimeWarning: overflow encountered in square\n", - " grvs = rpmag + 132.32 - 377.28*ggrp + 402.32*ggrp**2 - 190.97*ggrp**3 + 34.026*ggrp**4\n", - "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/_default_error_model.py:37: RuntimeWarning: overflow encountered in multiply\n", - " grvs = rpmag + 132.32 - 377.28*ggrp + 402.32*ggrp**2 - 190.97*ggrp**3 + 34.026*ggrp**4\n", - "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/_default_error_model.py:37: RuntimeWarning: overflow encountered in power\n", - " grvs = rpmag + 132.32 - 377.28*ggrp + 402.32*ggrp**2 - 190.97*ggrp**3 + 34.026*ggrp**4\n", - "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/_default_error_model.py:37: RuntimeWarning: invalid value encountered in subtract\n", - " grvs = rpmag + 132.32 - 377.28*ggrp + 402.32*ggrp**2 - 190.97*ggrp**3 + 34.026*ggrp**4\n", - "/home/athob/miniconda3/envs/main/lib/python3.10/site-packages/ananke/_default_error_model.py:37: RuntimeWarning: invalid value encountered in add\n", - " grvs = rpmag + 132.32 - 377.28*ggrp + 402.32*ggrp**2 - 190.97*ggrp**3 + 34.026*ggrp**4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Exported the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "['gaiadr2_g_rpmag_Sig', 'gaiadr2_gmag_Sig', 'pi_Err', 'dec_Sig', 'mura_Err', 'gaiadr2_g_bpmag_Err', 'mura_Sig', 'mudec_Sig', 'mudec_Err', 'ra_Sig', 'gaiadr2_g_rpmag_Err', 'gaiadr2_g_bpmag_Sig', 'pi_Sig', 'dec_Err', 'vr_Sig', 'gaiadr2_gmag_Err', 'vr_Err', 'ra_Err']\n", - "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "('gaiadr2_gmag', 'gaiadr2_g_rpmag', 'gaiadr2_g_bpmag', 'pi', 'ra', 'dec', 'mura', 'mudec', 'vr')\n", - "Overwritten the following quantities to /home/athob/Software/repos/py-ananke/jupyter/survey.sim.h5\n", - "('glon', 'glat', 'mul', 'mub')\n" - ] - } - ], - "source": [ - "survey = ananke.run()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "1664586c", - "metadata": {}, - "source": [ - "The output is saved as a `vaex` dataframe, with its columns organized in alphabetical order. These notably include:\n", - "- key `A_0` for the reference extinction which extinction coefficients are based on (at $\\lambda = 550 \\, nm$ in the case of Gaia DR2)\n", - "- key `A_{filter_name}` for the extinction value in each filter designated by `filter_name` (in this case, where `filter_name` is one of the 3 Gaia bands `gaia_g_bpmag`, `gaia_g_rpmag` \\& `gaia_gmag`)\n", - "- key `E(B-V)` for the reddening index\n", - "- key `age` for the log10 stellar age in years\n", - "- key `alpha`, `calcium`, `carbon`, `helium`, `magnesium`, `neon`, `nitrogen`, `oxygen`, `silicon`, `sulphur` for the various chemical abundances as given as input\n", - "- key `dec`, `ra` for the astrometric declination and right ascension celestial coordinates in degrees\n", - "- key `dform` for the formation distance as given as input\n", - "- key `dmod` for the distance modulus\n", - "- key `feh` for the stellar metallicity \\[Fe/H\\] in dex relative to solar\n", - "- key `glat`, `glon` for the astrometric galactic latitude and longitude celestrial coordinates in degrees\n", - "- key `grav` for the log10 surface gravity in CGS units\n", - "- key `log10_NH` for the log10 hydrogen column density between Observer position and star in $cm^{-2}$\n", - "- key `lum` for the stellar luminosity in solar luminosities\n", - "- key `mact`, `mtip`, `mini` for respectively the current stellar mass, the mass of that same star at tip of giant branch for its given age \\& metallicity and its stellar mass on zero-age main sequence, all in solar masses\n", - "- key `mub`, `mudec`, `mul`, `mura` for the astrometric proper motions, respectively in the direction of the galactic latitude, declination, galactic longitude and right ascension, all in milliarcseconds per year\n", - "- key `parentid` for the parent particle index as given as input\n", - "- key `partid` for the flag that identifies stars that are *not* central relatively to their parent particle\n", - "- key `pi` for the star parallax in milliarcseconds\n", - "- key `px`, `py`, `pz` for the star position cartesian coordinates in $kpc$ relative to the Observer's position\n", - "- key `rad` for the star distance to the Observer in $kpc$\n", - "- key `teff` for the star effective temperature in Kelvin\n", - "- key `vr` for the star astrometric radial velocity in $km.s^{-1}$\n", - "- key `vx`, `vy`, `vz` for the star velocity cartesian coordinates in $km.s^{-1}$ relative to the Observer's velocity\n", - "\n", - "Additionally, astrometric and photometric quantities `X` all have associated columns identified as:\n", - "- key `X_Sig` for the standard error on the quantity `X`\n", - "- key `X_Err` for the actual drawn gaussian error on the quantity `X`" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "42e393f6", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
# A_0 A_gaiadr2_g_bpmag A_gaiadr2_g_rpmag A_gaiadr2_gmag E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaiadr2_g_bpmag gaiadr2_g_bpmag_Err gaiadr2_g_bpmag_Intrinsic gaiadr2_g_bpmag_Sig gaiadr2_g_rpmag gaiadr2_g_rpmag_Err gaiadr2_g_rpmag_Intrinsic gaiadr2_g_rpmag_Sig gaiadr2_gmag gaiadr2_gmag_Err gaiadr2_gmag_Intrinsic gaiadr2_gmag_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz
0 0.70939701296666650.7125676091560126 0.4070167834122857 0.5278885380814727 0.2288377461182795 10.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.87123488088669 -0.8867433071136475nan nan 8.22037 nan nan nan 6.875088 nan nan nan 7.6075797 nan nan nan 56622.53 -0.7315406799316406 21.7574676703088660.08502915 0.52380776-0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 0 nan nan nan -142.0352559796067746.20841677042607 0.692591828190988 nan nan nan 149.364357880527480 -0.75635123252868650.5240775107307198 -1.09243309497833253.643452 nan nan nan 80.28685760498047 -54.7354850769043 62.91861343383789
1 0.39135261514935490.3932110342103401 0.224569255687789760.291449450794676550.1262427790804370510.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.87527071994942 -0.8867433071136475nan nan 8.465081 nan nan nan 7.0564466 nan nan nan 7.8151436 nan nan nan 58595.043-0.7315406799316406 21.4991465551046660.07226164 0.507031 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 nan nan nan -142.2608617629229 46.417971376138425-0.11534282804241303nan nan nan 149.642220513374670 -0.75635123252868650.5073366488986605 -1.09243309497833253.6330101nan nan nan 80.6484200428451 -52.69957314526562460.47162146715175
2 7.392986027528272 6.739848191949818 3.857969371581923 4.395135897711333 2.3848342024284745 10.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.888157433594138-0.8867433071136475nan nan 9.277008 nan nan nan 7.679845 nan nan nan 8.512117 nan nan nan 68168.14 -0.7315406799316406 22.7753982002354580.0408450140.44261116-0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 nan nan nan -142.9270461828407 47.20842184009032 1.8396875936103703 nan nan nan 150.5329202321734 0 -0.75635123252868650.4436048636953867 -1.09243309497833253.6021755nan nan nan 80.93093236871236 -55.87588068392333 63.872006273574485
3 3.61298885133904163.4033181539962825 1.9506143576453838 2.2818297625233486 1.1654802746254973 10.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.867217518655195-0.8867433071136475nan nan 9.901029 nan nan nan 8.152237 nan nan nan 9.037168 nan nan nan 77695.805-0.7315406799316406 22.46444493629801 0.0273405150.39295405-0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 nan nan nan -141.293458764168 47.56378569643568 1.0770165239203284 nan nan nan 149.0882797670927 0 -0.75635123252868650.39350367992526536-1.09243309497833253.585968 nan nan nan 82.02724120992328 -56.13920387771556 62.8829961513569
4 0.70147951758136 0.748366510460972 0.414951953985677250.5867886042288628 0.2262837153488258 10.0163259506225590.3380742371082306-1.1830222606658936-0.39430123567581177nan nan nan 0.0 20.86868071849355 -0.8867433071136475nan nan 5.201803 nan nan nan 4.5038996 nan nan nan 4.9383516 nan nan nan 30338.236-0.7315406799316406 21.7525933094733370.8118422 0.7637918 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096-0.652482807636261-0.66972786188125610 1 nan nan nan -141.8805554620097746.1152954631301 0.7600375956495637 nan nan nan 149.188773542136940 -0.75635123252868650.7644402589837288 -1.09243309497833253.779468 nan nan nan 80.28594209547329 -55.00206910551165 60.35710077567975
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1,614,15814.06004451220272212.868806573414634 7.057230806575605 8.423013661152801 4.535498229742814 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.61548082188761 -0.8060703873634338nan nan 5.553659 nan nan nan 4.7985764 nan nan nan 5.2621174 nan nan nan 35559.12 -0.0512677356600761423.0545650104414430.59976685 0.74945873-0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 nan nan nan -186.4785170051024597.15110580779618 8.11585399110565 nan nan nan 210.424432398200450 -1.247308373451233 0.7500223134586655 -0.99559468030929573.7660573nan nan nan 28.24216202332554880.45802370901552 -14.975214012762681
1,614,15911.0639231289692439.91050274374604 5.5781547672436895 6.45510528739357 3.5690074609578204 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.61577240657062 -0.8060703873634338nan nan 8.61342 nan nan nan 7.150438 nan nan nan 7.930956 nan nan nan 58586.617-0.0512677356600761422.9504874645149 0.06644254 0.5040816 -0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 nan nan nan -186.1230486764739 97.82701074897133 8.855589130749117 nan nan nan 210.4526900268967 0 -1.247308373451233 0.504675216060176 -0.99559468030929573.6246061nan nan nan 27.32033083906799281.30540302388515 -15.836660505121856
1,614,1602.62021510950831572.682412465734748 1.5085576559312066 1.9979343957376579 0.8452306804865534 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.60797143158025 -0.8060703873634338nan nan 5.727753 nan nan nan 4.9413347 nan nan nan 5.420544 nan nan nan 37539.883-0.0512677356600761422.32491526151538 0.51845455 0.7332436 -0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 nan nan nan -185.4155407018891797.54207904767259 8.937050140256147 nan nan nan 209.697998998382870 -1.247308373451233 0.7337202617485947 -0.99559468030929573.7585597nan nan nan 28.11590633817279 82.4289613003954 -16.50579831154242
1,614,16120.11053022532025 18.55864938118823 9.438526458834994 12.915669131356063 6.487267814619435 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.62280870754291 -0.8060703873634338nan nan 4.2347775 nan nan nan 3.6183882 nan nan nan 4.007981 nan nan nan 17641.299-0.0512677356600761423.2100018360011441.9032125 0.86141604-0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 nan nan nan -187.148672847189 97.44088694333617 7.677616529567157 nan nan nan 211.1357335752129 0 -1.247308373451233 0.8632034883204436 -0.99559468030929573.8003426nan nan nan 27.05434945544597 82.01953176748317 -14.847410387297346
1,614,1626.453998533061608 6.058586091870591 3.4826187148728667 4.090151594340529 2.0819350106650347 9.99021053314209 0.7036365270614624-0.89319157600402830.053123194724321365nan nan nan 0.0 21.61092186109904 -0.8060703873634338nan nan 0.14156544 nan nan nan -1.0621885 nan nan nan -0.38972253 nan nan nan 81.57164 -0.0512677356600761422.71640717719426 126.867645 0.918 -0.102433867752552030.92552537nan nan nan nan nan nan nan nan -0.56209683418273930.0669776126742363-1.214622616767883399999 1 nan nan nan -185.7446220327249 97.5570866189969 8.628931734904032 nan nan nan 209.983114146237770 -1.247308373451233 0.9262041245678233 -0.99559468030929573.6653404nan nan nan 27.35493020947136 82.0069568269455 -16.55336224599178
" - ], - "text/plain": [ - "# A_0 A_gaiadr2_g_bpmag A_gaiadr2_g_rpmag A_gaiadr2_gmag E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaiadr2_g_bpmag gaiadr2_g_bpmag_Err gaiadr2_g_bpmag_Intrinsic gaiadr2_g_bpmag_Sig gaiadr2_g_rpmag gaiadr2_g_rpmag_Err gaiadr2_g_rpmag_Intrinsic gaiadr2_g_rpmag_Sig gaiadr2_gmag gaiadr2_gmag_Err gaiadr2_gmag_Intrinsic gaiadr2_gmag_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz\n", - "0 0.7093970129666665 0.7125676091560126 0.4070167834122857 0.5278885380814727 0.2288377461182795 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.87123488088669 -0.8867433071136475 nan nan 8.22037 nan nan nan 6.875088 nan nan nan 7.6075797 nan nan nan 56622.53 -0.7315406799316406 21.757467670308866 0.08502915 0.52380776 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 0 nan nan nan -142.03525597960677 46.20841677042607 0.692591828190988 nan nan nan 149.36435788052748 0 -0.7563512325286865 0.5240775107307198 -1.0924330949783325 3.643452 nan nan nan 80.28685760498047 -54.7354850769043 62.91861343383789\n", - "1 0.3913526151493549 0.3932110342103401 0.22456925568778976 0.29144945079467655 0.12624277908043705 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.87527071994942 -0.8867433071136475 nan nan 8.465081 nan nan nan 7.0564466 nan nan nan 7.8151436 nan nan nan 58595.043 -0.7315406799316406 21.499146555104666 0.07226164 0.507031 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 nan nan nan -142.2608617629229 46.417971376138425 -0.11534282804241303 nan nan nan 149.64222051337467 0 -0.7563512325286865 0.5073366488986605 -1.0924330949783325 3.6330101 nan nan nan 80.6484200428451 -52.699573145265624 60.47162146715175\n", - "2 7.392986027528272 6.739848191949818 3.857969371581923 4.395135897711333 2.3848342024284745 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.888157433594138 -0.8867433071136475 nan nan 9.277008 nan nan nan 7.679845 nan nan nan 8.512117 nan nan nan 68168.14 -0.7315406799316406 22.775398200235458 0.040845014 0.44261116 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 nan nan nan -142.9270461828407 47.20842184009032 1.8396875936103703 nan nan nan 150.5329202321734 0 -0.7563512325286865 0.4436048636953867 -1.0924330949783325 3.6021755 nan nan nan 80.93093236871236 -55.87588068392333 63.872006273574485\n", - "3 3.6129888513390416 3.4033181539962825 1.9506143576453838 2.2818297625233486 1.1654802746254973 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.867217518655195 -0.8867433071136475 nan nan 9.901029 nan nan nan 8.152237 nan nan nan 9.037168 nan nan nan 77695.805 -0.7315406799316406 22.46444493629801 0.027340515 0.39295405 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 nan nan nan -141.293458764168 47.56378569643568 1.0770165239203284 nan nan nan 149.0882797670927 0 -0.7563512325286865 0.39350367992526536 -1.0924330949783325 3.585968 nan nan nan 82.02724120992328 -56.13920387771556 62.8829961513569\n", - "4 0.70147951758136 0.748366510460972 0.41495195398567725 0.5867886042288628 0.2262837153488258 10.016325950622559 0.3380742371082306 -1.1830222606658936 -0.39430123567581177 nan nan nan 0.0 20.86868071849355 -0.8867433071136475 nan nan 5.201803 nan nan nan 4.5038996 nan nan nan 4.9383516 nan nan nan 30338.236 -0.7315406799316406 21.752593309473337 0.8118422 0.7637918 -0.5486690402030945 0.886202 nan nan nan nan nan nan nan nan -0.7326117157936096 -0.652482807636261 -0.6697278618812561 0 1 nan nan nan -141.88055546200977 46.1152954631301 0.7600375956495637 nan nan nan 149.18877354213694 0 -0.7563512325286865 0.7644402589837288 -1.0924330949783325 3.779468 nan nan nan 80.28594209547329 -55.00206910551165 60.35710077567975\n", - "... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...\n", - "1,614,158 14.060044512202722 12.868806573414634 7.057230806575605 8.423013661152801 4.535498229742814 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.61548082188761 -0.8060703873634338 nan nan 5.553659 nan nan nan 4.7985764 nan nan nan 5.2621174 nan nan nan 35559.12 -0.05126773566007614 23.054565010441443 0.59976685 0.74945873 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 nan nan nan -186.47851700510245 97.15110580779618 8.11585399110565 nan nan nan 210.42443239820045 0 -1.247308373451233 0.7500223134586655 -0.9955946803092957 3.7660573 nan nan nan 28.242162023325548 80.45802370901552 -14.975214012762681\n", - "1,614,159 11.063923128969243 9.91050274374604 5.5781547672436895 6.45510528739357 3.5690074609578204 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.61577240657062 -0.8060703873634338 nan nan 8.61342 nan nan nan 7.150438 nan nan nan 7.930956 nan nan nan 58586.617 -0.05126773566007614 22.9504874645149 0.06644254 0.5040816 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 nan nan nan -186.1230486764739 97.82701074897133 8.855589130749117 nan nan nan 210.4526900268967 0 -1.247308373451233 0.504675216060176 -0.9955946803092957 3.6246061 nan nan nan 27.320330839067992 81.30540302388515 -15.836660505121856\n", - "1,614,160 2.6202151095083157 2.682412465734748 1.5085576559312066 1.9979343957376579 0.8452306804865534 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.60797143158025 -0.8060703873634338 nan nan 5.727753 nan nan nan 4.9413347 nan nan nan 5.420544 nan nan nan 37539.883 -0.05126773566007614 22.32491526151538 0.51845455 0.7332436 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 nan nan nan -185.41554070188917 97.54207904767259 8.937050140256147 nan nan nan 209.69799899838287 0 -1.247308373451233 0.7337202617485947 -0.9955946803092957 3.7585597 nan nan nan 28.11590633817279 82.4289613003954 -16.50579831154242\n", - "1,614,161 20.11053022532025 18.55864938118823 9.438526458834994 12.915669131356063 6.487267814619435 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.62280870754291 -0.8060703873634338 nan nan 4.2347775 nan nan nan 3.6183882 nan nan nan 4.007981 nan nan nan 17641.299 -0.05126773566007614 23.210001836001144 1.9032125 0.86141604 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 nan nan nan -187.148672847189 97.44088694333617 7.677616529567157 nan nan nan 211.1357335752129 0 -1.247308373451233 0.8632034883204436 -0.9955946803092957 3.8003426 nan nan nan 27.05434945544597 82.01953176748317 -14.847410387297346\n", - "1,614,162 6.453998533061608 6.058586091870591 3.4826187148728667 4.090151594340529 2.0819350106650347 9.99021053314209 0.7036365270614624 -0.8931915760040283 0.053123194724321365 nan nan nan 0.0 21.61092186109904 -0.8060703873634338 nan nan 0.14156544 nan nan nan -1.0621885 nan nan nan -0.38972253 nan nan nan 81.57164 -0.05126773566007614 22.71640717719426 126.867645 0.918 -0.10243386775255203 0.92552537 nan nan nan nan nan nan nan nan -0.5620968341827393 0.0669776126742363 -1.2146226167678833 99999 1 nan nan nan -185.7446220327249 97.5570866189969 8.628931734904032 nan nan nan 209.98311414623777 0 -1.247308373451233 0.9262041245678233 -0.9955946803092957 3.6653404 nan nan nan 27.35493020947136 82.0069568269455 -16.55336224599178" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "survey" - ] - }, - { - "cell_type": "markdown", - "id": "a9a28a5d", - "metadata": {}, - "source": [ - "Please refer to [`vaex`'s documentation](https://vaex.io/docs/tutorial.html) for further help on how to use `vaex` dataframes: the following line for example isolate only the rows with non-NaN photometry." - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "09f840d5", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
# A_0 A_gaiadr2_g_bpmag A_gaiadr2_g_rpmag A_gaiadr2_gmag E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaiadr2_g_bpmag gaiadr2_g_bpmag_Err gaiadr2_g_bpmag_Intrinsic gaiadr2_g_bpmag_Sig gaiadr2_g_rpmag gaiadr2_g_rpmag_Err gaiadr2_g_rpmag_Intrinsic gaiadr2_g_rpmag_Sig gaiadr2_gmag gaiadr2_gmag_Err gaiadr2_gmag_Intrinsic gaiadr2_gmag_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz
0 0.05681650709265505 0.05985558882052296 0.0335357793492652640.0467134239185913250.0183279055137596938.97172737121582 -0.6125200986862183 -0.12460324913263321-0.3605270683765411441.517887-4.3651322762456503e-073.7339328e-070.0 20.938860082853388-0.534867227077484120.934616 -0.09105875752639689 0.026959075 0.32711947 20.067745 0.010476073807142064 -0.9150356 0.32711947 20.610794 -0.013108958690914031 -0.36166972 0.014190837 -6.450095 159.08374369.8372 -0.6886086463928223 20.66105284593159 108.469862.1231031 -1.1473873853683472 1.9929105 1.9282719359892686 -0.24990918971905196-0.152088201656149722.1212947 2.3169853631740556 3.004030573793332 3.107170100412025 2.1212947 -0.44875627756118774-1.4166113138198853 -0.40134233236312866138 1 0.0047001384188920066-0.00178961182501974541.3442158 -143.0240526190031654.66209816691588 -17.31002173887193 64.3859947.738775790567222e-07 3.7339328e-07154.089134776508980 -0.4361392557621002 2.123614686399606 -1.2804145812988281 3.7215486nan nan nan -1.080939539950504 4.27721663340763 -104.71947041478431
1 0.3090895728483629 0.30842259877311784 0.17628026359430848 0.22611708693766508 0.09970631382205254 10.0699920654296880.5896989703178406 -0.9664415121078491 -0.9518471360206604 37.240967-2.2831375342149955e-072.49317e-07 0.0 21.769605166840982-0.801622748374939 21.307426 0.2680249694291372 -1.0386255 0.24083452 19.240015 -0.13966843269274323 -2.5623941 0.24083452 20.222652 -0.013217448221518976 -1.7598503 0.011413363 -0.91259795169.4424610.833822-0.3274851739406585721.39666266920291 558.4033 0.8450456 -0.211923792958259580.86665446-3.0969826102556715-2.5232363803451627 -2.542487626107496 1.4928615 0.8774132816791705 -1.9986079221169366 -2.04588855812214 1.4928615 -0.3413775563240051 -0.13905183970928192-0.8814153671264648 212 1 -1.1660510794203147 -1.1704777679639904 0.89754117-222.0501127897471741.38527019482137 -3.597976571347204778.53204 4.2180988179474246e-07 2.49317e-07 225.902498026130250 -0.7138696312904358 0.8677262727803007-1.077961802482605 3.6162643nan nan nan -51.864294010985724-3.452417675558107 52.329935511279956
2 0.04065386377065892 0.0418028072292431840.02370060669920257 0.0318886836017198760.01311414960343836 9.613767623901367 -0.1432933509349823 -1.0196176767349243 -0.6505561470985413 27.4685279.93141102529504e-07 5.270746e-07 0.0 21.241844522741097-0.596523582935333321.876608 0.38537958340209455 0.20757976 0.4235812 21.283127 1.0115375512029108 -0.99390167 0.4235812 20.921713 -0.029182178287689993 -0.3228382 0.01705969 -8.830861 175.76826114.44746-0.7592963576316833 20.51568014237017 118.698241.196 -0.7398169040679932 1.1982795 -1.6337324545644631-1.8048458518891428 -1.7305400665725954 2.8642974 1.0298405489110565 -0.6871569312728342 -0.5989357582041593 2.8642974 -1.3291157484054565 -0.7577531337738037 -0.45060980319976807252 1 1.5601152190393899 1.554470646021109 1.8974684 -174.5839585087630312.917886544408068-27.19747265375267 75.42295 -1.738821925276305e-07 5.270746e-07 177.161318803274070 -0.6941993832588196 1.2002945213596574-0.5894879698753357 3.6663215nan nan nan 44.815626870159115 -8.696420347749594 -90.83775218664684
3 0.7877962999054845 0.7836102802989956 0.4485485017244639 0.5726781831841731 0.25412783867918853 9.8711519241333 1.162867546081543 -0.7159809470176697 -0.6287623643875122 34.62386 6.854075293976649e-08 7.639342e-08 0.0 20.79343262014924 -1.236360788345337 19.920134 -0.005622249308989237-1.6512849 0.09372754 18.061659 -0.04331449085765518 -3.1099238 0.09372754 19.04199 0.00854874852791074 -2.3326683 0.005850956 -14.482033 160.587088.724134 0.7711513042449951 21.80299225153632 876.2868 0.92662406-0.073493219912052150.952725230.09118761002492409-0.12743009609252465-0.121577310622802570.53407407 0.296466288376349750.28278793098576693 0.16962703533504497 0.53407407-0.9232337474822998 -0.6347827315330505 -1.0434234142303467 281 1 -0.24483446567030384 -0.25177373072009146 0.2750163 -131.5961068632097446.37566245119917 -36.03787463886429 58.8145943.7359391102072234e-08 7.639342e-08 144.1074800897836 0 0.0109169194474816320.9538811072032849-1.0917985439300537 3.6316922nan nan nan -31.012357263624274-53.39747247914625 46.681828045304094
4 0.13204413245379218 0.13715348267910565 0.07738767519745388 0.10562465807915 0.04259488143670716 9.037848472595215 -0.20741142332553864-0.2963399291038513 0.24989141523838043 27.7544523.672289535219167e-07 4.3264754e-070.0 21.63436699581625 -0.934876859188079821.672022 0.4177469420941861 -0.51724565 0.36540693 20.406832 0.2875173851348014 -1.5919065 0.36540693 20.762663 -0.0013426168529036332-0.9759861 0.015354784 -6.714385 176.97495129.31134-0.6755844354629517 21.02729742239088 203.311841.8348202 -1.142288327217102 1.8366443 0.22742582474918802-1.0224689174457215 -1.02247116836483 2.41159 1.4182551635224565 1.0088247957898988 1.067175358322312 2.41159 -0.6697758436203003 -0.6329840421676636 -1.5521866083145142 343 1 2.2433125652881225 2.238601418881787 1.5575311 -210.5129725482945311.124849238363767-24.81775149965351 78.14718 -7.645186432301977e-08 4.3264754e-07212.262560691220050 -0.3810194134712219 1.8352900976292204-0.6407454609870911 3.6914678nan nan nan 4.41267248808539 33.91564561973785 -47.81752034953253
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1,1640.0190252846766175670.0196869320953938260.0111316669991515460.01511721103115259 0.00613718860536050610.3731727600097661.5368380546569824 -1.5263926982879639 -0.673753559589386 39.989857-2.514573920310201e-07 4.0399456e-070.0 21.230698985230248-1.226879239082336422.025711 0.8299667035764402 -0.054642305 0.3470864 20.100952 0.04999640531206987 -1.1908631 0.3470864 20.69277 -0.006136069764179247 -0.54691136 0.014802344 -10.55544 156.8341 71.625626-0.6782917976379395 20.185909478706613141.691970.798 0.3099588453769684 0.806828141.9005327439369708 0.5529681225325869 0.5241191460758158 2.2718804 1.3808223355267186 2.2831822765276324 2.3005029186373935 2.2718804 -0.6692771315574646 0.04717090725898743 -1.0167276859283447 99731 1 -1.8038561145794871 -1.80952973403217 1.4543804 -159.3008121376062168.16420594881328 -32.28748077755431558.55993 -8.166342547243272e-07 4.0399456e-07176.2543308270582 0 -0.643153190612793 0.8070930497545803-0.7373723983764648 3.6786351nan nan nan 91.64606945448743 -10.23754148145214225.588940561402193
1,1650.11785906487249849 0.11882245467275085 0.06779467873028416 0.08847483112602038 0.03801905318467693 9.395322799682617 -0.3845840394496918 -0.28358957171440125-0.4808520078659057634.8023389.918108029871799e-08 1.2833371e-070.0 21.730687168195804-0.761027336120605520.062742 -0.20591638105879556 -1.5808507 0.1435723 19.183807 0.3899514815920368 -3.0041256 0.1435723 19.584963 0.0065751865905664285 -2.2407725 0.007908253 -11.4430685163.6426814.651481-0.9921388030052185 20.977941305794037803.1406 1.433 -1.1456114053726196 1.4167645 -0.7805496455197294-1.061513757734159 -1.0666535865725877 0.83854187 0.7206434010757191 -0.04210933297675466-0.0146139763786017380.83854187-0.9093115329742432 -0.06070816144347191-0.573256254196167 99823 1 0.6270305330302727 0.6225237923805556 0.46200135-208.6765215243252461.24792880191641 -44.02164751433754563.986168-1.9273868544824463e-071.2833371e-07221.889848501217760 -0.5603996515274048 1.446258238190986 -0.6158600449562073 3.6311183nan nan nan 19.144157910757684 19.68245343984652 -14.362693836095195
1,1661.9178776046340098 1.8937630206087204 1.085983320180919 1.3702206129213481 0.618670195043229 9.400785446166992 0.5861782431602478 -0.661990225315094 -0.446218341588974 28.715738-4.908052626167452e-07 4.5137742e-070.0 21.56765254830313 -1.074138998985290522.023201 0.09706545298345842 -1.5352793 0.3772023 20.310297 0.7137742476844009 -2.8559453 0.3772023 20.798689 -0.005518799886512156 -2.133665 0.015706312 -10.957019 172.4603419.026196-0.9261223077774048 22.18939920269422 671.834661.323 -0.4879607856273651 1.3253865 5.474372140983591 5.868888862589489 5.871416168223197 2.502292 -3.09480473700729772.2589180788252445 2.2750541663028017 2.502292 0.23867693543434143 -1.0438926219940186 -1.0675371885299683 99881 1 -1.883078373748392 -1.8879365077565704 1.6249586 -200.3407015330409 26.516403301143548-39.12458260932041 71.24494 1.7179552430969074e-07 4.5137742e-07205.840349055119450 -0.306485772132873541.33023236613604050.5969148278236389 3.6487052nan nan nan 58.893637163546906 0.38034349101910236-2.683755036288687
1,1670.38909358176555053 0.4284423680675876 0.23326528792757678 0.3459109855134216 0.12551405863404855 8.76700210571289 1.2602565288543701 -0.6482102274894714 -0.646274745464325 18.708971-1.1252965856256632e-074.4515681e-070.0 21.967123504012505-1.156763672828674320.725286 -0.3056262783830847 -1.3646538 0.3733 20.238077 -0.16204777931782613 -1.7965397 0.3733 20.788153 -0.0028946091431594823-1.521986 0.015590355 -19.303923 178.78328421.27353-0.3065233826637268 21.496632381861517296.858952.3255537 0.10349282622337341 2.2348108 -0.966278153514542 -1.7330205113053976 -1.6164166274595297 2.4722178 1.4473464943545327 0.15857261863421246 0.15742234829525623 2.4722178 -0.099911376833915710.01162821426987648 -0.6298919320106506 99944 1 -1.469024973955347 -1.4730667784191478 1.6025645 -233.451558667982284.958240307345907 -81.78993982121428 68.41039 -8.61161514396646e-07 4.4515681e-07247.414245037373750 -0.135934576392173772.32588572372793 -0.7227007746696472 3.8350785nan nan nan 78.51290171740594 -108.88857930707961-61.69010348297734
1,1680.13128025060982543 0.13892906409656194 0.07761901232932818 0.10877511186828855 0.0423484679386533648.829378128051758 0.945320188999176 -1.3487151861190796 -0.3256357312202453635.68073 -6.829164901717445e-08 5.0387865e-070.0 21.449059479615702-1.558529853820800821.971952 0.678119222946501 -0.29415557 0.40957612 20.77844 0.42905685318463965 -1.1768098 0.40957612 20.904022 -0.004349176003901913 -0.6494634 0.01665563 -13.799286 159.73665292.4145 -0.0697977319359779421.024777711937954144.352342.104846 -0.6132096648216248 2.0921621 -2.47099662845572 -2.0149855855603285 -1.9733394462256058 2.7541013 0.22979677829391332-1.4486076040619862 -1.501391448026907 2.7541013 -0.40418189764022827-0.7111912369728088 -0.6041487455368042 99991 1 -0.46944864982128426 -0.4745794854764945 1.8139632 -177.5605876092853465.5525804310451 -46.48781414288353 58.6055034.792514094889688e-07 5.0387865e-07194.900025492832130 -0.5130423903465271 2.1051179373093634-0.105139151215553283.7279654nan nan nan -18.401481977818147-59.34776329404433 3.8806093685209264
" - ], - "text/plain": [ - "# A_0 A_gaiadr2_g_bpmag A_gaiadr2_g_rpmag A_gaiadr2_gmag E(B-V) age alpha calcium carbon dec dec_Err dec_Sig dform dmod feh gaiadr2_g_bpmag gaiadr2_g_bpmag_Err gaiadr2_g_bpmag_Intrinsic gaiadr2_g_bpmag_Sig gaiadr2_g_rpmag gaiadr2_g_rpmag_Err gaiadr2_g_rpmag_Intrinsic gaiadr2_g_rpmag_Sig gaiadr2_gmag gaiadr2_gmag_Err gaiadr2_gmag_Intrinsic gaiadr2_gmag_Sig glat glon grav helium log10_NH lum mact magnesium mtip mub mudec mudec_Err mudec_Sig mul mura mura_Err mura_Sig neon nitrogen oxygen parentid partid pi pi_Err pi_Sig px py pz ra ra_Err ra_Sig rad satid silicon smass sulphur teff vr vr_Err vr_Sig vx vy vz\n", - "0 0.05681650709265505 0.05985558882052296 0.033535779349265264 0.046713423918591325 0.018327905513759693 8.97172737121582 -0.6125200986862183 -0.12460324913263321 -0.36052706837654114 41.517887 -4.3651322762456503e-07 3.7339328e-07 0.0 20.938860082853388 -0.5348672270774841 20.934616 -0.09105875752639689 0.026959075 0.32711947 20.067745 0.010476073807142064 -0.9150356 0.32711947 20.610794 -0.013108958690914031 -0.36166972 0.014190837 -6.450095 159.08374 369.8372 -0.6886086463928223 20.66105284593159 108.46986 2.1231031 -1.1473873853683472 1.9929105 1.9282719359892686 -0.24990918971905196 -0.15208820165614972 2.1212947 2.3169853631740556 3.004030573793332 3.107170100412025 2.1212947 -0.44875627756118774 -1.4166113138198853 -0.40134233236312866 138 1 0.0047001384188920066 -0.0017896118250197454 1.3442158 -143.02405261900316 54.66209816691588 -17.31002173887193 64.385994 7.738775790567222e-07 3.7339328e-07 154.08913477650898 0 -0.4361392557621002 2.123614686399606 -1.2804145812988281 3.7215486 nan nan nan -1.080939539950504 4.27721663340763 -104.71947041478431\n", - "1 0.3090895728483629 0.30842259877311784 0.17628026359430848 0.22611708693766508 0.09970631382205254 10.069992065429688 0.5896989703178406 -0.9664415121078491 -0.9518471360206604 37.240967 -2.2831375342149955e-07 2.49317e-07 0.0 21.769605166840982 -0.801622748374939 21.307426 0.2680249694291372 -1.0386255 0.24083452 19.240015 -0.13966843269274323 -2.5623941 0.24083452 20.222652 -0.013217448221518976 -1.7598503 0.011413363 -0.91259795 169.44246 10.833822 -0.32748517394065857 21.39666266920291 558.4033 0.8450456 -0.21192379295825958 0.86665446 -3.0969826102556715 -2.5232363803451627 -2.542487626107496 1.4928615 0.8774132816791705 -1.9986079221169366 -2.04588855812214 1.4928615 -0.3413775563240051 -0.13905183970928192 -0.8814153671264648 212 1 -1.1660510794203147 -1.1704777679639904 0.89754117 -222.05011278974717 41.38527019482137 -3.5979765713472047 78.53204 4.2180988179474246e-07 2.49317e-07 225.90249802613025 0 -0.7138696312904358 0.8677262727803007 -1.077961802482605 3.6162643 nan nan nan -51.864294010985724 -3.452417675558107 52.329935511279956\n", - "2 0.04065386377065892 0.041802807229243184 0.02370060669920257 0.031888683601719876 0.01311414960343836 9.613767623901367 -0.1432933509349823 -1.0196176767349243 -0.6505561470985413 27.468527 9.93141102529504e-07 5.270746e-07 0.0 21.241844522741097 -0.5965235829353333 21.876608 0.38537958340209455 0.20757976 0.4235812 21.283127 1.0115375512029108 -0.99390167 0.4235812 20.921713 -0.029182178287689993 -0.3228382 0.01705969 -8.830861 175.76826 114.44746 -0.7592963576316833 20.51568014237017 118.69824 1.196 -0.7398169040679932 1.1982795 -1.6337324545644631 -1.8048458518891428 -1.7305400665725954 2.8642974 1.0298405489110565 -0.6871569312728342 -0.5989357582041593 2.8642974 -1.3291157484054565 -0.7577531337738037 -0.45060980319976807 252 1 1.5601152190393899 1.554470646021109 1.8974684 -174.58395850876303 12.917886544408068 -27.19747265375267 75.42295 -1.738821925276305e-07 5.270746e-07 177.16131880327407 0 -0.6941993832588196 1.2002945213596574 -0.5894879698753357 3.6663215 nan nan nan 44.815626870159115 -8.696420347749594 -90.83775218664684\n", - "3 0.7877962999054845 0.7836102802989956 0.4485485017244639 0.5726781831841731 0.25412783867918853 9.8711519241333 1.162867546081543 -0.7159809470176697 -0.6287623643875122 34.62386 6.854075293976649e-08 7.639342e-08 0.0 20.79343262014924 -1.236360788345337 19.920134 -0.005622249308989237 -1.6512849 0.09372754 18.061659 -0.04331449085765518 -3.1099238 0.09372754 19.04199 0.00854874852791074 -2.3326683 0.005850956 -14.482033 160.58708 8.724134 0.7711513042449951 21.80299225153632 876.2868 0.92662406 -0.07349321991205215 0.95272523 0.09118761002492409 -0.12743009609252465 -0.12157731062280257 0.53407407 0.29646628837634975 0.28278793098576693 0.16962703533504497 0.53407407 -0.9232337474822998 -0.6347827315330505 -1.0434234142303467 281 1 -0.24483446567030384 -0.25177373072009146 0.2750163 -131.59610686320974 46.37566245119917 -36.03787463886429 58.814594 3.7359391102072234e-08 7.639342e-08 144.1074800897836 0 0.010916919447481632 0.9538811072032849 -1.0917985439300537 3.6316922 nan nan nan -31.012357263624274 -53.39747247914625 46.681828045304094\n", - "4 0.13204413245379218 0.13715348267910565 0.07738767519745388 0.10562465807915 0.04259488143670716 9.037848472595215 -0.20741142332553864 -0.2963399291038513 0.24989141523838043 27.754452 3.672289535219167e-07 4.3264754e-07 0.0 21.63436699581625 -0.9348768591880798 21.672022 0.4177469420941861 -0.51724565 0.36540693 20.406832 0.2875173851348014 -1.5919065 0.36540693 20.762663 -0.0013426168529036332 -0.9759861 0.015354784 -6.714385 176.97495 129.31134 -0.6755844354629517 21.02729742239088 203.31184 1.8348202 -1.142288327217102 1.8366443 0.22742582474918802 -1.0224689174457215 -1.02247116836483 2.41159 1.4182551635224565 1.0088247957898988 1.067175358322312 2.41159 -0.6697758436203003 -0.6329840421676636 -1.5521866083145142 343 1 2.2433125652881225 2.238601418881787 1.5575311 -210.51297254829453 11.124849238363767 -24.81775149965351 78.14718 -7.645186432301977e-08 4.3264754e-07 212.26256069122005 0 -0.3810194134712219 1.8352900976292204 -0.6407454609870911 3.6914678 nan nan nan 4.41267248808539 33.91564561973785 -47.81752034953253\n", - "... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...\n", - "1,164 0.019025284676617567 0.019686932095393826 0.011131666999151546 0.01511721103115259 0.006137188605360506 10.373172760009766 1.5368380546569824 -1.5263926982879639 -0.673753559589386 39.989857 -2.514573920310201e-07 4.0399456e-07 0.0 21.230698985230248 -1.2268792390823364 22.025711 0.8299667035764402 -0.054642305 0.3470864 20.100952 0.04999640531206987 -1.1908631 0.3470864 20.69277 -0.006136069764179247 -0.54691136 0.014802344 -10.55544 156.8341 71.625626 -0.6782917976379395 20.185909478706613 141.69197 0.798 0.3099588453769684 0.80682814 1.9005327439369708 0.5529681225325869 0.5241191460758158 2.2718804 1.3808223355267186 2.2831822765276324 2.3005029186373935 2.2718804 -0.6692771315574646 0.04717090725898743 -1.0167276859283447 99731 1 -1.8038561145794871 -1.80952973403217 1.4543804 -159.30081213760621 68.16420594881328 -32.287480777554315 58.55993 -8.166342547243272e-07 4.0399456e-07 176.2543308270582 0 -0.643153190612793 0.8070930497545803 -0.7373723983764648 3.6786351 nan nan nan 91.64606945448743 -10.237541481452142 25.588940561402193\n", - "1,165 0.11785906487249849 0.11882245467275085 0.06779467873028416 0.08847483112602038 0.03801905318467693 9.395322799682617 -0.3845840394496918 -0.28358957171440125 -0.48085200786590576 34.802338 9.918108029871799e-08 1.2833371e-07 0.0 21.730687168195804 -0.7610273361206055 20.062742 -0.20591638105879556 -1.5808507 0.1435723 19.183807 0.3899514815920368 -3.0041256 0.1435723 19.584963 0.0065751865905664285 -2.2407725 0.007908253 -11.4430685 163.64268 14.651481 -0.9921388030052185 20.977941305794037 803.1406 1.433 -1.1456114053726196 1.4167645 -0.7805496455197294 -1.061513757734159 -1.0666535865725877 0.83854187 0.7206434010757191 -0.04210933297675466 -0.014613976378601738 0.83854187 -0.9093115329742432 -0.06070816144347191 -0.573256254196167 99823 1 0.6270305330302727 0.6225237923805556 0.46200135 -208.67652152432524 61.24792880191641 -44.021647514337545 63.986168 -1.9273868544824463e-07 1.2833371e-07 221.88984850121776 0 -0.5603996515274048 1.446258238190986 -0.6158600449562073 3.6311183 nan nan nan 19.144157910757684 19.68245343984652 -14.362693836095195\n", - "1,166 1.9178776046340098 1.8937630206087204 1.085983320180919 1.3702206129213481 0.618670195043229 9.400785446166992 0.5861782431602478 -0.661990225315094 -0.446218341588974 28.715738 -4.908052626167452e-07 4.5137742e-07 0.0 21.56765254830313 -1.0741389989852905 22.023201 0.09706545298345842 -1.5352793 0.3772023 20.310297 0.7137742476844009 -2.8559453 0.3772023 20.798689 -0.005518799886512156 -2.133665 0.015706312 -10.957019 172.46034 19.026196 -0.9261223077774048 22.18939920269422 671.83466 1.323 -0.4879607856273651 1.3253865 5.474372140983591 5.868888862589489 5.871416168223197 2.502292 -3.0948047370072977 2.2589180788252445 2.2750541663028017 2.502292 0.23867693543434143 -1.0438926219940186 -1.0675371885299683 99881 1 -1.883078373748392 -1.8879365077565704 1.6249586 -200.3407015330409 26.516403301143548 -39.12458260932041 71.24494 1.7179552430969074e-07 4.5137742e-07 205.84034905511945 0 -0.30648577213287354 1.3302323661360405 0.5969148278236389 3.6487052 nan nan nan 58.893637163546906 0.38034349101910236 -2.683755036288687\n", - "1,167 0.38909358176555053 0.4284423680675876 0.23326528792757678 0.3459109855134216 0.12551405863404855 8.76700210571289 1.2602565288543701 -0.6482102274894714 -0.646274745464325 18.708971 -1.1252965856256632e-07 4.4515681e-07 0.0 21.967123504012505 -1.1567636728286743 20.725286 -0.3056262783830847 -1.3646538 0.3733 20.238077 -0.16204777931782613 -1.7965397 0.3733 20.788153 -0.0028946091431594823 -1.521986 0.015590355 -19.303923 178.78328 421.27353 -0.3065233826637268 21.496632381861517 296.85895 2.3255537 0.10349282622337341 2.2348108 -0.966278153514542 -1.7330205113053976 -1.6164166274595297 2.4722178 1.4473464943545327 0.15857261863421246 0.15742234829525623 2.4722178 -0.09991137683391571 0.01162821426987648 -0.6298919320106506 99944 1 -1.469024973955347 -1.4730667784191478 1.6025645 -233.45155866798228 4.958240307345907 -81.78993982121428 68.41039 -8.61161514396646e-07 4.4515681e-07 247.41424503737375 0 -0.13593457639217377 2.32588572372793 -0.7227007746696472 3.8350785 nan nan nan 78.51290171740594 -108.88857930707961 -61.69010348297734\n", - "1,168 0.13128025060982543 0.13892906409656194 0.07761901232932818 0.10877511186828855 0.042348467938653364 8.829378128051758 0.945320188999176 -1.3487151861190796 -0.32563573122024536 35.68073 -6.829164901717445e-08 5.0387865e-07 0.0 21.449059479615702 -1.5585298538208008 21.971952 0.678119222946501 -0.29415557 0.40957612 20.77844 0.42905685318463965 -1.1768098 0.40957612 20.904022 -0.004349176003901913 -0.6494634 0.01665563 -13.799286 159.73665 292.4145 -0.06979773193597794 21.024777711937954 144.35234 2.104846 -0.6132096648216248 2.0921621 -2.47099662845572 -2.0149855855603285 -1.9733394462256058 2.7541013 0.22979677829391332 -1.4486076040619862 -1.501391448026907 2.7541013 -0.40418189764022827 -0.7111912369728088 -0.6041487455368042 99991 1 -0.46944864982128426 -0.4745794854764945 1.8139632 -177.56058760928534 65.5525804310451 -46.48781414288353 58.605503 4.792514094889688e-07 5.0387865e-07 194.90002549283213 0 -0.5130423903465271 2.1051179373093634 -0.10513915121555328 3.7279654 nan nan nan -18.401481977818147 -59.34776329404433 3.8806093685209264" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "survey[~survey.gaiadr2_gmag.isna()]" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "base", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - }, - "vscode": { - "interpreter": { - "hash": "93aa337d3be5595eae1049f286a1f242db5cd4d40fd613efbe29fb4c796799bf" - } - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/py-EnBiD-ananke b/py-EnBiD-ananke index 99ae4df..64c9b8c 160000 --- a/py-EnBiD-ananke +++ b/py-EnBiD-ananke @@ -1 +1 @@ -Subproject commit 99ae4dfd61926f074cf2bfb0bfbcb08e1892cb18 +Subproject commit 64c9b8c5399db192fe0ca86e908351abc77e0118 diff --git a/py-Galaxia-ananke b/py-Galaxia-ananke index bf7d338..01661ce 160000 --- a/py-Galaxia-ananke +++ b/py-Galaxia-ananke @@ -1 +1 @@ -Subproject commit bf7d33806e177f09848b6702d121ebb55e153306 +Subproject commit 01661ce38621727823b9cf523cd54d33f1632889 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..a46bebd --- /dev/null +++ b/setup.cfg @@ -0,0 +1,7 @@ +[versioneer] +VCS = git +style = pep440 +versionfile_source = src/ananke/_version.py +versionfile_build = ananke/_version.py +tag_prefix = v +parentdir_prefix = ananke- diff --git a/setup.py b/setup.py index ecfe996..d4ac321 100644 --- a/setup.py +++ b/setup.py @@ -1,17 +1,12 @@ #!/usr/bin/env python -import pathlib -from distutils.core import setup +from setuptools import setup from src._build_utils import * -from src.constants import NAME, SRC_DIR, PYENBID, PYGALAXIA +from src._constants import NAME, SRC_DIR from src.__metadata__ import * -ROOT_DIR = pathlib.Path(__file__).parent - -long_description = "" - -check_submodules(ROOT_DIR) - +with open("README.md") as readme: + long_description = readme.read() setup(name=NAME, version=__version__, @@ -19,26 +14,19 @@ author_email=__email__, maintainer=__maintainer__, maintainer_email=__email__, - url="https://github.com/athob/py-ananke", - description="", + url=__url__, + description=f"{__project__}: {__description__}", long_description=long_description, long_description_content_type="text/markdown", - classifiers=[ - __status__, - "Environment :: Console", - "Intended Audience :: Science/Research", - __license__, - "Natural Language :: English", - "Operating System :: Unix", - "Programming Language :: Python :: 3", - "Topic :: Database", - "Topic :: Scientific/Engineering :: Astronomy", - "Topic :: Software Development :: Version Control :: Git" - ], - python_requires='>=3.7.12', + classifiers=__classifiers__, + license=__license__, + copyright=__copyright__, + python_requires='>=3.8', packages=[NAME], package_dir={'': SRC_DIR}, - install_requires=["numpy", "scipy", "pandas", - f"EnBiD_ananke @ file://{(ROOT_DIR / PYENBID).resolve()}", - f"Galaxia_ananke @ file://{(ROOT_DIR / PYGALAXIA).resolve()}"] + package_data=make_package_data(), + include_package_data=True, + install_requires=append_install_requires_with_submodules( + ["numpy>=1.22,<2", "scipy>=1.7.2,<2", "pandas>=2,<3", "docstring_parser>=0.16,<0.17"]), + cmdclass=make_cmdclass(), ) diff --git a/src/_build_utils.py b/src/_build_utils.py index f5be3fe..1bb28b1 100644 --- a/src/_build_utils.py +++ b/src/_build_utils.py @@ -3,15 +3,17 @@ Contains the ananke module building utility tools. Credit to https://github.com/GalacticDynamics-Oxford/Agama/blob/master/setup.py. """ -import pathlib +import importlib.util import sys +import pathlib import subprocess # from packaging import version -from .constants import * +from ._constants import * from .__metadata__ import * +from . import versioneer -__all__ = ['say', 'all_files', 'check_submodules'] +__all__ = ['make_package_data', 'check_submodules', 'append_install_requires_with_submodules', 'make_cmdclass'] ROOT_DIR = pathlib.Path(__file__).parent.parent @@ -42,6 +44,21 @@ def all_files(*paths, basedir='.'): for f in files] +def make_package_data(): + for_all_files = ('__license__', ) + return {NAME: all_files(*for_all_files, + basedir=pathlib.Path(SRC_DIR, NAME))} + + +def import_source_file(module_name, file_path): + # based on https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly + spec = importlib.util.spec_from_file_location(module_name, file_path) + module = importlib.util.module_from_spec(spec) + sys.modules[module_name] = module + spec.loader.exec_module(module) + return module + + def check_submodules(root_dir): # if not pathlib.os.listdir(PYENBID) or not pathlib.os.listdir(PYGALAXIA): say("\nChecking submodules, running git...") @@ -51,3 +68,27 @@ def check_submodules(root_dir): raise OSError("Your system does not have git installed. Please install git before proceeding") if _temp == 128: raise OSError(f"The repository from which you are attempting to install this package is not a git repository.\nPlease follow the online instructions for proper installation ({__url__}/#installation).") + # + EnBiD_src_root = root_dir / PYENBID / SRC_DIR + EnBiD_src = import_source_file("EnBiD_src", EnBiD_src_root / '__init__.py') + EnBiD_meta = import_source_file("EnBiD_src.__metadata__", EnBiD_src_root / '__metadata__.py') + # + Galaxia_src_root = root_dir / PYGALAXIA / SRC_DIR + Galaxia_src = import_source_file("Galaxia_src", Galaxia_src_root / '__init__.py') + Galaxia_meta = import_source_file("Galaxia_src.__metadata__", Galaxia_src_root / '__metadata__.py') + #### TODO: below's fix is ugly, there must be something better to do! + if pathlib.Path(sys.argv[0]).name == 'setup.py' and (sys.argv[1] == 'egg_info' if len(sys.argv)>1 else False) and 'pip' in sys.argv[-1]: + subprocess.call(['pip', 'cache', 'remove', '*_ananke']) + #### + return EnBiD_meta, Galaxia_meta + + +def append_install_requires_with_submodules(install_requires): + EnBiD_meta, Galaxia_meta = check_submodules(ROOT_DIR) + return install_requires + [ + f"EnBiD_ananke @ file://{pathlib.Path(EnBiD_meta.__file__).parent.parent}", + f"Galaxia_ananke @ file://{pathlib.Path(Galaxia_meta.__file__).parent.parent}" + ] + + +make_cmdclass = versioneer.get_cmdclass diff --git a/src/_constants.py b/src/_constants.py new file mode 120000 index 0000000..9c7040c --- /dev/null +++ b/src/_constants.py @@ -0,0 +1 @@ +ananke/_constants.py \ No newline at end of file diff --git a/src/_version.py b/src/_version.py new file mode 120000 index 0000000..fbc4292 --- /dev/null +++ b/src/_version.py @@ -0,0 +1 @@ +ananke/_version.py \ No newline at end of file diff --git a/src/ananke/Ananke.py b/src/ananke/Ananke.py index 565d315..905f7e0 100644 --- a/src/ananke/Ananke.py +++ b/src/ananke/Ananke.py @@ -5,18 +5,27 @@ Please note that this module is private. The Ananke class is available in the main ``ananke`` namespace - use that instead. """ +from typing import TYPE_CHECKING, Any, Union, Tuple, List, Dict +from numpy.typing import NDArray +from Galaxia_ananke.photometry.PhotoSystem import PhotoSystem +from astropy.units import Quantity from warnings import warn +import re import numpy as np +import pandas as pd import Galaxia_ananke as Galaxia +import Galaxia_ananke.photometry as Galaxia_photo -from .constants import * +from . import utils +from ._constants import * from .Universe import Universe from .Observer import Observer from .DensitiesDriver import DensitiesDriver from .ExtinctionDriver import ExtinctionDriver from .ErrorModelDriver import ErrorModelDriver + __all__ = ['Ananke'] @@ -41,14 +50,15 @@ class Ananke: _galaxia_particles_keys = _required_particles_keys.union(_optional_particles_keys) _photo_sys = "photo_sys" _def_obs_position = Observer._default_position + _def_obs_velocity = Observer._default_velocity _def_uni_rshell = Universe._default_rshell _def_photo_sys = Galaxia.DEFAULT_PSYS _def_cmd_mags = Galaxia.DEFAULT_CMD - _def_cmd_box = Galaxia.DEFAULT_CMD_BOX _intrinsic_mag_formatter = '{}_Intrinsic' _intrinsic_mag_template = _intrinsic_mag_formatter.format - def __init__(self, particles, name, ngb=64, d_params={}, e_params={}, err_params={}, **kwargs) -> None: + def __init__(self, particles: Dict[str, NDArray], name: str, ngb: int = 64, + d_params: Dict[str, Any] = {}, e_params: Dict[str, Any] = {}, err_params: Dict[str, Any] = {}, **kwargs: Dict[str, Any]) -> None: """ Parameters ---------- @@ -64,136 +74,149 @@ def __init__(self, particles, name, ngb=64, d_params={}, e_params={}, err_params d_params : dict Parameters to configure the kernel density estimation. Use - class method display_density_docs to find what parameters can - be defined + class method ``display_density_docs`` to find what parameters + can be defined e_params : dict Parameters to configure the extinction pipeline. Use class - method display_extinction_docs to find what parameters can be - defined + method ``display_extinction_docs`` to find what parameters can + be defined err_params : dict Parameters to configure the error model pipeline. Use class - method display_errormodel_docs to find what parameters can be - defined + method ``display_errormodel_docs`` to find what parameters can + be defined - observer : array-like shape (3,) - Coordinates for the observer position in kpc. Default to - {_def_obs_position}. + observer : array-like shape (3,) or dict of array-like shape (3,) + Coordinates for the observer in phase space. Position and + velocity quantities must respectively be given in kpc and km/s. + To only specify position, an array-like object of shape (3,) is + enough. If specifying both position and velocity, please + provide a dictionary containing both coordinates as array-like + objects of shape (3,), respectively denoting the position and + velocity coordinates with keys ``{_pos}`` and ``{_vel}``. + Position coordinates default to:: + + {_def_obs_position} + + and velocity coordinates default to:: + + {_def_obs_velocity} rshell : array-like shape (2,) Range in kpc of distances from the observer position of the - particles that are to be considered. Default to - {_def_uni_rshell}. + particles that are to be considered. Default to:: + + {_def_uni_rshell} photo_sys : string or list Name(s) of the photometric system(s) Galaxia should use to - generate the survey. Default to {_def_photo_sys}. + generate the survey. Default to ``{_def_photo_sys}``. Available photometric systems can be queried with the class - method display_available_photometric_systems. + method ``display_available_photometric_systems``. cmd_magnames : string or dict Names of the filters Galaxia should use for the color-magnitude diagram box selection. The input can be given as string in which case it must meet the - following format: + following format:: + "band1,band2-band3" - where band1 is the magnitude filter and (band2, band3) are the - filters that define the band2-band3 color index. + + where ``band1`` is the magnitude filter and ``(band2, band3)`` + are the filters that define the ``band2-band3`` color index. Alternatively, a dictionary can be passed with the following - format: + format:: + dict('magnitude': band1, 'color_minuend': band2, 'color_subtrahend': band3) + The filter names must correspond to filters that are part of the first chosen photometric system in photo_sys. Default to - {_def_cmd_mags}. - - app_mag_lim_lo : float - app_mag_lim_hi : float - abs_mag_lim_lo : float - abs_mag_lim_hi : float - color_lim_lo : float - color_lim_hi : float - These allow to specify the limits of the chosen color-magnitude - diagram box selection (lo for lower and hi for upper). app_mag, - abs_mag and color represent respectively limits in apparent - magnitudes, absolute magnitudes and color index. Default values - follow those set in: - {_def_cmd_box}. - - fsample : float - Sampling rate from 0 to 1 for the resulting synthetic star - survey. 1 returns a full sample while any value below returns - partial surveys. Default to 1. + ``'{_def_cmd_mags}'``. + {parameters_from_galaxia} Notes ----- - The input particles must include same-length arrays for every key of - the list of keys return by property required_particles_keys. - Particular attention should be given to arrays of keys '{_pos}' and - '{_vel}' that must be shaped as (Nx3) arrays of, respectively, - position and velocity vectors. Use the class method - make_dummy_particles_input to generate a dummy example of such input - dictionary. + The input particles must include same-length arrays for every key + of the list of keys return by property required_particles_keys. + Particular attention should be given to arrays of keys ``'{_pos}'`` + and ``'{_vel}'`` that must be shaped as (Nx3) arrays of, + respectively, position and velocity vectors. Use the class method + ``make_dummy_particles_input`` to generate a dummy example of such + input dictionary. """ - self.__particles = particles - self.__name = name - self.__ngb = ngb - self.__universe_proxy = self._prepare_universe_proxy(kwargs) - self.__photo_sys = kwargs.pop(self._photo_sys, Galaxia.DEFAULT_PSYS) - self.__observer_proxy = self._prepare_observer_proxy(kwargs) - self.__parameters = kwargs - self.__densitiesdriver_proxy = self._prepare_densitiesdriver_proxy(d_params) - self.__extinctiondriver_proxy = self._prepare_extinctiondriver_proxy(e_params) - self.__errormodeldriver_proxy = self._prepare_errormodeldriver_proxy(err_params) - self.__galaxia_input = None - self.__galaxia_survey = None - self.__galaxia_output = None + self.__particles: Dict[str, NDArray] = particles + self.__name: str = name + self.__ngb: int = ngb + self.__universe_proxy: Universe = self._prepare_universe_proxy(kwargs) + self.__photo_sys: str = kwargs.pop(self._photo_sys, Galaxia.DEFAULT_PSYS) + self.__observer_proxy: Observer = self._prepare_observer_proxy(kwargs) + self.__parameters: Dict[str, Any] = kwargs + self.__densitiesdriver_proxy: DensitiesDriver = self._prepare_densitiesdriver_proxy(d_params) + self.__extinctiondriver_proxy: ExtinctionDriver = self._prepare_extinctiondriver_proxy(e_params) + self.__errormodeldriver_proxy: ErrorModelDriver = self._prepare_errormodeldriver_proxy(err_params) + self.__galaxia_input: Union[Galaxia.Input, None] = None + self.__galaxia_survey: Union[Galaxia.Survey, None] = None + self.__galaxia_output: Union[Galaxia.Output, None] = None __init__.__doc__ = __init__.__doc__.format(_def_obs_position=_def_obs_position, + _def_obs_velocity=_def_obs_velocity, _def_uni_rshell=_def_uni_rshell, _def_photo_sys=_def_photo_sys, + parameters_from_galaxia = utils.extract_parameters_from_docstring( + Galaxia.Survey.make_survey.__doc__, + parameters=[ + 'fsample', + 'app_mag_lim_lo, app_mag_lim_hi, abs_mag_lim_lo, abs_mag_lim_hi, color_lim_lo, color_lim_hi' + ]).replace("\n", "\n "), _def_cmd_mags=_def_cmd_mags, - _def_cmd_box=_def_cmd_box, _pos=_pos, _vel=_vel) - def _prepare_universe_proxy(self, kwargs): + def _prepare_universe_proxy(self, kwargs: Dict[str, Any]) -> Universe: _rshell = kwargs.pop('rshell', None) if _rshell is None: warn('The use of kwargs r_min & r_max will be deprecated, please use instead kwarg observer', DeprecationWarning, stacklevel=2) _rshell = np.array([kwargs.pop('r_min', np.nan), kwargs.pop('r_max', np.nan)]) return Universe(self, _rshell) - def _prepare_observer_proxy(self, kwargs): # TODO use a virtual solar system position as default, assuming (x,y) is the disc plane, might need to update Galaxia defaults + def _prepare_observer_proxy(self, kwargs: Dict[str, Any]) -> Observer: _obs = kwargs.pop('observer', None) - if _obs is None: + if _obs is None and re.match(',rSun[012],', ',,'.join(kwargs.keys())): + _obs = {self._pos: np.array([kwargs.pop('rSun0', np.nan), kwargs.pop('rSun1', np.nan), kwargs.pop('rSun2', np.nan)])} warn('The use of kwargs rSun0, rSun1 & rSun2 will be deprecated, please use instead kwarg observer', DeprecationWarning, stacklevel=2) - _obs = np.array([kwargs.pop('rSun0', np.nan), kwargs.pop('rSun1', np.nan), kwargs.pop('rSun2', np.nan)]) - return Observer(self, _obs) - - def _prepare_densitiesdriver_proxy(self, d_params): + elif not isinstance(_obs, dict): + _obs = {self._pos: _obs} + for key in ['pos', 'vel']: + if key in _obs.keys(): + new_key = getattr(self, f'_{key}') + warn(f"The use of key '{key}' in the observer dictionary will be deprecated, please use instead key '{new_key}'", DeprecationWarning, stacklevel=2) + _obs[new_key] = _obs.pop(key) + return Observer(self, **_obs) + + def _prepare_densitiesdriver_proxy(self, d_params: Dict[str, Any]) -> DensitiesDriver: return DensitiesDriver(self, **d_params) - def _prepare_extinctiondriver_proxy(self, e_params): + def _prepare_extinctiondriver_proxy(self, e_params: Dict[str, Any]) -> ExtinctionDriver: return ExtinctionDriver(self, **e_params) - def _prepare_errormodeldriver_proxy(self, err_params): + def _prepare_errormodeldriver_proxy(self, err_params: Dict[str, Any]) -> ErrorModelDriver: return ErrorModelDriver(self, **err_params) - def _prepare_galaxia_input(self, rho, **kwargs): + def _prepare_galaxia_input(self, rho, **kwargs) -> Galaxia.Input: input_kwargs = {'name': self.name, 'ngb': self.ngb, **kwargs} # input_dir, k_factor if self.__galaxia_input is None: self.__galaxia_input = Galaxia.Input(self._galaxia_particles, rho[POS_TAG], rho[VEL_TAG], **input_kwargs) return self.__galaxia_input - def _prepare_galaxia_survey(self, input: Galaxia.Input, surveyname = 'survey', **kwargs): + def _prepare_galaxia_survey(self, input: Galaxia.Input, **kwargs) -> Galaxia.Survey: survey_kwargs = {'photo_sys': self.photo_sys, **kwargs} # surveyname if self.__galaxia_survey is None: self.__galaxia_survey = Galaxia.Survey(input, **survey_kwargs) return self.__galaxia_survey - def _run_galaxia(self, rho, **kwargs): + def _run_galaxia(self, rho, **kwargs) -> Galaxia.Output: """ Method to generate the survey out of the pipeline particles given a dictionary of kernel density estimates @@ -204,8 +227,7 @@ def _run_galaxia(self, rho, **kwargs): A dictionary of same-length arrays representing kernel density estimates for the pipeline particles - input_dir : string - output_dir : string + input_dir, output_dir : string Optional arguments to specify paths for the directories where ananke should generate input and output data. @@ -218,173 +240,243 @@ def _run_galaxia(self, rho, **kwargs): surveyname : string Optional name Galaxia should use for the output files. Default to 'survey'. - - **kwargs - Additional parameters used by the method make_survey of - Galaxia's Survey objects + {parameters_from_galaxia} Returns ------- output : :obj:`Galaxia.Output` - Handler with utilities to utilize the output survey and its data. + Handler with utilities to utilize the output survey and its + data. + + Notes + ----- + {notes_from_galaxia_output} """ - input = self._prepare_galaxia_input(rho, **{k:kwargs.pop(k) for k in ['input_dir', 'k_factor'] if k in kwargs}) - survey = self._prepare_galaxia_survey(input, **{k:kwargs.pop(k) for k in ['surveyname'] if k in kwargs}) - self.__galaxia_output = survey.make_survey(**self._galaxia_kwargs, **kwargs) + input: Galaxia.Input = self._prepare_galaxia_input(rho, **{k:kwargs.pop(k) for k in ['input_dir', 'k_factor'] if k in kwargs}) + survey: Galaxia.Survey = self._prepare_galaxia_survey(input, **{k:kwargs.pop(k) for k in ['surveyname'] if k in kwargs}) + self.__galaxia_output: Galaxia.Output = survey.make_survey(**self._galaxia_kwargs, **kwargs) return self._galaxia_output - _run_galaxia.__doc__ = _run_galaxia.__doc__.format(POS_TAG=POS_TAG, VEL_TAG=VEL_TAG) + _run_galaxia.__doc__ = _run_galaxia.__doc__.format(POS_TAG=POS_TAG, VEL_TAG=VEL_TAG, + parameters_from_galaxia = utils.extract_parameters_from_docstring( + Galaxia.Survey.make_survey.__doc__, + ignore=[ + 'fsample', 'cmd_magnames', 'parfile', 'output_dir', + 'rSun0, rSun1, rSun2', 'vSun0, vSun1, vSun2', 'r_max, r_min', + 'app_mag_lim_lo, app_mag_lim_hi, abs_mag_lim_lo, abs_mag_lim_hi, color_lim_lo, color_lim_hi' + ]).replace("\n", "\n "), + notes_from_galaxia_output = utils.extract_notes_from_docstring( + Galaxia.Output.__init__.__doc__).replace("\n", "\n ")) - def _postprocess_observed_mags(self, galaxia_output: Galaxia.Output): - mag_names = self.galaxia_catalogue_mag_names + @classmethod + def __pp_observed_mags(cls, df: pd.DataFrame, mag_names, _dmod) -> None: for mag in mag_names: - galaxia_output[self._intrinsic_mag_template(mag)] = galaxia_output[mag] - galaxia_output[mag] += galaxia_output[galaxia_output._dmod] - galaxia_output.flush_extra_columns_to_hdf5(with_columns=mag_names) + df[cls._intrinsic_mag_template(mag)] = df[mag] + df[mag] += df[_dmod] + + def _pp_observed_mags(self, galaxia_output: Galaxia.Output) -> None: + pipeline_name = "observed_magnitudes" + print(f"Running {pipeline_name} post-processing pipeline") + mag_names = self.galaxia_catalogue_mag_names + galaxia_output.apply_post_process_pipeline_and_flush(self.__pp_observed_mags, mag_names, galaxia_output._dmod, flush_with_columns=mag_names) + + def _pp_extinctions(self) -> None: + pipeline_name = "extinctions" + print(f"Running {pipeline_name} post-processing pipeline") + if self._extinctiondriver_proxy._col_density in self.particles: + _ = self.extinctions + + def _pp_errors(self) -> None: + pipeline_name = "error_modeling" + print(f"Running {pipeline_name} post-processing pipeline") + if not self._errormodeldriver_proxy.ignore: + _ = self.errors - def run(self, **kwargs): + def run(self, **kwargs) -> Galaxia.Output: """ Method to run the pipeline Parameters ---------- - input_dir : string - output_dir : string - i_o_dir : string + input_dir, output_dir, i_o_dir : string Optional arguments to specify paths for the directories where ananke should generate input and output data. If the i_o_dir keyword argument is provided, it overrides any path given to the input_dir and output_dir keyword arguments. - - k_factor : float - Scaling factor applied to the kernels lengths to adjust all - the kernels sizes uniformly. Lower values reduces the kernels - extents, while higher values increases them. - Default to 1 (no adjustment). - - surveyname : string - Optional name Galaxia should use for the output files. Default - to 'survey'. - - **kwargs - Additional parameters used by the method make_survey of - Galaxia's Survey objects + {parameters_from_run_galaxia} Returns ------- galaxia_output : :obj:`Galaxia.Output` - Handler with utilities to utilize the output survey and its data. + Handler with utilities to utilize the output survey and its + data. + + Notes + ----- + {notes_from_run_galaxia} + + Ananke complements this set of properties with those that are + generated from its various post-processing subroutines. As a result + the ``photosys_filtername``-formatted columns contain the apparent + photometry, computed with addition of extinction and instrument + error. Each component contributing to this final apparent + photometry are stored in other columns with the + ``photosys_filtername`` format with relevant prefixing/suffixing as + listed below: + + * The intrinsic photometry are stored in the suffixed ``{_Intrinsic}`` keys + * The extinction values are stored in the prefixed ``{A_}`` keys + * The properties' standard error are stored in the suffixed ``{_Sig}`` keys + * The properties' actually drawn gaussian error are stored in the suffixed ``_Err`` keys + + Note that because the error model generally also affect astrometry, + the latter 2 suffixing rules also apply to the astrometric + properties. + + The extinction post-processing routine also add 3 properties: + + * The line-of-sight hydrogen column density in {log10_NH_unit} and decimal logarithmic scale via key ``{log10_NH}`` + * The reddening index via key ``{E_B_V}`` + * The reference extinction (which extinction coefficients are based on) via key ``{A_0}`` """ if 'i_o_dir' in kwargs: kwargs['input_dir'] = kwargs['output_dir'] = kwargs.pop('i_o_dir') - galaxia_output = self._run_galaxia(self.densities, **kwargs) - self._postprocess_observed_mags(galaxia_output) - if self._extinctiondriver_proxy._col_density in self.particles: - _ = self.extinctions - _ = self.errors + galaxia_output: Galaxia.Output = self._run_galaxia(self.densities, **kwargs) + self._pp_observed_mags(galaxia_output) + self._pp_extinctions() + self._pp_errors() return galaxia_output + run.__doc__ = run.__doc__.format( + parameters_from_run_galaxia = utils.extract_parameters_from_docstring( + _run_galaxia.__doc__, + ignore=['input_dir, output_dir', 'rho']).replace("\n", "\n "), + notes_from_run_galaxia = utils.extract_notes_from_docstring( + _run_galaxia.__doc__).replace("\n", "\n "), + _Intrinsic = _intrinsic_mag_template(""), + A_ = "A_", # TODO + _Sig = "_Sig", + _Err = "_Err", + log10 = "$log_{10}$", + log10_NH_unit = "$cm^{-2}$", + log10_NH = _log10NH, + E_B_V = "E(B-V)", + A_0 = "A_0") + @property - def _densitiesdriver_proxy(self): + def _densitiesdriver_proxy(self) -> DensitiesDriver: return self.__densitiesdriver_proxy @property - def _extinctiondriver_proxy(self): + def _extinctiondriver_proxy(self) -> ExtinctionDriver: return self.__extinctiondriver_proxy @property - def _errormodeldriver_proxy(self): + def _errormodeldriver_proxy(self) -> ErrorModelDriver: return self.__errormodeldriver_proxy @property - def particles(self): + def particles(self) -> Dict[str, NDArray]: return self.__particles @property - def particle_masses(self): + def particle_masses(self) -> NDArray: return self.particles[self._mass] @property - def particle_positions(self): + def particle_positions(self) -> NDArray: return self.particles[self._pos] @property - def particle_velocities(self): + def particle_velocities(self) -> NDArray: return self.particles[self._vel] @property - def name(self): + def name(self) -> str: return self.__name @property - def ngb(self): + def ngb(self) -> int: return self.__ngb @property - def universe(self): + def universe(self) -> Universe: return self.__universe_proxy @property - def universe_rshell(self): + def universe_rshell(self) -> NDArray: return self.universe.rshell @property - def observer(self): + def observer(self) -> Observer: return self.__observer_proxy @property - def observer_position(self): + def observer_position(self) -> NDArray: return self.observer.position @property - def observer_velocity(self): + def observer_velocity(self) -> NDArray: return self.observer.velocity @property - def densities(self): + def densities(self) -> Dict[str, NDArray]: return self._densitiesdriver_proxy.densities @property - def extinctions(self): + def extinctions(self): # TODO figure out output typing return self._extinctiondriver_proxy.extinctions @property - def errors(self): + def errors(self): # TODO figure out output typing return self._errormodeldriver_proxy.errors @property - def parameters(self): + def parameters(self) -> Dict[str, Any]: return self.__parameters @property - def photo_sys(self): + def photo_sys(self) -> str: return self.__photo_sys @property - def galaxia_isochrones(self): # TODO race condition with the implementation in extinction using the following 3 properties, requires rethinking Galaxia, maybe with the future photometryspecs implementation: ultimate goal is to get isochrones from a Galaxia object without explicitely calling Galaxia class methods - return Galaxia.Survey.set_isochrones_from_photosys(self.photo_sys) + def galaxia_photosystems(self) -> List[PhotoSystem]: # TODO race condition with the implementation in extinction using the following 3 properties, requires rethinking Galaxia, maybe with the future photometryspecs implementation: ultimate goal is to get isochrones from a Galaxia object without explicitely calling Galaxia class methods + return Galaxia.Survey.prepare_photosystems(self.photo_sys) + + @property + def galaxia_isochrones(self): + warn('This property will be deprecated, please use instead property galaxia_photosystems', DeprecationWarning, stacklevel=2) + return self.galaxia_photosystems @property - def galaxia_catalogue_mag_names(self): - return Galaxia.Output._compile_export_mag_names(self.galaxia_isochrones) + def galaxia_catalogue_mag_names(self) -> Tuple[str]: + return Galaxia.Output._compile_export_mag_names(self.galaxia_photosystems) @property - def intrinsic_catalogue_mag_names(self): + def intrinsic_catalogue_mag_names(self) -> Tuple[str]: return tuple(map(self._intrinsic_mag_template, self.galaxia_catalogue_mag_names)) @property - def galaxia_catalogue_mag_and_astrometrics(self): + def galaxia_catalogue_mag_and_astrometrics(self) -> Tuple[str]: return self.galaxia_catalogue_mag_names + (Galaxia.Output._pi,) + Galaxia.Output._cel + Galaxia.Output._mu + (Galaxia.Output._vr,) @property - def galaxia_catalogue_keys(self): - return Galaxia.Output._make_catalogue_keys(self.galaxia_isochrones) + def galaxia_catalogue_keys(self) -> Tuple[str]: + return Galaxia.Output._make_catalogue_keys(self.galaxia_photosystems) @property - def _galaxia_kwargs(self): + def photosystems_zeropoints(self) -> Quantity: + return np.hstack([ps.zeropoints for ps in self.galaxia_photosystems]) + + @property + def photosystems_zeropoints_dict(self) -> Dict[str, Quantity]: + return dict(zip(self.galaxia_catalogue_mag_names, self.photosystems_zeropoints)) + + @property + def _galaxia_kwargs(self) -> Dict[str, Any]: return {**self.universe.to_galaxia_kwargs, **self.observer.to_galaxia_kwargs, **self.parameters} @property - def _galaxia_particles(self): + def _galaxia_particles(self) -> Dict[str, NDArray]: return {key: self.particles[key] for key in self._galaxia_particles_keys if key in self.particles} @property @@ -393,14 +485,28 @@ def _output(self): return self._galaxia_output @property - def _galaxia_output(self): + def _galaxia_output(self) -> Galaxia.Output: if self.__galaxia_output is None: raise RuntimeError("You must use the `run` method before accessing the catalogue") else: return self.__galaxia_output @classmethod - def make_dummy_particles_input(cls, n_parts=10**5, with_densities=False): + def make_dummy_dictionary_description(cls) -> str: + description = """{particles_dictionary_description} + Ananke compute the phase space densities that are used to + determine particle smoothing lengths, but the dictionary can + include pre-computed densities with the following entries: + {density_properties} + """.format(particles_dictionary_description=Galaxia.Input.particles_dictionary_description, + density_properties=''.join( + [f"\n * {desc} via key ``{str(key)}``" + for key, desc in [Galaxia.Input._positiondensity_prop, + Galaxia.Input._velocitydensity_prop]])) + return description + + @classmethod + def make_dummy_particles_input(cls, n_parts=10**5, with_densities=False) -> Dict[str, NDArray]: """ Generate an example dummy input particles dictionary for Ananke made of randomly generated arrays. @@ -409,11 +515,19 @@ def make_dummy_particles_input(cls, n_parts=10**5, with_densities=False): ---------- n_parts : int Number of particles the example include. Default to 10**5. + + with_densities : bool + Flag to include dummy densities estimates in the returned + dictionary. Default to False Returns ------- p : dict - Dummy example input particles for Ananke. + Dummy example input particles dictionary for Ananke. + + Notes + ----- + {dummy_dictionary_description} """ p = Galaxia.make_dummy_particles_input(n_parts) p[cls._log10NH] = 22 + np.random.randn(n_parts) @@ -432,36 +546,47 @@ def display_available_photometric_systems(cls): available_photo_systems : dict Dictionary of dictionaries of Isochrone objects. """ - return Galaxia.photometry.available_photo_systems + return Galaxia_photo.available_photo_systems @classmethod - def display_density_docs(cls): + def display_density_docs(cls) -> None: """ Print the DensitiesDriver constructor docstring """ print(DensitiesDriver.__init__.__doc__) @classmethod - def display_EnBiD_docs(cls): + def display_EnBiD_docs(cls) -> None: """ - Print the EnBiD.run_enbid docstring + Print the EnBiD.run_enbid method docstring """ DensitiesDriver.display_EnBiD_docs() @classmethod - def display_extinction_docs(cls): + def display_extinction_docs(cls) -> None: """ Print the ExtinctionDriver constructor docstring """ print(ExtinctionDriver.__init__.__doc__) @classmethod - def display_errormodel_docs(cls): + def display_errormodel_docs(cls) -> None: """ Print the ErrorModelDriver constructor docstring """ print(ErrorModelDriver.__init__.__doc__) + @classmethod + def display_galaxia_makesurvey_docs(cls) -> None: + """ + Print the Galaxia.Survey.make_survey method docstring + """ + print(Galaxia.Survey.make_survey.__doc__) + + +Ananke.make_dummy_particles_input.__func__.__doc__ = Ananke.make_dummy_particles_input.__doc__.format( + dummy_dictionary_description=Ananke.make_dummy_dictionary_description()) + if __name__ == '__main__': - pass + raise NotImplementedError() diff --git a/src/ananke/DensitiesDriver.py b/src/ananke/DensitiesDriver.py index 9b15a4b..7cd000f 100644 --- a/src/ananke/DensitiesDriver.py +++ b/src/ananke/DensitiesDriver.py @@ -6,12 +6,13 @@ available in the main ``ananke`` namespace - use that instead. """ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any, Dict +from numpy.typing import NDArray import pathlib import EnBiD_ananke as EnBiD from . import utils -from .constants import * +from ._constants import * if TYPE_CHECKING: from .Ananke import Ananke @@ -25,7 +26,7 @@ class DensitiesDriver: """ _density_formatter = 'rho_{}' _density_template = _density_formatter.format - def __init__(self, ananke: Ananke, **kwargs) -> None: + def __init__(self, ananke: Ananke, **kwargs: Dict[str, Any]) -> None: """ Parameters ---------- @@ -38,8 +39,8 @@ def __init__(self, ananke: Ananke, **kwargs) -> None: parameters of EnBiD accessible through the class method display_EnBiD_docs """ - self.__ananke = ananke - self.__parameters = kwargs + self.__ananke: Ananke = ananke + self.__parameters: Dict[str, Any] = kwargs self.densities = self.particle_densities def _run_enbid(self): @@ -82,7 +83,7 @@ def particle_velocities(self): return self.ananke.particle_velocities @property - def particle_densities(self): + def particle_densities(self) -> Dict[str, NDArray]: return {key: self.ananke.particles[self._density_template(key)] for key in [POS_TAG, VEL_TAG] if self._density_template(key) in self.ananke.particles} @@ -96,7 +97,7 @@ def ngb(self): return self.ananke.ngb @property - def parameters(self): + def parameters(self) -> Dict[str, Any]: return self.__parameters @property diff --git a/src/ananke/ErrorModelDriver.py b/src/ananke/ErrorModelDriver.py index 517f330..1004927 100644 --- a/src/ananke/ErrorModelDriver.py +++ b/src/ananke/ErrorModelDriver.py @@ -6,17 +6,20 @@ available in the main ``ananke`` namespace - use that instead. """ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any, Union, Set, List, Dict, Callable +from numpy.typing import ArrayLike, NDArray from warnings import warn from collections.abc import Iterable import numpy as np +import pandas as pd from . import utils from ._default_error_model import * -from .constants import * +from ._constants import * if TYPE_CHECKING: from .Ananke import Ananke + import Galaxia_ananke as Galaxia __all__ = ['ErrorModelDriver'] @@ -31,7 +34,7 @@ class ErrorModelDriver: _error_template = _error_formatter.format _extra_output_keys = () - def __init__(self, ananke: Ananke, **kwargs) -> None: + def __init__(self, ananke: Ananke, **kwargs: Dict[str, Any]) -> None: """ Parameters ---------- @@ -49,8 +52,8 @@ def __init__(self, ananke: Ananke, **kwargs) -> None: to check if it has a default model to use. If it doesn't find one it will simply fill errors with nan values. """ - self.__ananke = ananke - self.__parameters = kwargs + self.__ananke: Ananke = ananke + self.__parameters: Dict[str, Any] = kwargs self._test_error_model() def __getattr__(self, item): @@ -60,66 +63,91 @@ def __getattr__(self, item): return self.__getattribute__(item) @property - def ananke(self): + def ananke(self) -> Ananke: return self.__ananke @property - def galaxia_output(self): + def galaxia_output(self) -> Galaxia.Output: return self.ananke._galaxia_output - def _expand_and_apply_error_model(self, df): - error_model = self.error_model + @staticmethod + def _expand_and_apply_error_model(df, error_model) -> Dict[str, ArrayLike]: if not isinstance(error_model, Iterable): error_model = [error_model] return {key: error for error_dict in [(err_model(df) if callable(err_model) else err_model) for err_model in error_model] for key,error in error_dict.items()} # TODO adapt to dataframe type of output? - def _test_error_model(self): + def _test_error_model(self) -> None: dummy_df = utils.RecordingDataFrame([], columns = self.ananke.galaxia_catalogue_keys + self._extra_output_keys) # TODO make use of dummy_df.record_of_all_used_keys dummy_df.loc[0] = np.nan try: - dummy_err = self._expand_and_apply_error_model(dummy_df) + dummy_err = self._expand_and_apply_error_model(dummy_df, self.error_model) except KeyError as KE: raise KE # TODO make it more informative - utils.compare_given_and_required(dummy_err.keys(), self.ananke.galaxia_catalogue_mag_and_astrometrics, set(self.ananke.galaxia_catalogue_keys)-set(self.ananke.galaxia_catalogue_mag_and_astrometrics), error_message="Given error model function returns wrong set of keys") + utils.compare_given_and_required(dummy_err.keys(), set(), self.ananke.galaxia_catalogue_mag_and_astrometrics, error_message="Given error model function returns wrong set of keys") @property - def _sigma_keys(self): + def _sigma_keys(self) -> Set[str]: return set(map(self._sigma_template, self.ananke.galaxia_catalogue_mag_names)) @property - def _error_keys(self): + def _error_keys(self) -> Set[str]: return set(map(self._error_template, self.ananke.galaxia_catalogue_mag_names)) - @property - def errors(self): - if self._error_keys.difference(self.galaxia_output.columns): - magnitudes = self.ananke.galaxia_catalogue_mag_names - with_columns = [] - for prop_name, error in self._expand_and_apply_error_model(self.galaxia_output).items(): + @classmethod + def __pp_pipeline(cls, df: pd.DataFrame, error_keys: Set[str], + error_model: List[Union[Callable[[pd.DataFrame], + Dict[str, NDArray]], + Dict[str, float]]]) -> None: + if error_keys.difference(df.columns): + for prop_name, error in cls._expand_and_apply_error_model(df, error_model).items(): # pre-generate the keys to use for the standard error and its actual gaussian drawn error of property prop_name - prop_sig_name, prop_err_name = self._sigma_template(prop_name), self._error_template(prop_name) + prop_sig_name, prop_err_name = cls._sigma_template(prop_name), cls._error_template(prop_name) # assign the column of the standard error values for property prop_name in the final catalogue output - self.galaxia_output[prop_sig_name] = error + df[prop_sig_name] = error # assign the column of the actual gaussian drawn error values for property prop_name in the final catalogue output - self.galaxia_output[prop_err_name] = error*np.random.randn(self.galaxia_output.shape[0]) + df[prop_err_name] = error*np.random.randn(df.shape[0]) # add the drawn error value to the existing quantity for property prop_name - self.galaxia_output[prop_name] += self.galaxia_output[prop_err_name] - with_columns.append(prop_name) - self.galaxia_output.flush_extra_columns_to_hdf5(with_columns=tuple(with_columns)) - self.galaxia_output._pp_convert_icrs_to_galactic() - return self.galaxia_output[list(self._error_keys)] + df[prop_name] += df[prop_err_name] + # with_columns.append(prop_name) + + @property + def errors(self): # TODO figure out output typing + galaxia_output = self.galaxia_output + error_keys = self._error_keys + galaxia_output.apply_post_process_pipeline_and_flush(self.__pp_pipeline, error_keys, self.error_model, flush_with_columns=tuple(self._error_prop_names)) + galaxia_output._pp_convert_icrs_to_galactic() + return galaxia_output[list(error_keys)] + + @property + def _error_prop_names(self) -> Set[str]: + dummy_df = utils.RecordingDataFrame([], columns = self.ananke.galaxia_catalogue_keys + self._extra_output_keys) # TODO make use of dummy_df.record_of_all_used_keys + dummy_df.loc[0] = np.nan + return set(self._expand_and_apply_error_model(dummy_df, self.error_model).keys()) @property - def parameters(self): + def parameters(self) -> Dict[str, Any]: return self.__parameters @property - def error_model(self): # TODO design - return self.parameters.get('error_model', [getattr(iso, 'default_error_model', self.__missing_default_error_model_for_isochrone(iso)) for iso in self.ananke.galaxia_isochrones]) + def ignore(self) -> bool: + return self.parameters.get('ignore', False) + + @property + def error_model(self) -> List[Union[Callable[[pd.DataFrame], Dict[str, NDArray]], Dict[str, float]]]: # TODO design + return self.parameters.get('error_model', [getattr(psys, 'default_error_model', self.__missing_default_error_model_for_photosystem(psys)) for psys in self.ananke.galaxia_photosystems]) @staticmethod - def __missing_default_error_model_for_isochrone(isochrone): + def __missing_default_error_model_for_photosystem(photosystem) -> Callable[[pd.DataFrame], Dict[str, NDArray]]: def __return_zero_error_and_warn(df): - warn(f"Method default_error_model isn't defined for isochrone {isochrone.key}", UserWarning, stacklevel=2) - return {mag: np.zeros(df.shape[0]) for mag in isochrone.to_export_keys} + warn(f"Method default_error_model isn't defined for photometric system {photosystem.key}", UserWarning, stacklevel=2) + return {mag: np.zeros(df.shape[0]) for mag in photosystem.to_export_keys} return __return_zero_error_and_warn + + @staticmethod + def __missing_default_error_model_for_isochrone(photosystem): + warn('This static method will be deprecated, please use instead static method __missing_default_error_model_for_photosystem', DeprecationWarning, stacklevel=2) + return ErrorModelDriver.__missing_default_error_model_for_photosystem(photosystem) + + +if __name__ == '__main__': + raise NotImplementedError() diff --git a/src/ananke/ExtinctionDriver.py b/src/ananke/ExtinctionDriver.py index 00ed0aa..0f8b877 100644 --- a/src/ananke/ExtinctionDriver.py +++ b/src/ananke/ExtinctionDriver.py @@ -6,19 +6,23 @@ available in the main ``ananke`` namespace - use that instead. """ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any, Union, Set, List, Dict, Callable +from numpy.typing import ArrayLike, NDArray from warnings import warn +from functools import cached_property from collections.abc import Iterable import numpy as np import scipy as sp -import scipy.interpolate # needed for python==3.7 +from scipy.interpolate import LinearNDInterpolator +import pandas as pd from . import utils from ._default_extinction_coeff import * -from .constants import * +from ._constants import * if TYPE_CHECKING: from .Ananke import Ananke + import Galaxia_ananke as Galaxia __all__ = ['ExtinctionDriver'] @@ -36,7 +40,7 @@ class ExtinctionDriver: _extinction_0 = _extinction_template(0) _extra_output_keys = (_reddening, _extinction_0) - def __init__(self, ananke: Ananke, **kwargs) -> None: + def __init__(self, ananke: Ananke, **kwargs: Dict[str, Any]) -> None: """ Parameters ---------- @@ -63,28 +67,12 @@ def __init__(self, ananke: Ananke, **kwargs) -> None: If it doesn't find one it will simply fill extinction with nan values. """ - self.__ananke = ananke - self.__interpolator = None - self.__parameters = kwargs + self.__ananke: Ananke = ananke + self.__interpolator: Union[LinearNDInterpolator, None] = None + self.__parameters: Dict[str, Any] = kwargs self._test_extinction_coeff() __init__.__doc__ = __init__.__doc__.format(Q_DUST=Q_DUST, TOTAL_TO_SELECTIVE=TOTAL_TO_SELECTIVE) - - def _make_interpolator(self): - # center particle coordinates on the observer - xhel_p = self.ananke.particle_positions - self.ananke.observer_position[:3] - # TODO coordinates.SkyCoord(**dict(zip([*'uvw'], xhel_p.T)), unit='kpc', representation_type='cartesian', frame='galactic') ? - # return distances from observer to particles - dhel_p = np.linalg.norm(xhel_p, axis=1) - # return the min,max extent of the shell of particles used by Galaxia (with a +-0.1 margin factor) - rmin, rmax = self.ananke.universe_rshell * [0.9, 1.1] - # create a mask for the particles that are within the shell - sel_interp = (rmin Ananke: return self.__ananke @property - def column_densities(self): + def particle_column_densities(self) -> NDArray: return self.particles[self._col_density] if self._col_density in self.particles else np.nan*self.particle_masses @property - def galaxia_output(self): + def galaxia_output(self) -> Galaxia.Output: return self.ananke._galaxia_output - @property - def galaxia_pos(self): - return np.array(self.galaxia_output[self._galaxia_pos]) - - @property - def column_density_interpolator(self): - if self.__interpolator is None: - return self._make_interpolator() - else: - return self.__interpolator - - @property - def interpolated_column_densities(self): - if self._interp_col_dens not in self.galaxia_output.column_names: - self.galaxia_output[self._interp_col_dens] = self.column_density_interpolator(self.galaxia_pos) - return self.galaxia_output[self._interp_col_dens] - - @property - def reddening(self): - if self._reddening not in self.galaxia_output.column_names: - self.galaxia_output[self._reddening] = self.q_dust * 10**self.interpolated_column_densities - return self.galaxia_output[self._reddening] - - @property - def extinction_0(self): - if self._extinction_0 not in self.galaxia_output.column_names: - self.galaxia_output[self._extinction_0] = self.total_to_selective * self.reddening - return self.galaxia_output[self._extinction_0] + @cached_property + def column_density_interpolator(self) -> LinearNDInterpolator: + # center particle coordinates on the observer + xhel_p = self.ananke.particle_positions - self.ananke.observer_position[:3] + # TODO coordinates.SkyCoord(**dict(zip([*'uvw'], xhel_p.T)), unit='kpc', representation_type='cartesian', frame='galactic') ? + # return distances from observer to particles + dhel_p = np.linalg.norm(xhel_p, axis=1) + # return the min,max extent of the shell of particles used by Galaxia (with a +-0.1 margin factor) + rmin, rmax = self.ananke.universe_rshell * [0.9, 1.1] + # create a mask for the particles that are within the shell + sel_interp = (rmin Dict[str, ArrayLike]: if not isinstance(extinction_coeff, Iterable): extinction_coeff = [extinction_coeff] - return {key: A0 * coeff for coeff_dict in [(ext_coeff(df) if callable(ext_coeff) else ext_coeff) for ext_coeff in extinction_coeff] for key,coeff in coeff_dict.items()} # TODO adapt to dataframe type of output? - - def _test_extinction_coeff(self): + return { + key: ((coeff if isinstance(coeff, np.ndarray) else coeff.to_numpy())* + (A0 if isinstance(A0, np.ndarray) else A0.to_numpy())) # TODO temporary fix while waiting issue https://github.com/vaexio/vaex/issues/2405 to be fixed + for coeff_dict in [ + (ext_coeff(df) if callable(ext_coeff) else ext_coeff) + for ext_coeff in extinction_coeff + ] + for key,coeff in coeff_dict.items() + } # TODO adapt to dataframe type of output? + + def _test_extinction_coeff(self) -> None: dummy_df = utils.RecordingDataFrame([], columns = self.ananke.galaxia_catalogue_keys + self._extra_output_keys) # TODO make use of dummy_df.record_of_all_used_keys dummy_df.loc[0] = np.nan try: - dummy_ext = self._expand_and_apply_extinction_coeff(dummy_df, dummy_df[self._extinction_0]) + dummy_ext = self._expand_and_apply_extinction_coeff(dummy_df, dummy_df[self._extinction_0], self.extinction_coeff) except KeyError as KE: raise KE # TODO make it more informative utils.compare_given_and_required(dummy_ext.keys(), self.ananke.galaxia_catalogue_mag_names, error_message="Given extinction coeff function returns wrong set of keys") @property - def _extinction_keys(self): + def _extinction_keys(self) -> Set[str]: return set(map(self._extinction_template, self.ananke.galaxia_catalogue_mag_names)) - @property - def extinctions(self): - if self._extinction_keys.difference(self.galaxia_output.columns): - for mag_name, extinction in self._expand_and_apply_extinction_coeff(self.galaxia_output, self.extinction_0).items(): + @classmethod + def __pp_pipeline(cls, df: pd.DataFrame, column_density_interpolator: LinearNDInterpolator, + q_dust: float, total_to_selective: float, extinction_keys: Set[str], + extinction_coeff: List[Union[Callable[[pd.DataFrame], + Dict[str, NDArray]], + Dict[str, float]]]) -> None: + column_densities = df[cls._interp_col_dens] = column_density_interpolator(np.array(df[cls._galaxia_pos])) + reddening = df[cls._reddening] = q_dust * 10**column_densities + extinction_0 = df[cls._extinction_0] = total_to_selective * reddening + if extinction_keys.difference(df.columns): + for mag_name, extinction in cls._expand_and_apply_extinction_coeff(df, extinction_0, extinction_coeff).items(): # assign the column of the extinction values for filter mag_name in the final catalogue output - self.galaxia_output[self._extinction_template(mag_name)] = extinction + df[cls._extinction_template(mag_name)] = extinction # add the extinction value to the existing photometric magnitude for filter mag_name - self.galaxia_output[mag_name] += extinction - self.galaxia_output.flush_extra_columns_to_hdf5(with_columns=self.ananke.galaxia_catalogue_mag_names) - return self.galaxia_output[list(self._extinction_keys)] + df[mag_name] += df[cls._extinction_template(mag_name)] @property - def parameters(self): + def extinctions(self): # TODO figure out output typing + galaxia_output = self.galaxia_output + coldens_interpolator = self.column_density_interpolator + extinction_keys = self._extinction_keys + galaxia_output.apply_post_process_pipeline_and_flush(self.__pp_pipeline, coldens_interpolator, + self.q_dust, self.total_to_selective, extinction_keys, + self.extinction_coeff, flush_with_columns=self.ananke.galaxia_catalogue_mag_names) + return galaxia_output[list(extinction_keys)] + + @property + def parameters(self) -> Dict[str, Any]: return self.__parameters @property - def q_dust(self): + def q_dust(self) -> float: return self.parameters.get('q_dust', Q_DUST) @property - def total_to_selective(self): + def total_to_selective(self) -> float: return self.parameters.get('total_to_selective', TOTAL_TO_SELECTIVE) @property - def extinction_coeff(self): - return self.parameters.get('extinction_coeff', [getattr(iso, 'default_extinction_coeff', self.__missing_default_extinction_coeff_for_isochrone(iso)) for iso in self.ananke.galaxia_isochrones]) + def extinction_coeff(self) -> List[Union[Callable[[pd.DataFrame], Dict[str, NDArray]], Dict[str, float]]]: + return self.parameters.get('extinction_coeff', [getattr(psys, 'default_extinction_coeff', self.__missing_default_extinction_coeff_for_photosystem(psys)) for psys in self.ananke.galaxia_photosystems]) @staticmethod - def __missing_default_extinction_coeff_for_isochrone(isochrone): + def __missing_default_extinction_coeff_for_photosystem(photosystem) -> Callable[[pd.DataFrame], Dict[str, NDArray]]: def __return_nan_coeff_and_warn(df): - warn(f"Method default_extinction_coeff isn't defined for isochrone {isochrone.key}", UserWarning, stacklevel=2) - return {mag: np.zeros(df.shape[0])*0. for mag in isochrone.to_export_keys} + warn(f"Method default_extinction_coeff isn't defined for photometric system {photosystem.key}", UserWarning, stacklevel=2) + return {mag: np.zeros(df.shape[0])*0. + coeff for mag, coeff in zip(photosystem.to_export_keys, universal_extinction_law(photosystem.effective_wavelengths))} return __return_nan_coeff_and_warn + + @staticmethod + def __missing_default_extinction_coeff_for_isochrone(photosystem): + warn('This static method will be deprecated, please use instead static method __missing_default_extinction_coeff_for_photosystem', DeprecationWarning, stacklevel=2) + return ExtinctionDriver.__missing_default_extinction_coeff_for_photosystem(photosystem) + + +if __name__ == '__main__': + raise NotImplementedError() diff --git a/src/ananke/Observer.py b/src/ananke/Observer.py index 24cef25..4022e9b 100644 --- a/src/ananke/Observer.py +++ b/src/ananke/Observer.py @@ -6,12 +6,12 @@ available in the main ``ananke`` namespace - use that instead. """ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any, Dict +from numpy.typing import ArrayLike, NDArray import numpy as np -import numpy.typing # needed for python==3.7 -from Galaxia_ananke.constants import DEFAULTS_FOR_PARFILE +from Galaxia_ananke._defaults import DEFAULTS_FOR_PARFILE -from .constants import * +from ._constants import * if TYPE_CHECKING: from .Ananke import Ananke @@ -28,51 +28,64 @@ class Observer: # TODO SkyCoord for center point: SkyCoord(u=-rSun[0], v=-rSun[ _pos2 = 'rSun2' _pos = [_pos0,_pos1,_pos2] _default_position = np.array([DEFAULTS_FOR_PARFILE[_p] for _p in _pos]) - _vel = [] # TODO + _vel0 = 'vSun0' + _vel1 = 'vSun1' + _vel2 = 'vSun2' + _vel = [_vel0,_vel1,_vel2] + _default_velocity = np.array([DEFAULTS_FOR_PARFILE[_p] for _p in _vel]) _pha = _pos+_vel - def __init__(self, ananke: Ananke, pos: np.typing.ArrayLike, **kwargs) -> None: + def __init__(self, ananke: Ananke, pos3: ArrayLike = None, vel3: ArrayLike = None, **kwargs: Dict[str, Any]) -> None: """ Parameters ---------- ananke : Ananke object The Ananke object that utilizes this Observer object - pos : array-like shape (3,) - Position of the observer + pos3 : array-like shape (3,) + Position of the observer. Default to None + vel3 : array-like shape (3,) + Velocity of the observer. Default to None **kwargs Additional parameters """ - self.__ananke = ananke - self.__position = self.__prepare_position(pos) - self.__velocity = [] - self.__parameters = kwargs + self.__ananke: Ananke = ananke + self.__position: NDArray = self.__prepare_position(pos3) + self.__velocity: NDArray = self.__prepare_velocity(vel3) + self.__parameters: Dict[str, Any] = kwargs + + @classmethod + def __prepare_against_default(cls, vector: ArrayLike, default: NDArray) -> NDArray: + vector = np.array(len(default)*[np.nan] if vector is None else vector) + vector[np.isnan(vector)] = default[np.isnan(vector)] + return vector - def __prepare_position(self, pos: np.typing.ArrayLike): - pos = np.array(pos) - pos[np.isnan(pos)] = self._default_position[np.isnan(pos)] - return pos + def __prepare_position(self, pos: ArrayLike) -> NDArray: + return self.__prepare_against_default(pos, self._default_position) + + def __prepare_velocity(self, vel: ArrayLike) -> NDArray: + return self.__prepare_against_default(vel, self._default_velocity) @property - def ananke(self): + def ananke(self) -> Ananke: return self.__ananke @property - def position(self): + def position(self) -> NDArray: return self.__position @property - def velocity(self): + def velocity(self) -> NDArray: return self.__velocity @property - def phase_space(self): + def phase_space(self) -> NDArray: return np.hstack([self.position, self.velocity]) @property - def to_galaxia_kwargs(self): + def to_galaxia_kwargs(self) -> Dict[str, float]: return dict(zip(self._pha, self.phase_space)) @property - def parameters(self): + def parameters(self) -> Dict[str, Any]: return self.__parameters \ No newline at end of file diff --git a/src/ananke/Universe.py b/src/ananke/Universe.py index 9075a49..2101399 100644 --- a/src/ananke/Universe.py +++ b/src/ananke/Universe.py @@ -6,12 +6,12 @@ available in the main ``ananke`` namespace - use that instead. """ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any, Dict +from numpy.typing import ArrayLike, NDArray import numpy as np -import numpy.typing # needed for python==3.7 -from Galaxia_ananke.constants import DEFAULTS_FOR_PARFILE +from Galaxia_ananke._defaults import DEFAULTS_FOR_PARFILE -from .constants import * +from ._constants import * if TYPE_CHECKING: from .Ananke import Ananke @@ -28,7 +28,7 @@ class Universe: _rshell = [_rmin,_rmax] _default_rshell = np.array([DEFAULTS_FOR_PARFILE[_p] for _p in _rshell]) - def __init__(self, ananke: Ananke, rshell: np.typing.ArrayLike, **kwargs) -> None: + def __init__(self, ananke: Ananke, rshell: ArrayLike, **kwargs: Dict[str, Any]) -> None: """ Parameters ---------- @@ -40,28 +40,28 @@ def __init__(self, ananke: Ananke, rshell: np.typing.ArrayLike, **kwargs) -> Non **kwargs Additional parameters """ - self.__ananke = ananke - self.__rshell = self.__prepare_rshell(rshell) - self.__parameters = kwargs + self.__ananke: Ananke = ananke + self.__rshell: NDArray = self.__prepare_rshell(rshell) + self.__parameters: Dict[str, Any] = kwargs - def __prepare_rshell(self, rshell: np.typing.ArrayLike): + def __prepare_rshell(self, rshell: ArrayLike) -> NDArray: rshell = np.array(rshell) rshell[np.isnan(rshell)] = self._default_rshell[np.isnan(rshell)] return rshell @property - def ananke(self): + def ananke(self) -> Ananke: return self.__ananke @property - def rshell(self): + def rshell(self) -> NDArray: return self.__rshell @property - def to_galaxia_kwargs(self): + def to_galaxia_kwargs(self) -> Dict[str, float]: return dict(zip(self._rshell, self.rshell)) @property - def parameters(self): + def parameters(self) -> Dict[str, Any]: return self.__parameters \ No newline at end of file diff --git a/src/ananke/__init__.py b/src/ananke/__init__.py index f63d453..27b67f7 100644 --- a/src/ananke/__init__.py +++ b/src/ananke/__init__.py @@ -13,10 +13,23 @@ for further help. """ from .__metadata__ import * -from .constants import * +from ._constants import * from .Ananke import Ananke -__all__ = ['Ananke'] +__all__ = ['Ananke', 'make_dummy_particles_input', 'display_available_photometric_systems', 'display_density_docs', 'display_EnBiD_docs', 'display_extinction_docs', 'display_errormodel_docs'] + + +make_dummy_particles_input = Ananke.make_dummy_particles_input + +display_available_photometric_systems = Ananke.display_available_photometric_systems + +display_density_docs = Ananke.display_density_docs + +display_EnBiD_docs = Ananke.display_EnBiD_docs + +display_extinction_docs = Ananke.display_extinction_docs + +display_errormodel_docs = Ananke.display_errormodel_docs if __name__ == '__main__': diff --git a/src/ananke/__license__/LICENSE b/src/ananke/__license__/LICENSE new file mode 120000 index 0000000..5853aae --- /dev/null +++ b/src/ananke/__license__/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/src/ananke/__license__/__init__.py b/src/ananke/__license__/__init__.py new file mode 100644 index 0000000..880d092 --- /dev/null +++ b/src/ananke/__license__/__init__.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python +""" +Reading LICENSE file +""" +import pathlib + +__all__ = ["__license_full__"] + +__license_full__ = (pathlib.Path(__file__).parent / 'LICENSE').read_text() diff --git a/src/ananke/__metadata__.py b/src/ananke/__metadata__.py index 90833b7..ae21f54 100644 --- a/src/ananke/__metadata__.py +++ b/src/ananke/__metadata__.py @@ -2,14 +2,152 @@ """ Contains the ananke module metadata. """ -__all__ = ['__author__', '__copyright__', '__credits__', '__license__', '__version__', '__maintainer__', '__email__', '__url__', '__status__'] +import _sitebuiltins +import textwrap +from typing import Final +from datetime import datetime +from . import _version + +try: + from .__license__ import __license_full__ +except ImportError: + __license_full__ = "" + +__all__ = ['__project__', '__description__', '__url__', '__year__', '__author__', '__contributors__', '__license__', + '__version__', '__date__', '__maintainer__', '__email__', '__classifiers__', + '__credits__', '__doi__', '__citation__', '__adsurl__', '__bibtex__', '__copyright__', '__readme__', + 'copyright', 'credits', 'license', 'readme'] + +# PROJECT METADATA +__project__ = "py-ananke" +__description__ = "Provides a pipeline to generate mock synthetic star catalogs from star particle based simulated data." +__url__ = "https://github.com/athob/py-ananke" +__year__ = 2022 __author__ = "Adrien Thob" -__copyright__ = None -__credits__ = ["Adrien Thob", "Robyn Sanderson", "Andrew Eden"] -__license__ = "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)" -__version__ = "0.1.0b1" +__contributors__ = ["Robyn Sanderson", "Andrew Eden"] +__supporters__ = ["Farnik Nikakhtar", "Nondh Panithanpaisal", "Nicolas Garavito-Camargo", "Sanjib Sharma"] +__feedback__ = ["the extended Galaxy Dynamics @ UPenn group", "the participants of the \"anankethon\" workshops"] +__license__ = "GNU General Public License v3 or later (GPLv3+)" # TODO change to longer version? +__license_classifier__ = "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)" +__license_short__ = "Licensed under the GNU GPL v3 or later" + +# SOFTWARE METADATA +__version__: Final[str] = _version.get_versions()['version'] +__date__: str = _version.get_versions()['date'] +__date__: datetime = datetime.fromisoformat(f"{__date__[:-2]}:{__date__[-2:]}") __maintainer__ = "Adrien Thob" __email__ = "athob@sas.upenn.edu" -__url__ = "https://github.com/athob/py-ananke" -__status__ = "Development Status :: 4 - Beta" +__status_classifier__ = "Development Status :: 4 - Beta" +__classifiers__ = [ + __status_classifier__, + "Environment :: Console", + "Intended Audience :: Science/Research", + __license_classifier__, + "Natural Language :: English", + "Operating System :: Unix", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Astronomy" + ], + +# CREDITS METADATA +__credits__ = textwrap.fill(f""" +Thanks to {', '.join(__contributors__)[::-1].replace(',','& ', 1)[::-1]} for their contributions, +to {', '.join(__supporters__)[::-1].replace(',','& ', 1)[::-1]} for their support & guidance, +and to the wider community for their suggestions and feedback, +including {', '.join(__feedback__)[::-1].replace(',','& ', 1)[::-1]}. +""".strip('\n')) + +# CITING METADATA +__doi__ = "10.48550/arXiv.2312.02268" +__citation__ = textwrap.fill(""" +Thob, Adrien C. R. et al. 2023, “Generating synthetic star catalogs +from simulated data for next-gen observatories with py-ananke”, +arXiv e-prints, doi:10.48550/arXiv.2312.02268. +""".strip('\n')) +__adsurl__ = "https://ui.adsabs.harvard.edu/abs/2023arXiv231202268T" +__adsexportcitation__ = f"{__adsurl__}/exportcitation" +__bibtex__ = """ +@ARTICLE{2023arXiv231202268T, + author = {{Thob}, Adrien C.~R. and {Sanderson}, Robyn E. and + {Eden}, Andrew P. and {Nikakhtar}, Farnik and + {Panithanpaisal}, Nondh and {Garavito-Camargo}, Nicol{\\'a}s + and {Sharma}, Sanjib}, + title = "{Generating synthetic star catalogs from simulated data + for next-gen observatories with py-ananke}", + journal = {arXiv e-prints}, + keywords = {Astrophysics - Astrophysics of Galaxies, + Astrophysics - Instrumentation and Methods for Astrophysics}, + year = 2023, + month = dec, + eid = {arXiv:2312.02268}, + pages = {arXiv:2312.02268}, + doi = {10.48550/arXiv.2312.02268}, +archivePrefix = {arXiv}, + eprint = {2312.02268}, + primaryClass = {astro-ph.GA}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv231202268T}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System}, + note = {Submitted to The Journal of Open Source Software, + in review} +} +""".strip('\n') +__citing__ = '\n\n'.join(map(textwrap.fill, f""" +If {__project__} has played a role in your research project or software +development, we kindly request that you acknowledge and cite the +project. Citing {__project__} not only gives credit to the dedicated +efforts of its creators but also helps others discover and benefit +from this software. + +To cite {__project__}, please use DOI {__doi__} as a +reference in your publications, or cite as the following: + +{{__citation__}} + +Alternatively, you may use one of the entries associated with +{__project__} as listed by The SAO/NASA Astrophysics Data System: +<{__adsexportcitation__}> +such as the following BibTeX entry: + +{{__bibtex__}} +""".strip('\n').split('\n\n'))).format(__citation__=__citation__, __bibtex__=__bibtex__) + +# COPYRIGHT METADATA +__copyright_short__ = f"Copyright (C) {__year__}-{__date__.year} {__author__}" +__copyright__ = f""" +{textwrap.fill(f"{__project__} v{__version__}: {__description__}")} + +{__copyright_short__} + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +--CITING------------------------------------------------------------- + +{__citing__} +""".strip('\n') + +# README +__readme__ = f""" +{__copyright__} + +--CREDITS------------------------------------------------------------ + +{__credits__} +""".strip('\n') + +# DEFINING PRINTERS +copyright = _sitebuiltins._Printer('copyright', __copyright__) +credits = _sitebuiltins._Printer('credits', __credits__) +license = _sitebuiltins._Printer('license', __license_full__) +readme = _sitebuiltins._Printer('readme', __readme__) diff --git a/src/ananke/constants.py b/src/ananke/_constants.py similarity index 93% rename from src/ananke/constants.py rename to src/ananke/_constants.py index e1007e9..0013030 100644 --- a/src/ananke/constants.py +++ b/src/ananke/_constants.py @@ -17,4 +17,4 @@ # Rachford et al 2009 (FUSE) measure N_H/E(B-V) (N_H=N_HI+2N_H2) = 5.8e21 H/cm^2/mag # many thanks to Julianne Dalcanton for pointing me to this paper!! Q_DUST = 4.0e-23 #1.0/5.8e21 -TOTAL_TO_SELECTIVE = 3.1 +TOTAL_TO_SELECTIVE = 3.1 #R_V value diff --git a/src/ananke/_default_error_model.py b/src/ananke/_default_error_model.py index ab05bec..9cc12f8 100644 --- a/src/ananke/_default_error_model.py +++ b/src/ananke/_default_error_model.py @@ -1,7 +1,7 @@ #!/usr/bin/env python """ Contains the definition of default error model estimators for -existing isochrones of Galaxia. +existing photometric systems of Galaxia. Please note that this module is private. """ @@ -20,9 +20,9 @@ def _temp(df): Table 3 which returns uncertainty estimates in magnitudes, mas, mas/yr, km/s. """ - GMAG = 'gaiadr2_gmag' - RPMAG = 'gaiadr2_g_rpmag' - BPMAG = 'gaiadr2_g_bpmag' + GMAG = 'gaia__dr2_g' + RPMAG = 'gaia__dr2_grp' + BPMAG = 'gaia__dr2_gbp' PI = 'pi' RA = 'ra' DEC = 'dec' @@ -66,4 +66,4 @@ def _model(prop, errtype): errors[VR][maglims] = np.sqrt(errors[VR][maglims]**2 + 0.11**2) #systematic floor return errors -ph.available_photo_systems['padova/GAIADR2'].default_error_model = _temp +ph.available_photo_systems['padova/GAIA__DR2'].default_error_model = _temp diff --git a/src/ananke/_default_extinction_coeff.py b/src/ananke/_default_extinction_coeff.py index e20c26b..a5ae411 100644 --- a/src/ananke/_default_extinction_coeff.py +++ b/src/ananke/_default_extinction_coeff.py @@ -1,12 +1,49 @@ #!/usr/bin/env python """ Contains the definition of default extinction coefficient estimators for -existing isochrones of Galaxia. +existing photometric systems of Galaxia. Please note that this module is private. """ +import numpy as np +from astropy.units import Quantity + from Galaxia_ananke import photometry as ph + +__all__ = ['universal_extinction_law'] + + +def _wang_and_chen_2019_eq_9(lambda_eff): + # for optical 0.3 to 1 micron + lambda_eff = Quantity(lambda_eff, unit='micron').value + coefficients = np.array([[1.0, 0.7499, -0.1086, -0.08909, 0.02905, 0.01069, 0.001707, -0.001002]]).T + Y = 1/lambda_eff - 1.82 + return np.matmul(Y[...,np.newaxis]**np.arange(coefficients.shape[0])[np.newaxis], coefficients)[...,0] + + +def _wang_and_chen_2019_eq_10(lambda_eff): + # for near IR 1 to 3.33 micron + lambda_eff = Quantity(lambda_eff, unit='micron').value + coefficient = 0.3722 + exponent = -2.070 + return coefficient * lambda_eff**exponent + + +def universal_extinction_law(lambda_eff): + # return extinction coefficient A_lambda/A_V at lambda effective + lambda_eff = Quantity(lambda_eff, unit='micron').value + choose = np.vstack([ + np.zeros(lambda_eff.shape[0]), + _wang_and_chen_2019_eq_9(lambda_eff), + _wang_and_chen_2019_eq_10(lambda_eff) + ]).T + choice = choose[:,0].astype('int') + choice[(0.3 < lambda_eff) & (lambda_eff < 1)] = 1 # optical + choice[(1 < lambda_eff) & (lambda_eff < 3.33)] = 2 # NIR + return choose[np.arange(choose.shape[0]), choice] + + def _temp(df): """ Default extinction coefficient function for the Gaia DR2 photometric @@ -20,13 +57,61 @@ def _temp(df): """ # Constants for the empirical extinction model from Table of Babusiaux et al. 2018 consts = { - 'gaiadr2_gmag': [0.0, 0.9761,-0.1704,0.0086,0.0011,-0.0438,0.0013,0.0099], - 'gaiadr2_g_bpmag':[0.0, 1.1517,-0.0871,-0.0333,0.0173,-0.0230,0.0006,0.0043], - 'gaiadr2_g_rpmag':[0.0, 0.6104,-0.0170,-0.0026,-0.0017,-0.0078,0.00005,0.0006] + 'gaia__dr2_g': [0.0, 0.9761,-0.1704,0.0086,0.0011,-0.0438,0.0013,0.0099], + 'gaia__dr2_gbp':[0.0, 1.1517,-0.0871,-0.0333,0.0173,-0.0230,0.0006,0.0043], + 'gaia__dr2_grp':[0.0, 0.6104,-0.0170,-0.0026,-0.0017,-0.0078,0.00005,0.0006] } - bp_rp_int = df['gaiadr2_g_bpmag'] - df['gaiadr2_g_rpmag'] + bp_rp_int = df['gaia__dr2_gbp'] - df['gaia__dr2_grp'] A_0 = df['A_0'] # Coeffients from Equation 1 of Babusiaux et al. 2018 return {b: c[1] + c[2]*bp_rp_int + c[3]*bp_rp_int**2 + c[4]*bp_rp_int**3 +c[5]*A_0 +c[6]*A_0**2 +c[7]*bp_rp_int*A_0 for b,c in consts.items()} -ph.available_photo_systems['padova/GAIADR2'].default_extinction_coeff = _temp +ph.available_photo_systems['padova/GAIA__DR2'].default_extinction_coeff = _temp + +# def _temp(): +# """ +# Default extinction coefficient function for the JWST NIRCam photometric +# system. + +# Notes +# ----- +# Extinction coefficients are adapted from Table 2 of Wang et al. 2024 +# (ui.adsabs.harvard.edu/abs/2024ApJ...964L...3W) assuming an average alpha +# value of 1.98, and using the V-band to F200W relative extinction +# coefficient showcased in Table 5 of Wang et al. 2019 +# (ui.adsabs.harvard.edu/abs/2019ApJ...877..116W) +# """ +# # Extinction coefficients from Table 2 of Wang et al. 2024 +# coeffs_vs_f200w = { +# 'jwst__nircam_f070w': 7.321, +# 'jwst__nircam_f090w': 4.791, +# 'jwst__nircam_f115w': 2.965, +# 'jwst__nircam_f150w': 1.75, +# 'jwst__nircam_f200w': 1.0, +# 'jwst__nircam_f277w': 0.524, +# 'jwst__nircam_f356w': 0.306, +# 'jwst__nircam_f444w': 0.193, +# 'jwst__nircam_f150w2': 1.772, +# 'jwst__nircam_f322w2': 0.422, +# 'jwst__nircam_f140m': 1.972, +# 'jwst__nircam_f162m': 1.48, +# 'jwst__nircam_f182m': 1.154, +# 'jwst__nircam_f210m': 0.874, +# 'jwst__nircam_f250m': 0.623, +# 'jwst__nircam_f300m': 0.45, +# 'jwst__nircam_f335m': 0.349, +# 'jwst__nircam_f360m': 0.288, +# 'jwst__nircam_f410m': 0.225, +# 'jwst__nircam_f430m': 0.199, +# 'jwst__nircam_f460m': 0.18, +# 'jwst__nircam_f480m': 0.166 +# } +# # V-band to F200W coefficient from Table 5 of Wang et al. 2019 +# V_to_f200w_coeff = 0.0919 +# return {b: V_to_f200w_coeff*c for b,c in coeffs_vs_f200w.items()} + +# ph.available_photo_systems['padova/JWST__NIRCam'].default_extinction_coeff = _temp() + + +if __name__ == '__main__': + raise NotImplementedError() diff --git a/src/ananke/_version.py b/src/ananke/_version.py new file mode 100644 index 0000000..f95e932 --- /dev/null +++ b/src/ananke/_version.py @@ -0,0 +1,683 @@ + +# This file helps to compute a version number in source trees obtained from +# git-archive tarball (such as those provided by githubs download-from-tag +# feature). Distribution tarballs (built by setup.py sdist) and build +# directories (produced by setup.py build) will contain a much shorter file +# that just contains the computed version number. + +# This file is released into the public domain. +# Generated by versioneer-0.29 +# https://github.com/python-versioneer/python-versioneer + +"""Git implementation of _version.py.""" + +import errno +import os +import re +import subprocess +import sys +from typing import Any, Callable, Dict, List, Optional, Tuple +import functools + + +def get_keywords() -> Dict[str, str]: + """Get the keywords needed to look up the version information.""" + # these strings will be replaced by git during git-archive. + # setup.py/versioneer.py will grep for the variable names, so they must + # each be defined on a line of their own. _version.py will just call + # get_keywords(). + git_refnames = "$Format:%d$" + git_full = "$Format:%H$" + git_date = "$Format:%ci$" + keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + parentdir_prefix: str + versionfile_source: str + verbose: bool + + +def get_config() -> VersioneerConfig: + """Create, populate and return the VersioneerConfig() object.""" + # these strings are filled in when 'setup.py versioneer' creates + # _version.py + cfg = VersioneerConfig() + cfg.VCS = "git" + cfg.style = "pep440" + cfg.tag_prefix = "v" + cfg.parentdir_prefix = "ananke-" + cfg.versionfile_source = "src/ananke/_version.py" + cfg.verbose = False + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: + HANDLERS[vcs] = {} + HANDLERS[vcs][method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) + print("stdout was %s" % stdout) + return None, process.returncode + return stdout, process.returncode + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %s but none started with prefix %s" % + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %s" % r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %s not under git control" % root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%s'" + % describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%s' doesn't start with prefix '%s'" + print(fmt % (full_tag, tag_prefix)) + pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" + % (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%d" % (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%d" % pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%s'" % style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +def get_versions() -> Dict[str, Any]: + """Get version information or return default if unable to do so.""" + # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have + # __file__, we can work backwards from there to the root. Some + # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which + # case we can only use expanded keywords. + + cfg = get_config() + verbose = cfg.verbose + + try: + return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, + verbose) + except NotThisMethod: + pass + + try: + root = os.path.realpath(__file__) + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. + for _ in cfg.versionfile_source.split('/'): + root = os.path.dirname(root) + except NameError: + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None} + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) + return render(pieces, cfg.style) + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + except NotThisMethod: + pass + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", "date": None} diff --git a/src/ananke/utils.py b/src/ananke/utils.py index 3c749af..562f7a8 100644 --- a/src/ananke/utils.py +++ b/src/ananke/utils.py @@ -2,11 +2,14 @@ """ Module miscellaneous utilities """ +from typing import Optional, List +import re +import docstring_parser as DS_parser import pandas as pd from Galaxia_ananke import utils as Gutils -__all__ = ['compare_given_and_required', 'confirm_equal_length_arrays_in_dict', 'RecordingDataFrame'] +__all__ = ['compare_given_and_required', 'confirm_equal_length_arrays_in_dict', 'RecordingDataFrame', 'extract_parameters_from_docstring', 'extract_notes_from_docstring'] compare_given_and_required = Gutils.compare_given_and_required @@ -38,3 +41,22 @@ def __getitem__(self, key): @property def record_of_all_used_keys(self): return self._record_of_all_used_keys + + +def extract_parameters_from_docstring(docstring: str, parameters: Optional[List[str]] = None, ignore: Optional[List[str]] = None) -> str: + input_DS = DS_parser.parse(docstring) + output_DS = DS_parser.Docstring() + output_DS.style = input_DS.style + output_DS.meta = [param + for param in input_DS.params + if (True if parameters is None else param.arg_name in parameters) and (True if ignore is None else param.arg_name not in ignore)] + temp_docstring = re.split("\n-*\n",DS_parser.compose(output_DS),maxsplit=1)[1] + return '\n'.join([line if line[:1] in ['', ' '] else f"\n{line}" for line in temp_docstring.split('\n')]) + + +def extract_notes_from_docstring(docstring: str) -> str: + input_DS = DS_parser.parse(docstring) + output_DS = DS_parser.Docstring() + output_DS.style = input_DS.style + output_DS.meta = [meta for meta in input_DS.meta if 'notes' in meta.args] + return re.split("\n-*\n",DS_parser.compose(output_DS),maxsplit=1)[1] diff --git a/src/constants.py b/src/constants.py deleted file mode 120000 index e7828fe..0000000 --- a/src/constants.py +++ /dev/null @@ -1 +0,0 @@ -ananke/constants.py \ No newline at end of file diff --git a/src/tests/__init__.py b/src/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/tests/test_example_run.py b/src/tests/test_example_run.py new file mode 100644 index 0000000..206bfbe --- /dev/null +++ b/src/tests/test_example_run.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +import numpy as np + +from .utils import in_tmp_wd + +D = 200 # *units.kpc +observer = np.nan*np.ones(3) +while not np.linalg.norm(observer)<1: + observer = 2*np.random.rand(3)-1 + +observer *= D/np.linalg.norm(observer) +rshell = [0, 2*D] +fsample = 0.01 +photo_sys = 'padova/GAIA__DR2' +cmd_magnames = {'magnitude': 'G', + 'color_minuend': 'Gbp', + 'color_subtrahend': 'Grp'} +cmd_box = { + 'abs_mag_lim_lo': -1000, + 'abs_mag_lim_hi': 1000, + # 'app_mag_lim_lo' : -1000, + 'app_mag_lim_hi': 30, + # 'color_lim_lo' : -1000, + # 'color_lim_hi' : 1000 + } +name = 'sim' + + +@in_tmp_wd +def test_example_run(): + from .. import ananke as an + p = an.Ananke.make_dummy_particles_input() + ananke = an.Ananke(p, name, fsample=fsample, + observer=observer, rshell=rshell, + photo_sys=photo_sys, cmd_magnames=cmd_magnames, + **cmd_box) + survey = ananke.run() + print(survey) + + +if __name__ == '__main__': + pass diff --git a/src/tests/utils.py b/src/tests/utils.py new file mode 100644 index 0000000..cd76abd --- /dev/null +++ b/src/tests/utils.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +import os +import sys +import io +import tempfile +import random +import string +import pathlib +import contextlib +import functools + +import numpy as np + + +FOURTHIRDPI = 4*np.pi/3 + +def make_random_string(length=10): + return "".join([ + random.choice(string.ascii_letters+string.digits) + for i in range(length) + ]) + +@contextlib.contextmanager +def tmp_wd(): + """ + Changes working directory to a temporary one + and returns to previous on exit. + Credit to https://stackoverflow.com/a/42441759 + """ + prev_cwd = pathlib.Path.cwd() + with tempfile.TemporaryDirectory() as tmpdir: + os.chdir(tmpdir) + try: + yield + finally: + os.chdir(prev_cwd) + +def in_tmp_wd(func): + @functools.wraps(func) + def wrapped_func(*args, **kwargs): + with tmp_wd(): + func(*args, **kwargs) + return wrapped_func + +class list_stdout(list): + """ + Credit to https://stackoverflow.com/a/16571630 + """ + def __enter__(self): + self._stdout = sys.stdout + sys.stdout = self._stringio = io.StringIO() + return self + def __exit__(self, *args): + self.extend(self._stringio.getvalue().splitlines()) + del self._stringio # free up some memory + sys.stdout = self._stdout + + +if __name__ == '__main__': + pass diff --git a/src/versioneer.py b/src/versioneer.py new file mode 120000 index 0000000..2a4cf10 --- /dev/null +++ b/src/versioneer.py @@ -0,0 +1 @@ +../versioneer.py \ No newline at end of file diff --git a/versioneer.py b/versioneer.py new file mode 100644 index 0000000..1e3753e --- /dev/null +++ b/versioneer.py @@ -0,0 +1,2277 @@ + +# Version: 0.29 + +"""The Versioneer - like a rocketeer, but for versions. + +The Versioneer +============== + +* like a rocketeer, but for versions! +* https://github.com/python-versioneer/python-versioneer +* Brian Warner +* License: Public Domain (Unlicense) +* Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 +* [![Latest Version][pypi-image]][pypi-url] +* [![Build Status][travis-image]][travis-url] + +This is a tool for managing a recorded version number in setuptools-based +python projects. The goal is to remove the tedious and error-prone "update +the embedded version string" step from your release process. Making a new +release should be as easy as recording a new tag in your version-control +system, and maybe making new tarballs. + + +## Quick Install + +Versioneer provides two installation modes. The "classic" vendored mode installs +a copy of versioneer into your repository. The experimental build-time dependency mode +is intended to allow you to skip this step and simplify the process of upgrading. + +### Vendored mode + +* `pip install versioneer` to somewhere in your $PATH + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a + `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) + * Note that you will need to add `tomli; python_version < "3.11"` to your + build-time dependencies if you use `pyproject.toml` +* run `versioneer install --vendor` in your source tree, commit the results +* verify version information with `python setup.py version` + +### Build-time dependency mode + +* `pip install versioneer` to somewhere in your $PATH + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a + `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) +* add `versioneer` (with `[toml]` extra, if configuring in `pyproject.toml`) + to the `requires` key of the `build-system` table in `pyproject.toml`: + ```toml + [build-system] + requires = ["setuptools", "versioneer[toml]"] + build-backend = "setuptools.build_meta" + ``` +* run `versioneer install --no-vendor` in your source tree, commit the results +* verify version information with `python setup.py version` + +## Version Identifiers + +Source trees come from a variety of places: + +* a version-control system checkout (mostly used by developers) +* a nightly tarball, produced by build automation +* a snapshot tarball, produced by a web-based VCS browser, like github's + "tarball from tag" feature +* a release tarball, produced by "setup.py sdist", distributed through PyPI + +Within each source tree, the version identifier (either a string or a number, +this tool is format-agnostic) can come from a variety of places: + +* ask the VCS tool itself, e.g. "git describe" (for checkouts), which knows + about recent "tags" and an absolute revision-id +* the name of the directory into which the tarball was unpacked +* an expanded VCS keyword ($Id$, etc) +* a `_version.py` created by some earlier build step + +For released software, the version identifier is closely related to a VCS +tag. Some projects use tag names that include more than just the version +string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool +needs to strip the tag prefix to extract the version identifier. For +unreleased software (between tags), the version identifier should provide +enough information to help developers recreate the same tree, while also +giving them an idea of roughly how old the tree is (after version 1.2, before +version 1.3). Many VCS systems can report a description that captures this, +for example `git describe --tags --dirty --always` reports things like +"0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the +0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has +uncommitted changes). + +The version identifier is used for multiple purposes: + +* to allow the module to self-identify its version: `myproject.__version__` +* to choose a name and prefix for a 'setup.py sdist' tarball + +## Theory of Operation + +Versioneer works by adding a special `_version.py` file into your source +tree, where your `__init__.py` can import it. This `_version.py` knows how to +dynamically ask the VCS tool for version information at import time. + +`_version.py` also contains `$Revision$` markers, and the installation +process marks `_version.py` to have this marker rewritten with a tag name +during the `git archive` command. As a result, generated tarballs will +contain enough information to get the proper version. + +To allow `setup.py` to compute a version too, a `versioneer.py` is added to +the top level of your source tree, next to `setup.py` and the `setup.cfg` +that configures it. This overrides several distutils/setuptools commands to +compute the version when invoked, and changes `setup.py build` and `setup.py +sdist` to replace `_version.py` with a small static file that contains just +the generated version data. + +## Installation + +See [INSTALL.md](./INSTALL.md) for detailed installation instructions. + +## Version-String Flavors + +Code which uses Versioneer can learn about its version string at runtime by +importing `_version` from your main `__init__.py` file and running the +`get_versions()` function. From the "outside" (e.g. in `setup.py`), you can +import the top-level `versioneer.py` and run `get_versions()`. + +Both functions return a dictionary with different flavors of version +information: + +* `['version']`: A condensed version string, rendered using the selected + style. This is the most commonly used value for the project's version + string. The default "pep440" style yields strings like `0.11`, + `0.11+2.g1076c97`, or `0.11+2.g1076c97.dirty`. See the "Styles" section + below for alternative styles. + +* `['full-revisionid']`: detailed revision identifier. For Git, this is the + full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac". + +* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the + commit date in ISO 8601 format. This will be None if the date is not + available. + +* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that + this is only accurate if run in a VCS checkout, otherwise it is likely to + be False or None + +* `['error']`: if the version string could not be computed, this will be set + to a string describing the problem, otherwise it will be None. It may be + useful to throw an exception in setup.py if this is set, to avoid e.g. + creating tarballs with a version string of "unknown". + +Some variants are more useful than others. Including `full-revisionid` in a +bug report should allow developers to reconstruct the exact code being tested +(or indicate the presence of local changes that should be shared with the +developers). `version` is suitable for display in an "about" box or a CLI +`--version` output: it can be easily compared against release notes and lists +of bugs fixed in various releases. + +The installer adds the following text to your `__init__.py` to place a basic +version in `YOURPROJECT.__version__`: + + from ._version import get_versions + __version__ = get_versions()['version'] + del get_versions + +## Styles + +The setup.cfg `style=` configuration controls how the VCS information is +rendered into a version string. + +The default style, "pep440", produces a PEP440-compliant string, equal to the +un-prefixed tag name for actual releases, and containing an additional "local +version" section with more detail for in-between builds. For Git, this is +TAG[+DISTANCE.gHEX[.dirty]] , using information from `git describe --tags +--dirty --always`. For example "0.11+2.g1076c97.dirty" indicates that the +tree is like the "1076c97" commit but has uncommitted changes (".dirty"), and +that this commit is two revisions ("+2") beyond the "0.11" tag. For released +software (exactly equal to a known tag), the identifier will only contain the +stripped tag, e.g. "0.11". + +Other styles are available. See [details.md](details.md) in the Versioneer +source tree for descriptions. + +## Debugging + +Versioneer tries to avoid fatal errors: if something goes wrong, it will tend +to return a version of "0+unknown". To investigate the problem, run `setup.py +version`, which will run the version-lookup code in a verbose mode, and will +display the full contents of `get_versions()` (including the `error` string, +which may help identify what went wrong). + +## Known Limitations + +Some situations are known to cause problems for Versioneer. This details the +most significant ones. More can be found on Github +[issues page](https://github.com/python-versioneer/python-versioneer/issues). + +### Subprojects + +Versioneer has limited support for source trees in which `setup.py` is not in +the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are +two common reasons why `setup.py` might not be in the root: + +* Source trees which contain multiple subprojects, such as + [Buildbot](https://github.com/buildbot/buildbot), which contains both + "master" and "slave" subprojects, each with their own `setup.py`, + `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI + distributions (and upload multiple independently-installable tarballs). +* Source trees whose main purpose is to contain a C library, but which also + provide bindings to Python (and perhaps other languages) in subdirectories. + +Versioneer will look for `.git` in parent directories, and most operations +should get the right version string. However `pip` and `setuptools` have bugs +and implementation details which frequently cause `pip install .` from a +subproject directory to fail to find a correct version string (so it usually +defaults to `0+unknown`). + +`pip install --editable .` should work correctly. `setup.py install` might +work too. + +Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in +some later version. + +[Bug #38](https://github.com/python-versioneer/python-versioneer/issues/38) is tracking +this issue. The discussion in +[PR #61](https://github.com/python-versioneer/python-versioneer/pull/61) describes the +issue from the Versioneer side in more detail. +[pip PR#3176](https://github.com/pypa/pip/pull/3176) and +[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve +pip to let Versioneer work correctly. + +Versioneer-0.16 and earlier only looked for a `.git` directory next to the +`setup.cfg`, so subprojects were completely unsupported with those releases. + +### Editable installs with setuptools <= 18.5 + +`setup.py develop` and `pip install --editable .` allow you to install a +project into a virtualenv once, then continue editing the source code (and +test) without re-installing after every change. + +"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a +convenient way to specify executable scripts that should be installed along +with the python package. + +These both work as expected when using modern setuptools. When using +setuptools-18.5 or earlier, however, certain operations will cause +`pkg_resources.DistributionNotFound` errors when running the entrypoint +script, which must be resolved by re-installing the package. This happens +when the install happens with one version, then the egg_info data is +regenerated while a different version is checked out. Many setup.py commands +cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into +a different virtualenv), so this can be surprising. + +[Bug #83](https://github.com/python-versioneer/python-versioneer/issues/83) describes +this one, but upgrading to a newer version of setuptools should probably +resolve it. + + +## Updating Versioneer + +To upgrade your project to a new release of Versioneer, do the following: + +* install the new Versioneer (`pip install -U versioneer` or equivalent) +* edit `setup.cfg` and `pyproject.toml`, if necessary, + to include any new configuration settings indicated by the release notes. + See [UPGRADING](./UPGRADING.md) for details. +* re-run `versioneer install --[no-]vendor` in your source tree, to replace + `SRC/_version.py` +* commit any changed files + +## Future Directions + +This tool is designed to make it easily extended to other version-control +systems: all VCS-specific components are in separate directories like +src/git/ . The top-level `versioneer.py` script is assembled from these +components by running make-versioneer.py . In the future, make-versioneer.py +will take a VCS name as an argument, and will construct a version of +`versioneer.py` that is specific to the given VCS. It might also take the +configuration arguments that are currently provided manually during +installation by editing setup.py . Alternatively, it might go the other +direction and include code from all supported VCS systems, reducing the +number of intermediate scripts. + +## Similar projects + +* [setuptools_scm](https://github.com/pypa/setuptools_scm/) - a non-vendored build-time + dependency +* [minver](https://github.com/jbweston/miniver) - a lightweight reimplementation of + versioneer +* [versioningit](https://github.com/jwodder/versioningit) - a PEP 518-based setuptools + plugin + +## License + +To make Versioneer easier to embed, all its code is dedicated to the public +domain. The `_version.py` that it creates is also in the public domain. +Specifically, both are released under the "Unlicense", as described in +https://unlicense.org/. + +[pypi-image]: https://img.shields.io/pypi/v/versioneer.svg +[pypi-url]: https://pypi.python.org/pypi/versioneer/ +[travis-image]: +https://img.shields.io/travis/com/python-versioneer/python-versioneer.svg +[travis-url]: https://travis-ci.com/github/python-versioneer/python-versioneer + +""" +# pylint:disable=invalid-name,import-outside-toplevel,missing-function-docstring +# pylint:disable=missing-class-docstring,too-many-branches,too-many-statements +# pylint:disable=raise-missing-from,too-many-lines,too-many-locals,import-error +# pylint:disable=too-few-public-methods,redefined-outer-name,consider-using-with +# pylint:disable=attribute-defined-outside-init,too-many-arguments + +import configparser +import errno +import json +import os +import re +import subprocess +import sys +from pathlib import Path +from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union +from typing import NoReturn +import functools + +have_tomllib = True +if sys.version_info >= (3, 11): + import tomllib +else: + try: + import tomli as tomllib + except ImportError: + have_tomllib = False + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + versionfile_source: str + versionfile_build: Optional[str] + parentdir_prefix: Optional[str] + verbose: Optional[bool] + + +def get_root() -> str: + """Get the project root directory. + + We require that all commands are run from the project root, i.e. the + directory that contains setup.py, setup.cfg, and versioneer.py . + """ + root = os.path.realpath(os.path.abspath(os.getcwd())) + setup_py = os.path.join(root, "setup.py") + pyproject_toml = os.path.join(root, "pyproject.toml") + versioneer_py = os.path.join(root, "versioneer.py") + if not ( + os.path.exists(setup_py) + or os.path.exists(pyproject_toml) + or os.path.exists(versioneer_py) + ): + # allow 'python path/to/setup.py COMMAND' + root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) + setup_py = os.path.join(root, "setup.py") + pyproject_toml = os.path.join(root, "pyproject.toml") + versioneer_py = os.path.join(root, "versioneer.py") + if not ( + os.path.exists(setup_py) + or os.path.exists(pyproject_toml) + or os.path.exists(versioneer_py) + ): + err = ("Versioneer was unable to run the project root directory. " + "Versioneer requires setup.py to be executed from " + "its immediate directory (like 'python setup.py COMMAND'), " + "or in a way that lets it use sys.argv[0] to find the root " + "(like 'python path/to/setup.py COMMAND').") + raise VersioneerBadRootError(err) + try: + # Certain runtime workflows (setup.py install/develop in a setuptools + # tree) execute all dependencies in a single python process, so + # "versioneer" may be imported multiple times, and python's shared + # module-import table will cache the first one. So we can't use + # os.path.dirname(__file__), as that will find whichever + # versioneer.py was first imported, even in later projects. + my_path = os.path.realpath(os.path.abspath(__file__)) + me_dir = os.path.normcase(os.path.splitext(my_path)[0]) + vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) + if me_dir != vsr_dir and "VERSIONEER_PEP518" not in globals(): + print("Warning: build in %s is using versioneer.py from %s" + % (os.path.dirname(my_path), versioneer_py)) + except NameError: + pass + return root + + +def get_config_from_root(root: str) -> VersioneerConfig: + """Read the project setup.cfg file to determine Versioneer config.""" + # This might raise OSError (if setup.cfg is missing), or + # configparser.NoSectionError (if it lacks a [versioneer] section), or + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + root_pth = Path(root) + pyproject_toml = root_pth / "pyproject.toml" + setup_cfg = root_pth / "setup.cfg" + section: Union[Dict[str, Any], configparser.SectionProxy, None] = None + if pyproject_toml.exists() and have_tomllib: + try: + with open(pyproject_toml, 'rb') as fobj: + pp = tomllib.load(fobj) + section = pp['tool']['versioneer'] + except (tomllib.TOMLDecodeError, KeyError) as e: + print(f"Failed to load config from {pyproject_toml}: {e}") + print("Try to load it from setup.cfg") + if not section: + parser = configparser.ConfigParser() + with open(setup_cfg) as cfg_file: + parser.read_file(cfg_file) + parser.get("versioneer", "VCS") # raise error if missing + + section = parser["versioneer"] + + # `cast`` really shouldn't be used, but its simplest for the + # common VersioneerConfig users at the moment. We verify against + # `None` values elsewhere where it matters + + cfg = VersioneerConfig() + cfg.VCS = section['VCS'] + cfg.style = section.get("style", "") + cfg.versionfile_source = cast(str, section.get("versionfile_source")) + cfg.versionfile_build = section.get("versionfile_build") + cfg.tag_prefix = cast(str, section.get("tag_prefix")) + if cfg.tag_prefix in ("''", '""', None): + cfg.tag_prefix = "" + cfg.parentdir_prefix = section.get("parentdir_prefix") + if isinstance(section, configparser.SectionProxy): + # Make sure configparser translates to bool + cfg.verbose = section.getboolean("verbose") + else: + cfg.verbose = section.get("verbose") + + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +# these dictionaries contain VCS-specific tools +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + HANDLERS.setdefault(vcs, {})[method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) + print("stdout was %s" % stdout) + return None, process.returncode + return stdout, process.returncode + + +LONG_VERSION_PY['git'] = r''' +# This file helps to compute a version number in source trees obtained from +# git-archive tarball (such as those provided by githubs download-from-tag +# feature). Distribution tarballs (built by setup.py sdist) and build +# directories (produced by setup.py build) will contain a much shorter file +# that just contains the computed version number. + +# This file is released into the public domain. +# Generated by versioneer-0.29 +# https://github.com/python-versioneer/python-versioneer + +"""Git implementation of _version.py.""" + +import errno +import os +import re +import subprocess +import sys +from typing import Any, Callable, Dict, List, Optional, Tuple +import functools + + +def get_keywords() -> Dict[str, str]: + """Get the keywords needed to look up the version information.""" + # these strings will be replaced by git during git-archive. + # setup.py/versioneer.py will grep for the variable names, so they must + # each be defined on a line of their own. _version.py will just call + # get_keywords(). + git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" + git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" + git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s" + keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + parentdir_prefix: str + versionfile_source: str + verbose: bool + + +def get_config() -> VersioneerConfig: + """Create, populate and return the VersioneerConfig() object.""" + # these strings are filled in when 'setup.py versioneer' creates + # _version.py + cfg = VersioneerConfig() + cfg.VCS = "git" + cfg.style = "%(STYLE)s" + cfg.tag_prefix = "%(TAG_PREFIX)s" + cfg.parentdir_prefix = "%(PARENTDIR_PREFIX)s" + cfg.versionfile_source = "%(VERSIONFILE_SOURCE)s" + cfg.verbose = False + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: + HANDLERS[vcs] = {} + HANDLERS[vcs][method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %%s" %% dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %%s" %% (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %%s (error)" %% dispcmd) + print("stdout was %%s" %% stdout) + return None, process.returncode + return stdout, process.returncode + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %%s but none started with prefix %%s" %% + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %%d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%%s', no digits" %% ",".join(refs - tags)) + if verbose: + print("likely tags: %%s" %% ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %%s" %% r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %%s not under git control" %% root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%%s'" + %% describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%%s' doesn't start with prefix '%%s'" + print(fmt %% (full_tag, tag_prefix)) + pieces["error"] = ("tag '%%s' doesn't start with prefix '%%s'" + %% (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%%d.g%%s" %% (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%%d.g%%s" %% (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%%d.dev%%d" %% (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%%d" %% (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%%d" %% pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%%s" %% pieces["short"] + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%%s" %% pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%%s" %% pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%%s" %% pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%%s'" %% style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +def get_versions() -> Dict[str, Any]: + """Get version information or return default if unable to do so.""" + # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have + # __file__, we can work backwards from there to the root. Some + # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which + # case we can only use expanded keywords. + + cfg = get_config() + verbose = cfg.verbose + + try: + return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, + verbose) + except NotThisMethod: + pass + + try: + root = os.path.realpath(__file__) + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. + for _ in cfg.versionfile_source.split('/'): + root = os.path.dirname(root) + except NameError: + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None} + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) + return render(pieces, cfg.style) + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + except NotThisMethod: + pass + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", "date": None} +''' + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %s" % r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %s not under git control" % root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%s'" + % describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%s' doesn't start with prefix '%s'" + print(fmt % (full_tag, tag_prefix)) + pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" + % (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def do_vcs_install(versionfile_source: str, ipy: Optional[str]) -> None: + """Git-specific installation logic for Versioneer. + + For Git, this means creating/changing .gitattributes to mark _version.py + for export-subst keyword substitution. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + files = [versionfile_source] + if ipy: + files.append(ipy) + if "VERSIONEER_PEP518" not in globals(): + try: + my_path = __file__ + if my_path.endswith((".pyc", ".pyo")): + my_path = os.path.splitext(my_path)[0] + ".py" + versioneer_file = os.path.relpath(my_path) + except NameError: + versioneer_file = "versioneer.py" + files.append(versioneer_file) + present = False + try: + with open(".gitattributes", "r") as fobj: + for line in fobj: + if line.strip().startswith(versionfile_source): + if "export-subst" in line.strip().split()[1:]: + present = True + break + except OSError: + pass + if not present: + with open(".gitattributes", "a+") as fobj: + fobj.write(f"{versionfile_source} export-subst\n") + files.append(".gitattributes") + run_command(GITS, ["add", "--"] + files) + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %s but none started with prefix %s" % + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +SHORT_VERSION_PY = """ +# This file was generated by 'versioneer.py' (0.29) from +# revision-control system data, or from the parent directory name of an +# unpacked source archive. Distribution tarballs contain a pre-generated copy +# of this file. + +import json + +version_json = ''' +%s +''' # END VERSION_JSON + + +def get_versions(): + return json.loads(version_json) +""" + + +def versions_from_file(filename: str) -> Dict[str, Any]: + """Try to determine the version from _version.py if present.""" + try: + with open(filename) as f: + contents = f.read() + except OSError: + raise NotThisMethod("unable to read _version.py") + mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", + contents, re.M | re.S) + if not mo: + mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON", + contents, re.M | re.S) + if not mo: + raise NotThisMethod("no version_json in _version.py") + return json.loads(mo.group(1)) + + +def write_to_version_file(filename: str, versions: Dict[str, Any]) -> None: + """Write the given version number to the given _version.py file.""" + contents = json.dumps(versions, sort_keys=True, + indent=1, separators=(",", ": ")) + with open(filename, "w") as f: + f.write(SHORT_VERSION_PY % contents) + + print("set %s to '%s'" % (filename, versions["version"])) + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%d" % (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%d" % pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%s'" % style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +class VersioneerBadRootError(Exception): + """The project root directory is unknown or missing key files.""" + + +def get_versions(verbose: bool = False) -> Dict[str, Any]: + """Get the project version from whatever source is available. + + Returns dict with two keys: 'version' and 'full'. + """ + if "versioneer" in sys.modules: + # see the discussion in cmdclass.py:get_cmdclass() + del sys.modules["versioneer"] + + root = get_root() + cfg = get_config_from_root(root) + + assert cfg.VCS is not None, "please set [versioneer]VCS= in setup.cfg" + handlers = HANDLERS.get(cfg.VCS) + assert handlers, "unrecognized VCS '%s'" % cfg.VCS + verbose = verbose or bool(cfg.verbose) # `bool()` used to avoid `None` + assert cfg.versionfile_source is not None, \ + "please set versioneer.versionfile_source" + assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix" + + versionfile_abs = os.path.join(root, cfg.versionfile_source) + + # extract version from first of: _version.py, VCS command (e.g. 'git + # describe'), parentdir. This is meant to work for developers using a + # source checkout, for users of a tarball created by 'setup.py sdist', + # and for users of a tarball/zipball created by 'git archive' or github's + # download-from-tag feature or the equivalent in other VCSes. + + get_keywords_f = handlers.get("get_keywords") + from_keywords_f = handlers.get("keywords") + if get_keywords_f and from_keywords_f: + try: + keywords = get_keywords_f(versionfile_abs) + ver = from_keywords_f(keywords, cfg.tag_prefix, verbose) + if verbose: + print("got version from expanded keyword %s" % ver) + return ver + except NotThisMethod: + pass + + try: + ver = versions_from_file(versionfile_abs) + if verbose: + print("got version from file %s %s" % (versionfile_abs, ver)) + return ver + except NotThisMethod: + pass + + from_vcs_f = handlers.get("pieces_from_vcs") + if from_vcs_f: + try: + pieces = from_vcs_f(cfg.tag_prefix, root, verbose) + ver = render(pieces, cfg.style) + if verbose: + print("got version from VCS %s" % ver) + return ver + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + if verbose: + print("got version from parentdir %s" % ver) + return ver + except NotThisMethod: + pass + + if verbose: + print("unable to compute version") + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, "error": "unable to compute version", + "date": None} + + +def get_version() -> str: + """Get the short version string for this project.""" + return get_versions()["version"] + + +def get_cmdclass(cmdclass: Optional[Dict[str, Any]] = None): + """Get the custom setuptools subclasses used by Versioneer. + + If the package uses a different cmdclass (e.g. one from numpy), it + should be provide as an argument. + """ + if "versioneer" in sys.modules: + del sys.modules["versioneer"] + # this fixes the "python setup.py develop" case (also 'install' and + # 'easy_install .'), in which subdependencies of the main project are + # built (using setup.py bdist_egg) in the same python process. Assume + # a main project A and a dependency B, which use different versions + # of Versioneer. A's setup.py imports A's Versioneer, leaving it in + # sys.modules by the time B's setup.py is executed, causing B to run + # with the wrong versioneer. Setuptools wraps the sub-dep builds in a + # sandbox that restores sys.modules to it's pre-build state, so the + # parent is protected against the child's "import versioneer". By + # removing ourselves from sys.modules here, before the child build + # happens, we protect the child from the parent's versioneer too. + # Also see https://github.com/python-versioneer/python-versioneer/issues/52 + + cmds = {} if cmdclass is None else cmdclass.copy() + + # we add "version" to setuptools + from setuptools import Command + + class cmd_version(Command): + description = "report generated version string" + user_options: List[Tuple[str, str, str]] = [] + boolean_options: List[str] = [] + + def initialize_options(self) -> None: + pass + + def finalize_options(self) -> None: + pass + + def run(self) -> None: + vers = get_versions(verbose=True) + print("Version: %s" % vers["version"]) + print(" full-revisionid: %s" % vers.get("full-revisionid")) + print(" dirty: %s" % vers.get("dirty")) + print(" date: %s" % vers.get("date")) + if vers["error"]: + print(" error: %s" % vers["error"]) + cmds["version"] = cmd_version + + # we override "build_py" in setuptools + # + # most invocation pathways end up running build_py: + # distutils/build -> build_py + # distutils/install -> distutils/build ->.. + # setuptools/bdist_wheel -> distutils/install ->.. + # setuptools/bdist_egg -> distutils/install_lib -> build_py + # setuptools/install -> bdist_egg ->.. + # setuptools/develop -> ? + # pip install: + # copies source tree to a tempdir before running egg_info/etc + # if .git isn't copied too, 'git describe' will fail + # then does setup.py bdist_wheel, or sometimes setup.py install + # setup.py egg_info -> ? + + # pip install -e . and setuptool/editable_wheel will invoke build_py + # but the build_py command is not expected to copy any files. + + # we override different "build_py" commands for both environments + if 'build_py' in cmds: + _build_py: Any = cmds['build_py'] + else: + from setuptools.command.build_py import build_py as _build_py + + class cmd_build_py(_build_py): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + _build_py.run(self) + if getattr(self, "editable_mode", False): + # During editable installs `.py` and data files are + # not copied to build_lib + return + # now locate _version.py in the new build/ directory and replace + # it with an updated value + if cfg.versionfile_build: + target_versionfile = os.path.join(self.build_lib, + cfg.versionfile_build) + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + cmds["build_py"] = cmd_build_py + + if 'build_ext' in cmds: + _build_ext: Any = cmds['build_ext'] + else: + from setuptools.command.build_ext import build_ext as _build_ext + + class cmd_build_ext(_build_ext): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + _build_ext.run(self) + if self.inplace: + # build_ext --inplace will only build extensions in + # build/lib<..> dir with no _version.py to write to. + # As in place builds will already have a _version.py + # in the module dir, we do not need to write one. + return + # now locate _version.py in the new build/ directory and replace + # it with an updated value + if not cfg.versionfile_build: + return + target_versionfile = os.path.join(self.build_lib, + cfg.versionfile_build) + if not os.path.exists(target_versionfile): + print(f"Warning: {target_versionfile} does not exist, skipping " + "version update. This can happen if you are running build_ext " + "without first running build_py.") + return + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + cmds["build_ext"] = cmd_build_ext + + if "cx_Freeze" in sys.modules: # cx_freeze enabled? + from cx_Freeze.dist import build_exe as _build_exe # type: ignore + # nczeczulin reports that py2exe won't like the pep440-style string + # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. + # setup(console=[{ + # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION + # "product_version": versioneer.get_version(), + # ... + + class cmd_build_exe(_build_exe): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + target_versionfile = cfg.versionfile_source + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + + _build_exe.run(self) + os.unlink(target_versionfile) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % + {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + cmds["build_exe"] = cmd_build_exe + del cmds["build_py"] + + if 'py2exe' in sys.modules: # py2exe enabled? + try: + from py2exe.setuptools_buildexe import py2exe as _py2exe # type: ignore + except ImportError: + from py2exe.distutils_buildexe import py2exe as _py2exe # type: ignore + + class cmd_py2exe(_py2exe): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + target_versionfile = cfg.versionfile_source + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + + _py2exe.run(self) + os.unlink(target_versionfile) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % + {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + cmds["py2exe"] = cmd_py2exe + + # sdist farms its file list building out to egg_info + if 'egg_info' in cmds: + _egg_info: Any = cmds['egg_info'] + else: + from setuptools.command.egg_info import egg_info as _egg_info + + class cmd_egg_info(_egg_info): + def find_sources(self) -> None: + # egg_info.find_sources builds the manifest list and writes it + # in one shot + super().find_sources() + + # Modify the filelist and normalize it + root = get_root() + cfg = get_config_from_root(root) + self.filelist.append('versioneer.py') + if cfg.versionfile_source: + # There are rare cases where versionfile_source might not be + # included by default, so we must be explicit + self.filelist.append(cfg.versionfile_source) + self.filelist.sort() + self.filelist.remove_duplicates() + + # The write method is hidden in the manifest_maker instance that + # generated the filelist and was thrown away + # We will instead replicate their final normalization (to unicode, + # and POSIX-style paths) + from setuptools import unicode_utils + normalized = [unicode_utils.filesys_decode(f).replace(os.sep, '/') + for f in self.filelist.files] + + manifest_filename = os.path.join(self.egg_info, 'SOURCES.txt') + with open(manifest_filename, 'w') as fobj: + fobj.write('\n'.join(normalized)) + + cmds['egg_info'] = cmd_egg_info + + # we override different "sdist" commands for both environments + if 'sdist' in cmds: + _sdist: Any = cmds['sdist'] + else: + from setuptools.command.sdist import sdist as _sdist + + class cmd_sdist(_sdist): + def run(self) -> None: + versions = get_versions() + self._versioneer_generated_versions = versions + # unless we update this, the command will keep using the old + # version + self.distribution.metadata.version = versions["version"] + return _sdist.run(self) + + def make_release_tree(self, base_dir: str, files: List[str]) -> None: + root = get_root() + cfg = get_config_from_root(root) + _sdist.make_release_tree(self, base_dir, files) + # now locate _version.py in the new base_dir directory + # (remembering that it may be a hardlink) and replace it with an + # updated value + target_versionfile = os.path.join(base_dir, cfg.versionfile_source) + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, + self._versioneer_generated_versions) + cmds["sdist"] = cmd_sdist + + return cmds + + +CONFIG_ERROR = """ +setup.cfg is missing the necessary Versioneer configuration. You need +a section like: + + [versioneer] + VCS = git + style = pep440 + versionfile_source = src/myproject/_version.py + versionfile_build = myproject/_version.py + tag_prefix = + parentdir_prefix = myproject- + +You will also need to edit your setup.py to use the results: + + import versioneer + setup(version=versioneer.get_version(), + cmdclass=versioneer.get_cmdclass(), ...) + +Please read the docstring in ./versioneer.py for configuration instructions, +edit setup.cfg, and re-run the installer or 'python versioneer.py setup'. +""" + +SAMPLE_CONFIG = """ +# See the docstring in versioneer.py for instructions. Note that you must +# re-run 'versioneer.py setup' after changing this section, and commit the +# resulting files. + +[versioneer] +#VCS = git +#style = pep440 +#versionfile_source = +#versionfile_build = +#tag_prefix = +#parentdir_prefix = + +""" + +OLD_SNIPPET = """ +from ._version import get_versions +__version__ = get_versions()['version'] +del get_versions +""" + +INIT_PY_SNIPPET = """ +from . import {0} +__version__ = {0}.get_versions()['version'] +""" + + +def do_setup() -> int: + """Do main VCS-independent setup function for installing Versioneer.""" + root = get_root() + try: + cfg = get_config_from_root(root) + except (OSError, configparser.NoSectionError, + configparser.NoOptionError) as e: + if isinstance(e, (OSError, configparser.NoSectionError)): + print("Adding sample versioneer config to setup.cfg", + file=sys.stderr) + with open(os.path.join(root, "setup.cfg"), "a") as f: + f.write(SAMPLE_CONFIG) + print(CONFIG_ERROR, file=sys.stderr) + return 1 + + print(" creating %s" % cfg.versionfile_source) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + + ipy = os.path.join(os.path.dirname(cfg.versionfile_source), + "__init__.py") + maybe_ipy: Optional[str] = ipy + if os.path.exists(ipy): + try: + with open(ipy, "r") as f: + old = f.read() + except OSError: + old = "" + module = os.path.splitext(os.path.basename(cfg.versionfile_source))[0] + snippet = INIT_PY_SNIPPET.format(module) + if OLD_SNIPPET in old: + print(" replacing boilerplate in %s" % ipy) + with open(ipy, "w") as f: + f.write(old.replace(OLD_SNIPPET, snippet)) + elif snippet not in old: + print(" appending to %s" % ipy) + with open(ipy, "a") as f: + f.write(snippet) + else: + print(" %s unmodified" % ipy) + else: + print(" %s doesn't exist, ok" % ipy) + maybe_ipy = None + + # Make VCS-specific changes. For git, this means creating/changing + # .gitattributes to mark _version.py for export-subst keyword + # substitution. + do_vcs_install(cfg.versionfile_source, maybe_ipy) + return 0 + + +def scan_setup_py() -> int: + """Validate the contents of setup.py against Versioneer's expectations.""" + found = set() + setters = False + errors = 0 + with open("setup.py", "r") as f: + for line in f.readlines(): + if "import versioneer" in line: + found.add("import") + if "versioneer.get_cmdclass()" in line: + found.add("cmdclass") + if "versioneer.get_version()" in line: + found.add("get_version") + if "versioneer.VCS" in line: + setters = True + if "versioneer.versionfile_source" in line: + setters = True + if len(found) != 3: + print("") + print("Your setup.py appears to be missing some important items") + print("(but I might be wrong). Please make sure it has something") + print("roughly like the following:") + print("") + print(" import versioneer") + print(" setup( version=versioneer.get_version(),") + print(" cmdclass=versioneer.get_cmdclass(), ...)") + print("") + errors += 1 + if setters: + print("You should remove lines like 'versioneer.VCS = ' and") + print("'versioneer.versionfile_source = ' . This configuration") + print("now lives in setup.cfg, and should be removed from setup.py") + print("") + errors += 1 + return errors + + +def setup_command() -> NoReturn: + """Set up Versioneer and exit with appropriate error code.""" + errors = do_setup() + errors += scan_setup_py() + sys.exit(1 if errors else 0) + + +if __name__ == "__main__": + cmd = sys.argv[1] + if cmd == "setup": + setup_command()