kinetic_ising {spatialising} | R Documentation |
Ising model for spatial data
Description
Performs simulations based on the given parameters of the Ising model
Usage
kinetic_ising(
x,
B,
J,
updates = 1,
iter,
rule = "glauber",
inertia = 0,
version = 1,
progress = FALSE
)
Arguments
x |
SpatRaster or matrix containing two values: -1 and 1 |
B |
External pressure (positive or negative): it tries to align cells' values with its sign |
J |
Strength of the local autocorrelation tendency (always positive): it tries to align signs of neighboring cells |
updates |
Specifies how many sets of iterations are performed on the input object.
The output of this function has as many layers as the |
iter |
Specifies how many iterations are performed on the input object. By default it equals to the number of values in the input object. |
rule |
IM temporal evolution rule: either |
inertia |
Represents the modification of the algorithm aimed at suppressing the salt-and-pepper noise of the focus category present when simulating evolution of a coarse-textured pattern. With Q > 0, small patches of the focus category are not generated, thus eliminating the salt-and-pepper noise of the focus category |
version |
By default, |
progress |
TRUE/FALSE |
Value
Object of the same class as x
with the number of layers specified by updates
References
Ising, E., 1924. Beitrag zur theorie des ferro-und paramagnetismus. Ph.D. thesis, Grefe & Tiedemann.
Onsager, L., 1944. Crystal statistics. I. A two-dimensional model with an order-disorder transition. Physical Review 65 (3-4), 117.
Brush, S. G., 1967. History of the Lenz-Ising model. Reviews of modern physics 39 (4), 883.
Cipra, B. A., 1987. An introduction to the Ising model. The American Mathematical Monthly 94 (10), 937–959.
Examples
data(r_start, package = "spatialising")
ts1 = kinetic_ising(r_start, B = -0.3, J = 0.7)
ts10 = kinetic_ising(r_start, B = -0.3, J = 0.7, updates = 10)
r1 = terra::rast(system.file("raster/r_start.tif", package = "spatialising"))
terra::plot(r1)
r2 = kinetic_ising(r1, B = -0.3, J = 0.7)
terra::plot(r2)
library(terra)
ri1 = kinetic_ising(r1, B = -0.3, J = 0.7, updates = 9)
plot(ri1)
ri2 = kinetic_ising(r1, B = 0.3, J = 0.7, updates = 9)
plot(ri2)
ri3 = kinetic_ising(r1, B = -0.3, J = 0.4, updates = 9)
plot(ri3)