yt.analysis_modules.star_analysis.sfr_spectrum.StarFormationRate

class yt.analysis_modules.star_analysis.sfr_spectrum.StarFormationRate(ds, data_source=None, star_mass=None, star_creation_time=None, bins=300, volume=None, star_filter=None)[source]

Calculates the star formation rate for a given population of star particles.

Parameters:

ds : EnzoDataset object

data_source : AMRRegion object, optional

The region from which stars are extracted for analysis. If this is not supplied, the next three must be, otherwise the next three do not need to be specified.

star_mass : Ordered array or list of floats

The mass of the stars to be analyzed in units of Msun.

star_creation_time : Ordered array or list of floats

The creation time for the stars in code units.

volume : Float

The comoving volume of the region for the specified list of stars.

bins : Integer

The number of time bins used for binning the stars. Default = 300.

star_filter : A user-defined filtering rule for stars.

Examples

>>> import yt
>>> from yt.analysis_modules.star_analysis.api import StarFormationRate
>>> ds = yt.load("Enzo_64/RD0006/RedshiftOutput0006")
>>> sp = ds.sphere([0.5, 0.5, 0.5], 0.1)
>>> sfr = StarFormationRate(ds, sp)

Methods