synthpop.modules.age.single_value

A single age distribution

Stars are all assigned the set age

Classes

SingleValue

Single age generator

Module Contents

class synthpop.modules.age.single_value.SingleValue(age_value: float, **kwargs)

Bases: synthpop.modules.age._age.Age

Single age generator

age_func_name = 'single_value'
age_value
draw_random_age(N: int or None = None) np.ndarray or float

Generate a “random” age from a single value distribution

Parameters

Nint, None, optional

if N is set to an integer, an array with N random ages is returned

Returns

agefloat, ndarray [Gyr]

single age or numpy array of N ages in Giga-years

average_age() float

Return the average age of the population

get_maximum_age() float

Return the maximum age that can be generated by the distribution.