synthpop.modules.age.uniform ============================ .. py:module:: synthpop.modules.age.uniform .. autoapi-nested-parse:: A uniform age distribution Stars are assigned uniformly drawn random ages between the bounds Classes ------- .. autoapisummary:: synthpop.modules.age.uniform.Uniform Module Contents --------------- .. py:class:: Uniform(low_bound: float, high_bound: float, **kwargs) Bases: :py:obj:`synthpop.modules.age._age.Age` Uniform age distribution generator .. py:attribute:: age_func_name :value: 'uniform' .. py:attribute:: low_bound .. py:attribute:: high_bound .. py:method:: draw_random_age(N: float or None = None) -> np.ndarray or float Generate a random age or ages from a uniform distribution Parameters ---------- N : int, None, optional if N is set to an integer, an array with N random ages is returned Returns ------- age : ndarray, float [Gyr] single age or numpy array of N ages in gigayears .. py:method:: average_age() -> float Return the average age of the population .. py:method:: get_maximum_age() -> float Return the maximum age that can be generated by the distribution.