So I am trying to define a function for each vector variable in my mode_0 values. I then want to create a plot of all of these values together. Attached is the code below and a screenshot of a graph with the first two values of mode_0, I want to do this for up to 50 values in the mode_0 list.
#impose a lorenztian
# define lorenztian fit
def lor0(A, Tau, v, vk):
lorenzian_fit = (((A**2)/(np.pi*Tau))/(1+(((2*(v-vk))/Tau)**2)))
return lorenzian_fit
# A_k is the mode amplitude = np.sqrt(pi * Max height * Tau)
# Tau_k is the mode linewidth (FWHM) = 0.1-0.2
# V_k is the ossillation mode frequency = modes
lor0 = lor(np.sqrt(np.pi * 200000 * 0.15), 0.15, frequencies, mode_0[1])
lor0_1 = lor(np.sqrt(np.pi * 200000 * 0.15), 0.15, frequencies, mode_0[2])
#lor1 = lor(np.sqrt(np.pi * 200000 * 0.15), 0.15, frequencies, mode_1)
#lor2 = lor(np.sqrt(np.pi * 200000 * 0.15), 0.15, frequencies, mode_2)