add Function to plot histograms of error values
This commit is contained in:
parent
365c6ae825
commit
302aee34d6
@ -5,6 +5,25 @@ from scipy.optimize import curve_fit
|
||||
import functions as fu
|
||||
from numba import jit
|
||||
import matplotlib.pyplot as plt
|
||||
import time
|
||||
|
||||
|
||||
def plot_errors(list_errors):
|
||||
names = ["error_bf", "error_vs", "error_sc", "error_f_inf",
|
||||
"error_f_inf_slope", "error_f_zero", "error_f_zero_s", "f_zero_curve"]
|
||||
data = np.array(list_errors)
|
||||
|
||||
fig, axes = plt.subplots(2, 4, figsize=(10, 8))
|
||||
|
||||
for i in range(8):
|
||||
col = i % 4
|
||||
row = int(i/4.0)
|
||||
|
||||
axes[row, col].hist(data[:, i])
|
||||
axes[row, col].set_title(names[i])
|
||||
|
||||
plt.savefig("figures/error_distributions/error_distribution_{}.png".format(time.strftime("%H:%M:%S")))
|
||||
plt.close()
|
||||
|
||||
|
||||
def fit_clipped_line(x, y):
|
||||
|
Loading…
Reference in New Issue
Block a user