andycasey / smhr

Spectroscopy Made Hard(er)
14 stars 7 forks source link

Build Status

Spectroscopy Made Harder

Gotta pay back that tech debt.

Authors

Installation

For older Macs or other computers, this worked fine:

conda create -c conda-forge --name smhr-py3 python=3.8 scipy numpy=1.22.4 matplotlib=3.1.3 six astropy ipython python.app requests
conda activate smhr-py3
conda install -c conda-forge pyside2=5.13.2
conda install -c conda-forge yaml

Note: you can also open smhr with python or ipython, but the menu bar may not work. It appears you can fix this by clicking outside SMHR then clicking back in. But using pythonw is better. Details: https://stackoverflow.com/questions/48738805/mac-pyqt5-menubar-not-active-until-unfocusing-refocusing-the-app

create a new environment for smhr-py3:

conda create --name smhr-py3 python=3.8 scipy numpy=1.22.4 matplotlib=3.1.3 six astropy ipython requests

Activate environment:

conda activate smhr-py3

Install pyside2:

conda install -c conda-forge pyside2=5.13.2

Install yaml

conda install -c conda-forge yaml

Get smhr:

git clone https://github.com/andycasey/smhr.git cd smhr python setup.py develop

Start smhr:

cd smh/gui ipython main.py

MOOG

It is currently recommended that you use this version of MOOG: https://github.com/alexji/moog17scat

Follow the usual MOOG installation instructions. When you compile MOOG, make sure that you have not activated any anaconda environments, because it can mess up the gfortran flags. Note that SMHR requires you to have an executable called MOOGSILENT callable from your $PATH environment variable. Specifically, it uses the version of MOOG that you get from which MOOGSILENT.

This version is modified from the 2017 February version of MOOG from Chris Sneden's website. 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. There is now a 2019 November version of MOOG, but it did not add anything different unless you use the HF molecule or work on combined spectra of globular clusters. It did also start forcing MOOG to read everything as loggf from linelists, rather than logging things if all the loggfs were positive. But in SMHR we add a fake line whenever this is detected, so it does impact anything here.

Note that Alex has recently (Nov 16, 2021) fixed a bug in moog17scat that existed since the beginning and resulted in continuum accuracy only at the 0.003 when scattering is on. He also fixed a bug in isotopes. See the README for moog17scat if you have concerns. (Note May 2022: Alex has updated the master branch of moog17scat so this is done by default.)

VERSION HISTORY:

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.