コード例 #1
0
def read_file(filename):
    txt = plot_files.lines_without_comments(filename)
    filetype = plot_files.determine_type(txt)
    if filetype == "paren_complex":
        parse_pair = plot_files.parse_pair
        df = pd.read_csv(txt, delimiter=' ', names=["id", "identities", "error"],
                         converters={1: parse_pair, 2: parse_pair}, index_col=0)
    else:
        df = pd.read_csv(txt, delimiter=' ', names=["id", "identities", "error"], index_col=0)
    return df
コード例 #2
0
ファイル: alt_zfactor.py プロジェクト: f4hy/effectivemass
def read_level_fits(filename):
    """
    Read in fit values to the levels. Fits should be single exp
    Should be in the format
    # Level, Amp, Error(Amp), Mass, Error(Mass)
    0, 1.74082463996023, 0.0154835440133309, 0.153284504901198, 0.000705009866455281

    final column chi^2 optional
    """

    txt = plot_files.lines_without_comments(filename)
    df = pd.read_csv(txt, delimiter=',', names=["level", "amp", "amp_error", "mass", "mass_error", "chisqr"], index_col=0)
    return df
コード例 #3
0
ファイル: alt_zfactor.py プロジェクト: f4hy/effectivemass
def read_zrots(filename):
    txt = plot_files.lines_without_comments(filename)
    df = pd.read_csv(txt, delimiter=',', names=["level", "amp", "error"], index_col=0)
    return df
コード例 #4
0
ファイル: zfactor.py プロジェクト: f4hy/effectivemass
def read_coeffs_file(filename):
    txt = plot_files.lines_without_comments(filename)
    parse_pair = plot_files.parse_pair
    df = pd.read_csv(txt, delimiter=' ', names=["id", "identities", "error"],
                     converters={1: parse_pair, 2: parse_pair}, index_col=0)
    return df
コード例 #5
0
def read_file(filename):
    txt = plot_files.lines_without_comments(filename)
    df = pd.read_csv(txt, delimiter=' ', names=["time", "correlator", "error"],
                     converters={1: parse_pair, 2: parse_pair}, skipinitialspace=True, index_col=0)
    return df