Skip to content

andycasey/moog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installing MOOG the Easy Way™

Info:See the GitHub repository for the latest source
Author: Andy Casey, University of Cambridge (andy@astrowizici.st)
Website:astrowizici.st
License:Distribute to anyone you see fit, as long as you adhere to the licenses set by MOOG. Improvements are welcome!

Background

MOOG was written by Chris Sneden. It's an invaluable contribution to modern stellar astrophysics. From the MOOG website:

MOOG is a code that performs a variety of LTE line analysis and spectrum synthesis tasks. The typical use of MOOG is to assist in the determination of the chemical composition of a star.

The current MOOG version hosted by this repository is the February, 2013 version.

Installation

Historically MOOG has been difficult to install. Or at least it has been for me because I'm bad at computers. Now it's easy-ier!

If you are on a Mac then you will need to ensure you have Xcode installed as well as the Command Line Tools first. Regardless of your operating system, you will need either gfortran (recommended) or g77 to compile MOOG. If you have either of these, just open a terminal and type:

pip install moogsilent (or if you must, easy_install moogsilent)

And that's it. Happy spectroscopy-ing!

Alternatively you can download this repository, extract the files and type:

python setup.py install

The installer will compile MOOGSILENT and place it in your $PATH. It will also create a ~/.moog directory to contain data files.

Python Context Manager FTW

I've included a Python context manager with this version. That means you can do the following in Python:

import moog

with moog.instance("/tmp/") as moogsilent:
    abundances = moogsilent.abfind(...)

    dispersion, intensities = moogsilent.synth(...)

and get native Python objects returned to you. Sick, right?

Uninstall

Just type the following files to uninstall MOOG:

pip uninstall moog

And to clean up completely:

rm -Rf ~/.moog

About

A package installer for the MOOG code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors