def thetaModIdxV2(self, x1):
    '\n        This is a simpler alternative to the thetaModIdx method in that it\n        calculates the difference between the normalized temporal\n        autocorrelogram at the trough between 50-70ms and the\n        peak between 100-140ms over their sum (data is binned into 5ms bins)\n\n        Measure used in Cacucci et al., 2004 and Kropff et al 2015\n        '
    y = self.xcorr(x1)
    (corr, bins) = np.histogram(y[(y != 0)], bins=201, range=np.array([(- 500), 500]))
    bins = bins[0:(- 1)]
    corr = (corr / float(np.max(corr)))
    thetaAntiPhase = np.min(corr[np.logical_and((bins > 50), (bins < 70))])
    thetaPhase = np.max(corr[np.logical_and((bins > 100), (bins < 140))])
    return ((thetaPhase - thetaAntiPhase) / (thetaPhase + thetaAntiPhase))
This is a simpler alternative to the thetaModIdx method in that it
calculates the difference between the normalized temporal
autocorrelogram at the trough between 50-70ms and the
peak between 100-140ms over their sum (data is binned into 5ms bins)

Measure used in Cacucci et al., 2004 and Kropff et al 2015
def thetaModIdxV2(self, x1):
    '\n        This is a simpler alternative to the thetaModIdx method in that it\n        calculates the difference between the normalized temporal\n        autocorrelogram at the trough between 50-70ms and the\n        peak between 100-140ms over their sum (data is binned into 5ms bins)\n\n        Measure used in Cacucci et al., 2004 and Kropff et al 2015\n        '
    y = self.xcorr(x1)
    (corr, bins) = np.histogram(y[(y != 0)], bins=201, range=np.array([(- 500), 500]))
    bins = bins[0:(- 1)]
    corr = (corr / float(np.max(corr)))
    thetaAntiPhase = np.min(corr[np.logical_and((bins > 50), (bins < 70))])
    thetaPhase = np.max(corr[np.logical_and((bins > 100), (bins < 140))])
    return ((thetaPhase - thetaAntiPhase) / (thetaPhase + thetaAntiPhase))