ConstantPlummerSphere#

class cogsworth.sfh.ConstantPlummerSphere(tau_min, tau_max, Z_all, M, a, r_trunc=None, **kwargs)[source]#

Bases: StarFormationHistory

A simple star formation history, with all stars formed at a constant rate between tau_min and tau_max in a Plummer sphere potential, all with metallicity Z.

This star formation history sampled BOTH positions and velocities self-consistently in a Plummer potential.

Parameters:
sizeint

Number of points to sample from the model

tau_minQuantity [time]

Minimum lookback time

tau_maxQuantity [time]

Maximum lookback time

Z_allfloat

Metallicity of the sphere

MQuantity [mass]

Total mass of the Plummer sphere

aQuantity [length]

Plummer scale radius

r_truncQuantity [length], optional

Truncation radius for the Plummer sphere, by default None (i.e. no truncation). If set, stars will only be sampled within this radius. For some guidance on setting this value, note that you will lose 1 - (r_trunc**3 / (r_trunc**2 + a**2)**1.5) of the mass of the Plummer sphere, where a is the Plummer scale radius. So setting r_trunc = 5 a will lose ~6% of the mass, r_trunc = 10 a will lose ~0.5% of the mass.

Methods Summary

draw_lookback_times(size)

Draw lookback times uniformly between tau_min and tau_max

get_metallicity(size)

Fix all metallicities to Z_all

sample(size)

Sample from the distributions for each component, combine and save in class attributes

Methods Documentation

draw_lookback_times(size)[source]#

Draw lookback times uniformly between tau_min and tau_max

get_metallicity(size)[source]#

Fix all metallicities to Z_all

sample(size)[source]#

Sample from the distributions for each component, combine and save in class attributes