get_rtm_kwargs#

petpal.kinetic_modeling.fit_tac_with_rtms.get_rtm_kwargs(method: Callable, bounds: list = None, k2_prime: float = None, t_thresh_in_mins: float = None)#

Function for getting special keyword arguments to be passed on to the provided when used as part of an analysis.

Takes a callable reference tissue model (RTM) method, and optionally a set of bounds, a k2’ value, and/or a threshold time. The necessary arguments to run the provided method are then processed and assigned to their appropriate values in the dictionary args_dict. The function returns args_dict with any assigned values, which can be passed to method in the form **args_dict.

Parameters:
  • method (Callable) – A method to fit a TAC with an RTM. Expected one of the methods from petpal.kinetic_modeling.reference_tissue_models, such as fit_srtm_to_tac().

  • bounds – The bounds on parameters fit during RTM analysis, if applicable. Expected order is as they appear in the original method, e.g. see fit_frtm_to_tac_with_bounds(). Default None.

  • k2_prime – The k2_prime value to be used in the analysis, if applicable. Default None.

  • t_thresh_in_mins – The threshold time value to be used in the analysis, if applicable. Default None.

Returns:

args_dict (dict) – Dictionary with all keywords necessary to plug into an RTM analysis.

Important

If bounds,`k2_prime`, t_thresh_in_mins are all unset, as they should be for fit_srtm_to_tac() for example, will return an empty dictionary.