summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGard Spreemann <gspreemann@gmail.com>2016-03-29 12:40:25 +0200
committerGard Spreemann <gspreemann@gmail.com>2016-03-29 12:40:25 +0200
commit4a11698e58ca5323a4dccf593878a2955548a982 (patch)
treea93ec8fb2eba213b5718d15204c84c250e138c40
parente09ce6af881ba16b57d5b92256aa8e430e168ee1 (diff)
Download link.
-rw-r--r--README.md28
1 files changed, 16 insertions, 12 deletions
diff --git a/README.md b/README.md
index a4ec5a3..44b16f6 100644
--- a/README.md
+++ b/README.md
@@ -34,15 +34,17 @@ following caveats:
Installation
-----
-The scripts require NumPy and Matplotlib. If you want them to manage
+Version 0.0.2 is available
+[here](https://nonempty.org/software/python-phstuff/phstuff-0.0.2.tar.gz). The
+package can be installed using standard Python tools, for example by
+doing `python setup.py install --user` or something similar.
+
+The package requires NumPy and Matplotlib. If you want them to manage
running DIPHA as well, then you of course need working dipha and
mpirun executables. If the environment variables DIPHA and/or MPIRUN
are set, their values specify these executables. If not, those are
searched for in PATH.
-The package can be installed using standard Python tools, for example
-by doing `python setup.py install --user` or something similar.
-
Todo/missing
----
@@ -79,12 +81,13 @@ This is as simple as
weights = np.random.uniform(0, 1, (100, 100)) # The graph.
dipha.save_weight_matrix("weights.dipha", weights)
-DIPHA can now be run on "weights.dipha".
+DIPHA can now be run on `weights.dipha`.
### Loading a DIPHA barcode file
To load a dimension-`1` persistence diagram DIPHA stored in
-"out.dipha", do:
+`out.dipha` (for example after running DIPHA on the file from the
+previous example), do:
import phstuff.diphawrapper as dipha
@@ -118,11 +121,11 @@ present in the graph.
### Running DIPHA from Python
-If you prefer to control the entire computation from Python, these
-scripts can generate the necessary temporary files and run DIPHA on
-them. For this, the mpirun and dipha executables must be in the PATH
-environment variable, or they must be specified through the MPIRUN and
-DIPHA environment variables.
+If you prefer to control the entire computation from Python, this
+package can generate the necessary temporary files and run DIPHA on
+them. The mpirun and dipha executables must be in the PATH environment
+variable, or they must be specified through the MPIRUN and DIPHA
+environment variables.
import phstuff.diphawrapper as dipha
import numpy as np
@@ -131,7 +134,8 @@ DIPHA environment variables.
weights = np.random.uniform(0, 1, (100, 100))
dipharunner = dipha.DiphaRunner(2) # Compute up to 2-simplices.
- dipharunner.weight_matrix(weights)
+ dipharunner.weight_matrix(weights) # See also dipharunner.masked_weight_matrix,
+ # and dipharunner.edge_list.
dipharunner.run()
for interval in dipharunner.barcode[1]: