예제 #1
0
def read_data_files(pattern):
    files = glob.glob(pattern)

    if not files:
        raise ValueError("cannot find any matching files: " % pattern)

    keys, times = zip(*[stats.read_raw_data(fname) for fname in files])
    validate_keys(keys)

    means     = np.mean(times, axis=0)
    variances = np.var(times, axis=0)
    return Data(keys[0], np.array(times), means, variances)
예제 #2
0
def read_data_files(pattern):
    files = glob.glob(pattern)

    if not files:
        raise ValueError("cannot find any matching files: " % pattern)

    keys, times = zip(*[stats.read_raw_data(fname) for fname in files])
    validate_keys(keys)

    means = np.mean(times, axis=0)
    variances = np.var(times, axis=0)
    return Data(keys[0], np.array(times), means, variances)
예제 #3
0
def read_data_files(pattern):
    files = glob.glob(pattern)
    # print "processing {} file(s)".format(len(files))

    if not files:
        raise ValueError("cannot find any matching files: %s" % pattern)

    keys, times = zip(*[stats.read_raw_data(fname) for fname in files])
    for idx, i in enumerate(keys):
        if keys[0] != i:
            print files[idx]
            raise ValueError("inconsistent data files")

    means = np.mean(times, axis=0)
    variances = np.var(times, axis=0)
    return Data(keys[0], np.array(times), means, variances)
def read_data_files(pattern):
    files = glob.glob(pattern)
    # print "processing {} file(s)".format(len(files))

    if not files:
        raise ValueError("cannot find any matching files: %s" % pattern)

    keys, times = zip(*[stats.read_raw_data(fname) for fname in files])
    for idx, i in enumerate(keys):
        if keys[0] != i:
            print files[idx]
            raise ValueError("inconsistent data files")

    means     = np.mean(times, axis=0)
    variances = np.var(times, axis=0)
    return Data(keys[0], np.array(times), means, variances)