def find_smallest_bin(b):
    """
    Take boundary non-uniform vector and find smallest bin
    assuming they are multiple of each other

    Parameters
    ----------

    b: array of floats
        boundaries, in mm

    returns: float
        minimal bin size
    """

    minb = 10000000.0
    prev = b[0]
    ll   = len(b)-1
    for k in range(0, ll):
        v     = b[k+1]
        delta = v - prev
        prev  = v

        if minb > delta:
            minb = delta

    return minb