= analysis = [[PageOutline]] == Data == '''!__name!__''' = !NeuroTools.analysis == Functions == ==== _dict_max(D) ==== For a dict containing numerical values, contain the key for the highest value. If there is more than one item with the same highest value, return one of them (arbitrary - depends on the order produced by the iterator). ==== arrays_almost_equal(a, b, threshold) ==== ==== ccf(x, y, axis=None) ==== Computes the cross-correlation function of two series x and y. Note that the computations are performed on anomalies (deviations from average). Returns the values of the cross-correlation at different lags. Inputs: x - 1D !MaskedArray of a Time series. y - 1D !MaskedArray of a Time series. axis - integer *[None]* Axis along which to compute (0 for rows, 1 for cols). If `None`, the array is flattened first. Examples: >> z= arange(1000) >> ccf(z,z) ==== check_dependency(name) ==== ==== simple_frequency_spectrum(x) ==== Very simple calculation of frequency spectrum with no detrending, windowing, etc. Just the first half (positive frequency components) of abs(fft(x)) == Classes == === !TuningCurve === Class to facilitate working with tuning curves. ==== !__getitem!__(self, i) ==== ==== !__init!__(self, D=None) ==== If `D` is a dict, it is used to give initial values to the tuning curve. ==== add(self, D) ==== ==== max(self) ==== Return the key of the max value and the max value. ==== stats(self) ==== Return the mean tuning curve with stderrs. ----