code: def relayIndextoCoord(self, i):
      
      x = i % self.relayWidth
      y = i / self.relayWidth
      return x, y
docs: Map 1D cell index to a 2D coordinate
  
      :param i: integer 1D cell index
  
      :return: (x, y), a 2D coordinate