import math


def calc_skycell_dist(x, y, x_ref, y_ref):
    """Calculate distance from one skyframe to another

    Parameters
    ----------
    x : int
        skyframe x index

    y : int
        skyframe y index

    x_ref : int
        reference x index

    y_ref : int
        reference y index

    Returns
    -------
    dist : float
        distance from (x, y) to (x_ref, y_ref)
    """
    dist = math.sqrt(float((x - x_ref)**2) + float((y - y_ref)**2))
    return(dist)