def extract(self, fileName):
     data, headers = ae.fromFileToFloats(fileName)
     jointsIndices = self.extractor.getJointsIndices(headers)
     centerXIndex = self.extractor.getCenterJointIndex(headers)
     dataRelativeToCenter = ae.subCenterFromDataForIndecies(data, centerXIndex, jointsIndices)
     velocities = np.diff(dataRelativeToCenter,1, 0)
     sqVelocities = np.square(velocities)   
     energy = [np.sum(line) for line in sqVelocities]
     return energy
Beispiel #2
0
 def extract(self, fileName):
     data, headers = ae.fromFileToFloats(fileName)
     jointsIndices = self.extractor.getJointsIndices(headers)
     centerXIndex = self.extractor.getCenterJointIndex(headers)
     dataRelativeToCenter = ae.subCenterFromDataForIndecies(data, centerXIndex, jointsIndices)
     velocities = np.diff(dataRelativeToCenter,1, 0)[1:]
     accelarations = np.diff(velocities,1, 0)
     #h = [np.sum(np.abs(line))*np.sum(acc) for acc,line in zip(velocities, accelarations)]
     h = [np.sum(np.abs(line)) for line in velocities]
     return h