Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status

Spectroscopy Made Harder

Gotta pay back that tech debt.


  • Andrew R. Casey (Monash)
  • Alex Ji (Carnegie Observatories)


  • The branch refactor-scatterplot has an updated and improved GUI (as of Jan 2020). These have not been merged into master yet but should be soon.
  • The master branch is currently frozen to a version from about July 2019.
  • v0.22 (formerly branch better-errors) is a frozen version that is the result of a big update on May 30, 2019. It is considered a stable version.
  • v0.2 is a frozen development version, v0.21 is a slightly more recently frozen version.
  • v0.1 is the current stable version. Things are working and it is being used for papers.

If you are new to SMHR, you should use the branch refactor-scatterplot. Note v0.1 and v0.2 files are not compatible, but there is a script to convert old save files into new save files. There is not a way to convert files from the old SMH to new SMHR.


This is one way that I (Alex) got things running from a fresh mac install and I'm putting it here as a record of some things I had to do. Default anaconda does not officially support pyside, but I think conda-forge does. We may switch to that, or a different version of PySide, in the future. For now, this works...

  • Download full anaconda with python 2.7. If you run into trouble later, specifically install an old anaconda version from the anaconda archive around October 2016.
  • conda install pyside: this will install pyside v1.1.1
  • install qt4:
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt@4
  • conda install matplotlib=1.5.1 (fixing this is very painful because I need to update to qt5; I have started doing this but it will take a long time)
  • conda install numpy=1.11.3 (this is an issue with pyside)
  • conda install scipy=0.19.0 (this is an issue with newer versions of scipy, not sure yet why but it segfaults in interpolate.griddata)
  • conda install qt=4.8.7 (you may have to uninstall and downgrade some things for this to work; it should be safe to upgrade those later) (Recent versions of anaconda have removed this version of QT. We have not yet found a solution but are working on appears to mess up the Open File Dialogs, and we will try to come up with a workaround.)
  • Clone smhr
  • Go into the smhr directory and python develop
  • Go to smhr/smh/gui and open with ipython It should crash with a message about libpyside, saying something is not found. This is because a file is named wrong within anaconda.
    • Go to ~/anaconda/lib (or the equivalent if you made a separate environment), and make a symlink or file copy for libpyside-python2.7.1.1.dylib from one that looks almost the same (e.g. libpyside-python2.
    • Try to open SMHR again, and it will crash. Do the same thing for libshiboken when you see this error message.
    • If you have multiple anaconda installations: make sure that you are doing all of this with the correct anaconda (e.g. anaconda2)
  • If you have problems with qt_menu.nib, use ~/anaconda/bin/ instead of ipython. If you have multiple anaconda installations, make sure you change anaconda to anaconda2 or whatever you installed it to. (I have fixed this on my laptop by copying it somewhere but I cannot find where. Some possible places that could help):
  • There are sometimes some problems with segfaults due to the GUI library. We hope this will go away when we move away from pyside. Sorry.

Some notes from Henrique Reggiani that may be helpful to some:

I am running everything under MAC OS X 10.14.6
My Python 2.7 install is the system install (I do not use anaconda and I only have one python install per version, so I manage packages as needed).

I install qt4 from macports (system install). I already have qt5 but it did not create any problems.
I had to export in my .profile/.bash_rc the path to the qmake executable:
(export PATH="$PATH:/opt/local/libexec/qt4/bin") – this is the system path

Then PySide was not finding the libpyside-python2.7.1.2.dylib. The libraries were all correctly placed and named. To solve the problem you go into $PYTHONPATH/site-packages/PySide and run this script:


It is currently recommended that you use this version of MOOG:

This version is not the most efficient, and it computes synthetic spectra only to about 0.003 accuracy. It is modified from the 2017 February version of MOOG from Chris Sneden's website (there has been an update made in Nov 2019 that Alex has not investigated yet). It includes Jennifer Sobeck's scattering routines (turned on and off with the flag scat, which is not true in the default MOOG 2017) and the fixes to the Barklem damping that were implemented in the 2014 MOOG refactoring.

Note that by default right now, we require you to have an executable called MOOGSILENT callable from your $PATH environment variable. Specifically, we use the version of MOOG that you get from which MOOGSILENT. We may change this in the future.


Spectroscopy Made Hard(er)



No releases published


No packages published
You can’t perform that action at this time.