-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrHyperSpec_pdf_report.Rnw
More file actions
195 lines (164 loc) · 6.84 KB
/
rHyperSpec_pdf_report.Rnw
File metadata and controls
195 lines (164 loc) · 6.84 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
\documentclass[letterpaper]{article}
\author{}
\usepackage{longtable} %allow long form tables
\usepackage{rotating} %allow for tables to be rotated [not used currently]
\usepackage[margin=0.5in]{geometry}
\title{rHyperSpec Results}
\begin{document}
\maketitle
<<setup, results='hide', echo=FALSE>>=
library(xtable)
addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- c(0)
addtorow$command <- c(paste("\\hline \n",
"\\endhead \n",
"\\hline \n",
"{\\footnotesize Continued on next page} \n",
"\\endfoot \n",
"\\endlastfoot \n",sep=""))
@
<<metadata_table, results='hide', echo=FALSE>>=
mddata <- read.csv("output/outputFiles/tables/metadata.csv")
mdtable <- xtable(mddata, caption = "\\textbf{Metadata for hyperspectral data analysis}",
align = "llp{12cm}", floating = F, latex.environments = "left")
@
<<print_metadata, results = 'asis', echo=FALSE>>=
print(mdtable,
tabular.environment = "longtable",
floating = FALSE,
include.rownames = FALSE, # because addtorow will substitute the default row names
add.to.row = addtorow, # this is where you actually make the substitution
hline.after=c(-1),
caption.placement = "top")
@
\newpage
\begin{figure}[h!]
\centering
\caption{Raw Calibration Panel Irradiance}
\includegraphics[width=\columnwidth]{outputFiles/plots/calibration_raw_irradiance_plot.png}
\label{fig:cal_irrad}
\end{figure}
\begin{figure}[h!]
\centering
\caption{Raw Calibration Panel Radiance}
\includegraphics[width=\columnwidth]{outputFiles/plots/calibration_raw_radiance_plot.png}
\label{fig:cal_rad}
\end{figure}
\begin{figure}[h!]
\centering
\caption{Calibration Panel Reflectance}
\includegraphics[width=\columnwidth]{outputFiles/plots/calibration_reflectance_plot.png}
\label{fig:cal_refl}
\end{figure}
\newpage
\begin{figure}[h!]
\centering
\caption{Raw Event Irradiance}
\includegraphics[width=\columnwidth]{outputFiles/plots/event_raw_irradiance_plot.png}
\label{fig:event_irrad}
\end{figure}
\begin{figure}[h!]
\centering
\caption{Raw Event Radiance}
\includegraphics[width=\columnwidth]{outputFiles/plots/event_raw_radiance_plot.png}
\label{fig:event_rad}
\end{figure}
\begin{figure}[h!]
\centering
\caption{Event Average Normalized Reflectance}
\includegraphics[width=\columnwidth]{outputFiles/plots/event_reflectance_plot.png}
\label{fig:event_refl}
\end{figure}
\newpage
\begin{figure}[h!]
\centering
\caption{Reflectance Map (by location and wavelength)}
\includegraphics[width=\columnwidth]{outputFiles/plots/reflectance_map.png}
\label{fig:refl_map}
\end{figure}
\begin{figure}[h!]
\centering
\caption{Plot of selected three indices (see legend)}
\includegraphics[width=\columnwidth]{outputFiles/plots/triple_index_plot.png}
\label{fig:triple_index_plot}
\end{figure}
\newpage
<<index_list_table, results='hide', echo=FALSE>>=
indexdata <- read.csv("Indices.csv")
indextable <- xtable(indexdata[,c(1,2,7,9)], caption = "\\textbf{Indices Calculated by rHyperSpec.} These indices come from a list kindly provided by Fred Huemmrich. The list may be updated periodically.",
digits = 2, align = "lp{3cm}p{2cm}p{3cm}p{7cm}")
@
<<print_index_list, results = 'asis', echo=FALSE>>=
print(indextable, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top")
@
\newpage
<<indices_calculated_summary_table, results='hide', echo=FALSE>>=
cisdata <- read.csv("outputFiles/tables/indices-calculated-summary.csv")
cistable <- xtable(cisdata, caption = "\\textbf{Summary of Calculated Indices}", digits = 2)
@
<<print_index_summary, results = 'asis', echo=FALSE>>=
print(cistable, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top")
@
\newpage
<<indices_calculated_all_table_1, results='hide', echo=FALSE>>=
ciadata <- read.csv("outputFiles/tables/indices-calculated-all.csv")
ciatable1 <- xtable(ciadata[,1:12],
caption = "\\textbf{Calculated Indices for Each Location, Group 1}", digits = 3)
@
<<print_index_all_1, results = 'asis', echo=FALSE>>=
print(ciatable1, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top", latex.environments = "left")
@
<<indices_calculated_all_table_2, results='hide', echo=FALSE>>=
ciatable2 <- xtable(ciadata[,c(1,13:23)],
caption = "\\textbf{Calculated Indices for Each Location, Group 2}", digits = 3)
@
<<print_index_all_2, results = 'asis', echo=FALSE>>=
print(ciatable2, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top", latex.environments = "left")
@
<<indices_calculated_all_table_3, results='hide', echo=FALSE>>=
ciatable3 <- xtable(ciadata[,c(1,24:35)],
caption = "\\textbf{Calculated Indices for Each Location, Group 3}", digits = 3)
@
<<print_index_all_3, results = 'asis', echo=FALSE>>=
print(ciatable3, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top", latex.environments = "left")
@
<<indices_calculated_all_table_4, results='hide', echo=FALSE>>=
ciatable4 <- xtable(ciadata[,c(1,36:47)],
caption = "\\textbf{Calculated Indices for Each Location, Group 4}", digits = 3)
@
<<print_index_all_4, results = 'asis', echo=FALSE>>=
print(ciatable4, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top", latex.environments = "left")
@
<<indices_calculated_all_table_5, results='hide', echo=FALSE>>=
ciatable5 <- xtable(ciadata[,c(1,48:59)],
caption = "\\textbf{Calculated Indices for Each Location, Group 5}", digits = 3)
@
<<print_index_all_5, results = 'asis', echo=FALSE>>=
print(ciatable5, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top", latex.environments = "left")
@
<<indices_calculated_all_table_6, results='hide', echo=FALSE>>=
ciatable6 <- xtable(ciadata[,c(1,60:ncol(ciadata))],
caption = "\\textbf{Calculated Indices for Each Location, Group 6}", digits = 3)
@
\flushleft
<<print_index_all_6, results = 'asis', echo=FALSE>>=
print(ciatable6, tabular.environment = "longtable", floating = FALSE,
include.rownames = FALSE, add.to.row = addtorow,
hline.after=c(-1), caption.placement = "top", latex.environments = "left")
@
\end{document}