FIREFLY Spectra

This class is dedicated to handling the spectra to feedin the FIREFLY code, see Wilkinson et al. 2015.

https://arxiv.org/abs/1503.01124

General purpose:

The class GalaxySpectrumFIREFLY is dedicated to handling spectra to be fed to FIREFLY for fitting its stellar population

Imports:

import numpy as np
import astropy.io.fits as pyfits
import glob
from firefly_dust import get_dust_radec
class GalaxySpectrumFIREFLY.GalaxySpectrumFIREFLY(path_to_spectrum, milky_way_reddening=True, hpf_mode='on')[source]

Loads the environnement to transform observed spectra into the input for FIREFLY.

Currently SDSS spectra, speclite format is handled as well as stacks from the VVDS and the DEEP2 galaxy surveys.

Parameters:
  • path_to_spectrum – path to the spectrum
  • milky_way_reddening – True if you want to correct from the Milky way redenning using the Schlegel 98 dust maps.
  • hpf_mode – models the dust attenuation observed in the spectrum using high pass filter.
openObservedMuseSpectrum(catalog)[source]

Loads the observed spectrum in counts.

openObservedSDSSSpectrum()[source]

It reads an SDSS spectrum and provides the input for the firefly fitting routine. :param path_to_spectrum: :param sdss_dir: directory with the observed spectra :param milky_way_reddening: True or False if you want to correct the redenning of the Milky way. :param hpf_mode: ‘on’ high pass filters the data to correct from dust in the galaxy.

In this aims, it stores the following data in the object : * hdu list from the spec lite * SED data : wavelength (in angstrom), flux, error on the flux (in 10^{-17} erg/cm2/s/Angstrom, like the SDSS spectra) * Metadata :

  • ra : in degrees J2000
  • dec : in degrees J2000
  • redshift : best fit
  • vdisp : velocity dispersion in km/s
  • r_instrument : resolution of the instrument at each wavelength observed
  • trust_flag : 1 or True if trusted
  • bad_flags : ones as long as the wavelength array, filters the pixels with bad data
  • objid : object id optional : set to 0
openObservedStack()[source]

It reads an Stack spectrum from the LF analysis and provides the input for the firefly fitting routine. :param path_to_spectrum: :param sdss_dir: directory with the observed spectra :param milky_way_reddening: True or False if you want to correct the redenning of the Milky way. :param hpf_mode: ‘on’ high pass filters the data to correct from dust in the galaxy.

In this aims, it stores the following data in the object : * hdu list from the spec lite * SED data : wavelength (in angstrom), flux, error on the flux (in 10^{-17} erg/cm2/s/Angstrom, like the SDSS spectra) * Metadata :

  • ra : in degrees J2000
  • dec : in degrees J2000
  • redshift : best fit
  • vdisp : velocity dispersion in km/s
  • r_instrument : resolution of the instrument at each wavelength observed
  • trust_flag : 1 or True if trusted
  • bad_flags : ones as long as the wavelength array, filters the pixels with bad data
  • objid : object id optional : set to 0
openObservedStackTutorial()[source]

It reads an Stack spectrum from the LF analysis and provides the input for the firefly fitting routine. :param path_to_spectrum: :param sdss_dir: directory with the observed spectra :param milky_way_reddening: True or False if you want to correct the redenning of the Milky way. :param hpf_mode: ‘on’ high pass filters the data to correct from dust in the galaxy.

In this aims, it stores the following data in the object : * hdu list from the spec lite * SED data : wavelength (in angstrom), flux, error on the flux (in 10^{-17} erg/cm2/s/Angstrom, like the SDSS spectra) * Metadata :

  • ra : in degrees J2000
  • dec : in degrees J2000
  • redshift : best fit
  • vdisp : velocity dispersion in km/s
  • r_instrument : resolution of the instrument at each wavelength observed
  • trust_flag : 1 or True if trusted
  • bad_flags : ones as long as the wavelength array, filters the pixels with bad data
  • objid : object id optional : set to 0