/
spectral-signatures.Rmd
executable file
·91 lines (76 loc) · 3.13 KB
/
spectral-signatures.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
title: "Spectral signatures"
output:
workflowr::wflow_html:
includes:
in_header: header.html
editor_options:
chunk_output_type: console
author: "Patrick Schratz"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
fig.retina = 3,
fig.align = "center",
fig.width = 6.93,
fig.height = 6.13,
out.width = "100%",
echo = FALSE
)
source(here::here("code/99-packages.R"))
sourceDirectory("R")
# load drake objects
loadd(data_hs_preprocessed)
library("hsdar")
library("cowplot")
library("magrittr")
library("purrr")
library("dplyr")
```
# Spectral signatures of plots
Spectral signatures for plots
- Laukiz 1
- Laukiz 2
- Luiando
- Oiartzun
for the wavelength range of 400 nm - 1000 nm.
Values represent the mean reflectance of all observations at the respective wavelength.
```{r spectral-signatures-1}
data_hs_preprocessed = data_hs_preprocessed[c("laukiz1", "laukiz2", "luiando", "oiartzun")]
```
```{r spectral-signatures-2}
wavelength <- c(404.08, 408.5, 412.92, 417.36, 421.81, 426.27, 430.73, 435.20,
439.69, 444.18, 448.68, 453.18, 457.69, 462.22, 466.75, 471.29,
475.83, 480.39, 484.95, 489.52, 494.09, 498.68, 503.26, 507.86,
512.47, 517.08, 521.70, 526.32, 530.95, 535.58, 540.23, 544.88,
549.54, 554.20, 558.86, 563.54, 568.22, 572.90, 577.60, 582.29,
586.99, 591.70, 596.41, 601.13, 605.85, 610.58, 615.31, 620.05,
624.79, 629.54, 634.29, 639.04, 643.80, 648.56, 653.33, 658.10,
662.88, 667.66, 672.44, 677.23, 682.02, 686.81, 691.60, 696.40,
701.21, 706.01, 710.82, 715.64, 720.45, 725.27, 730.09, 734.91,
739.73, 744.56, 749.39, 754.22, 759.05, 763.89, 768.72, 773.56,
778.40, 783.24, 788.08, 792.93, 797.77, 802.62, 807.47, 812.32,
817.17, 822.02, 826.87, 831.72, 836.57, 841.42, 846.28, 851.13,
855.98, 860.83, 865.69, 870.54, 875.39, 880.24, 885.09, 889.94,
894.79, 899.64, 904.49, 909.34, 914.18, 919.03, 923.87, 928.71,
933.55, 938.39, 943.23, 948.07, 952.90, 957.73, 962.56, 967.39,
972.22, 977.04, 981.87, 986.68, 991.50, 996.31)
```
```{r spectral-signatures-3 }
speclibs <- map(data_hs_preprocessed, ~ speclib(.x, wavelength))
```
```{r spectral-signatures-4}
plot_laukiz1 = plot(speclibs[[1]], main = "Laukiz 1", ylim = c(0, 350))
#abline(v = 773.56, new = FALSE, col = "#BC3C29") # 80
#text("Band 80\n (773 nm)", x = 550, y = 330, col = "darkgreen")
plot_laukiz2 = plot(speclibs[[2]], main = "Laukiz 2", ylim = c(0, 350))
#abline(v = 817.17, new = FALSE, col = "#0072B5") # 89
#text("Band 89\n (817 nm)", x = 550, y = 330, col = "darkgreen")
plot_luiando = plot(speclibs[[3]], main = "Luiando", ylim = c(0, 350))
#abline(v = 846.28, new = FALSE, col = "#E18727") # 95
# text("Band 70\n (725 nm)", x = 450, y = 330, col = "blue")
plot_oiartzun = plot(speclibs[[4]], main = "Oiartzun", ylim = c(0, 350))
#abline(v = 503.26, new = FALSE, col = "#20854E") # 23
# text("Band 70\n (725 nm)", x = 450, y = 330, col = "blue")
plot_grid(plot_laukiz1, plot_laukiz2, plot_luiando, plot_oiartzun, ncol = 2)
```