Introduction

StructuralGT is a Python package for graph theoretic analysis of image data. Originally prototyped as a GUI based package for microscopy data, [VMHK21] the package outlined in this documentation is designed for terminal-based use. Addtionally, this package offers the possibility of analysing 3-dimensional datasets and property predictions. Initial graph theoretic studies of microscopy datasets have shown structural differences betweeen disordered architectures of various nanoscale materials. This API offers the users the possiblility of performing analysis beyond what has been reported in the literature. Some basic examples of analyses are given in Examples.

All analyses carried out with StructuralGT involve a Network class, which represents the system being studied. To motivate its construction, we first outline the conceptual difference between a network and a graph. Networks are real-world objects which exhibit a structure akin to points linked by connections. Their study belongs to the discipline of network science and examples may include social networks, internet networks, or material networks. The mathematical objects which abstract these structures are graphs, and the discipline which examines them is graph theory. A graph may be defined only by its nodes and connecting edges. While the nodes and edges may contain attributes, to give further detail, a large part of the network’s description is lost as a result of its abstraction into a graph (most notably, its geometric features). Hence we construct the Network class to contain a conventional graph, and all other information that would be otherwise lost. Specifically, after the appropriate graph extraction methods have been called, the Network class is populated with a graph attribute.

The second component required for analysis in StructuralGT is a Compute class, which represents the calculations being carried out on the system (i.e. Network class). All compute methods may be instantiated with a weight type, to specify whether graph weights are to be used in the calculations. Compute modules contain a compute() method, which populates the object with attributes containing the results of the calculations. Generally, compute modules call a mixture of python functions and fast graph theoretic computations, via the igraph C library [CN05]. When the user wishes to carry out their own custom analysis with C-level speed, they may implement their own C routines, which expose the results to the Python API. Instructions on this implementation are given in Adding C++ Scripts.