def get_stat(pickle_path, alg): superset = pickle_load(pickle_path) eta_0, eta_0_err = superset.get_eta_0() f_peak, f_peak_err = superset.get_f_peak(alg, dr) return eta_0, eta_0_err, f_peak, f_peak_err
def get_stat(pickle_path): superset = pickle_load(pickle_path) R_var, R_var_err = superset.get_var() vf, vf_err = superset.get_vf() return vf, vf_err, R_var, R_var_err
superset = pickle_load(pickle_path) eta_0, eta_0_err = superset.get_eta_0() f_peak, f_peak_err = superset.get_f_peak(alg, dr) return eta_0, eta_0_err, f_peak, f_peak_err eta_0, eta_0_err, f_peak, f_peak_err = get_stat(paths.exp_pickle_path) ax.errorbar(eta_0, f_peak, xerr=eta_0_err, yerr=f_peak_err, ls='none', label=r'Experiment', c=color_exp) superset = pickle_load(paths.exp_pickle_path) gamma_fit, gamma_fit_err, k_fit, k_fit_err = superset.fit_to_model(alg, dr) f_peak_model = superset.get_f_peak_model(gamma_fit, k_fit) # ch = np.sqrt(np.sum(np.square(f_peak_model - f_peak))) / len(f_peak_model) gamma_fit = 0.14 k_fit = 0.08 if use_latex: label = r'Model fit, $\tau^{-1} = \SI{%.2g}{\per\s}, k = %.2g$' % ( gamma_fit, k_fit) else: label = r'Model fit, $\tau^{-1} = %.2g s^{-1}, k = %.2g$' % (gamma_fit, k_fit) ax.scatter(eta_0, f_peak_model, label=label, c=color_model) # eta_0, eta_0_err, f_peak, f_peak_err = get_stat(paths.exp_reproduction_Dr_0_05_Drc_0_pickle_path) # ax.errorbar(eta_0, f_peak, xerr=eta_0_err, yerr=f_peak_err, ls='none', label=r'$D_r^c = 0$', c=color_0)
from dataset import Superset, pickle_load import numpy as np import paths res = 0.7 # superset = Superset(paths.exp_dset_paths) # print(superset.fit_to_model('mean', res)) # superset = Superset(paths.exp_dset_paths) # print(superset.fit_to_model('median', res)) # superset = Superset(paths.exp_reproduction_Dr_0_05_Drc_10_dset_paths) superset = pickle_load(paths.exp_reproduction_Dr_0_05_Drc_10_pickle_path) print(superset.fit_to_model('mean', res))
def get_stat(pickle_path): superset = pickle_load(pickle_path) R_mean, R_mean_err = superset.get_mean() vf, vf_err = superset.get_vf() return vf, vf_err, R_mean, R_mean_err
ejm_rcparams.prettify_axes(ax) dr = 0.7 alg = 'mean' def get_stat(pickle_path): superset = pickle_load(pickle_path) eta_0, eta_0_err = superset.get_eta_0() f_peak, f_peak_err = superset.get_f_peak(alg, dr) return eta_0, eta_0_err, f_peak, f_peak_err eta_0, eta_0_err, f_peak, f_peak_err = get_stat(paths.exp_pickle_path) ax.errorbar(eta_0, f_peak, xerr=eta_0_err, yerr=f_peak_err, ls='none', label=r'Experiment', c=color_exp) superset = pickle_load(paths.exp_pickle_path) gamma_fit, gamma_fit_err, k_fit, k_fit_err = superset.fit_to_model(alg, dr) f_peak_model = superset.get_f_peak_model(gamma_fit, k_fit) # ch = np.sqrt(np.sum(np.square(f_peak_model - f_peak))) / len(f_peak_model) gamma_fit = 0.14 k_fit = 0.08 if use_latex: label = r'Model fit, $\tau^{-1} = \SI{%.2g}{\per\s}, k = %.2g$' % (gamma_fit, k_fit) else: label = r'Model fit, $\tau^{-1} = %.2g s^{-1}, k = %.2g$' % (gamma_fit, k_fit) ax.scatter(eta_0, f_peak_model, label=label, c=color_model) # eta_0, eta_0_err, f_peak, f_peak_err = get_stat(paths.exp_reproduction_Dr_0_05_Drc_0_pickle_path) # ax.errorbar(eta_0, f_peak, xerr=eta_0_err, yerr=f_peak_err, ls='none', label=r'$D_r^c = 0$', c=color_0) # eta_0, eta_0_err, f_peak, f_peak_err = get_stat(paths.exp_reproduction_Dr_0_05_Drc_10_pickle_path)
def get_stat(pickle_path): superset = pickle_load(pickle_path) R = superset.get_R() f_peak, f_peak_err = superset.get_f_peak(alg, dr) return R, f_peak, f_peak_err