Estimates a likelihood map for each stationary period based on observed magnetic data (intensity and inclination) compared to the expected values from the World Magnetic Model (WMM).
Usage
geomag_map(
tag,
compute_known = FALSE,
sd_e_f = 0.007,
sd_e_i = 5,
sd_m_f = 0.01,
sd_m_i = 3.2,
ref_map = geomag_map_ref(tag),
quiet = FALSE
)
Arguments
- tag
- compute_known
Logical. If TRUE, computes likelihood maps for known stationary periods; if FALSE, fixes the likelihood at the known location.
- sd_e_f
Numeric. Standard deviation of observation noise of intensity error (single value or one per stap).
- sd_e_i
Numeric. Standard deviation of observation noise of inclination error (single value or one per stap).
- sd_m_f
Numeric. Standard deviation of stationary-period-specific noise of intensity error (single value or per stap).
- sd_m_i
Numeric. Standard deviation of stationary-period-specific noise of inclination error (single value or per stap).
- ref_map
Raster stack or list. Reference magnetic maps (intensity and inclination) computed by default using
geomag_map_ref()
. Provide it if you've already computed it to save computational time.- quiet
Logical. If TRUE, suppresses progress messages.
Value
A GeoPressureR tag object with likelihood maps added as:
tag$map_magnetic_intensity
tag$map_magnetic_inclination
tag$map_magnetic
and updated parameters intag$param
.
Examples
library(GeoPressureR)
withr::with_dir(system.file("extdata", package = "GeoMag"), {
tag <- tag_create("14DM", quiet = TRUE)
tag <- tag_label(tag, quiet = TRUE)
tag <- tag_set_map(tag,
extent = c(-18, 23, 0, 50),
scale = 2,
known = data.frame(
stap_id = c(1, -1),
known_lon = 7.27,
known_lat = 46.19
)
)
tag <- geomag_calib(tag, quiet = TRUE)
tag <- geomag_map(tag, quiet = TRUE)
plot(tag, type = "map_magnetic_intensity")
plot(tag, type = "map_magnetic_inclination")
})
#> ℹ Using raw magnetic data for calibrationd data
#> Calculating Magnetic Field map ■■■■■■■■■■■■■ 39% | ETA: 2s
#> Calculating Magnetic Field map ■■■■■■■■■■■■■■■■■■■■■■■■■■ 83% | ETA: 0s
#> Calculating Magnetic Field map ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100% | ETA: 0s