def process_expt(h5_path, inmemory = True, ignorenan = False):
    """
    Assumes h5 file has table called `F_measure`

    Parameters
    ----------
    h5_path : string
        path to HDF file containing the experimental data. The file is expected
        to have been generated from the `repeat_expt` function.

    inmemory : bool
        whether to process the experiments in memory

    ignorenan : bool
        whether to ignore NaNs when computing the mean and variance
    """

    logging.info("Reading file at {}".format(h5_path))
    h5_file = tables.open_file(h5_path, mode = 'r')

    F = h5_file.root.F_measure

    n_expt, n_labels, n_class = F.shape
    mean_n_iterations = np.sum(h5_file.root.n_iterations)/n_expt

    if hasattr(h5_file.root, 'CPU_time'):
        CPU_time = h5_file.root.CPU_time
        mean_CPU_time = np.mean(CPU_time)
        var_CPU_time = np.var(CPU_time)
    else:
        mean_CPU_time = None
        var_CPU_time = None
        mean_CPU_time_per_iteration = None

    F_mean = np.empty([n_labels, n_class], dtype='float')
    F_var = np.empty([n_labels, n_class], dtype='float')
    F_stderr = np.empty([n_labels, n_class], dtype='float')
    n_sample = np.empty(n_labels, dtype='int')
    if inmemory:
        F_mem = F[:,:,:]

    logging.info("Beginning processing".format())
    for t in range(n_labels):

        if t%np.ceil(n_labels/10).astype(int) == 0:
            logging.info("Processed {} of {} experiments".format(t, n_labels))
        if inmemory:
            temp = F_mem[:,t,:]
        else:
            temp = F[:,t,:]
        if ignorenan:
            n_sample[t] = np.sum(~np.isnan(temp))
            # Expect to see RuntimeWarnings if array contains all NaNs
            with warnings.catch_warnings():
                warnings.simplefilter("ignore", category=RuntimeWarning)
                F_mean[t] = np.nanmean(temp, axis=0)
                F_var[t] = np.nanvar(temp, axis=0)
                F_stderr[t] = np.sqrt(F_var[t]/n_sample[t])
        else:
            n_sample[t] = len(temp)
            F_mean[t] = np.mean(temp, axis=0)
            F_var[t] = np.var(temp, axis=0)
            F_stderr[t] = np.sqrt(F_var[t]/n_sample[t])

    logging.info("Processing complete".format())

    h5_file.close()

    return {'mean': F_mean,
            'variance': F_var,
            'std_error': F_stderr,
            'n_samples': n_sample,
            'n_expts': n_expt,
            'n_labels': n_labels,
            'mean_CPU_time': mean_CPU_time,
            'var_CPU_time': var_CPU_time,
            'mean_n_iterations': mean_n_iterations,
            'h5_path': h5_path}
Assumes h5 file has table called `F_measure`

    Parameters
    ----------
    h5_path : string
        path to HDF file containing the experimental data. The file is expected
        to have been generated from the `repeat_expt` function.

    inmemory : bool
        whether to process the experiments in memory

    ignorenan : bool
        whether to ignore NaNs when computing the mean and variance