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)¶ Bases:
object
Class representing a single node of a spatial report.
-
property
id
¶ Node ID
-
property
data
¶ Time series data for this node.
-
property
-
class
emod_api.spatialreports.spatial.
SpatialReport
(filename: str = None, node_ids: List[int] = None, data: numpy.array = None, start: int = 0, interval: int = 1)¶ 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
¶ Returns full 2 dimensional NumPy array with report data. Shape is (#values, #nodes).
-
property
node_ids
¶ Returns list of node IDs (integers) for nodes in the report.
-
property
nodes
¶ Returns dictionary of SpatialNodes keyed on node ID.
-
property
node_count
¶ Number of nodes in the report.
-
property
time_steps
¶ Number of samples in the report.
-
property
start
¶ Time step of first sample.
-
property
interval
¶ Interval, in time steps, between samples.
-
property