4 Light map
In the advanced tutorial, we construct the same three products with a Great Reed Warbler (18LX), this time including light and wind data.

This first chapter focuses on constructing a likelihood map from light data. This step is optional in the workflow, but can be helpful in most case. Typically, it is quite informative for short stopovers with long flights before and after. It can also be helpful to cross-check pressure map can reduce the computational cost of the creation of the graph.
Here, we use an approach based on the threshold method and using a calibration of zenith angle (rather than time of sunrise). This approach is presented in more detail in section 2.4 of Nussbaumer et al. (2023).
A more thorough introduction to geolocation with light data can be found in the geolocation manual (Lisovski et al. 2020). Note that other methods producing likelihood maps could also be used such as the ones presented in Basson et al. (2016) or Bindoff et al. (2018).
4.1 Basic tutorial catch up
Before getting into light data, we first need to create, label, and set the map for the tag object. We essentially perform the same steps than in Tag object and Pressure map in just a few lines using the native pipe operator |>. Note that this assumes the labelling has already been done.
tag <- tag_create(
"18LX",
crop_start = "2017-06-20",
crop_end = "2018-05-02",
quiet = TRUE
) |>
tag_label(quiet = TRUE) |>
tag_set_map(
extent = c(-16, 23, 0, 50),
scale = 4,
known = data.frame(
stap_id = 1,
known_lat = 48.9,
known_lon = 17.05
)
) |>
geopressure_map(quiet = TRUE)4.2 Estimate twilights
We find the twilight (time of sunrise and sunset every day) with twilight_create(), which performs the same tasks as TwGeos::FindTwilight(), but using a matrix representation. This approach is faster but possibly less general.
By default, the threshold of light twl_thr is automatically defined as the first and last light of the day (i.e., tag$light$value>0). The twl_offset parameter is used to centre the night/day for the matrix representation of light. A good centring is necessary to find the correct twilights.
tag <- twilight_create(tag, twl_thr = NULL, twl_offset = NULL)We can visualize the twilight and check the centering of the day.
plot(tag, type = "twilight")