Skip to content

Instantly share code, notes, and snippets.

/FFT

Created February 24, 2016 08:33
Show Gist options
  • Save anonymous/f4520f68d5bcb160b1ab to your computer and use it in GitHub Desktop.
Save anonymous/f4520f68d5bcb160b1ab to your computer and use it in GitHub Desktop.
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