-
-
Save anonymous/f4520f68d5bcb160b1ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pylab as pl | |
import numpy as np | |
class FFT : | |
def __init__(self, file='data.csv'): | |
self.file=file | |
self.readFile() | |
def readFile(self) : | |
xy = np.loadtxt(self.file, delimiter=",", skiprows=1).transpose() | |
self.a = xy[4] | |
self.u = xy[5] | |
for n in range(len(self.a)): | |
data_pot = [self.a[n],self.u[n]] | |
def U(angle): | |
return min(pot_data, key=lambda x: abs(x[0] - angle))[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment