Skip to content

Simultaneous continuum and emission line fitting of galaxy optical spectra from SDSS and MaNGA

Notifications You must be signed in to change notification settings

fuhaiastro/spfit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spfit: a spectral fitting tool for galaxies

SPFIT is an IDL-based package to simultaneous fit models of stellar continuum and emission lines to galaxy spectra. The intial solution is found with pPXF - Penalized Pixel-Fitting and the optimization of the final solution uses MPFIT - Robust non-linear least squares curve fitting. For the ease of use, wrappers and examples for modeling SDSS single-fiber spectra and MaNGA integral-field spectroscopic datacubes are provided. A brief installation guide can be found below, which assumes familarity with macOS and Bash shell.

References

Demo Examples

Examples are provided for fitting SDSS single-fiber spectra and MaNGA datacubes. See the README files in these folders for instructions.

Installation Guide

  1. Download source code
cd ~/idl
git clone https://github.com/fuhaiastro/spfit.git
  1. Set environmental variables and define start-up command to launch spfit.
vi ~/.bash_profile
alias spfit='source ~/idl/spfit/setup.sh; /Applications/harris/idl/bin/idl -IDL_PROMPT "SPFIT>"'
  1. Make sure the appropriate paths are set correctly for your host.
vi ~/idl/spfit/setup.sh

Below is the content of the setup file:

# Bash shell commands to define IDL environment variables and aliases.
. /Applications/harris/idl/bin/idl_setup.bash

export IDL_PATH=+$IDL_DIR/examples:+$IDL_DIR/lib
export IDL=$HOME/idl

# MaNGA 
export MANGA_DIR=/Volumes/scr/manga
export MANGA_SPECTRO_REDUX=$MANGA_DIR/spectro/redux/
export MANGADRP_VER=MPL-11
# SPFIT
export SPFIT_DIR=$HOME/idl/spfit/
export IDL_PATH=${IDL_PATH}:+$SPFIT_DIR/pro
# IDLUTILS (includes Astrolib, Coyote, & MPFIT)
export IDLUTILS_DIR=$IDL/idlutils
#export IDL_PATH ${IDL_PATH}:+$IDL/astron/pro:+$IDLUTILS_DIR/goddard/pro:+$IDLUTILS_DIR/pro
export IDL_PATH=${IDL_PATH}:+$IDLUTILS_DIR/goddard/pro:+$IDLUTILS_DIR/pro
export PATH=$IDLUTILS_DIR/bin:$PATH
# SFD98 Galactic dust maps
export DUST_DIR=$IDL/dust 
# IDLSPEC2D
export IDLSPEC2D_DIR=$IDL/idlspec2d
export IDL_PATH=${IDL_PATH}:+$IDLSPEC2D_DIR/pro
export PATH=$IDLSPEC2D_DIR/bin:$PATH
  1. Install IDLUTILS
cd ~/idl
mkdir idlutils
cd idlutils
svn co https://svn.sdss.org/public/repo/sdss/idlutils/trunk .
export IDL_DIR=/Applications/harris/idl
export IDL=$HOME/idl
export IDLUTILS_DIR=$IDL/idlutils
$IDLUTILS_DIR/bin/evilmake clean
$IDLUTILS_DIR/bin/evilmake
  1. Install IDLSPEC2D
cd ~/idl
mkdir idlspec2d
cd idlspec2d
svn co https://svn.sdss.org/public/repo/eboss/idlspec2d/trunk/ .
export IDLSPEC2D_DIR=$IDL/idlspec2d
$IDLUTILS_DIR/bin/evilmake clean
$IDLUTILS_DIR/bin/evilmake
  1. Install DUST (Galactic dust maps)
cd ~/idl
mkdir dust
cd dust
svn co https://svn.sdss.org/public/data/sdss/catalogs/dust/trunk/ .

About

Simultaneous continuum and emission line fitting of galaxy optical spectra from SDSS and MaNGA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages