.. _physics-stellarPopulationSpectra: Stellar Population Spectra ========================== Class providing spectral energy distributions (SEDs) for simple stellar populations (SSPs)---the luminosity per unit frequency (in :math:`L_\odot` Hz\ :math:`^{-1}`) of a coeval population of stars as a function of age, metallicity, and wavelength. These SEDs are convolved with the star formation history to produce the integrated galaxy SED, which is compared to observed photometry or spectra. Implementations typically wrap stellar isochrone libraries and atmosphere grids such as FSPS, BC03, or BPASS. **Default implementation:** ``stellarPopulationSpectraFSPS`` Methods ------- ``luminosity`` → ``double precision`` Return the luminosity (in units of :math:`L_\odot` Hz\ :math:`^{-1}`) for a stellar population, composition ``abundances``, of the given ``age`` (in Gyr), at the specified ``wavelength`` (in Angstroms). * ``type (abundances), intent(in ) :: abundancesStellar`` * ``double precision , intent(in ) :: age , wavelength`` * ``integer , intent( out), optional :: status`` ``tabulation`` → ``void`` Return a tabulation of ages and metallicities at which stellar spectra should be tabulated. * ``integer , intent( out) :: agesCount, metallicitiesCount`` * ``double precision, allocatable, dimension(:), intent( out) :: ages , metallicity`` ``wavelengths`` → ``void`` Return a tabulation of wavelengths at which stellar spectra are defined. * ``integer , intent( out) :: wavelengthsCount`` * ``double precision, allocatable, dimension(:), intent( out) :: wavelengths`` ``wavelengthInterval`` → ``double precision`` At a given wavelength, return the wavelength interval in the tabulation of wavelength for which stellar spectra are defined. * ``double precision, intent(in ) :: wavelength`` .. _physics-stellarPopulationSpectraFile: ``stellarPopulationSpectraFile`` -------------------------------- A stellar population spectra class which computes spectra via interpolation in a tabulation read from file. This should be an HDF5 file with the following structure: .. code-block:: none ages Dataset {ageCount} metallicities Dataset {metallicityCount} spectra Dataset {metallicityCount, ageCount, metallicityCount} wavelengths Dataset {wavelengthCount} where the datasets contain the tabulated ages (in Gyr), metallicities (logarithmic, relative to Solar), wavelengths (in \AA) and spectra (in :math:`L_\odot` Hz\ :math:`^{-1}`). Scripts to convert the data provided by :cite:t:`maraston_evolutionary_2005` and :cite:t:`bruzual_stellar_2003` into Galacticus's format are provided in the ``scripts/ssps`` folder. **Methods** * ``readFile`` — Read the named power spectrum file. **Parameters** * ``[forceZeroMetallicity]`` (default ``.false.``) — Force the use of zero metallicity (or lowest metallicity available) for all stellar populations. * ``[fileName]`` — The path to the HDF5 file containing the tabulated stellar population spectra, with datasets for ages (Gyr), metallicities (log Solar), wavelengths (\AA), and spectra (:math:`L_\odot\,\mathrm{Hz}^{-1}`); see the ``scripts/ssps`` folder for conversion scripts. * ``[fileName]`` — The name of the file which contains fit coefficients for the time per tree fitting function. * ``[fileName]`` (default ``inputPath(pathTypeDataStatic)//'stellarAstrophysics/stellarPropertiesCompilationStandard.xml'``) — The name of the XML file from which to read stellar properties (ejected masses, yields, etc.). * ``[fileName]`` (default ``inputPath(pathTypeDataStatic)//'stellarAstrophysics/Stellar_Tracks_Padova.hdf5'``) — The name of the HDF5 file from which to read stellar tracks. * ``[fileName]`` — The name of the file from which to read intergalactic medium state data. * ``[fileName]`` — The name of the file from which to read intergalactic background light properties. * ``[fileName]`` — The name of a file from which to read tabulated spectra of accretion disks. * ``[fileName]`` — The name of the file from which to read a tabulated transfer function. .. _physics-stellarPopulationSpectraFSPS: ``stellarPopulationSpectraFSPS`` -------------------------------- A stellar population spectra class utilizing the FSPS package :cite:p:`conroy_propagation_2009`. If necessary, the `FSPS `_ code will be downloaded, patched and compiled and run to generate spectra. These tabulations are then stored to file for later re-use. The file name used is ``datasets/dynamic/stellarPopulations/simpleStellarPopulationsFSPS:v_.hdf5`` where :math:`<`\ ``version``\ :math:`>` is the FSPS version used, and :math:`<`\ ``descriptor``\ :math:`>` is an MD5 hash descriptor of the selected stellar population. **(Default implementation)** **Parameters** * ``[forceZeroMetallicity]`` (default ``.false.``) — Force the use of zero metallicity (or lowest metallicity available) for all stellar populations.