Implements the selection of different star-formation history scenarios.

posydon.popsyn.star_formation_history.get_formation_times(N_binaries, star_formation='constant', **kwargs)[source]

Get formation times of binaries in a population based on a SFH scenario.

Parameters
  • N_binaries (int) – Number of formation ages to produce.

  • star_formation (str, {constant, burst}) – Constant - random formation times from a uniform distribution. Burst - all stars are born at the same time.

  • burst_time (float, 0 (years)) – Sets birth time in years.

  • min_time (float, 0 (years)) – If constant SF, sets minimum of random sampling.

  • max_time (float, age_of_universe (years)) – If constant SF, sets maximum of random sampling.

  • RNG (<class, np.random.Generator>) – Random generator instance.

Returns

The formation times array.

Return type

array