neat.CompartmentFitter.convert_fit_arg¶
- CompartmentFitter.convert_fit_arg(fit_arg)[source]¶
Convert a fit argument, which can be a tuple, dict or tuple, to a tuple consisting of a neat.CompartmentTree that is either fitted, or in the process of being fitted, and the corresponding list of locations.
- Parameters:
fit_arg (string, dict, or tuple) – If string, the provided argument is interpreted as the fit name. If dict, the provided argument is a dictionary of the form {‘ctree’: neat.CompartmentTree, ‘locs’: <list of locations>}. If tuple, the provided argument is a tuple of the form (neat.CompartmentTree, <list of locations>}.
- Returns:
neat.CompartmentTree – The compartmenttree that is (in the process of being) fitted.
list of <neat.MorphLoc> – The corresponding list of fit locations.
- Raises:
TypeError – If fit_arg does not correspond to one of the above described arguments.