diff --git a/pes_to_spec/test/prepare_plots.py b/pes_to_spec/test/prepare_plots.py index 80c80d7e5c66de8fea9bf6eebde4c6ec54dda613..7953bf0215f280cbf01947693f95be6b7e053795 100755 --- a/pes_to_spec/test/prepare_plots.py +++ b/pes_to_spec/test/prepare_plots.py @@ -110,8 +110,9 @@ def plot_chi2_intensity(df: pd.DataFrame, filename: str): fill=True, ax=ax) sns.scatterplot(x=df.chi2_prepca/df.ndof.iloc[0], y=df.xgm_flux_t*1e-3, - s=200, - alpha=0.1, + s=5, + alpha=0.4, + c="tab:red", #size=df.root_mean_squared_pca_unc, #sizes=(20, 200), ax=ax) @@ -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(title=f"", xlabel="Component", - ylabel="Variance [%]", + ylabel="Variance contribution [%]", xlim=(1, x_max), ylim=(0.01, 100)) ax.spines['top'].set_visible(False) @@ -184,14 +185,14 @@ def plot_impulse(df: pd.DataFrame, filename: str): #x_new = np.linspace(-6, 6, 601) #spl = make_interp_spline(x, np.log10(y), k=3) #y_new = np.power(10, spl(x_new)) - x_new = moving_average(x, n=10) - y_new = moving_average(y, n=10) - sel = (x_new >= -10) & (x_new <= 10) - ax.plot(x_new[sel], y_new[sel], c='tab:blue', lw=4) + x_new = moving_average(x, n=5) + y_new = moving_average(y, n=5) + sel = (x_new >= -5.1) & (x_new <= 5.1) + ax.plot(x_new[sel], y_new[sel], c='tab:blue', lw=3) ax.set_yscale('log') ax.set(title=f"", xlabel="Energy [eV]", - ylim=(1e-4, 0.5), + ylim=(1e-4, 0.4), ylabel="Response [a.u.]", ) ax.spines['top'].set_visible(False)