R

R

spectropath takes a two-column path, with an ordered coordinate in the first column and the measured signal in the second.

Minimal workflow

library(spectropath)

u <- seq(-5, 5, length.out = 500)
f <- dnorm(u, 0, 1) + 0.25 * dnorm(u, 1.8, 0.45)
path <- cbind(u, f)

path_features(path)
classical_features(path)

Symmetric profile

u <- seq(-5, 5, length.out = 500)
f <- dnorm(u, 0, 1)
path <- cbind(u, f)

path_features(path)
      p2  p_pm  p3u    p3F    p4F p4T
  0.0000 0.000 0.000 -0.1601 0.3974 0

Asymmetric wing

u <- seq(-5, 5, length.out = 500)
f <- dnorm(u, 0, 1) + 0.25 * dnorm(u, 1.8, 0.45)
path <- cbind(u, f)

path_features(path)
      p2  p_pm     p3u    p3F    p4F    p4T
 -0.3133 0.000 -0.0169 -0.1736 0.4534 0.0132

Mixed emission and absorption

u <- seq(-5, 5, length.out = 500)
f <- dnorm(u, 0.8, 0.7) - 0.45 * dnorm(u, -1.2, 0.35)
path <- cbind(u, f)

path_features(path)
      p2    p_pm    p3u    p3F    p4F   p4T
 -0.2368 -0.3125 0.0217 -0.0842 0.2988 0.0411

The Functions page gives the paper notation and the public function list.