def order_pms(X, Y):
    """Function to order two matrices by width.

    Inputs:
        X, Y (np.array): two position matrices.

    Returns:
        X, Y (np.array): two position matrices ordered by width, X being smaller.
    """
    if len(Y) < len(X):
        X, Y = Y, X
    return X, Y