Coder Social home page Coder Social logo

q2's Introduction

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}
}

q2's People

Contributors

astrochasqui avatar ramstojh avatar kaykeigh avatar deusavilar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.