INNER CODE UNIT · Python

impedance_plot1

ECSIM/pem-dataset1 · Notebooks/functions.py:107

def impedance_plot1(data, set_index):
    """
    Impedance plot function 1.

    :param data: input data
    :type data: numpy array
    :param set_index: activation set index
    :type set_index: int
    :return: None
    """
    filtered_data = data[data[:, 3] == set_index]
    x_plot_data = []
    y_plot_data = []
    voltages = sorted(list(set(filtered_data[:, 2])))
    for v in voltages:
        x_plot_data.append(filtered_data[filtered_data[:, 2] == v][:, 0])
        y_plot_data.append(filtered_data[filtered_data[:, 2] == v][:, 1])
    legend = list(map(lambda x: "V: "+format_number(x)+"V",voltages))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…