def bound2d(decs):
    """
    Return the (maximal) survey boundaries in (RA,DEC) for multiple samples.
    Note in the RA direction, the limits are **always** set as ramin=0. and 
    ramax=360. to make the pair counting valid for surveys that cross the origin 
    of coordinates

    .. rubric :: Parameters
    
    decs : float array or list of arrays
        DEC coordinates of one or more samples [deg]
        
    .. rubric :: Returns
    
    bound : tuple
        The limits (ramin,ramax,decmin,decmax) that enclose all input samples
    """
    delta = 0.001   # small delta to avoid issues with souces exactly at edges
    if (type(decs)!=list):  decs = [decs]
    ramin  = 0.
    ramax  = 360.
    decmin = max(min([min(d) for d in decs]) - delta, -90.)
    decmax = min(max([max(d) for d in decs]) + delta, 90.)
    return (ramin,ramax,decmin,decmax)