docs: def get_ry0_distance(self, mesh):
          """
          Compute the minimum distance between each point of a mesh and the great
          circle arcs perpendicular to the average strike direction of the
          fault trace and passing through the end-points of the trace.
  
          :param mesh:
              :class:`~openquake.hazardlib.geo.mesh.Mesh` of points to calculate
              Ry0-distance to.
          :returns:
              Numpy array of distances in km.
          """
          # This computes ry0 by using an average strike direction
          top_edge = self.mesh[0:1]
          mean_strike = self.get_strike()
  
          dst1 = geodetic.distance_to_arc(top_edge.lons[0, 0],
                                          top_edge.lats[0, 0],
                                          (mean_strike + 90.) % 360,
                                          mesh.lons, mesh.lats)
  
          dst2 = geodetic.distance_to_arc(top_edge.lons[0, -1],
                                          top_edge.lats[0, -1],
                                          (mean_strike + 90.) % 360,
                                          mesh.lons, mesh.lats)
          # Find the points on the rupture
  
          # Get the shortest distance from the two lines
          idx = numpy.sign(dst1) == numpy.sign(dst2)
          dst = numpy.zeros_like(dst1)
          dst[idx] = numpy.fmin(numpy.abs(dst1[idx]), numpy.abs(dst2[idx]))
  
          return dst