docs: def find_potential_match_regions(template, transformed_array, method='correlation', raw_tolerance=0.666):
      """To prevent prohibitively slow calculation of normalisation coefficient at each point in image
         find potential match points, and normalise these only these.
         This function uses the definitions of the matching functions to calculate the expected match value
         and finds positions in the transformed array matching these- normalisation will then eliminate false positives
      """
      if method == 'correlation':
          match_value  = np.sum(template**2) # this will be the value of the match in the
      elif method == 'squared difference':
          match_value = 0
      elif method == 'correlation coefficient':
          temp_minus_mean = template - np.mean(template)
          match_value = np.sum(temp_minus_mean**2)
      else:
          raise ValueError('Matching method not implemented')
      condition = ((np.round(transformed_array, decimals=3)>=match_value*raw_tolerance) &
                   (np.round(transformed_array, decimals=3)<=match_value*(1./raw_tolerance)))
      return np.transpose(condition.nonzero())