Description Usage Arguments Value Examples
A two-stage routine is used to remove erroneous detections and determine the best detection for each fish in each study period. In removing erroneous signals and determining the location of fish, the function draws from the functionality of the R packages riverdist. The function combined the contents of raw_data, removing the detections that occurred d_1 meters away from the river system, and determines the location of each fish in each detection period. In short, the fish location is considered to be the location on the river network where the highest power detection occurred for each fish in each detection period subject to two constraints: 1) n_d other detections must occur within d_2 meters from the highest power detection, and 2) there must be a negative linear relationship between the signal strength and the distance between the detection and associated the highest power detection the distance from the highest powered detection for all detections occurrring within d_2 meters from the highest power detection. In simpler terms, the signal stength increases as the highest power detection is approached.
1 | get_locations(raw_data, flight_group, source_vec, river_network, n_d, d_1, d_2)
|
raw_data |
The output of |
flight_group |
A numerical vector encoding the detection period (flight group) associated with each data.frame in raw.data. |
river_network |
A river_network object discribing the riversystem topology (the output of |
n_d |
See description |
d_1 |
See description |
d_2 |
See description |
Returns a data.frame containing the best locations. The data.frame can be used as input to the following functions: make_plot
, flag_dead_fish
, and hmm_survival
.
1 2 3 4 5 | names(raw_data)
flight_group <- flight_group <- c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,5,5,5,5,6,6,7,7,7,7,8,8)
source_vec <- c(rep(c("belly","wing"), 10), rep(c("wing","belly"),2), c("belly","wing"))
best_locations <- get_locations(raw_data, flight_group, source_vec, river_net, n_d=5, d_1=1000, d_2=5000)
make_plot(sldf, best_locations, open_maps=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.