Skip to main content

q2 Python Package

Project description

q2 Python package


The q2 code allows you to use the 2019 MOOG version (in its SILENT mode) to calculate elemental abundances of stars and/or determine their atmospheric parameters using the standard techniques of iron line excitation/ionization equilibrium. It also allows you to calculate other fundamental stellar parameters such as mass and age using isochrones. A tutorial is available here.

Installation

The new version of q2 can only be installed via pip. Simply try:

pip install qoyllur-quipu

If you have installed the old version of q2, you must delete it from your HOME directory and also remove its PATH from bashrc (.bash_profile for Mac OS). Once you have installed q2, open a Jupyter Notebook Environment (or iPython) and import q2.

import q2

By importing q2, the latest version of MOOG (2019) will begin to install. The only thing you need to do is declare the kind of machine you are using, i.g., 'rh64' for 64-bit linux (Linux Mint, Ubuntu, etc), 'rh' for 32-bit linux system and 'maclap' for Mac Os. That's all folks. This process is done only once. Note that the q2 package requires Python 3.7 or later.

Future releases will be upgraded via:

pip install qoyllur-quipu --upgrade

Quickstart

Find spectroscopic parameters of a sample of stars using the Sun as the reference star (strict line-by-line differential analysis):

import q2
data = q2.Data('stars.csv', 'lines.csv')
sp = q2.specpars.SolvePars(grid='marcs')
q2.specpars.solve_all(data, sp, 'solution.csv', 'Sun')

Measure elemental abundances of a sample of stars with respect to the solar abundances (line-by-line):

species_ids = ['CI', 'OI', 'BaII']
q2.abundances.get_all(data, species_ids, 'abundances.csv', 'Sun')

Author

Maintainers

Preferred citation

If you make use of this code, please cite Ramirez et al. 2014, A&A, 572, A48. The BibTeX entry for the paper is:

@ARTICLE{Ramirez2014,
       author = {{Ram{\'\i}rez}, I. and {Mel{\'e}ndez}, J. and {Bean}, J. and {Asplund}, M. and {Bedell}, M. and {Monroe}, T. and {Casagrande}, L. and {Schirbel}, L. and {Dreizler}, S. and {Teske}, J. and {Tucci Maia}, M. and {Alves-Brito}, A. and {Baumann}, P.},
        title = "{The Solar Twin Planet Search. I. Fundamental parameters of the stellar sample}",
      journal = {\aap},
     keywords = {stars: abundances, stars: fundamental parameters, planetary systems, Astrophysics - Solar and Stellar Astrophysics},
         year = 2014,
        month = dec,
       volume = {572},
          eid = {A48},
        pages = {A48},
          doi = {10.1051/0004-6361/201424244},
archivePrefix = {arXiv},
       eprint = {1408.4130},
 primaryClass = {astro-ph.SR},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2014A&A...572A..48R},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qoyllur_quipu-1.0.2.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

qoyllur_quipu-1.0.2-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file qoyllur_quipu-1.0.2.tar.gz.

File metadata

  • Download URL: qoyllur_quipu-1.0.2.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for qoyllur_quipu-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f3cb1f7a7836dace9723c6158932f0c00d895a1ce2cfc5da7d66017b2a15a1cd
MD5 09c8de1e8338e67ceb994d36a3cdcdc9
BLAKE2b-256 87fc34fe8c68717ee07dc12bc4c10dfaad476cc5fc561abea16f1b420d4deb5a

See more details on using hashes here.

File details

Details for the file qoyllur_quipu-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for qoyllur_quipu-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9da0a877b1d334f3304676811fb64a8b463ceab674277347c14723bb6f415ac
MD5 54131f71addd732babad0474f3ac1e30
BLAKE2b-256 ee449b72efd010bed04a1dc49a6285f3281443031e05d214e38ffb0b3e5d7b02

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page