code: def calc_point_distance(self, chi_coords):
          
          chi1_bin, chi2_bin = self.find_point_bin(chi_coords)
          min_dist = 1000000000
          indexes = None
          for chi1_bin_offset, chi2_bin_offset in self.bin_loop_order:
              curr_chi1_bin = chi1_bin + chi1_bin_offset
              curr_chi2_bin = chi2_bin + chi2_bin_offset
              for idx, bank_chis in \
                              enumerate(self.bank[curr_chi1_bin][curr_chi2_bin]):
                  dist = coord_utils.calc_point_dist(chi_coords, bank_chis)
                  if dist < min_dist:
                      min_dist = dist
                      indexes = (curr_chi1_bin, curr_chi2_bin, idx)
          return min_dist, indexes
docs: Calculate distance between point and the bank. Return the closest
          distance.
  
          Parameters
          -----------
          chi_coords : numpy.array
              The position of the point in the chi coordinates.
  
          Returns
          --------
          min_dist : float
              The smallest **SQUARED** metric distance between the test point and
              the bank.
          indexes : The chi1_bin, chi2_bin and position within that bin at which
              the closest matching point lies.