synthpop.modules.age.single_value ================================= .. py:module:: synthpop.modules.age.single_value .. autoapi-nested-parse:: A single age distribution Stars are all assigned the set age Classes ------- .. autoapisummary:: synthpop.modules.age.single_value.SingleValue Module Contents --------------- .. py:class:: SingleValue(age_value: float, **kwargs) Bases: :py:obj:`synthpop.modules.age._age.Age` Single age generator .. py:attribute:: age_func_name :value: 'single_value' .. py:attribute:: age_value .. py:method:: draw_random_age(N: int or None = None) -> np.ndarray or float Generate a "random" age from a single value distribution Parameters ---------- N : int, None, optional if N is set to an integer, an array with N random ages is returned Returns ------- age : float, ndarray [Gyr] single age or numpy array of N ages in Giga-years .. 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.