docs: def calculate_sample_mean(self, Data_sample_or_site):
          '''
          Data_sample_or_site is a dictonary holding the samples_or_sites mean
          Data_sample_or_site ={}
          Data_sample_or_site[specimen]=B (in units of microT)
          '''
  
          pars = {}
          tmp_B = []
          for spec in list(Data_sample_or_site.keys()):
              if 'B' in list(Data_sample_or_site[spec].keys()):
                  tmp_B.append(Data_sample_or_site[spec]['B'])
          if len(tmp_B) < 1:
              pars['N'] = 0
              pars['pass_or_fail'] = 'fail'
              return pars
  
          tmp_B = np.array(tmp_B)
          pars['pass_or_fail'] = 'pass'
          pars['N'] = len(tmp_B)
          pars['B_uT'] = np.mean(tmp_B)
          if len(tmp_B) > 1:
              pars['B_std_uT'] = np.std(tmp_B, ddof=1)
              pars['B_std_perc'] = 100 * (pars['B_std_uT'] / pars['B_uT'])
          else:
              pars['B_std_uT'] = 0
              pars['B_std_perc'] = 0
          pars['sample_int_interval_uT'] = (max(tmp_B) - min(tmp_B))
          pars['sample_int_interval_perc'] = 100 * \
              (pars['sample_int_interval_uT'] / pars['B_uT'])
          pars['fail_list'] = []
          # check if pass criteria
          #----------
          # int_n
          if self.acceptance_criteria['average_by_sample_or_site']['value'] == 'sample':
              average_by_sample_or_site = 'sample'
          else:
              average_by_sample_or_site = 'site'
  
          if average_by_sample_or_site == 'sample':
              cutoff_value = self.acceptance_criteria['sample_int_n']['value']
          else:
              cutoff_value = self.acceptance_criteria['site_int_n']['value']
          if cutoff_value != -999:
              if pars['N'] < cutoff_value:
                  pars['pass_or_fail'] = 'fail'
                  pars['fail_list'].append("int_n")
          #----------
          # int_sigma ; int_sigma_perc
          pass_sigma, pass_sigma_perc = False, False
          if self.acceptance_criteria['average_by_sample_or_site']['value'] == 'sample':
              sigma_cutoff_value = self.acceptance_criteria['sample_int_sigma']['value']
          else:
              sigma_cutoff_value = self.acceptance_criteria['site_int_sigma']['value']
  
          if sigma_cutoff_value != -999:
              if pars['B_std_uT'] * 1e-6 <= sigma_cutoff_value:
                  pass_sigma = True
  
          if self.acceptance_criteria['average_by_sample_or_site']['value'] == 'sample':
              sigma_perc_cutoff_value = self.acceptance_criteria['sample_int_sigma_perc']['value']
          else:
              sigma_perc_cutoff_value = self.acceptance_criteria['site_int_sigma_perc']['value']
          if sigma_perc_cutoff_value != -999:
              if pars['B_std_perc'] <= sigma_perc_cutoff_value:
                  pass_sigma_perc = True
  
          if not (sigma_cutoff_value == -999 and sigma_perc_cutoff_value == -999):
              if not (pass_sigma or pass_sigma_perc):
                  pars['pass_or_fail'] = 'fail'
                  pars['fail_list'].append("int_sigma")
  
          pass_int_interval, pass_int_interval_perc = False, False
          if self.acceptance_criteria['average_by_sample_or_site']['value'] == 'sample':
              cutoff_value = self.acceptance_criteria['sample_int_interval_uT']['value']
              if cutoff_value != -999:
                  if pars['sample_int_interval_uT'] <= cutoff_value:
                      pass_int_interval = True
  
              cutoff_value_perc = self.acceptance_criteria['sample_int_interval_perc']['value']
              if cutoff_value_perc != -999:
                  if pars['sample_int_interval_perc'] <= cutoff_value_perc:
                      pass_int_interval_perc = True
  
              if not (cutoff_value == -999 and cutoff_value_perc == -999):
                  if not (pass_int_interval or pass_int_interval_perc):
                      pars['pass_or_fail'] = 'fail'
                      pars['fail_list'].append("int_interval")
  
              # if cutoff_value != -999 or cutoff_value_perc != -999:
              #    if not (pass_int_interval or pass_int_interval_perc):
              #        pars['pass_or_fail']='fail'
              #        pars['fail_list'].append("int_interval")
  
              #
              #
              #
              #
              # if (acceptance_criteria['sample_int_sigma_uT']==0 and acceptance_criteria['sample_int_sigma_perc']==0) or\
              #    (pars['B_uT'] <= acceptance_criteria['sample_int_sigma_uT'] or pars['B_std_perc'] <= acceptance_criteria['sample_int_sigma_perc']):
              #        if ( pars['sample_int_interval_uT'] <= acceptance_criteria['sample_int_interval_uT'] or pars['sample_int_interval_perc'] <= acceptance_criteria['sample_int_interval_perc']):
              #            pars['pass_or_fail']='pass'
          return(pars)