The SKIRT project
advanced radiative transfer for astrophysics
Functions
pts.storedtable.convert_sed Namespace Reference

Functions for converting SEDs and SED families to stored table format. More...

Functions

def convertBpassSEDFamily (inFilePaths, outFilePaths)
 This function converts data representing a BPASS family of SED templates for stellar populations (Eldridge, Stanway et al, 2017, PASA 34, 58; Stanway & Eldridge, 2018, MNRAS, 479, 75) to stored table format. More...
 
def convertBruzualCharlotSEDFamily (inFilePaths, outFilePaths)
 This function converts data representing the family of Bruzual & Charlot SEDs for single stellar populations, parameterized on metallicity and age (Bruzual & Charlot 2003, RAS 344, 1000-1026), to stored table format. More...
 
def convertCastelliKuruczSEDFamily (inFilePaths, outFilePaths)
 This function converts data representing the Castelli-Kurucz family of stellar atmosphere models (i.e. More...
 
def convertFSPSSEDFamily (inFilePaths, outFilePaths)
 This function converts data representing a family of SEDs for single stellar populations generated by the FSPS code, parameterized on metallicity and age, to stored table format. More...
 
def convertMappingsSEDFamily (inFilePaths, outFilePaths)
 This function converts data representing the family of MAPPINGS III starburst template SEDs, parameterized on metallicity, compactness, ISM pressure and PDR covering factor, as described in Groves et al. More...
 
def convertMarastonSEDFamily (inFilePaths, outFilePaths)
 This function converts data representing the family of SEDs for simple stellar populations (SSPs) according to the model of Maraston (1998, MNRAS, 300, 872–892) to stored table format. More...
 
def convertStarburst99SEDFamily (inFilePaths, outFilePaths)
 This function converts data representing the family of Starburst99 SEDs for single stellar populations (Leitherer et al. More...
 
def convertTextSEDinWattsPerMicron (inFilePaths, outFilePaths)
 This function converts a regular text column file with an optional header and two columns (wavelength in micron and specific luminosity in W/micron) to stored table file format. More...
 
def createQuasarSED (inFilePaths, outFilePaths)
 This function calculates an SED representing a simple model for the spectral energy distribution of a quasar; see Stalevski et al. More...
 

Detailed Description

Functions for converting SEDs and SED families to stored table format.

The functions in this module can convert various kinds of SED and SED family data to SKIRT stored table format.

Function Documentation

◆ convertBpassSEDFamily()

def pts.storedtable.convert_sed.convertBpassSEDFamily (   inFilePaths,
  outFilePaths 
)

This function converts data representing a BPASS family of SED templates for stellar populations (Eldridge, Stanway et al, 2017, PASA 34, 58; Stanway & Eldridge, 2018, MNRAS, 479, 75) to stored table format.

The function expects a sequence of input file paths and corresponding output file paths. Each input file path is actually interpreted as a template where the string "*" will be replaced by the appropriate metallicity code.

The stored table output file contains specific luminosities in W/m normalized on an initial stellar population mass of 1 solar mass, as a function of wavelength and parameterized on metallicity and age.

◆ convertBruzualCharlotSEDFamily()

def pts.storedtable.convert_sed.convertBruzualCharlotSEDFamily (   inFilePaths,
  outFilePaths 
)

This function converts data representing the family of Bruzual & Charlot SEDs for single stellar populations, parameterized on metallicity and age (Bruzual & Charlot 2003, RAS 344, 1000-1026), to stored table format.

The function expects a sequence of input file paths and corresponding output file paths. Each input file path is actually interpreted as a template where the string "MM" will be replaced by the appropriate metallicity code.

The stored table output file contains specific luminosities in W/m normalized on an initial stellar population mass of 1 solar mass, in function of wavelength and parameterized on metallicity and age.

◆ convertCastelliKuruczSEDFamily()

def pts.storedtable.convert_sed.convertCastelliKuruczSEDFamily (   inFilePaths,
  outFilePaths 
)

This function converts data representing the Castelli-Kurucz family of stellar atmosphere models (i.e.

SEDs) to stored table format. The function expects a single input file path and the corresponding output file path. The input file path is actually interpreted as a template where the asterisks will be replaced by the appropriate metallicity and temperature codes.

The stored table output file contains specific fluxes in W/m/m2. To obtain the specific luminosity for a particular star, multiply this value by the stellar surface, i.e. 4 pi R^2.

◆ convertFSPSSEDFamily()

def pts.storedtable.convert_sed.convertFSPSSEDFamily (   inFilePaths,
  outFilePaths 
)

This function converts data representing a family of SEDs for single stellar populations generated by the FSPS code, parameterized on metallicity and age, to stored table format.

For info on FSPS, see https://github.com/cconroy20/fsps and Conroy, Gunn, & White (2009, ApJ) and Conroy & Gunn (2010, ApJ). The function expects a sequence of input file paths and corresponding output file paths. Each input file path is actually interpreted as a template where the string "*" will be replaced by some metallicity identifier. The metallicity identifiers in the filenames are used only for locating the files; the actual metallicity value is obtained from the file contents, and the files are automatically sorted in order of increasing metallicity.

The stored table output file contains specific luminosities in W/m normalized on an initial stellar population mass of 1 solar mass, in function of wavelength and parameterized on metallicity and age.

◆ convertMappingsSEDFamily()

def pts.storedtable.convert_sed.convertMappingsSEDFamily (   inFilePaths,
  outFilePaths 
)

This function converts data representing the family of MAPPINGS III starburst template SEDs, parameterized on metallicity, compactness, ISM pressure and PDR covering factor, as described in Groves et al.

(2008, ApJS,176,438), to stored table format. The function expects a single input file path pointing to the IDL save file containing the data, and a single output file path.

The stored table output file contains specific luminosities in W/m scaled to a star formation rate of 1 Msun/yr (over 10^7 yrs).

The input data must be converted for SKIRT as follows:

  • lambda: micron --> * 1e-6 (to m)
  • Z: relative to solar, with Zsun = 0.0122 as in Asplund et al. (2005) --> Z = Zrel * Zsun
  • logC: dimensionless --> no conversion
  • P: given as log10(P/k) ('ponk') with k Boltzmann's constant, and in K/cm^3 --> P = k * 1e6 * 10**ponk (to Pa)
  • fPDR: dimensionless fraction -> no conversion
  • Llambda: erg/s/Hz --> * 1e-7 * c / lambda**2 (to W/m)

◆ convertMarastonSEDFamily()

def pts.storedtable.convert_sed.convertMarastonSEDFamily (   inFilePaths,
  outFilePaths 
)

This function converts data representing the family of SEDs for simple stellar populations (SSPs) according to the model of Maraston (1998, MNRAS, 300, 872–892) to stored table format.

The function expects a sequence of input file paths and corresponding output file paths. Each input file path is actually interpreted as a template where the string "*" will be replaced by the appropriate metallicity code.

The stored table output file contains specific luminosities in W/m normalized on an initial stellar population mass of 1 solar mass, in function of wavelength and parameterized on metallicity and age.

◆ convertStarburst99SEDFamily()

def pts.storedtable.convert_sed.convertStarburst99SEDFamily (   inFilePaths,
  outFilePaths 
)

This function converts data representing the family of Starburst99 SEDs for single stellar populations (Leitherer et al.

1999, ApJS, 123, 3), assuming the Kroupa initial mass function (Kroupa 2001, MNRAS, 322, 231), and parameterized on metallicity and age, to stored table format. The function expects a single input file path pointing to the compressed FITS file containing the data, and a single output file path.

The stored table output file contains specific luminosities in W/m normalized on an initial stellar population mass of 1 solar mass, in function of wavelength and parameterized on metallicity and age.

◆ convertTextSEDinWattsPerMicron()

def pts.storedtable.convert_sed.convertTextSEDinWattsPerMicron (   inFilePaths,
  outFilePaths 
)

This function converts a regular text column file with an optional header and two columns (wavelength in micron and specific luminosity in W/micron) to stored table file format.

The function expects a sequence of input file paths and corresponding output file paths.

◆ createQuasarSED()

def pts.storedtable.convert_sed.createQuasarSED (   inFilePaths,
  outFilePaths 
)

This function calculates an SED representing a simple model for the spectral energy distribution of a quasar; see Stalevski et al.

(2012, MNRAS, 420, 2756–2772) and Schartmann et al. (2005, A&A, 437, 861–881). The SED is defined in the wavelength range between 0.001 \(\mu\)m and 1000 \(\mu\)m and is characterized by

\[ S_\lambda \propto \begin{cases} \; \lambda^{1/5} & \text{if $0.001~\mu{\text{m}}<\lambda<0.01~\mu{\text{m}}$} \\ \; \lambda^{-1} & \text{if $0.01~\mu{\text{m}}<\lambda<0.1~\mu{\text{m}}$} \\ \; \lambda^{-3/2} & \text{if $0.1~\mu{\text{m}}<\lambda<5~\mu{\text{m}}$} \\ \; \lambda^{-4} & \text{if $5~\mu{\text{m}}<\lambda<1000~\mu{\text{m}}$.} \end{cases} \]

The function expects no input file names and a single output file name. There is no input file because the function calculates the SED analytically. Because SEDs are log-log interpolated in SKIRT, and the segments of the QuasarSED are power-laws, we can restrict the tabulation to the wavelength grid points separating the segments.

The QuasarSED is arbitrarily normalized so that the value at 0.001 micron equals 1 W/m.