Commit d7ffac3e authored by Inigo Aldazabal's avatar Inigo Aldazabal

Update solar spot data and correct spectrum power

parent bd7d498e
......@@ -313,3 +313,5 @@
2012.5 84.5 6.7 5753
2013.5 94.0 6.9 5347
2014.5 113.3 8.0 5273
2015.5 69.8 6.4 8903
2016.5 39.8 3.9 9940
......@@ -20,7 +20,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"collapsed": true
},
......@@ -154,9 +154,7 @@
"collapsed": false
},
"outputs": [],
"source": [
"import scipy as sp"
]
"source": []
},
{
"cell_type": "markdown",
......@@ -337,7 +335,7 @@
"\n",
"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. "
]
......@@ -551,7 +549,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
"version": "3.6.0"
}
},
"nbformat": 4,
......
......@@ -366,11 +366,11 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": [
"#help(integrate)"
"help(integrate)"
]
},
{
......@@ -389,7 +389,7 @@
"\n",
"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",
"\n",
"freq = freq[1:N/2]\n",
"power = power[1:N/2]"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment