How to use the pyroofit.data.df2roo function in pyroofit

To help you get started, we’ve selected a few pyroofit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github simonUU / PyrooFit / tests / test_data.py View on Github external
def test_roo2hist():
    import ROOT
    df = get_test_df()
    df['w'] = np.random.uniform(0, 1, len(df))

    hist = df2roo(df, columns=['col1'], bins=20)
    assert isinstance(hist, ROOT.RooDataHist)
github simonUU / PyrooFit / tests / test_data.py View on Github external
def test_df2roo():
    import ROOT
    df = get_test_df()
    assert isinstance(df, pd.DataFrame)
    df_roo = df2roo(df)
    assert isinstance(df_roo, ROOT.RooDataSet)
github simonUU / PyrooFit / tests / test_data.py View on Github external
def test_df2roo_observables():
    import ROOT
    df = get_test_df()
    assert isinstance(df, pd.DataFrame)
    obs = {}
    obs['col1'] = ROOT.RooRealVar('col1','',0,1)
    obs['col2'] = ROOT.RooRealVar('col2', '', 0, 1)
    df_roo = df2roo(df, observables=obs)
    assert isinstance(df_roo, ROOT.RooDataSet)
github simonUU / PyrooFit / tests / test_data.py View on Github external
def test_df2roo_columns():
    import ROOT
    df = get_test_df()
    assert isinstance(df, pd.DataFrame)
    df_roo = df2roo(df, columns=['col1'])
    assert isinstance(df_roo, ROOT.RooDataSet)
github simonUU / PyrooFit / tests / test_data.py View on Github external
def test_df2roo_weights_array():
    import ROOT
    df = get_test_df()
    w = np.random.uniform(0, 1, len(df))

    df_roo = df2roo(df, weights=w)
    df_roo.Print()
    assert isinstance(df_roo, ROOT.RooDataSet)
github simonUU / PyrooFit / tests / test_data.py View on Github external
def test_df2roo_weights_columnname():
    import ROOT
    df = get_test_df()
    df['w'] = np.random.uniform(0, 1, len(df))

    df_roo = df2roo(df, weights='w')
    df_roo.Print()
    assert isinstance(df_roo, ROOT.RooDataSet)

pyroofit

Python wrapper for RooFit to create fits easily with pandas DataFrames.

MIT
Latest version published 4 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages