code: def encodeSensorimotorSequence(self, eyeLocs):
      
      sequenceLength = len(eyeLocs) - 1
  
      motorSequence = []
      sensorySequence = []
      sensorimotorSequence = []
  
      for i in xrange(sequenceLength):
        currentEyeLoc = eyeLocs[i]
        nextEyeLoc = eyeLocs[i+1]
  
        currentSensoryInput = self.spatialMap[currentEyeLoc]
  
        currentEyeV = nextEyeLoc - currentEyeLoc
  
        if self.verbosity:
          print "sensory input = ", currentSensoryInput, \
              "eye location = ", currentEyeLoc, \
              " motor command = ", currentEyeV
  
        sensoryInput = self.encodeSensoryInput(currentSensoryInput)
        motorInput = self.encodeMotorInput(list(currentEyeV))
        sensorimotorInput = numpy.concatenate((sensoryInput, motorInput))
  
        sensorySequence.append(sensoryInput)
        motorSequence.append(motorInput)
        sensorimotorSequence.append(sensorimotorInput)
  
      return (sensorySequence, motorSequence, sensorimotorSequence)
docs: Encode sensorimotor sequence given the eye movements. Sequence will have
      length len(eyeLocs) - 1 because only the differences of eye locations can be
      used to encoder motor commands.
  
      @param eyeLocs  (list)
          Numpy coordinates describing where the eye is looking.
  
      @return (tuple) Contains:
              sensorySequence       (list)
                  Encoded sensory input for whole sequence.
  
              motorSequence         (list)
                  Encoded motor input for whole sequence.
  
              sensorimotorSequence  (list)
                  Encoder sensorimotor input for whole sequence. This is useful
                  when you want to give external input to temporal memory.