From 16dbc7ee106ee4be710555274ee00b7082fc7a58 Mon Sep 17 00:00:00 2001 From: robinzyb <38876805+robinzyb@users.noreply.github.com> Date: Mon, 23 Oct 2023 23:38:28 +0200 Subject: [PATCH] remove dependencies on ectoolkit --- cp2kdata/plots/fep_plot.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cp2kdata/plots/fep_plot.py b/cp2kdata/plots/fep_plot.py index 0d4a107..1bafdee 100644 --- a/cp2kdata/plots/fep_plot.py +++ b/cp2kdata/plots/fep_plot.py @@ -2,7 +2,6 @@ import matplotlib.pyplot as plt import glob import os -from toolkit.utils.utils import get_cum_mean from cp2kdata.block_parser.fep import parse_vertical_gap from scipy import integrate from cycler import cycler @@ -10,6 +9,16 @@ au2eV = 2.72113838565563E+01 +def get_cum_mean(array): + tot = 0.0 + cum_mean_array = [] + for idx, i in enumerate(array): + tot += i + cum_mean_array.append(tot/(idx+1)) + cum_mean_array = np.array(cum_mean_array) + return cum_mean_array + + def plot_ti(fig_name): eta_sub_dir_list = glob.glob("[0-1].*") eta_sub_dir_list.sort()