skultrafast.kinetic_model ========================= .. py:module:: skultrafast.kinetic_model .. autoapi-nested-parse:: This module helps to build a transfer matrix and applying it to an DAS. Classes ------- .. autoapisummary:: skultrafast.kinetic_model.Transition skultrafast.kinetic_model.Model Functions --------- .. autoapisummary:: skultrafast.kinetic_model.get_comparments skultrafast.kinetic_model.get_symbols Module Contents --------------- .. py:class:: Transition(from_comp, to_comp, rate=None, qy=None) Bases: :py:obj:`object` Represents a transtion between comparments. .. py:attribute:: from_comp .. py:attribute:: to_comp .. py:attribute:: qu_yield :value: None .. py:class:: Model Bases: :py:obj:`object` Helper class to make a model .. py:attribute:: transitions :type: List[Transition] :value: [] .. py:method:: add_transition(from_comp, to_comp, rate=None, qy=None) Adds an transition to the model. :param from_comp: Start of the transition :type from_comp: str :param to_comp: Target of the transition :type to_comp: str :param rate: Name of the associated rate, by default None, which generates a default name. :type rate: str, optional :param qy: The yield of the transition, by default 1 :type qy: str of float, optional .. py:method:: build_matrix() Builds the n x n k-matrix as a symbolic representation (list of lists of tuples). Each entry contains a list of (coefficient, rate_name, yield_value) tuples. .. py:method:: build_mat_func() Creates a function that builds the K matrix from parameter values. Uses fully vectorized numpy operations for maximum speed. .. py:method:: get_compartments() .. py:method:: make_diff_equation() Creates a representation of the differential equations. Note: Full symbolic differential equation support removed with sympy dependency. .. py:method:: get_trans(y0, taus, t) Return the solution using vectorized matrix exponential computation. .. py:function:: get_comparments(list_trans) Getting a list of transtions, return the compartments .. py:function:: get_symbols(list_trans) Return the used symbols