import numpy as np
import pandas as pd
from EMRI_DET.validate import grid_heatmap_corner


def function_1(x1,x2,x3,x4,x5):
    return x1/x2/x3*x4*x5


def function_2(x1,x2,x3,x4,x5):
    return x1/x2/x3*x4*x5**2


vals = np.linspace(2,10,10)
combos = [[v1,v2,v3,v4,v5] for v1 in vals for v2 in vals for v3 in vals for v4 in vals for v5 in vals]

titles = ['x1','x2','x3','x4','x5','Truth','Pred']
out = np.zeros(shape=(len(combos),7))
for i,combo in enumerate(combos):
    truth = function_1(*combo)
    pred = function_2(*combo)
    out[i,:5] = combo
    out[i,5] = truth
    out[i,6] = pred

df = pd.DataFrame(out,columns=titles)

grid_heatmap_corner(df,'Truth','Pred',log=True, ratio=True, save=False)

