plot_slopes_by_location: plots log of observed versus expected slope by time for a...

View source: R/data_preparation.R

plot_slopes_by_locationR Documentation

plots log of observed versus expected slope by time for a known location

Description

The function calculates and plots calibration slopes for sunsets and sunrises for every day of the tracking period, based on the assumption that the tag remained in the same (calibration) location all the time.

Usage

plot_slopes_by_location(
  Proc.data,
  location,
  log.light.borders = "auto",
  log.irrad.borders = "auto",
  ylim = NULL,
  xlim = NULL
)

Arguments

Proc.data

processed data object generated by get.tags.data

location

vector with longitude and latitude of calibration location (degrees).

log.light.borders

numeric vector with length of 2 for minimum and maximum log(light) levels to use. Default value 'auto', will take these values from the Proc.data object.

log.irrad.borders

numeric vector with length of 2 for minimum and maximum log(irradiance) values to use. Default value 'auto', will take these values from the Proc.data object.

ylim

the y limits of the plot. The default value, NULL, indicates that the range of the finite values to be plotted should be used.

xlim

the x limits of the plot. The default value, NULL, otherwise can be POSIXct or character in a form readable by as.POSIXct.

Details

The plot of calibration slopes is used for finding start and end dates of a calibration period (the time period, during which the tag remained in the calibration location with coordinates (x,y)). During the calibration period, the calibration slopes vary little both, between the twilight events (sunrises and sunsets) and in time. When the tag changes location, the slopes for sunrises and sunsets start to deviate. There may potentially be several calibration periods for the same location (if the bird returned to the same location several times). The boundaries (start and end dates) of each of these periods are captured visually. If there were more than one calibration location, the procedure is repeated, once for each location. All the obtained calibration periods can be entered in a data frame 'Calibration.periods', for further analysis. Each line of the data frame contains start and end dates (if applicable) of the calibration period and geographic coordinates of the location.

Value

'NULL'

Author(s)

Eldar Rakhimberdiev

Examples

File<-system.file("extdata", "Godwit_TAGS_format.csv", package = "FLightR")
Proc.data<-get.tags.data(File)
plot_slopes_by_location(Proc.data=Proc.data, location=c(5.43, 52.93))
abline(v=as.POSIXct("2013-08-20", tz='GMT')) # end of first calibration period
abline(v=as.POSIXct("2014-05-05", tz='GMT')) # start of the second calibration period


eldarrak/FLightR documentation built on Nov. 10, 2023, 7:53 a.m.