"In the next example we will use the Fast Fourier Transform (FFT) in order to transform time-dependent data into the frequency domain. By doing so, it is possible to analyse if any predominant frequencies exists - i.e. if there is any periodicity in the data. \n",
"\n",
"The example data we will use is the sunspot activity measurements from year 1700 to year 2014 provided by the Sunspot index and Long-term Solar Observation. The data set is the yearly mean total sunspot observations available via HTTP.\n",
"The example data we will use is the sunspot activity measurements from year 1700 to year 2016 provided by the Sunspot index and Long-term Solar Observation. The data set is the yearly mean total sunspot observations available via HTTP.\n",
"\n",
"The datafile is also included in `files/SN_y_tot_V2.0.txt`. The sunspot data have been used for illustrating the power of FFT with respect to finding a periodicity in sunspot activity in various computer languages, e.g. Matlab and BASIC. "
"In the next example we will use the Fast Fourier Transform (FFT) in order to transform time-dependent data into the frequency domain. By doing so, it is possible to analyse if any predominant frequencies exists - i.e. if there is any periodicity in the data. \n",
"\n",
"The example data we will use is the sunspot activity measurements from year 1700 to year 2014 provided by the Sunspot index and Long-term Solar Observation. The data set is the yearly mean total sunspot observations available via HTTP.\n",
"The example data we will use is the sunspot activity measurements from year 1700 to year 2016 provided by the Sunspot index and Long-term Solar Observation. The data set is the yearly mean total sunspot observations available via HTTP.\n",
"\n",
"The datafile is also included in `files/SN_y_tot_V2.0.txt`. The sunspot data have been used for illustrating the power of FFT with respect to finding a periodicity in sunspot activity in various computer languages, e.g. Matlab and BASIC. "
]
...
...
@@ -427,7 +427,6 @@
},
"outputs": [],
"source": [
"solarspots\n",
"years = solarspots[:,0]\n",
"spots = solarspots[:,1]"
]
...
...
@@ -518,7 +517,7 @@
"N = spots_fft.size\n",
"timestep = 1 # year\n",
"freq = fftfreq(N, d=timestep) # 1/year\n",
"power = np.abs(spots_fft) # proportional to this\n",
"power = np.abs(spots_fft)**2 # proportional to this\n",