code: def get_max_ptrm_check(ptrm_checks_included_temps, ptrm_checks_all_temps, ptrm_x, t_Arai, x_Arai):
      
      if not ptrm_checks_included_temps:
          return [], float('nan'), float('nan'), float('nan'), float('nan')
      diffs = []
      abs_diffs = []
      x_Arai_compare = []
      ptrm_compare = []
      check_percents = []
      ptrm_checks_all_temps = list(ptrm_checks_all_temps)
      for check in ptrm_checks_included_temps: # goes through each included temperature step
          ptrm_ind = ptrm_checks_all_temps.index(check) # indexes the number of the check
          ptrm_check = ptrm_x[ptrm_ind] # x value at that temperature step
          ptrm_compare.append(ptrm_check) #
          arai_ind = t_Arai.index(check)
          ptrm_orig = x_Arai[arai_ind]
          x_Arai_compare.append(ptrm_orig)
          diff = ptrm_orig - ptrm_check
          diffs.append(diff)
          abs_diffs.append(abs(diff))
          if ptrm_orig == 0:
              check_percents.append(0)
          else:
              check_percents.append((old_div(abs(diff), ptrm_orig)) * 100)
      max_diff = max(abs_diffs)
      check_percent = max(check_percents)
      sum_diffs = abs(sum(diffs))
      sum_abs_diffs = sum(abs_diffs)
      return diffs, max_diff, sum_diffs, check_percent, sum_abs_diffs
docs: input: ptrm_checks_included_temps, ptrm_checks_all_temps, ptrm_x, t_Arai, x_Arai.
      sorts through included ptrm_checks and finds the largest ptrm check diff,
      the sum of the total diffs,
      and the percentage of the largest check / original measurement at that temperature step
      output: max_diff, sum_diffs, check_percent, sum_abs_diffs.