swifco_rs.init_map module¶
The local breeding capacity \(BC_{ij}\) of each cell is initialised from spatially structured wild boar density estimates, for example using [Pittiglio_2018]. The breeding capacity is often calculated as
following the regression \(density\_estimate = f(BC)\). Individual cell values can be assigned by drawing from a Poisson distribution with mean value BCij as a sort of stochastic rounding.
Alternatively, a self-consistent calibration can be perform where the coefficient a is the result of an optimization where the difference in the densities produce by the model and the initial density estimates is minimized.
Each cell is connected to eight neighbouring units (Moore neighbourhood).
- swifco_rs.init_map.callback(size, callback)¶
Map initializer which determines the breeding capacity by calling back into Python code
Parameters:
size - tuple of map size in cells
callback - a Python function which is passed the x and y coordinates and is expected to return an integer breeding capacity
- swifco_rs.init_map.callback_poisson(size, callback)¶
Map initializer which determines the breeding capacity by calling back into Python code, and drawing from a Poisson distribution using the result
Parameters:
size - tuple of map size in cells
callback - a Python function which is passed the x and y coordinates and is expected to return a float breeding capacity to used as parameter for the Poisson distribution
- swifco_rs.init_map.random_uniform(size=(100, 100), limits=(0, 5))¶
Map initializer with uniformly distributed random breeding capacity
Parameters:
size - tuple of map size in cells
limits - tuple of breeding capacity distribution limits (upper exclusive)