def thellier_interpreter_pars_calc(self, Grade_As):
        '''
        calcualte sample or site STDEV-OPT paleointensities
        and statistics
        Grade_As={}

        '''
        thellier_interpreter_pars = {}
        thellier_interpreter_pars['stdev-opt'] = {}
        # thellier_interpreter_pars['stdev-opt']['B']=
        # thellier_interpreter_pars['stdev-opt']['std']=
        thellier_interpreter_pars['min-value'] = {}
        # thellier_interpreter_pars['min-value']['B']=
        # thellier_interpreter_pars['min-value']['std']=
        thellier_interpreter_pars['max-value'] = {}
        # thellier_interpreter_pars['max-value']['B']=
        # thellier_interpreter_pars['max-value']['std']=
        thellier_interpreter_pars['fail_criteria'] = []
        thellier_interpreter_pars['pass_or_fail'] = 'pass'

        # acceptance criteria
        if self.acceptance_criteria['average_by_sample_or_site']['value'] == 'sample':
            int_n_cutoff = self.acceptance_criteria['sample_int_n']['value']
            int_sigma_cutoff = self.acceptance_criteria['sample_int_sigma']['value']
            int_sigma_perc_cutoff = self.acceptance_criteria['sample_int_sigma_perc']['value']
            int_interval_cutoff = self.acceptance_criteria['sample_int_interval_uT']['value']
            int_interval_perc_cutoff = self.acceptance_criteria['sample_int_interval_perc']['value']
        else:
            int_n_cutoff = self.acceptance_criteria['site_int_n']['value']
            int_sigma_cutoff = self.acceptance_criteria['site_int_sigma']['value']
            int_sigma_perc_cutoff = self.acceptance_criteria['site_int_sigma_perc']['value']
            int_interval_cutoff = self.acceptance_criteria['site_int_interval_uT']['value']
            int_interval_perc_cutoff = self.acceptance_criteria['site_int_interval_perc']['value']

        N = len(list(Grade_As.keys()))
        if N <= 1:
            thellier_interpreter_pars['pass_or_fail'] = 'fail'
            thellier_interpreter_pars['fail_criteria'].append("int_n")
            return(thellier_interpreter_pars)

        Best_interpretations, best_mean, best_std = self.find_sample_min_std(
            Grade_As)
        sample_acceptable_min, sample_acceptable_min_std, sample_acceptable_max, sample_acceptable_max_std = self.find_sample_min_max_interpretation(
            Grade_As)
        sample_int_interval_uT = sample_acceptable_max - sample_acceptable_min
        sample_int_interval_perc = 100 * \
            ((sample_acceptable_max - sample_acceptable_min) / best_mean)
        thellier_interpreter_pars['stdev_opt_interpretations'] = Best_interpretations
        thellier_interpreter_pars['stdev-opt']['B'] = best_mean
        thellier_interpreter_pars['stdev-opt']['std'] = best_std
        thellier_interpreter_pars['stdev-opt']['std_perc'] = 100. * \
            (best_std / best_mean)
        thellier_interpreter_pars['min-value']['B'] = sample_acceptable_min
        thellier_interpreter_pars['min-value']['std'] = sample_acceptable_min_std
        thellier_interpreter_pars['max-value']['B'] = sample_acceptable_max
        thellier_interpreter_pars['max-value']['std'] = sample_acceptable_max_std
        thellier_interpreter_pars['sample_int_interval_uT'] = sample_int_interval_uT
        thellier_interpreter_pars['sample_int_interval_perc'] = sample_int_interval_perc

        if N < int_n_cutoff:
            thellier_interpreter_pars['pass_or_fail'] = 'fail'
            thellier_interpreter_pars['fail_criteria'].append("int_n")

        pass_int_sigma, pass_int_sigma_perc = True, True
        pass_int_interval, pass_int_interval_perc = True, True

        if not (int_sigma_cutoff == -999 and int_sigma_perc_cutoff == -999):
            if best_std <= int_sigma_cutoff * 1e6 and int_sigma_cutoff != -999:
                pass_sigma = True
            else:
                pass_sigma = False
            if 100. * (best_std / best_mean) <= int_sigma_perc_cutoff and int_sigma_perc_cutoff != -999:
                pass_sigma_perc = True
            else:
                pass_sigma_perc = False
            if not (pass_sigma or pass_sigma_perc):
                thellier_interpreter_pars['pass_or_fail'] = 'fail'
                thellier_interpreter_pars['fail_criteria'].append("int_sigma")

        if not (int_interval_cutoff == -999 and int_interval_perc_cutoff == -999):
            if sample_int_interval_uT <= int_interval_perc_cutoff and int_interval_perc_cutoff != -999:
                pass_interval = True
            else:
                pass_interval = False
            if sample_int_interval_perc <= int_interval_perc_cutoff and int_interval_perc_cutoff != -999:
                pass_interval_perc = True
            else:
                pass_interval_perc = False
            if not (pass_interval or pass_interval_perc):
                thellier_interpreter_pars['pass_or_fail'] = 'fail'
                thellier_interpreter_pars['fail_criteria'].append(
                    "int_interval")

        return(thellier_interpreter_pars)