From 6b27436315b04b463fa3d7ed82eb9ada3271d4ea Mon Sep 17 00:00:00 2001 From: Draga Doncila Date: Mon, 4 Dec 2023 15:01:11 +1100 Subject: [PATCH] Fix some documentation --- README.md | 7 +++++-- src/traccuracy/_tracking_graph.py | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b0b3adc..700fba1e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The `traccuracy` library has three main components: loaders, matchers, and metri Loaders load tracking graphs from other formats, such as the CTC format, into a [TrackingGraph](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/index.html#traccuracy.TrackingGraph) object. A TrackingGraph is a spatiotemporal graph. Nodes represent a single cell in a given time point, and are annotated with a time and a location. -Edges point from a node representing a cell in time point `t` to the same cell or its daughter in `t+1`. +Edges point forward in time from a node representing a cell in time point `t` to the same cell or its daughter in frames `t+1` (or beyond, to represent gap closing). To load TrackingGraphs from a custom format, you will likely need to implement a loader: see documentation [here](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/loaders/index.html#module-traccuracy.loaders) for more information. @@ -55,4 +55,7 @@ pipelines, [documented here](https://traccuracy.readthedocs.io/en/latest/cli.htm : A single non-dividing cell tracked over time. In graph terms, this is the connected component of a track between divisions (daughter to next parent). Tracklets can also start or end with a non-dividing cell at the beginning and end of the captured time or if the track leaves the field of view. **Track** -: A single cell and all of its progeny. In graph terms, a connected component including divisions. \ No newline at end of file +: A single cell and all of its progeny. In graph terms, a connected component including divisions. + +**Gap-Closing** +: Also known as *frame-skipping*, these are edges that connect non-consecutive frames to signify a cell being occluded or missing for some frames, before the track continues. \ No newline at end of file diff --git a/src/traccuracy/_tracking_graph.py b/src/traccuracy/_tracking_graph.py index 082e0ac3..8f21bc62 100644 --- a/src/traccuracy/_tracking_graph.py +++ b/src/traccuracy/_tracking_graph.py @@ -81,6 +81,9 @@ class TrackingGraph: location (defaults to 'x' and 'y'). As in networkx, every cell must have a unique id, but these can be of any (hashable) type. + Edges typically connect nodes across consecutive frames, but gap closing or frame + skipping edges are valid, which connect nodes in frame t to nodes in frames beyond t+1. + We provide common functions for accessing parts of the track graph, for example all nodes in a certain frame, or all previous or next edges for a given node. Additional functionality can be accessed by querying the stored networkx graph