yt.extensions.StarAnalysis.SpectrumBuilder

class yt.extensions.StarAnalysis.SpectrumBuilder(pf, bcdir='', model='chabrier')

Initialize the data to build a summed flux spectrum for a collection of stars using the models of Bruzual & Charlot (2003). This function loads the necessary data tables into memory and must be called before analyzing any star particles.

Parameters :

pf : EnzoStaticOutput object

bcdir : String

Path to directory containing Bruzual & Charlot h5 fit files.

model : String

Choice of Initial Metalicity Function model, ‘chabrier’ or ‘salpeter’. Default = ‘chabrier’.

Examples

>>> pf = load("RedshiftOutput0000")
>>> spec = SpectrumBuilder(pf, "/home/user/bc/", model="salpeter")

Methods

calculate_spectrum([data_source, star_mass, ...]) For the set of stars, calculate the collective spectrum.
read_bclib() Read in the age and wavelength bins, and the flux bins for each
write_out([name]) Write out the summed flux to a file.
write_out_SED([name, flux_norm]) Write out the summed SED to a file. The file has two columns:

Previous topic

yt.extensions.StarAnalysis.StarFormationRate.write_out

Next topic

yt.extensions.StarAnalysis.SpectrumBuilder.calculate_spectrum

This Page