In [1]:
import matplotlib.pyplot as plt
import numpy as np
import warnings

def fftPlot(sig, dt=None, block=False, plot=True):
# here it's assumes analytic signal (real signal...)- so only half of the axis is required

if dt is None:
dt = 1
t = np.arange(0, sig.shape[-1])
xLabel = 'samples'
else:
t = np.arange(0, sig.shape[-1]) * dt
xLabel = 'freq [Hz]'

if sig.shape[0] % 2 != 0:
warnings.warn("signal prefered to be even in size, autoFixing it...")
t = t[0:-1]
sig = sig[0:-1]

sigFFT = np.fft.fft(sig) / t.shape[0]  # divided by size t for coherent magnitude

freq = np.fft.fftfreq(t.shape[0], d=dt)

# plot analytic signal - right half of freq axis needed only...
firstNegInd = np.argmax(freq < 0)
freqAxisPos = freq[0:firstNegInd]
sigFFTPos = 2 * sigFFT[0:firstNegInd]  # *2 because of magnitude of analytic signal

if plot:
plt.figure()
plt.plot(freqAxisPos, np.abs(sigFFTPos))
plt.xlabel(xLabel)
plt.ylabel('mag')
plt.title('Analytic FFT plot')
plt.show(block=block)

return sigFFTPos, freqAxisPos

In [2]:
dt = 1 / 1000
f0 = 10 # 1 / dt / 4

t = np.arange(0, 1 + dt, dt)
sig = np.sin(2 * np.pi * f0 * t+100) + 10 * np.sin(2 * np.pi * f0 / 2 * t)
sig = np.sin(2 * np.pi * f0 * t) #+ 10 * np.sin(2 * np.pi * f0 / 2 * t)

plt.figure()
plt.plot(t,sig)

Out[2]:
[<matplotlib.lines.Line2D at 0x1dab0960b00>]
In [3]:
fftPlot(sig, dt=dt, block=True)

c:\users\chech\appdata\local\programs\python\cv_course_venv\lib\site-packages\ipykernel_launcher.py:17: UserWarning: signal prefered to be even in size, autoFixing it...

Out[3]:
(array([-1.35218361e-16+0.00000000e+00j,  2.51116358e-16+1.63881828e-16j,
-4.52325269e-16+3.65929509e-16j, -2.39670412e-16-4.54777765e-16j,
-1.07278937e-16+5.28234172e-17j,  2.77492410e-17-2.85786190e-16j,
1.68511446e-16-1.46993528e-16j,  6.40567282e-19+2.09689624e-16j,
9.43993617e-17-2.98571023e-17j, -3.15811420e-17+2.14127214e-16j,
-5.42099220e-16-1.00000000e+00j,  2.44928224e-17-1.46480675e-16j,
6.56938963e-17-1.27299000e-16j,  2.51267948e-17+6.76800287e-17j,
-5.27206938e-17+8.79131305e-17j, -1.34990357e-16-1.20519190e-17j,
1.84769562e-17-1.00473535e-17j, -3.12726552e-16+2.88905718e-16j,
-4.72366967e-16-3.63713722e-16j,  1.84697778e-16-2.43001362e-16j,
-2.15683731e-17-5.61723085e-17j, -9.19427221e-17-6.74995699e-17j,
-4.32089265e-17-1.88457913e-16j, -4.89189737e-17-2.01467725e-16j,
-1.43016201e-16+5.85657552e-17j,  1.57895305e-16-3.06069319e-16j,
1.62250196e-16-2.26020856e-16j,  4.48995680e-17+1.53282601e-16j,
5.49910758e-17-1.31775599e-16j,  4.09835166e-17-9.19196794e-17j,
6.04739731e-17-7.10542736e-18j,  5.12396464e-17+4.81107409e-17j,
1.22189913e-16-4.12273938e-17j,  8.55355941e-17+9.55856396e-17j,
-6.67281335e-17+7.72522265e-17j, -4.66643972e-17-3.78654870e-17j,
6.47631061e-17-1.48228228e-17j,  2.11804039e-18+3.02810659e-17j,
-9.90042608e-17+9.30568531e-17j,  3.10581507e-17+2.98928343e-17j,
2.07297895e-17-1.83800984e-17j, -1.49555957e-16+4.95180745e-17j,
-2.78206017e-17-1.54042314e-16j, -4.75499370e-17-4.75785289e-17j,
-3.33088493e-17+6.62076650e-17j, -3.36847552e-17-2.00652927e-17j,
-2.20060926e-17-9.28442237e-17j, -4.37234463e-17-3.09511184e-17j,
-6.69985128e-17-3.65011036e-17j,  4.76152488e-17-1.24053931e-16j,
3.62924032e-17-2.85987930e-17j, -2.87423755e-17-3.51292640e-17j,
-3.69167285e-17-2.09766528e-17j,  9.05992760e-17-3.49732958e-17j,
3.05220399e-17-7.41063572e-17j,  1.08451301e-18-5.97237546e-17j,
8.91326743e-17+1.61173382e-17j,  4.52270530e-17+4.49534310e-17j,
-6.52688800e-17+5.91350599e-17j,  3.07048546e-17-3.66579513e-17j,
4.49282108e-17-2.16790939e-17j,  3.73258986e-17+3.12612799e-17j,
-4.15832826e-17+5.51148894e-17j,  3.07676687e-17-1.96117593e-17j,
-6.55443133e-17+6.29081660e-17j, -6.85258456e-17-1.62091166e-17j,
-4.14443387e-17-2.76203718e-17j,  6.02971814e-18+1.71698290e-17j,
-4.05023042e-17+3.98861512e-18j, -4.42439210e-17-2.85869553e-17j,
-8.86887891e-18-3.33678992e-17j, -3.68901273e-17-6.65270417e-17j,
-8.62348354e-17-2.72292542e-17j,  8.55967216e-17-2.85324690e-17j,
3.25826518e-17-2.72324782e-17j, -3.32358074e-17-3.99709637e-17j,
-8.32083795e-18-1.70476479e-17j,  1.89218233e-17-1.22995758e-17j,
1.11802766e-18-4.62443760e-17j,  1.44259127e-17-4.98907581e-17j,
8.02358472e-17+5.55059419e-19j, -3.62128184e-18+2.78009440e-17j,
-2.24369165e-17+6.48279915e-17j, -5.52255706e-17-6.08241769e-17j,
4.00428560e-17-3.95610254e-17j,  2.77521201e-17-2.64232983e-17j,
-3.77000714e-17+2.09183117e-17j,  3.88756661e-17+3.52256288e-17j,
-1.95102100e-17+2.23286604e-17j, -5.49916189e-17-3.71597397e-17j,
1.58568610e-17-8.28165287e-18j, -3.29040859e-17-2.56200994e-19j,
-2.98230112e-17+2.98436926e-17j, -3.73017438e-17-2.77132777e-17j,
-2.98204792e-17+3.43542693e-17j, -8.48271038e-17-3.35225047e-17j,
1.93253100e-17-3.46672229e-17j, -8.65182969e-18-6.60180795e-17j,
-1.51517070e-17+6.64122582e-18j, -4.99141127e-17-5.60563248e-17j,
3.96707225e-17-2.34059939e-18j, -6.28561518e-17-2.99194117e-17j,
-9.63198246e-18-2.02350548e-17j, -1.39447059e-16-3.14713264e-17j,
1.56560340e-16-3.16807806e-17j, -2.27358475e-16-1.01937775e-16j,
-2.44296963e-17-1.30503083e-16j,  3.18366216e-16-9.78071641e-17j,
-4.55629379e-17+3.69410494e-17j,  9.87899792e-17-4.07826988e-18j,
1.63100561e-17+6.27424947e-17j,  4.34155984e-17+1.17685821e-18j,
-4.43129358e-17+2.05035830e-17j,  1.97549976e-17-4.10947387e-17j,
-2.56249531e-17+7.32646814e-18j, -8.65722802e-18+2.34408253e-17j,
3.20365135e-17+1.08192527e-17j, -1.04156108e-17-4.23897475e-17j,
-3.27228955e-17+5.53789691e-17j, -5.26441219e-17-5.00994190e-17j,
2.09922401e-17-1.70476497e-17j, -3.39088624e-17-1.85384572e-17j,
-2.18138712e-17+1.99191086e-18j, -8.39423923e-17-2.87519568e-17j,
9.78293174e-17+8.58694453e-18j, -2.36174961e-16-1.01670382e-16j,
-1.06258378e-17-1.71337591e-16j,  3.42224332e-16-1.32707473e-16j,
-4.38623010e-17+8.18647299e-17j,  5.49211682e-17+2.68493212e-17j,
2.50135271e-17+5.58603754e-18j,  4.75508937e-17-5.16488014e-17j,
2.01114432e-19+1.18704309e-17j,  5.41349971e-17-1.51146983e-17j,
-4.60738900e-18+3.31248582e-17j,  2.11054882e-17+3.60522202e-17j,
-6.57343696e-18+7.56782861e-18j,  2.31062244e-17-2.64970913e-17j,
-7.05065642e-18+3.07438379e-17j, -3.79903415e-18-2.69649473e-17j,
-1.40506785e-17-4.54439080e-18j, -8.02766455e-19+7.35333793e-18j,
-1.97403518e-17+1.77188040e-17j, -6.87778820e-18-6.33936077e-17j,
1.98617611e-17+7.93823374e-18j,  2.07955755e-17-1.11727309e-18j,
-1.90268765e-17-9.17625805e-18j,  3.40309462e-17-5.06770185e-17j,
-1.56851299e-17+3.51387145e-17j, -5.54970345e-17+2.54825849e-17j,
7.44011713e-18-5.30152040e-17j,  3.40945973e-17-2.74854553e-17j,
1.61009782e-17+1.51390833e-17j, -1.38683077e-18-2.16889507e-17j,
1.41401541e-17+7.08252876e-18j, -5.66082176e-18-1.03012722e-17j,
1.79487952e-17-1.07123557e-17j,  3.32861832e-17-1.57932135e-17j,
2.72783904e-17+3.20087539e-17j,  2.74239994e-18+7.35297943e-19j,
-1.29887399e-17-1.63700141e-17j,  2.00452722e-17+2.19906106e-17j,
-1.31059279e-17+3.43842077e-18j, -1.50146407e-17+1.28164409e-17j,
1.96658576e-17+7.47106065e-18j, -6.41136301e-18+1.85653427e-17j,
-4.08309421e-17-3.47680201e-18j, -6.18504638e-19-4.56258281e-17j,
-1.26415559e-17-1.41664023e-17j, -3.06464375e-17+2.43241789e-17j,
-6.66809810e-18-3.34410349e-17j,  3.67957131e-17-2.70059586e-17j,
2.27592332e-18+1.08393208e-17j, -2.99532353e-17-1.68813148e-17j,
1.76093182e-17-2.87190110e-17j,  1.01768795e-17-2.73501819e-18j,
1.81294570e-18-3.88183485e-17j,  4.43959527e-17+1.62132216e-17j,
2.37153968e-17+1.70391552e-17j, -1.82998758e-17-5.10042852e-18j,
4.28264075e-18-2.04082086e-17j,  1.88705219e-17+6.65171388e-18j,
-1.28671172e-17+3.25598736e-17j, -2.97577660e-17+1.55709590e-17j,
3.11011025e-17-1.60219046e-17j,  2.52724889e-18+1.03368918e-18j,
-5.32369690e-18+3.99422674e-18j, -5.42064858e-18-4.31503654e-18j,
2.92643883e-17-2.15025724e-18j, -4.46208983e-17+2.19465588e-17j,
6.54583187e-17+5.68434189e-17j, -1.18167613e-18-2.35638855e-17j,
5.06705952e-18+2.03929253e-17j, -4.76296882e-17+1.15318073e-18j,
-1.62257646e-17-8.35572438e-18j,  2.06073706e-17-1.93832031e-17j,
-3.73867992e-17-1.91800289e-17j, -8.91758436e-18-9.19084629e-19j,
1.72323767e-17+2.04480810e-17j, -9.51387649e-17-1.22359029e-17j,
8.54860289e-18-1.27244050e-16j,  5.77332221e-17-2.22973333e-18j,
2.15940969e-17-1.71586343e-17j,  6.63015608e-18-1.77906202e-17j,
3.12971376e-17-3.00917564e-17j,  2.71648869e-17+7.83616847e-18j,
-8.98860561e-18+4.08194187e-17j,  1.04831756e-17-9.93821491e-18j,
6.13252829e-18-1.43413988e-17j, -6.95531256e-18+2.43658777e-17j,
-1.77841953e-17+9.33886057e-18j, -5.47175288e-18-1.59091810e-17j,
4.61380515e-18+1.91404954e-17j, -4.11869614e-17+1.07629740e-17j,
-3.93740884e-17-2.24948418e-17j,  8.33239057e-18-2.12167250e-17j,
-2.50288757e-17+1.82591291e-17j, -4.87958724e-17+2.69559485e-17j,
1.54282895e-17+1.17148493e-18j, -7.17163799e-17-4.18053065e-17j,
-8.79495017e-17-1.47707106e-16j,  2.39597209e-18+5.38194560e-17j,
1.95868229e-17-1.89946901e-16j,  1.06187356e-16+4.74005640e-17j,
6.76399896e-17-4.74965424e-17j,  1.61585657e-17-4.43403245e-17j,
-2.24972237e-17+3.74120143e-17j,  1.64369050e-17-1.51299179e-17j,
3.21706860e-17-2.43211388e-17j,  4.04131075e-17+1.57405078e-17j,
-1.95166405e-17+1.66132110e-17j,  2.25377981e-17-2.53358455e-17j,
2.33079952e-17-4.62928990e-18j,  1.33755425e-17+1.16777585e-17j,
3.10470162e-18-1.76893226e-17j,  1.08599153e-17+7.73906523e-18j,
5.24377218e-19+3.30964305e-17j, -2.48492872e-17+3.48126219e-17j,
1.41233544e-17+3.89545545e-18j,  7.33234911e-18-3.81505690e-17j,
-6.62427899e-17-9.01135673e-18j, -5.62421317e-17+4.24397209e-17j,
7.96234182e-18-1.58182131e-16j,  1.02202208e-16+5.36628795e-17j,
7.00877266e-17-3.68475942e-18j, -2.51618508e-17-6.25323396e-17j,
-2.26154438e-17+1.28990943e-17j,  1.00291928e-18+2.75269502e-18j,
3.38845139e-17-3.04889333e-17j,  3.46581717e-17+1.08423924e-17j,
2.58408821e-17+2.25657025e-17j,  2.38245239e-18-1.92361604e-17j,
4.27953353e-17-1.08834981e-17j,  1.48105568e-17+7.06171808e-18j,
-7.71804859e-18+6.23250046e-19j,  1.56388408e-17-3.06288485e-18j,
2.28601288e-17-2.52504369e-18j, -1.12480943e-18+5.95960485e-18j,
2.83472753e-19-1.35436722e-17j,  1.54298169e-17+1.46774538e-17j,
2.64433349e-17+3.05536724e-17j, -9.78380404e-19-2.58339409e-18j,
-1.50295194e-17-2.08214372e-17j,  1.33957398e-17+8.80872783e-18j,
1.23320472e-17+3.49835274e-17j, -5.10426275e-17-1.02913850e-17j,
-1.65430841e-17+3.95508698e-18j,  1.42808935e-17-8.98553208e-18j,
-2.24067928e-17-2.48614490e-17j,  3.18489561e-17+6.95595813e-18j,
1.78819763e-17-5.47749172e-17j, -3.83353309e-17-1.99825953e-17j,
2.33358883e-17-3.78138240e-17j,  3.84701378e-18+6.59429503e-19j,
-1.72886292e-17+5.59054891e-19j,  1.72483015e-17-2.68553866e-17j,
3.26731070e-17-1.84913360e-17j, -8.25307418e-18+1.42325556e-17j,
-3.48174621e-18+1.84581024e-17j,  1.82126876e-17-1.21752428e-18j,
1.99579625e-17+1.21239467e-17j, -2.29755379e-18+2.97156850e-18j,
-5.97817009e-20-1.43277023e-17j,  7.17807332e-18+1.19644072e-17j,
4.34007709e-18+1.34397071e-17j, -2.72257757e-17-1.48215306e-17j,
-1.51115460e-17+2.26602946e-19j,  2.87218346e-17-1.16800125e-17j,
3.70892219e-18+2.09104482e-17j,  8.90098081e-18-5.75713688e-18j,
2.52477395e-17+8.25893550e-18j, -4.06478261e-17+5.91417409e-19j,
2.29395318e-17-3.34025207e-17j,  4.11411326e-17-1.85843271e-17j,
-3.15540987e-17+5.12875918e-17j, -1.02927818e-17-3.17808646e-17j,
-7.50307902e-18+1.73425787e-18j, -1.05755801e-17+1.28069934e-17j,
-2.67206998e-19+7.56658570e-18j,  1.86593315e-17-4.73808686e-17j,
4.41873749e-18+4.94864269e-18j,  3.88081740e-18-9.98449382e-18j,
1.13337120e-17-6.20321404e-18j,  1.80239285e-17-1.47039386e-17j,
-3.63551369e-19-1.43706791e-18j, -8.30426401e-20-3.94534989e-18j,
7.04392724e-18+2.89570452e-18j, -1.25670642e-18+8.15053500e-18j,
-2.06837657e-18+2.81237499e-17j, -1.71731824e-17+5.10032628e-18j,
-5.18386103e-17-4.87666216e-17j, -4.24119968e-17+6.12327305e-18j,
2.38192819e-17+2.58372965e-17j,  5.59609742e-19-1.89054923e-17j,
-3.26869995e-17+7.41119491e-17j, -1.59204876e-16-4.52005205e-17j,
-1.85064734e-17-1.81110437e-16j,  1.09770011e-16+1.15325041e-17j,
-8.47306029e-19+3.14608503e-19j,  2.69971169e-17-3.53524254e-17j,
5.60567824e-19+6.37480130e-18j,  2.01037053e-17+4.44456506e-18j,
-4.19628225e-18+9.34227497e-18j,  1.78586810e-17-1.73750305e-17j,
1.50611384e-17+1.19724996e-17j, -5.59196925e-18-9.58670726e-18j,
-1.91016833e-18-2.18741134e-18j, -8.52332204e-18-1.23048161e-17j,
-1.85237260e-18+7.97455679e-18j, -2.04741500e-18-1.14699623e-17j,
1.55982347e-17+7.59496835e-19j, -3.62798725e-17+1.83956666e-18j,
3.29763485e-17+3.36921772e-17j, -4.99327198e-17-1.18523811e-17j,
-1.05860948e-18+4.67816058e-18j, -1.60800905e-16-1.32338557e-17j,
4.36246617e-17-1.69677726e-16j,  4.22908400e-17-1.43256027e-17j,
-1.32776819e-17-3.45858877e-17j,  1.14098688e-16-6.13496182e-17j,
-2.69063369e-17+2.28537337e-17j,  6.60594524e-17+6.78367325e-18j,
-6.37174444e-18+5.82960579e-18j,  1.81510477e-17-2.46330847e-17j,
1.28336964e-17+9.09602218e-18j,  1.21961899e-17-1.77024105e-17j,
1.25156151e-17-7.71759670e-18j,  2.60609737e-17-3.26862396e-17j,
1.48577576e-17+5.24716960e-18j,  1.65426135e-17-1.55265625e-17j,
1.14064196e-17+2.83251546e-17j,  7.65636533e-18-2.16688760e-18j,
2.68208523e-17-1.13418188e-18j, -3.88324909e-20-1.76870381e-17j,
1.12325576e-18+1.98026020e-17j, -1.03354189e-17-6.77491278e-18j,
3.56460711e-17+7.89643614e-18j, -6.10540143e-17-1.42810656e-17j,
3.38720998e-19-1.83712037e-17j,  1.14722347e-16-6.02043729e-17j,
-6.79064669e-18+5.55642888e-17j,  1.39026719e-17+1.54868273e-17j,
-2.87563391e-17-8.34340639e-19j, -7.45505441e-18-1.11918218e-17j,
7.70477265e-18-9.60038750e-19j,  2.68931993e-17+6.38057085e-18j,
2.85026029e-18+5.62859052e-18j,  2.26428217e-18-2.36954924e-17j,
-1.51172244e-17+1.27989533e-17j, -1.17160289e-18-5.90337314e-18j,
4.87976515e-17-3.93279861e-17j,  1.07456942e-17-1.80718478e-17j,
9.71045833e-18-6.26705802e-18j,  8.84323691e-18-1.53144323e-17j,
-4.52680671e-18+7.11093940e-18j,  1.81407649e-17-2.31912204e-17j,
1.40102950e-18-7.71394253e-18j,  1.99294303e-17+1.53042438e-17j,
5.18680698e-19+9.78179084e-18j,  1.63740579e-17-4.97996358e-18j,
1.87427591e-17+4.38897693e-17j, -2.79427100e-17+2.44076754e-17j,
-1.72742469e-17-3.45422228e-17j, -1.11003056e-18+2.10912732e-18j,
2.62081132e-17+2.51032691e-17j,  6.45550085e-18+1.38724216e-17j,
-1.83001512e-18+8.54172553e-18j, -2.59213054e-17-3.65703651e-17j,
-1.32236765e-17-1.79446404e-17j,  6.01396137e-18+7.05902748e-19j,
-1.81381696e-17+0.00000000e+00j, -6.13376405e-18-2.18378955e-18j,
-5.71616762e-18+1.44480222e-18j,  1.07806438e-17+9.06706898e-19j,
-3.99837893e-18+2.05737541e-17j,  5.97042750e-18-1.10497166e-17j,
-2.24747176e-18-1.05596520e-17j,  1.10709845e-17+8.58013907e-18j,
-1.49498511e-17+1.85687206e-18j, -3.83702426e-18-8.92426318e-18j,
1.07828836e-17-9.91297060e-18j,  1.71219271e-17+5.31207304e-18j,
-1.24649791e-17-2.82952263e-17j,  2.26141250e-17-2.83592969e-18j,
2.63608283e-17+3.02975559e-17j, -1.11036040e-17+1.62468173e-17j,
1.31192781e-17-1.94468344e-18j,  1.02068541e-18-2.46910739e-17j,
-1.49950116e-17-1.59760967e-17j,  5.61165101e-17+3.47224593e-17j,
-3.16863866e-17+8.99739098e-19j, -5.48484781e-17+2.49682892e-17j,
6.49872248e-18+1.34729197e-17j, -1.08620101e-17-1.26347366e-18j,
4.79209808e-19+7.23983058e-18j, -3.74900068e-17-8.83686876e-18j,
-4.21643293e-18-1.05999905e-17j, -1.74928232e-17-1.62789307e-17j,
-9.44096487e-18-4.14738264e-18j, -3.30771080e-17-1.79314852e-17j,
2.78320431e-17+6.12164427e-19j, -1.90914331e-17-1.05291270e-17j,
-3.07088250e-17+8.42560828e-18j, -2.28597415e-17-1.30036505e-17j,
2.37356402e-17+1.42093701e-18j, -5.87625135e-17+6.30266925e-18j,
-1.29152487e-17-9.19734034e-18j, -3.26197722e-17-2.29078311e-17j,
-1.46649828e-17+2.28476553e-17j, -6.20640911e-17+1.27033538e-17j,
-7.80099314e-18+6.45903242e-17j, -4.02525157e-16+5.89756161e-18j,
2.96685004e-17-5.34841640e-16j,  3.32323450e-16-1.55091814e-17j,
2.08790294e-18+1.79168327e-17j,  8.52378912e-17-1.05021052e-17j,
5.84686353e-18+3.81250396e-18j,  6.70608129e-17-1.35648101e-17j,
-9.24499334e-18+2.08091083e-17j,  3.36437139e-18-1.56741794e-17j,
-5.73345075e-18+1.35283363e-17j,  6.78874711e-18-1.84392191e-17j,
-2.81549236e-17+2.09341768e-17j, -2.45062313e-18-3.78103799e-17j,
7.61199537e-18+1.25441327e-17j, -1.44129699e-17-1.00279169e-17j,
-5.97740110e-18+1.08517504e-17j, -1.95495180e-17-4.73723137e-17j,
2.60044766e-17+1.91318631e-17j, -9.27072220e-17-1.76013487e-17j,
7.30830191e-18+2.09290574e-17j, -3.38291505e-16-1.01280350e-17j,
4.91869895e-18-5.42547400e-16j,  3.60760013e-16+8.22742950e-18j,
1.51641554e-17-1.13016324e-16j,  1.68005791e-16+7.74099984e-18j,
2.89433004e-17+4.30756233e-17j,  1.19019003e-16-7.53998782e-18j,
1.98706071e-17+4.52287107e-17j,  5.59444112e-17-3.86357562e-17j,
2.77880144e-18-8.02003592e-18j,  5.86970949e-17-1.53222455e-17j,
8.83775601e-18+4.22234613e-17j,  3.57455277e-17-2.64552692e-17j,
9.70509959e-18+1.85289550e-17j,  5.13018011e-17+9.18814097e-18j,
1.84180314e-17+1.81581332e-17j,  4.28619087e-17-4.42517612e-17j,
2.37652903e-17+2.24831884e-17j,  2.20297024e-17-6.86789715e-18j,
-2.23160362e-17-5.16713189e-17j,  2.25784527e-17-2.40109598e-17j,
2.17600281e-17+2.36663550e-17j,  1.52341034e-17+1.96194960e-18j,
1.61719738e-17-9.97459915e-17j,  6.53636514e-17+3.69409354e-18j,
5.30366331e-17+6.77538755e-17j,  1.33018726e-17-1.64764468e-17j,
5.95220473e-17+7.91145658e-18j,  1.85446241e-17-1.88212053e-17j,
2.81730843e-17-3.61203637e-18j,  3.77161899e-17+4.56119071e-18j,
1.09329590e-17+3.54926713e-17j, -5.38658002e-18-3.58022311e-18j,
2.71505055e-17+3.68229542e-19j,  1.46397654e-17+1.48161470e-17j,
1.84751331e-17+1.11471387e-17j, -1.52933579e-17-2.13401184e-17j,
3.90164060e-17+2.64889662e-18j,  2.05680928e-18-2.95026745e-18j,
-3.43723236e-18+6.37915138e-18j,  2.04081546e-17-2.21610312e-17j,
5.71564864e-17+1.00155414e-17j, -8.45039508e-18-5.59754203e-18j,
2.06357906e-17+5.44420964e-18j,  3.03197764e-17-1.16146096e-17j,
4.92694051e-17+3.12446081e-17j, -2.60727559e-17-1.35028043e-17j,
1.90038981e-17-2.27485182e-17j,  2.19643353e-17+4.82973116e-19j]),
array([  0.,   1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   9.,  10.,
11.,  12.,  13.,  14.,  15.,  16.,  17.,  18.,  19.,  20.,  21.,
22.,  23.,  24.,  25.,  26.,  27.,  28.,  29.,  30.,  31.,  32.,
33.,  34.,  35.,  36.,  37.,  38.,  39.,  40.,  41.,  42.,  43.,
44.,  45.,  46.,  47.,  48.,  49.,  50.,  51.,  52.,  53.,  54.,
55.,  56.,  57.,  58.,  59.,  60.,  61.,  62.,  63.,  64.,  65.,
66.,  67.,  68.,  69.,  70.,  71.,  72.,  73.,  74.,  75.,  76.,
77.,  78.,  79.,  80.,  81.,  82.,  83.,  84.,  85.,  86.,  87.,
88.,  89.,  90.,  91.,  92.,  93.,  94.,  95.,  96.,  97.,  98.,
99., 100., 101., 102., 103., 104., 105., 106., 107., 108., 109.,
110., 111., 112., 113., 114., 115., 116., 117., 118., 119., 120.,
121., 122., 123., 124., 125., 126., 127., 128., 129., 130., 131.,
132., 133., 134., 135., 136., 137., 138., 139., 140., 141., 142.,
143., 144., 145., 146., 147., 148., 149., 150., 151., 152., 153.,
154., 155., 156., 157., 158., 159., 160., 161., 162., 163., 164.,
165., 166., 167., 168., 169., 170., 171., 172., 173., 174., 175.,
176., 177., 178., 179., 180., 181., 182., 183., 184., 185., 186.,
187., 188., 189., 190., 191., 192., 193., 194., 195., 196., 197.,
198., 199., 200., 201., 202., 203., 204., 205., 206., 207., 208.,
209., 210., 211., 212., 213., 214., 215., 216., 217., 218., 219.,
220., 221., 222., 223., 224., 225., 226., 227., 228., 229., 230.,
231., 232., 233., 234., 235., 236., 237., 238., 239., 240., 241.,
242., 243., 244., 245., 246., 247., 248., 249., 250., 251., 252.,
253., 254., 255., 256., 257., 258., 259., 260., 261., 262., 263.,
264., 265., 266., 267., 268., 269., 270., 271., 272., 273., 274.,
275., 276., 277., 278., 279., 280., 281., 282., 283., 284., 285.,
286., 287., 288., 289., 290., 291., 292., 293., 294., 295., 296.,
297., 298., 299., 300., 301., 302., 303., 304., 305., 306., 307.,
308., 309., 310., 311., 312., 313., 314., 315., 316., 317., 318.,
319., 320., 321., 322., 323., 324., 325., 326., 327., 328., 329.,
330., 331., 332., 333., 334., 335., 336., 337., 338., 339., 340.,
341., 342., 343., 344., 345., 346., 347., 348., 349., 350., 351.,
352., 353., 354., 355., 356., 357., 358., 359., 360., 361., 362.,
363., 364., 365., 366., 367., 368., 369., 370., 371., 372., 373.,
374., 375., 376., 377., 378., 379., 380., 381., 382., 383., 384.,
385., 386., 387., 388., 389., 390., 391., 392., 393., 394., 395.,
396., 397., 398., 399., 400., 401., 402., 403., 404., 405., 406.,
407., 408., 409., 410., 411., 412., 413., 414., 415., 416., 417.,
418., 419., 420., 421., 422., 423., 424., 425., 426., 427., 428.,
429., 430., 431., 432., 433., 434., 435., 436., 437., 438., 439.,
440., 441., 442., 443., 444., 445., 446., 447., 448., 449., 450.,
451., 452., 453., 454., 455., 456., 457., 458., 459., 460., 461.,
462., 463., 464., 465., 466., 467., 468., 469., 470., 471., 472.,
473., 474., 475., 476., 477., 478., 479., 480., 481., 482., 483.,
484., 485., 486., 487., 488., 489., 490., 491., 492., 493., 494.,
495., 496., 497., 498., 499.]))
In [ ]: