def distance_diff_catl(ra, dist, gap):
    """
    Computes the necessary distance between catalogues

    Parameters
    -----------
    ra: float
        1st distance

    dist: float
        2nd distance

    Returns
    -----------
    dist_diff: float
        amount of distance necessary between mocks
    """
    ra = float(ra)
    dist = float(dist)
    gap = float(gap)
    ## Calculation of distance between catalogues
    dist_diff = (((ra + gap)**2 - (dist/2.)**2.)**(0.5)) - ra

    return dist_diff