mufasa.map#

Data types for spatially distributed detections, i.e. over an area.

Classes#

BoundingBox

Map

Spatially distributed detection, rasterized to a geo-referenced data array, at some timestamp.

BayesianMap

Map subtype that stores data in log-odds space.

Module Contents#

class mufasa.map.BoundingBox#

Bases: NamedTuple

min_x: float#
min_y: float#
max_x: float#
max_y: float#
class mufasa.map.Map(data: numpy.ndarray, transform: rasterio.transform.Affine, crs: CRS | None = None, *, timestamp: float = 0.0)#

Spatially distributed detection, rasterized to a geo-referenced data array, at some timestamp. Geo-referencing via an affine transformation and a crs.

Parameters:
  • data (numpy.ndarray)

  • transform (rasterio.transform.Affine)

  • crs (CRS | None)

  • timestamp (float)

data#
transform#
crs = None#
timestamp = 0.0#
classmethod from_bounds(bounds: BoundingBox, resolution: tuple[float, float], crs: str | CRS | None = None) → Map#
Parameters:
  • bounds (BoundingBox)

  • resolution (tuple[float, float])

  • crs (str | CRS | None)

Return type:

Map

property bbox: BoundingBox#
Return type:

BoundingBox

copy() → Map#
Return type:

Map

reproject(crs: str | CRS, bbox: BoundingBox, resolution: tuple[float, float]) → Map#
Parameters:
  • crs (str | CRS)

  • bbox (BoundingBox)

  • resolution (tuple[float, float])

Return type:

Map

class mufasa.map.BayesianMap(data: numpy.ndarray, transform: rasterio.transform.Affine, crs: CRS | None = None, *, timestamp: float = 0.0)#

Bases: Map

Map subtype that stores data in log-odds space.

Used by Bayesian fusion nodes to avoid repeated logit/expit round-trips.

Parameters:
  • data (numpy.ndarray)

  • transform (rasterio.transform.Affine)

  • crs (CRS | None)

  • timestamp (float)

property probabilities: numpy.ndarray#

Return a copy of the map data converted to probabilities in [0, 1].

Return type:

numpy.ndarray