synthpop.modules.age._age ========================= .. py:module:: synthpop.modules.age._age .. autoapi-nested-parse:: The base class for age distribution modules. Classes ------- .. autoapisummary:: synthpop.modules.age._age.Age Module Contents --------------- .. py:class:: Age(sun: types.ModuleType = None, coord_trans: types.ModuleType = None, logger: types.ModuleType = None, **kwargs) Bases: :py:obj:`abc.ABC` The Age base class. .. py:attribute:: age_func_name :value: 'None' .. py:attribute:: sun .. py:attribute:: coord_trans :value: None .. py:attribute:: logger :value: None .. py:method:: draw_random_age(N: int = None) -> np.ndarray or float :abstractmethod: Generate a random age from the distribution Parameters ---------- N : int, None, optional if N is set to an integer, an array with N random ages is returned Returns ------- random_age : ndarray or float [Gyr] array of random ages .. py:method:: average_age() -> float :abstractmethod: Returns the average age of the distribution .. py:method:: get_maximum_age() -> float :abstractmethod: Returns the maximum age generated by the distribution if there is no maximum, it should return None.