d = PseudoData(lambda x: np.random.normal(0,1,(x,3)), 0)
df = d.get_df(10)
assert df.values.shape == (10,4)
df.head()
Callable class generating signal data. NB, paper states mu=[1,1]
, but plots and code indicate mu=[0,0]
s0 = paper_sig(2)
print(s0)
assert s0.shape == (2,3)
paper_sig1 = _PaperData([0,0], [[1,0],[0,1]], 0, 2)
paper_sig1.r[0] += 1000
paper_sig1.r
s1 = paper_sig1(2)
print(s1)
assert s1[0,0] > s0[0,0]
Callable class generating background data with nuisances at nominal values
n=1000
df = PseudoData(paper_sig, 1).get_df(n).append(PseudoData(paper_bkg, 0).get_df(n), ignore_index=True)
df
Reproduces paper plots
import seaborn as sns
sns.pairplot(df, hue='gen_target', vars=[f for f in df.columns if f != 'gen_target'])