Skip to content
Snippets Groups Projects
Commit 9bb04ca5 authored by Danilo Ferreira de Lima's avatar Danilo Ferreira de Lima
Browse files

Updated plots.

parent 01ebe6fb
No related branches found
No related tags found
1 merge request!14Corrected bugs in the BNN and added many plotting scripts adapted for the paper
...@@ -110,8 +110,9 @@ def plot_chi2_intensity(df: pd.DataFrame, filename: str): ...@@ -110,8 +110,9 @@ def plot_chi2_intensity(df: pd.DataFrame, filename: str):
fill=True, fill=True,
ax=ax) ax=ax)
sns.scatterplot(x=df.chi2_prepca/df.ndof.iloc[0], y=df.xgm_flux_t*1e-3, sns.scatterplot(x=df.chi2_prepca/df.ndof.iloc[0], y=df.xgm_flux_t*1e-3,
s=200, s=5,
alpha=0.1, alpha=0.4,
c="tab:red",
#size=df.root_mean_squared_pca_unc, #size=df.root_mean_squared_pca_unc,
#sizes=(20, 200), #sizes=(20, 200),
ax=ax) ax=ax)
...@@ -153,7 +154,7 @@ def pca_variance_plot(df: pd.DataFrame, filename: str, max_comp_frac: float=0.99 ...@@ -153,7 +154,7 @@ def pca_variance_plot(df: pd.DataFrame, filename: str, max_comp_frac: float=0.99
ax.set_yscale('log') ax.set_yscale('log')
ax.set(title=f"", ax.set(title=f"",
xlabel="Component", xlabel="Component",
ylabel="Variance [%]", ylabel="Variance contribution [%]",
xlim=(1, x_max), xlim=(1, x_max),
ylim=(0.01, 100)) ylim=(0.01, 100))
ax.spines['top'].set_visible(False) ax.spines['top'].set_visible(False)
...@@ -184,14 +185,14 @@ def plot_impulse(df: pd.DataFrame, filename: str): ...@@ -184,14 +185,14 @@ def plot_impulse(df: pd.DataFrame, filename: str):
#x_new = np.linspace(-6, 6, 601) #x_new = np.linspace(-6, 6, 601)
#spl = make_interp_spline(x, np.log10(y), k=3) #spl = make_interp_spline(x, np.log10(y), k=3)
#y_new = np.power(10, spl(x_new)) #y_new = np.power(10, spl(x_new))
x_new = moving_average(x, n=10) x_new = moving_average(x, n=5)
y_new = moving_average(y, n=10) y_new = moving_average(y, n=5)
sel = (x_new >= -10) & (x_new <= 10) sel = (x_new >= -5.1) & (x_new <= 5.1)
ax.plot(x_new[sel], y_new[sel], c='tab:blue', lw=4) ax.plot(x_new[sel], y_new[sel], c='tab:blue', lw=3)
ax.set_yscale('log') ax.set_yscale('log')
ax.set(title=f"", ax.set(title=f"",
xlabel="Energy [eV]", xlabel="Energy [eV]",
ylim=(1e-4, 0.5), ylim=(1e-4, 0.4),
ylabel="Response [a.u.]", ylabel="Response [a.u.]",
) )
ax.spines['top'].set_visible(False) ax.spines['top'].set_visible(False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment