parse_width_arg

sofia_redux.toolkit.fitting.fitpeaks1d.parse_width_arg(model_class, width_arg)[source]

Simple convenience lookup to get width parameter name for various models.

Parameters:
model_classastropy.modeling.Fittable1DModel
width_argNone or float or int or ((str or None), (float or int))
Returns:
None or (int or float) or (str, (int or float))
If None:

Do not apply max_region

If (int or float)

Apply fixed max_region

If (str, float) or (str, int)

Apply max_region as max_region[1] multiple of model parameter max_region[0].

Raises:
ValueError, TypeError