format_grid

lsst.ts.standardscripts.format_grid(axis1: float | list[float], axis2: float | list[float]) tuple[list[float], list[float]]

Format two input values into lists with the same lengths.

If both values are scalars, the return value will be a pair of lists with a single value.

If one of the inputs is a scalar and the other is a list, the return value is a list with the scalar value with the same length as the list and the list itself.

If both are lists with the same dimension, the return value is the same as the input. However, if the lists have different dimensions an exception is raised.

Parameters:
axis1float or list`[`float]

Input value for the first axis.

axis2float or list`[`float]

Input value for the second axis.

Returns:
tuple`[`list`[`float], list`[`float]]]

Pair of lists with the same length.

Raises:
RuntimeError

If both inputs are lists of different lengths.