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: Optional[str] = None, node_ids: Optional[List[int]] = None, data: Optional[numpy.array] = 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: numpy.array¶
Returns full 2 dimensional NumPy array with report data. Shape is (#values, #nodes).
- property nodes: Dict[int, emod_api.spatialreports.spatial.SpatialNode]¶
Returns dictionary of SpatialNodes keyed on node ID.