:py:mod:`neurorosettes.clocks` ============================== .. py:module:: neurorosettes.clocks .. autoapi-nested-parse:: This module deals with the proliferation, differentiation and death cycles Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: neurorosettes.clocks.Clock neurorosettes.clocks.CellClocks neurorosettes.clocks.ClocksFactory .. py:class:: Clock(rate = None) Class to represent a cell's internal clock. Cells start in an inactive status and can be flagged for an event based on a rate. Alternatively, this status can be manually induced. Active states can also be blocked. When a rate is not defined, cells remain in an inactive state. :param rate: The rate of the clock's event .. py:method:: set_rate(rate) Sets the clock's event rate. :param rate: The clock's event rate .. py:method:: advance_clock(timestep) Updates the cell cycle status based on the proliferation rate (may happen or not). :param timestep: The simulation time step (time passed between status updates). .. py:method:: flag() Updates the cell cycle to proliferation (will always happen) .. py:method:: remove_flag() Updates the cell cycle to arrest (will always happen) .. py:method:: trigger_block() Activates the cycle block to avoid proliferation .. py:class:: CellClocks(proliferation_rate, death_rate, differentiation_rate) Class to represent all of the internal biological clocks of a cell. :param proliferation_rate: A cell's proliferation rate. :param death_rate: A cell's death rate. :param differentiation_rate: A cell's differentiation rate. .. py:method:: set_proliferation_clock(proliferation_rate) Sets the proliferation rate. :param proliferation_rate: A cell's proliferation rate .. py:method:: set_death_clock(death_rate) Sets the death rate. :param death_rate: A cell's proliferation rate .. py:method:: set_differentiation_clock(differentiation_rate) Sets the differentiation rate. :param differentiation_rate: A cell's differentiation rate .. py:method:: set_clocks(proliferation_rate, death_rate, differentiation_rate) Sets the rates for all biological events (proliferation, death and differentiation). :param proliferation_rate: A cell's proliferation rate :param death_rate: A cell's proliferation rate :param differentiation_rate: A cell's differentiation rate .. py:method:: get_clock_rates() Returns all the clock rates for biological events. .. py:method:: advance_clocks(timestep) Advance all biological clocks and flag cells for biological events. :param timestep: The simulation time step (time passed between status updates) .. py:method:: block_all_clocks() Blocks the cycling, death and differentiation clocks. .. py:class:: ClocksFactory Helper class to create instances of cell internal clocks based on the same rates. .. py:attribute:: proliferation_rate :annotation: :float The rate of proliferation of the cells. .. py:attribute:: death_rate :annotation: :float The rate of death of the cells. .. py:attribute:: differentiation_rate :annotation: :float The rate of differntiation of the cells. .. py:method:: get_clocks() Returns an instance of a CellClocks object with the chosen biology rates.