Load k40 coincidences from hdf5 file

    Parameters
    ----------
    filename: filename of hdf5 file
    dom_id: DOM ID

    Returns
    -------
    data: numpy array of coincidences
    livetime: duration of data-taking

def load_k40_coincidences_from_hdf5(filename, dom_id):
    """Load k40 coincidences from hdf5 file

    Parameters
    ----------
    filename: filename of hdf5 file
    dom_id: DOM ID

    Returns
    -------
    data: numpy array of coincidences
    livetime: duration of data-taking
    """

    with h5py.File(filename, 'r') as h5f:
        data = h5f['/k40counts/{0}'.format(dom_id)]
        livetime = data.attrs['livetime']
        data = np.array(data)

    return data, livetime