Tools for Flexible Spectroscopic Inference
HTML Jupyter Notebook Python Shell
Clone or download
Latest commit 433007a May 22, 2018


Build Status

Starfish is a set of tools used for spectroscopic inference. We designed the package to robustly determine stellar parameters using high resolution spectral models, however there are many potential applications to other types of spectra, such as unresolved stellar clusters or supernovae spectra.

Beta version 0.2

Please note that this software package is still under development as more features are being added.



Copyright Ian Czekala 2013, 2014, 2015, 2016

If you wish to use this code in your own research, please email me and I can help you get started. Please bear in mind that this package is under heavy development and features may evolve rapidly. If something doesn't work, please fill an issue on this repository. If you would like to contribute to this project (either with bugfixes, documentation, or new features) please feel free to fork the repository and submit a pull request!

Citation: if you use this code or derivative components of this code in your research, please cite our paper

Installation Instructions


Starfish has several dependencies, however most of them should be satisfied by an up-to-date scientific python installation. We highly recommend using the Anaconda Scientific Python Distribution and updating to python 3.3 or greater. This code makes no attempt to work on the python 2.x series, and I doubt it will if you try. This package has been tested on Linux and Mac OSX 10.10.

Starfish requires the following Python packages:

  • numpy
  • scipy
  • matplotlib
  • h5py
  • astropy
  • cython
  • pyyaml
  • scikit-learn
  • emcee

Unless you actively maintain your own scientific python distribution, I recommend installing the Anaconda distribution with python 3.3 or greater , obtainable here. All of these required packages can be installed via Anaconda by doing conda install pkg where pkg is the name of the package you want to install.

To make sure you are running the correct version of python, start a python interpreter via the system shell and you should see something similar

$ python
Python 3.4.1 (default, May 19 2014, 17:23:49)
[GCC 4.9.0 20140507 (prerelease)] on linux  
Type "help", "copyright", "credits" or "license" for more information.

If your shell says Python 2.x, try using the python3 command instead of python.


For now, we recommended building Starfish from source on your machine. Once the features stabilize, there will be an option to install via pip.

First, if you have not already done so, create a github user account and install git on your computer.

In order to download a local copy of this repository, cd to the location where you want it to live and then do

git clone
cd Starfish

To build the cython extensions

$ python build_ext --inplace

Since you may want to edit files during active development, it is best to install in develop mode

$ sudo python develop

You should now be done. Once the package has stabilized, the develop command may change to

$ sudo python install

To test that you've properly installed Starfish, try doing the following inside of a Python interpreter session

>>> import Starfish

If you see a blank line, then the package successfully installed. If you see any errors, then something went wrong--please file an issue.

Now that you've successfully installed the code, please see the documentation on how to begin using Starfish to solve your spectroscopic inference problem, or head to the cookbook for a taste of a typical workflow.