diff --git a/README.md b/README.md index a896676..2f346e7 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ For more information on the ECT, see: ### Documentation and tutorials - The documentation is available at: [munchlab.github.io/ect](https://munchlab.github.io/ect/) -- A tutorial jupyter notebook can be found [here](https://munchlab.github.io/ect/notebooks/Tutorial-ECT_for_embedded_graphs.html) +- A tutorial jupyter notebook can be found [here](https://munchlab.github.io/ect/notebooks/Tutorial-EmbeddedComplex.html) ### Dependencies diff --git a/doc_source/ECTResult.md b/doc_source/ECTResult.md new file mode 100644 index 0000000..f8179ff --- /dev/null +++ b/doc_source/ECTResult.md @@ -0,0 +1,9 @@ +# ECTResult + +`ECTResult` class provides a fast way to manipulate ECT matrices while also maintaining properties of being a numpy array. + + +```{eval-rst} +.. automodule:: ect.results + :members: +``` \ No newline at end of file diff --git a/doc_source/contributing.rst b/doc_source/contributing.rst index 47a593f..ceae78c 100644 --- a/doc_source/contributing.rst +++ b/doc_source/contributing.rst @@ -33,7 +33,7 @@ The `ect` package uses the Sphinx documentation system for generating documentat - First, include docstrings in the code which will be autogenerated into the documentation. When in doubt, write too much. - Second, write documentation in the `doc_source` directory using the reStructuredText format. This package also supports writing files in markdown, although there are some issues when dealing with autogenerated content so it's a bit of a mix at the moment. Note that when the documentation is generated, everything in the `docs` folder is deleted and overwritten, so do not do your work in there, it will be lost! -Assuming everything (TODO: Add install list) is set up correctly, you can generate the documentation by running the following command from the top level folder:: +Assuming everything is set up correctly (see the installation instructions in the main documentation), you can generate the documentation by running the following command from the top level folder:: make html @@ -93,10 +93,3 @@ If you would like to fix an issue and you are a contributor to the project, plea If you are not a contributor, you will need to fork the code and create a pull request from your fork. Note that all pull requests need to be approved by Liz Munch before they can be merged. - -Conclusion ----------- - -- Acknowledgements -- Future development plans -- Contact information and support \ No newline at end of file diff --git a/doc_source/ect_on_graphs.md b/doc_source/ect.md similarity index 91% rename from doc_source/ect_on_graphs.md rename to doc_source/ect.md index f717327..0a05124 100644 --- a/doc_source/ect_on_graphs.md +++ b/doc_source/ect.md @@ -1,4 +1,4 @@ -# ECT on Graphs +# ECT ```{eval-rst} .. automodule:: ect.ect diff --git a/doc_source/installation.rst b/doc_source/installation.rst index 57c42cf..099bedc 100644 --- a/doc_source/installation.rst +++ b/doc_source/installation.rst @@ -6,7 +6,7 @@ Prerequisites Before installing `ect`, make sure you have the following prerequisites: -- Python (version 3.7 or higher) +- Python (version 3.10 or higher) - Pip (Python package installer) Installing `ect` diff --git a/doc_source/modules.rst b/doc_source/modules.rst index 9dbfbfa..e967bbe 100644 --- a/doc_source/modules.rst +++ b/doc_source/modules.rst @@ -7,5 +7,6 @@ Table of Contents Embedded Complex Validation System - ECT on graphs + ECT + ECTResult Directions \ No newline at end of file diff --git a/src/ect/ect.py b/src/ect/ect.py index 04b1824..6b7a146 100644 --- a/src/ect/ect.py +++ b/src/ect/ect.py @@ -10,19 +10,33 @@ class ECT: """ - A class to calculate the Euler Characteristic Transform (ECT) from an input :any:`EmbeddedComplex`. + A class to calculate the Euler Characteristic Transform (ECT) from an input :any:`EmbeddedComplex`, + using a set of directions to project the complex onto and thresholds to filter the projections. - The result is a matrix where entry ``M[i,j]`` is :math:`\chi(K_{a_i})` for the direction :math:`\omega_j` where :math:`a_i` is the ith entry in ``self.thresholds``, and :math:`\omega_j` is the ith entry in ``self.thetas``. + The result is a matrix where entry ``M[i,j]`` is :math:`\chi(K_{a_i})` for the direction :math:`\omega_j` + where :math:`a_i` is the ith entry in ``self.thresholds``, and :math:`\omega_j` is the jth entry in ``self.directions``. Attributes - num_dirs (int): - The number of directions to consider in the matrix. - num_thresh (int): - The number of thresholds to consider in the matrix. - directions (Directions): - The directions to consider for projection. - bound_radius (float): - Either ``None``, or a positive radius of the bounding circle. + ---------- + num_dirs : int + The number of directions to consider in the matrix. + num_thresh : int + The number of thresholds to consider in the matrix. + directions : Directions + The directions to consider for projection. + bound_radius : float + Either ``None``, or a positive radius of the bounding circle. + + Example: + >>> from ect import ECT, EmbeddedComplex + >>> from ect import EmbeddedGraph + >>> complex = EmbeddedComplex() + >>> complex.add_node(0, [0, 0]) + >>> complex.add_node(1, [1, 0]) + >>> complex.add_edge(0, 1) + >>> ect = ECT(num_dirs=10, num_thresh=10) # chooses 10 uniform directions and 10 thresholds + >>> result = ect.calculate(complex) + >>> result.plot() """ def __init__(