Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions doc_source/ECTResult.md
Original file line number Diff line number Diff line change
@@ -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:
```
9 changes: 1 addition & 8 deletions doc_source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion doc_source/ect_on_graphs.md → doc_source/ect.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ECT on Graphs
# ECT

```{eval-rst}
.. automodule:: ect.ect
Expand Down
2 changes: 1 addition & 1 deletion doc_source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion doc_source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Table of Contents

Embedded Complex <embed_complex.md>
Validation System <validation.md>
ECT on graphs <ect_on_graphs.md>
ECT <ect.md>
ECTResult <ECTResult.md>
Directions <directions.md>
34 changes: 24 additions & 10 deletions src/ect/ect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down
Loading