ConstantPlummerSphere#
- class cogsworth.sfh.ConstantPlummerSphere(tau_min, tau_max, Z_all, M, a, r_trunc=None, **kwargs)[source]#
Bases:
StarFormationHistoryA simple star formation history, with all stars formed at a constant rate between
tau_minandtau_maxin a Plummer sphere potential, all with metallicityZ.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_min
Quantity[time] Minimum lookback time
- tau_max
Quantity[time] Maximum lookback time
- Z_allfloat
Metallicity of the sphere
- M
Quantity[mass] Total mass of the Plummer sphere
- a
Quantity[length] Plummer scale radius
- r_trunc
Quantity[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