generate_observedcounts: Generate observed counts from the set of bird trajectories.
Description
Generate observed counts from the set of bird trajectories.
Usage
generate_observedcounts(migr, traj, mask)
Arguments
migr
A migration structure (attributes site_name, horizon, initial_state are used).
traj
A trajectory matrix with a trajectory for each bird.
For each bird, at each time step (from 0 to horizon), position of the bird.
positions: sites, 0 for flying, -1 for dead.
matrix N x (horizon + 1)
mask
Boolean matrix (horizon x S) indicating the available observations,
(mask(t,i)=TRUE if site i is observed at time t).
Value
Counts of observed birds on sites for time steps from 1 to horizon,
from the provided set of bird trajectories,
matrix (S + 2) x (horizon + 1).
At each time step, count of birds observed on each site.
NA correspond to non observation.
For compatibility with trajectory, the first column (time step 0) and
the 2 last rows ( S+1 and S+2) are kept and filled with NA.