関数sequence_correlation_noshift_limittime マニュアル

(The documentation of function sequence_correlation_noshift_limittime)

Last Update: 2021/12/7


◆機能・用途(Purpose)

2つの時系列データの相互相関関数の ラグタイム\(\tau=0\)での値\(C_1(f,g;0)\)を計算する。 使用する時系列データの時刻範囲を限定して計算を行う。
Compute the value of the cross correlation function, \(C_1(f,g;0)\), between two time series data for zero time lag (\(\tau=0\)), limiting the time windows of the time series data to use.


◆形式(Format)

#include <sequence/correlation.h>
inline double sequence_correlation_noshift_limittime
(const struct sequence f,const struct sequence g,
 const double tmin,const double tmax)


◆引数(Arguments)

f 相互相関関数の計算に用いる1つ目の時系列データ\(f(t)\)。
The 1st time series data, \(f(t)\), used to compute the CCF.
g 相互相関関数の計算に用いる2つ目の時系列データ\(g(t)\)。
The 2nd time series data, \(g(t)\), used to compute the CCF.
tmin 計算に用いる\(f(t)\), \(g(t)\)の時刻範囲の先頭。
The start time of the time range of \(f(t)\) and \(g(t)\) included in the calculation.
tmax 計算に用いる\(f(t)\), \(g(t)\)の時刻範囲の末尾。
The end time of the time range of \(f(t)\) and \(g(t)\) included in the calculation.


◆戻り値(Return value)

\(f(t)\), \(g(t)\)の\(t_{min}\leq t\leq t_{max}\)の範囲のみを用いた ラグタイム\(\tau=0\)での相互相関関数\(C_1(f,g;0)\)の値。 計算式は \[\begin{equation} C_1(f,g;0)= \frac{\int_{t_{min}}^{t_{max}}f(t)g(t)dt} {\sqrt{\int_{t_{min}}^{t_{max}}f(t)^2dt \int_{t_{min}}^{t_{max}}g(t)^2dt}} \label{eq.formula} \end{equation}\] となる。
The value of the cross correlation function, \(C_1(f,g;0)\), between \(f(t)\) and \(g(t)\) with zero time lag \(\tau=0\), limiting the time range of the data as \(t_{min}\leq t\leq t_{max}\). Eq. (\ref{eq.formula}) is used for the calculation.


◆使用例(Example)

struct sequence data1,data2;
double correlation=sequence_correlation_noshift(data1,data2,1.2,3.4);