diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-08-17 16:10:46 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-08-17 16:10:46 +0000 |
commit | 2fc118133e76f05fc55d86cf32883223191fe473 (patch) | |
tree | 5570161d7082dffde9c96a02060330edf1be32b9 /src/cython/doc/fileformats.rst | |
parent | 5d8fad1814c3ec5f1d73e316853aba301070299f (diff) |
Add file formats for Python.
Binding for persistence write files
Launch py.test with the command "python -m pytest" (shall work everywhere)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_diagram_improvement@2611 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 9443a7eb5b580ece7708ff57949ad08339c1c5c3
Diffstat (limited to 'src/cython/doc/fileformats.rst')
-rw-r--r-- | src/cython/doc/fileformats.rst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/cython/doc/fileformats.rst b/src/cython/doc/fileformats.rst new file mode 100644 index 00000000..36225b6d --- /dev/null +++ b/src/cython/doc/fileformats.rst @@ -0,0 +1,30 @@ +File formats +############ + +To find the correct function to read the files, please refer to :doc:`reader_utils_ref` + +Persistence Diagram +******************* + +Such a file, whose extension is usually ``.pers``, contains a list of persistence intervals. + +Lines starting with ``#`` are ignored (comments). + +Other lines might contain 2, 3 or 4 values (the number of values on each line must be the same for all lines):: + + [[field] dimension] birth death + +Here is a simple sample file:: + + # Persistence diagram example + 2 2.7 3.7 + 2 9.6 14. + # Some comments + 3 34.2 34.974 + 4 3. inf + +Other sample files can be found in the data/persistence_diagram folder. + +Such files can be generated with :meth:`gudhi.SimplexTree.write_persistence_diagram` and read with +:meth:`gudhi.read_persistence_intervals_grouped_by_dimension`, or +:meth:`gudhi.read_persistence_intervals_in_dimension`. |