synthpop.modules.age.exponential ================================ .. py:module:: synthpop.modules.age.exponential .. autoapi-nested-parse:: An exponential age distribution Stars are assigned ages from an exponential distribution with a power law index and upper and lower limits. Classes ------- .. autoapisummary:: synthpop.modules.age.exponential.Exponential Module Contents --------------- .. py:class:: Exponential(gamma: float, low_bound: float = 0.0001, high_bound: float = 19.9526231497, **kwargs) Bases: :py:obj:`synthpop.modules.age._age.Age` Exponential age distribution generator .. py:attribute:: age_func_name :value: 'exponential' .. py:attribute:: gamma .. py:attribute:: lower :value: 0.0001 .. py:attribute:: upper :value: 19.9526231497 .. py:method:: draw_random_age(N: int or None = None, **kwargs) -> np.ndarray or float Returns one or more ages [Gyr] from an exponential distribution. Parameters ---------- N : int, None, optional if N is set to an integer, an array with N random ages is returned Returns ------- val : ndarray, float [Gyr] single age or ndarray of N ages in [Gyr] .. 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.