def computeSplitHalf_size(self, numSplits, subsample, verbose=False, correct=True, plot_=False):
    import scipy.stats
    trial_data = self.trial_data
    Rs = []
    for s in range(0, numSplits):
        if (verbose == True):
            print(s)
        else:
            pass
        np.random.shuffle(trial_data)
        if ((int(subsample) % 2) == 0):
            half1.extend(t[0:(subsample / 2)])
            half2.extend(t[((- subsample) / 2):])
        else:
            half1.extend(t[0:((subsample / 2) + 1)])
            half2.extend(t[((- subsample) / 2):])
        if (self.numResp == 2):
            (CM1, combs) = self.getPopCM2x2fast(half1)
            (CM2, combs) = self.getPopCM2x2fast(half2)
        else:
            (CM1, combs) = self.getPopCM(half1)
            (CM2, combs) = self.getPopCM(half2)
        half1_array = []
        half2_array = []
        for mat in range(0, len(CM1)):
            newarray = np.reshape(normalize_CM(CM1[mat]), ((CM1[mat].shape[0] * CM1[mat].shape[1]), (- 1)))
            half1_array += list([x for x in newarray if (x != 0)])
            newarray = np.reshape(normalize_CM(CM2[mat]), ((CM2[mat].shape[0] * CM2[mat].shape[1]), (- 1)))
            half2_array += list([x for x in newarray if (x != 0)])
        if (self.corr_type == 'pearson'):
            Rs.append(scipy.stats.pearsonr(half1_array, half2_array)[0])
        else:
            Rs.append(scipy.stats.spearmanr(half1_array, half2_array)[0])
        if (plot_ == True):
            plt.plot(half1_array, half2_array, 'b.')
    if (correct == False):
        return Rs
    else:
        Rs_c = [SBcorrection(r, 2) for r in Rs]
        return Rs_c
def computeSplitHalf_size(self, numSplits, subsample, verbose=False, correct=True, plot_=False):
    import scipy.stats
    trial_data = self.trial_data
    Rs = []
    for s in range(0, numSplits):
        if (verbose == True):
            print(s)
        else:
            pass
        np.random.shuffle(trial_data)
        if ((int(subsample) % 2) == 0):
            half1.extend(t[0:(subsample / 2)])
            half2.extend(t[((- subsample) / 2):])
        else:
            half1.extend(t[0:((subsample / 2) + 1)])
            half2.extend(t[((- subsample) / 2):])
        if (self.numResp == 2):
            (CM1, combs) = self.getPopCM2x2fast(half1)
            (CM2, combs) = self.getPopCM2x2fast(half2)
        else:
            (CM1, combs) = self.getPopCM(half1)
            (CM2, combs) = self.getPopCM(half2)
        half1_array = []
        half2_array = []
        for mat in range(0, len(CM1)):
            newarray = np.reshape(normalize_CM(CM1[mat]), ((CM1[mat].shape[0] * CM1[mat].shape[1]), (- 1)))
            half1_array += list([x for x in newarray if (x != 0)])
            newarray = np.reshape(normalize_CM(CM2[mat]), ((CM2[mat].shape[0] * CM2[mat].shape[1]), (- 1)))
            half2_array += list([x for x in newarray if (x != 0)])
        if (self.corr_type == 'pearson'):
            Rs.append(scipy.stats.pearsonr(half1_array, half2_array)[0])
        else:
            Rs.append(scipy.stats.spearmanr(half1_array, half2_array)[0])
        if (plot_ == True):
            plt.plot(half1_array, half2_array, 'b.')
    if (correct == False):
        return Rs
    else:
        Rs_c = [SBcorrection(r, 2) for r in Rs]
        return Rs_c