Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.gridspec as gridspec
- import nufft
- x = np.linspace(-500,500,100000)
- y = np.sin(x)
- f=np.linspace(0.95,0.95,1000)
- ft=nufft.nufft.nufft1d3(x, y, f)
- max_value = max(np.abs(ft[1:]))
- max_index = np.abs(ft[1:]).tolist().index(max_value)
- freqlist=f.tolist()
- FREQ=freqlist[max_index]
- print(FREQ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement