def thellier_interpreter_BS_pars_calc(self, Grade_As):
        '''
        calcualte sample or site bootstrap paleointensities
        and statistics
        Grade_As={}
        '''
        thellier_interpreter_pars = {}
        thellier_interpreter_pars['fail_criteria'] = []
        thellier_interpreter_pars['pass_or_fail'] = 'pass'

        BOOTSTRAP_N = int(self.preferences['BOOTSTRAP_N'])
        Grade_A_samples_BS = {}
        if len(list(Grade_As.keys())) >= self.acceptance_criteria['sample_int_n']['value']:
            for specimen in list(Grade_As.keys()):
                if specimen not in list(Grade_A_samples_BS.keys()) and len(Grade_As[specimen]) > 0:
                    Grade_A_samples_BS[specimen] = []
                for B in Grade_As[specimen]:
                    Grade_A_samples_BS[specimen].append(B)
                Grade_A_samples_BS[specimen].sort()
                specimen_int_max_slope_diff = max(
                    Grade_A_samples_BS[specimen]) / min(Grade_A_samples_BS[specimen])
                if specimen_int_max_slope_diff > self.acceptance_criteria['specimen_int_max_slope_diff']:
                    self.thellier_interpreter_log.write(
                        "-I- specimen %s Failed specimen_int_max_slope_diff\n" % specimen, Grade_A_samples_BS[specimen])
                    del Grade_A_samples_BS[specimen]

        if len(list(Grade_A_samples_BS.keys())) >= self.acceptance_criteria['sample_int_n']['value']:
            BS_means_collection = []
            for i in range(BOOTSTRAP_N):
                B_BS = []
                for j in range(len(list(Grade_A_samples_BS.keys()))):
                    LIST = list(Grade_A_samples_BS.keys())
                    specimen = random.choice(LIST)
                    if self.acceptance_criteria['interpreter_method']['value'] == 'bs':
                        B = random.choice(Grade_A_samples_BS[specimen])
                    if self.acceptance_criteria['interpreter_method']['value'] == 'bs_par':
                        B = random.uniform(min(Grade_A_samples_BS[specimen]), max(
                            Grade_A_samples_BS[specimen]))
                    B_BS.append(B)
                BS_means_collection.append(mean(B_BS))

            BS_means = array(BS_means_collection)
            BS_means.sort()
            sample_median = median(BS_means)
            sample_std = std(BS_means, ddof=1)
            sample_68 = [BS_means[(0.16) * len(BS_means)],
                         BS_means[(0.84) * len(BS_means)]]
            sample_95 = [BS_means[(0.025) * len(BS_means)],
                         BS_means[(0.975) * len(BS_means)]]

        else:
            String = "-I- sample %s FAIL: not enough specimen int_n= %i < %i " % (sample, len(
                list(Grade_A_samples_BS.keys())), int(self.acceptance_criteria['sample_int_n']['value']))
            # print String
            self.thellier_interpreter_log.write(String)

        thellier_interpreter_pars['bs_bedian'] = sample_median
        thellier_interpreter_pars['bs_std'] = sample_std
        thellier_interpreter_pars['bs_68'] = sample_68
        thellier_interpreter_pars['bs_95'] = sample_95
        thellier_interpreter_pars['bs_n'] = len(
            list(Grade_A_samples_BS.keys()))