WKT_AC < test.dat
#---------------------------------------------------------------------------
# ウィーナー・ヒンチンの定理
#---------------------------------------------------------------------------
# パワースペクトルを逆フーリエ変換し、自己相関関数を計算
# パワースペクトルから求めた自己相関関数(ウィーナー・ヒンチンの定理): WKT ACF
# データから直接求めた自己相関関数: DATA ACF
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# Wiener-Khinchin theorem (using cyclic data)
#---------------------------------------------------------------------------
# inverse Fourier transform of the power spectrum and calculation of the auto-correlation function
# WKT ACF: auto-correlation function obtained from the power spectrum (Wiener-Khinchin theorem)
# DATA ACF: auto-correlation function obtained directly from the data
# gap: WKT ACF - DATA ACF
#---------------------------------------------------------------------------
# lag WKT ACF DATA ACF gap
0 4.756758 4.756758 -8.88178e-016
1 3.026620 3.026620 4.44089e-016
2 3.970637 3.970637 -4.44089e-016
3 2.926908 2.926908 8.88178e-016
4 3.895882 3.895882 -4.44089e-016
5 3.253893 3.253893 -1.33227e-015
6 3.893654 3.893654 -4.44089e-016
7 3.271705 3.271705 -8.88178e-016
8 4.117009 4.117009 -8.88178e-016
9 3.271705 3.271705 -2.22045e-015
10 3.893654 3.893654 -4.44089e-016
11 3.253893 3.253893 -1.77636e-015
12 3.895882 3.895882 -8.88178e-016
13 2.926908 2.926908 1.33227e-015
14 3.970637 3.970637 1.33227e-015
15 3.026620 3.026620 1.77636e-015
#---------------------------------------------------------------------------
# 自己相関関数をフーリエ変換し、パワースペクトルを計算
# データから直接求めたパワースペクトル: DATA PS
# 自己相関関数から求めたパワースペクトル(ウィーナー・ヒンチンの定理): WKT PS
#---------------------------------------------------------------------------
# Fourier transform the autocorrelation function and calculate the power spectrum
# DATA PS: power spectrum obtained directly from the data
# WKT PS: power spectrum obtained from the auto-correlation function (Wiener-Khinchin theorem)
# gap: DATA PS - WKT PS
#---------------------------------------------------------------------------
# freq DATA PS WKT PS gap
0 57.352366 57.352366 -7.10543e-015
1 0.045497 0.045497 3.7817e-015
2 1.248207 1.248207 0
3 0.947489 0.947489 2.05391e-014
4 0.936949 0.936949 1.94289e-014
5 0.114270 0.114270 5.63438e-015
6 0.915796 0.915796 3.21965e-015
7 1.451739 1.451739 -2.28706e-014
8 7.435861 7.435861 8.88178e-016
9 1.451739 1.451739 -2.70894e-014
10 0.915796 0.915796 4.57412e-014
11 0.114270 0.114270 -2.498e-016
12 0.936949 0.936949 -5.66214e-014
13 0.947489 0.947489 -2.57572e-014
14 1.248207 1.248207 -2.15383e-014
15 0.045497 0.045497 -2.05391e-015
programme
WKT_AC.c contains the main function.
巡回型データとは、入力したデータが、繰り返されることを意味します。例えば、1, 2, 3が入力データだとすると、この計算で用いられるデータは、1, 2, 3, 1, 2, 3となります。
Cyclic data means that the input data is repeated. For example, if the input data is 1, 2, 3, the data used in this calculation are 1, 2, 3, 1, 2, 3.