emod_api.spatialreports.spatial module#
emod-api spatial report module. Exposes SpatialReport and SpatialNode objects.
- class emod_api.spatialreports.spatial.SpatialNode(node_id: int, data)[source]#
Bases:
object
Class representing a single node of a spatial report.
- property data#
Time series data for this node.
- class emod_api.spatialreports.spatial.SpatialReport(filename: str | None = None, node_ids: List[int] | None = None, data: array | None = None, start: int = 0, interval: int = 1)[source]#
Bases:
object
Class for reading (and, optionally, writing) spatial reports in EMOD/DTK format. “Filtered” reports will have start > 0 and/or reporting interval > 1.
- property data: array#
Returns full 2 dimensional NumPy array with report data. Shape is (#values, #nodes).
- property nodes: Dict[int, SpatialNode]#
Returns dictionary of SpatialNodes keyed on node ID.