diff --git a/GPy/util/mocap.py b/GPy/util/mocap.py index 4f6336c5..e405d3a1 100644 --- a/GPy/util/mocap.py +++ b/GPy/util/mocap.py @@ -304,6 +304,11 @@ class acclaim_skeleton(skeleton): channels = self.read_channels(fid) fid.close() return channels + + def save_channels(self, file_name, channels): + with open(file_name,'w') as fid: + self.writ_channels(fid, channels) + fid.close() def load_skel(self, file_name): @@ -469,6 +474,18 @@ class acclaim_skeleton(skeleton): self.smooth_angle_channels(channels) return channels + def writ_channels(self, fid, channels): + fid.write('#!OML:ASF \n') + fid.write(':FULLY-SPECIFIED\n') + fid.write(':DEGREES\n') + num_frames = channels.shape[0] + for i_frame in range(num_frames): + fid.write(str(i_frame+1)+'\n') + offset = 0 + for vertex in self.vertices: + fid.write(vertex.name+' '+ ' '.join([str(v) for v in channels[i_frame,offset:offset+len(vertex.meta['channels'])]])+'\n') + offset += len(vertex.meta['channels']) + def read_documentation(self, fid): """Read documentation from an acclaim skeleton file stream.""" diff --git a/doc/source/index.rst~ b/doc/source/index.rst~ deleted file mode 100644 index 48ec0422..00000000 --- a/doc/source/index.rst~ +++ /dev/null @@ -1,22 +0,0 @@ -.. GPy documentation master file, created by - sphinx-quickstart on Fri Sep 18 18:16:28 2015. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to GPy's documentation! -=============================== - -Contents: - -.. toctree:: - :maxdepth: 2 - - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` -