API
Wahoo.track — Function
Tracks the location of the fish
track(;pos_init::Matrix,
tsave::AbstractVector = 1:100,
bathymetry::GeoArrays.GeoArray,
observations::Vector,
observation_models::Vector{Function},
sensor_positions::Vector,
spatial_resolution,
movement_std,
smoother::Bool = true,
filter::Bool = false,
n_trajectories::Int = 0,
show_progressbar::Bool = !is_logging(stderr),
precision = Float32)Infers the location of the animal based on a diffusion model and smoothing.
Keyword Arguments
pos_init::Matrix: Initial probability distribution of the fish position.tsave::AbstractVector: Time steps at which the probability map is saved.bathymetry: Bathymetric data asGeoArray.spatial_resolution: the spatial resolution [m] of thebathymetry.movement_std: Standard deviation of the fish movement within one time step [m].observations: Vector holding all observations. Each element contains the observation of a separate sensor.observation_models::Vector{Function}: Vector containing the observation model for each sensor.sensor_positions: Vector of tuples of coordinates ornothing, i.e.Vector{Union{Nothing, Tuple{Real, Real}}}.smoother = true: iftruethe probabilities from the smoother run are returned.filter = false: iftruethe probabilities from the filter run are returned.n_trajectories = 0: Number of trajectories to sample.show_progressbar = !is_logging(stderr): defaults totruefor interactive use.precision = Float32: numerical floating point type used for computations.
Note, the elements of the vectors observations, observation_models, and sensor_positions must be sorted in the same way, i.e. the elements at the same position in the Vectors refer to the same sensor.
Return
A named tuple with the following elements:
log_p: Log probability of the observations, $\log p(\mathbf{y}_{1:T})$.tsave: Vector of time steps at which the results are saved.trajectories: Sampled trajectories ifn_trajectories> 0, otherwisenothing.
Additionally, if smoother = true:
pos_smoother: $\Pr(\mathbf{s}_t \mid \mathbf{y}_{1:T})$, the smoothed probability distribution of the fish positions for all timesteps intsave.residence_dist: Residence distribution, $\frac{1}{T}\sum_{t=1}^{T}\Pr(\mathbf{s}_t\mid \mathbf{y}_{1:T})$.
Additionally, if filter = true:
pos_filter: $\Pr(\mathbf{s}_t \mid \mathbf{y}_{1:t})$, the filtered probability distribution of the fish positions.