Bases: nitime.analysis.base.BaseAnalyzer
Analyzer object for coherence/coherency analysis
Parameters : | input: TimeSeries object :
method: dict, optional, :
unwrap_phases: bool, optional :
|
---|
Examples
>>> import nitime.timeseries as ts
>>> np.set_printoptions(precision=4) # for doctesting
>>> t1 = ts.TimeSeries(data = np.arange(0,1024,1).reshape(2,512),
... sampling_rate=np.pi)
>>> c1 = CoherenceAnalyzer(t1)
>>> c1.method['Fs']
3.14159265359 Hz
>>> c1.method['this_method']
'welch'
>>> c1.coherence[0,1]
array([ 0.9024, 0.9027, 0.9652, 0.9433, 0.9297, 0.9213, 0.9161,
0.9126, 0.9102, 0.9085, 0.9072, 0.9063, 0.9055, 0.905 ,
0.9045, 0.9041, 0.9038, 0.9036, 0.9034, 0.9032, 0.9031,
0.9029, 0.9028, 0.9027, 0.9027, 0.9026, 0.9026, 0.9025,
0.9025, 0.9025, 0.9025, 0.9026, 1. ])
>>> c1.phase[0,1]
array([ 0. , -0.035 , -0.4839, -0.4073, -0.3373, -0.2828, -0.241 ,
-0.2085, -0.1826, -0.1615, -0.144 , -0.1292, -0.1164, -0.1054,
-0.0956, -0.0869, -0.0791, -0.072 , -0.0656, -0.0596, -0.0541,
-0.0489, -0.0441, -0.0396, -0.0353, -0.0314, -0.0277, -0.0244,
-0.0216, -0.0197, -0.0198, -0.028 , 0. ])
The coherence between the different channels in the input TimeSeries object
The partial coherence between data[i] and data[j], given data[k], as a function of frequency band
The standard output for this kind of analyzer is the coherency
The delay in seconds between the two time series
The central frequencies in the bands
The frequency-dependent phase relationship between all the pairwise combinations of time-series in the data
The spectra of each of the channels and cross-spectra between different channles in the input TimeSeries object
Bases: nitime.analysis.base.BaseAnalyzer
Analyzer for multi-taper coherence analysis, including jack-knife estimate of confidence interval
Initializer function for the MTCoherenceAnalyzer
Parameters : | input: TimeSeries object : bandwidth: float, :
alpha: float, default =0.05 :
adaptive: bool, default to True :
|
---|
Notes
Thompson, DJ (2007) Jackknifing multitaper spectrum estimates. IEEE Signal Processing Magazing. 24: 20-30
The size of the 1-alpha confidence interval
Bases: object
This analyzer takes two time-series. The first is designated as a time-series of seeds. The other is designated as a time-series of targets. The analyzer performs a coherence analysis between each of the channels in the seed time-series and all of the channels in the target time-series.
The constructor for the SeedCoherenceAnalyzer
Parameters : | seed_time_series: a time-series object : target_time_series: a time-series object : lb,ub: float,optional, default: lb=0, ub=None (max frequency) :
prefer_speed_over_memory: Boolean, optional, default=True :
|
---|
The coherence between each of the channels of the seed time series and all the channels of the target time-series.
The delay in seconds between the two time series
Get the central frequencies for the frequency bands, given the method of estimating the spectrum
The frequency-band dependent relative phase between the two time-series
Bases: nitime.analysis.base.BaseAnalyzer
This analyzer is intended for analysis of large sets of data, in which possibly only a subset of combinations of time-series needs to be compared. The constructor for this class receives as input not only a time-series object, but also a list of tuples with index combinations (i,j) for the combinations. Importantly, this class implements only the mlab csd function and cannot use other methods of spectral estimation
The constructor for the SparseCoherenceAnalyzer
Parameters : | time_series: a time-series object : ij: a list of tuples, each containing a pair of indices. :
lb,ub: float,optional, default: lb=0, ub=None (max frequency) :
prefer_speed_over_memory: Boolean, optional, default=True :
method: optional, dict : The method for spectral estimation (see :func:`algorithms.get_spectra`) : |
---|
Caches the fft windows required by the other methods of the SparseCoherenceAnalyzer. Calculate only once and reuse
The coherence values for the output
The default behavior is to calculate the cache, extract it and then output the coherency
The delay in seconds between the two time series
Get the central frequencies for the frequency bands, given the method of estimating the spectrum
The frequency-band dependent phases of the spectra of each of the time -series i,j in the analyzer
The frequency-band dependent relative phase between the two time-series
get the spectrum for the collection of time-series in this analyzer