synthpop.modules.age ==================== .. py:module:: synthpop.modules.age Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/synthpop/modules/age/_age/index /autoapi/synthpop/modules/age/exponential/index /autoapi/synthpop/modules/age/gaussian/index /autoapi/synthpop/modules/age/single_value/index /autoapi/synthpop/modules/age/uniform/index Classes ------- .. autoapisummary:: synthpop.modules.age.Age Package 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.