-
Notifications
You must be signed in to change notification settings - Fork 6
/
hmtk_tutorial.tex
435 lines (368 loc) · 15 KB
/
hmtk_tutorial.tex
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The Legrand Orange Book
% LaTeX Template
% Version 1.4 (12/4/14)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Mathias Legrand ([email protected])
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Compiling this template:
% This template uses biber for its bibliography and makeindex for its index.
% When you first open the template, compile it from the command line with the
% commands below to make sure your LaTeX distribution is configured correctly:
%
% 1) pdflatex hmtk_tutorial
% 2) makeindex hmtk_tutorial.idx -s StyleInd.ist
% 3) biber hmtk_tutorial
% 4 makeglossaries hmtk_tutorial
% 4) pdflatex hmtk_tutorial x 2
%
% After this, when you wish to update the bibliography/index use the appropriate
% command above and make sure to compile with pdflatex several times
% afterwards to propagate your changes to the document.
%
% This template also uses a number of packages which may need to be
% updated to the newest versions for the template to compile. It is strongly
% recommended you update your LaTeX distribution if you have any
% compilation errors.
%
% Important note:
% Chapter heading images should have a 2:1 width:height ratio,
% e.g. 920px width and 460px height.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[11pt,fleqn]{book} % Default font size and left-justified equations
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry} % Page margins
\usepackage{xcolor} % Required for specifying colors by name
\definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the book
\usepackage{setspace}
% Font Settings
\usepackage{avant} % Use the Avantgarde font for headings
%\usepackage{times} % Use the Times font for headings
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Symbol, Chancery and Computer Modern fonts
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
% Bibliography
\usepackage{csquotes}
\usepackage{cprotect}
\usepackage[style=alphabetic,
sorting=nyt,
sortcites=true,
natbib=true,
style=authoryear,
maxcitenames=2,
maxbibnames=100,
autopunct=true,
babel=hyphen,
hyperref=true,
doi=true,
abbreviate=false,
backref=true,
uniquename=false,
uniquelist=false,
backend=biber]{biblatex}
\addbibresource{./bibliography/hazard.bib} % BibTeX bibliography file
\defbibheading{bibempty}{}
% Figure caption settings
\usepackage[textfont=it,margin=10pt,font=small,labelfont=bf,labelsep=endash]{caption}
\usepackage{subcaption}
\usepackage{rotating}
% Table
\usepackage{color, colortbl}
\definecolor{almond}{rgb}{0.94, 0.87, 0.8}
\definecolor{ashgrey}{rgb}{0.7, 0.75, 0.71}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}
% Index
\usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
\usepackage{makeidx} % Required to make an index
\makeindex % Tells LaTeX to create the files required for indexing
\usepackage{todonotes}
%
% Package to create a glossary - It must be uploaded after hyperref
% to produce the glossary: makeglossaries OQB
\usepackage[acronym,nonumberlist,style=altlist]{glossaries}
\glstoctrue
\makeglossaries
% package for bold symbols
\usepackage{bm}
%----------------------------------------------------------------------------------------
% Insert the commands.tex file which contains the majority of the structure
% behind the template
\input{structure}
\begin{document}
\lstset{language=Python} % For listings environment - use python
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Load the glossary
%\input{./book/glossary.tex}
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\begingroup
\thispagestyle{empty}
%\AddToShipoutPicture*{\put(6,5){\includegraphics[scale=1]{background}}} % Image background
\par\normalfont\fontsize{15}{15}\sffamily\selectfont
“OpenQuake: Calculate, share, explore”
\centering
\vspace*{9cm}
\par\normalfont\fontsize{35}{35}\sffamily\selectfont
Hazard Modeller's Toolkit - User Guide\par % Book title
\endgroup
%----------------------------------------------------------------------------------------
% COPYRIGHT PAGE
%----------------------------------------------------------------------------------------
\newpage
~\vfill
\thispagestyle{empty}
\noindent Copyright \copyright\ 2014 GEM Foundation\\ % Copyright notice
\noindent \textsc{Published by GEM Foundation}\\ % Publisher
\noindent \textsc{globalquakemodel.org/openquake}\\ % URL
\noindent
{\textbf{Citation}} \hfill \\
Please cite this document as:\\
Weatherill, G. A. (2014) OpenQuake Hazard Modeller's Toolkit - User Guide. \textit{Global Earthquake Model (GEM). Technical Report}\\
{\bf{Disclaimer}} \hfill \\
\noindent
The ``Hazard Modeller's Tookit - User Guide'' is distributed in the hope that it will be useful, but without any warranty: without
even the implied warranty of merchantability or fitness for a
particular purpose. While every
precaution has been taken in the preparation of this document, in
no event shall the authors of the manual and the GEM Foundation be
liable to any party for direct, indirect, special, incidental, or
consequential damages, including lost profits, arising out of the
use of information contained in this document or from the use of
programs and source code that may accompany it, even if the authors
and GEM Foundation have been advised of the possibility of such damage.
The Book provided hereunder is on as "as is" basis, and the authors
and GEM Foundation have no obligations to provide maintenance, support,
updates, enhancements, or modifications.
\hfill \\
The current version of the book has been revised only by members of
the GEM model facility and it must be considered a draft copy.
%
\vspace{0.4cm} \hfill \\
{\bf{License}} \hfill \\
This Book is distributed under the Creative Common License
Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)
(see link below). You can download this Book and share it with
others as long as you provide proper credit, but you cannot change
it in any way or use it commercially.
\hfill \\
%\noindent \textit{First printing, June 2014} % Printing/edition date
\noindent \textit{Edition 2, January 2021} % Printing/edition date
%----------------------------------------------------------------------------------------
% TABLE OF CONTENTS
%----------------------------------------------------------------------------------------
\chapterimage{./figures/chapter_head_1.pdf} % Table of contents heading image
\pagestyle{empty} % No headers
\tableofcontents % Print the table of contents itself
\cleardoublepage % Forces the first chapter to start on an odd page so it's on the right
\pagestyle{fancy} % Print headers again
%----------------------------------------------------------------------------------------
% CHAPTER 1
%----------------------------------------------------------------------------------------
\chapterimage{./figures/chapter_head_2.pdf} % Chapter heading image
\chapter{Introduction}
\label{chap:intro}
\input{./mtk_setup.tex}
%----------------------------------------------------------------------------------------
% CHAPTER 2
%----------------------------------------------------------------------------------------
\chapterimage{./figures/chapter_head_2.pdf} % Chapter heading image
\chapter{Catalogue Tools}
\label{chap:catalogue}
\input{./catalogue_tools.tex}
%----------------------------------------------------------------------------------------
% CHAPTER 3
%----------------------------------------------------------------------------------------
\chapterimage{./figures/chapter_head_1.pdf} % Chapter heading image
\chapter{Hazard Tools}
\label{chap:hazard}
\input{./hazard_tools.tex}
%----------------------------------------------------------------------------------------
% CHAPTER 4
%----------------------------------------------------------------------------------------
\chapterimage{./figures/chapter_head_1.pdf} % Chapter heading image
\chapter{Geology Tools}
\label{chap:geology}
\input{./geology_tools.tex}
%----------------------------------------------------------------------------------------
% CHAPTER 5
%----------------------------------------------------------------------------------------
\chapterimage{./figures/chapter_head_1.pdf} % Chapter heading image
\chapter{Geodetic Tools}
\label{chap:geodesy}
\input{./geodetic_tools.tex}
%----------------------------------------------------------------------------------------
% CHAPTER 6
%----------------------------------------------------------------------------------------
%\chapterimage{./figures/chapter_head_1.pdf} % Chapter heading image
%\chapter{Hazard Applications}
%\label{chap:hazard}
%\input{./hazard.tex}
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY
%----------------------------------------------------------------------------------------
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{\textcolor{ocre}{Bibliography}}
\section*{Books}
\addcontentsline{toc}{section}{Books}
\printbibliography[heading=bibempty,type=book]
\section*{Articles}
\addcontentsline{toc}{section}{Articles}
\printbibliography[heading=bibempty,type=article]
\section*{Other Sources}
\addcontentsline{toc}{section}{Reports}
\printbibliography[heading=bibempty,nottype=book,nottype=article]
%----------------------------------------------------------------------------------------
% INDEX
%----------------------------------------------------------------------------------------
\cleardoublepage
\phantomsection
\setlength{\columnsep}{0.75cm}
\addcontentsline{toc}{chapter}{\textcolor{ocre}{Index}}
\printindex
\printglossary
%----------------------------------------------------------------------------------------
\part{Appendices}
\appendix
% -----------------------------------------------------------------------------
% -----------------------------------------------------------------------------
\chapter{The 10 Minute Guide to Python!}
\label{sec:python_guide}
%\begin{myfancybox}
% The objectives of this chapter are:
%\begin{itemize}
% \item To introduce Python data types to facilitate use of the HMTK for Python beginners
% \end{itemize}
%\end{myfancybox}
\input{python_guide.tex}
\end{document}
%\documentclass[11pt,a4paper,headings=small,dvips]{scrbook}
%\input{configuration.tex}
%\usepackage{xcolor}
%\usepackage{framed}
%\usepackage[utf8]{inputenc}
%\usepackage{listings}
%
%\newenvironment{myfancybox}{%
% \def\FrameCommand{\fboxsep=\FrameSep \fcolorbox{blue01}{honeydew}}%
% \color{black}\MakeFramed {\FrameRestore}}%
% {\endMakeFramed}
%
%\setlength{\parskip}{2.5mm}
%\setlength{\parindent}{0.0mm}
%
%\begin{document}
%\setcounter{page}{1}
%\lstset{language=Python}
%
%\begin{titlepage}
% \title{ \textcolor{blue01}{\textsf{\bfseries\Huge
% Hazard Modeller's Toolkit
% }}}
% \subtitle{ \textcolor{blue01}{\textsf{\bfseries\LARGE
% Documentation \& Tutorial}}}
% \date{June 2014}
%
% \publishers{GEM Foundation, Pavia}
%\end{titlepage}
%\pagestyle{scrheadings}
%\maketitle
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Load the glossary
%%\input{glossary.tex}
%% -----------------------------------------------------------------------------
%% -----------------------------------------------------------------------------
%%\chapter*{Introduction}
%%\cleardoublepage
%% -----------------------------------------------------------------------------
%% -----------------------------------------------------------------------------
%\tableofcontents
%\cleardoublepage
%%
%% % -----------------------------------------------------------------------------
%\chapter{Introduction to the Hazard Modeller's Toolkit}
%\begin{myfancybox}
%The objectives of this chapter are:
%\begin{itemize}
% \item Outline the purpose and creation of the Hazard Modeller's Toolkit
% \item Setup and installation of the software
% \item Introduction to the visualisation and mapping functions
%\end{itemize}
%\end{myfancybox}
% \input{mtk_setup.tex}
%\cleardoublepage
%% % -----------------------------------------------------------------------------
%% % -----------------------------------------------------------------------------
%
%\chapter{Seismicity Tools}
%\begin{myfancybox}
%The objectives of this chapter are:
%\begin{itemize}
% \item Describe features of the seismicity tools of the Hazard Modeller's Toolkit
% \item Run simple calculations using the seismicity tools
%\end{itemize}
%\end{myfancybox}
% \input{catalogue_tools.tex}
%\cleardoublepage
%
%
%% \cleardoublepage
%% %
%\chapter{Hazard Tools}
%\begin{myfancybox}
%The objectives of this chapter are:
%\begin{itemize}
% \item Introduction to the HMTK source model classes
% \item Understand how to link source models to seismicity
% \item Run simple PSHA calculations in OpenQuake, using the HMTK
%\end{itemize}
%\end{myfancybox}
% \input{hazard_tools.tex}
%\cleardoublepage
%
%
%-----------------------------------------------------------------------------
%\chapter{Geological Tools}
%\begin{myfancybox}
%The objectives of this chapter are:
%\begin{itemize}
% \item Describe features of the geological tools Hazard Modeller's Toolkit
% \item Run simple calculations using the geological tools
%\end{itemize}
%\end{myfancybox}
% \input{geology_tools.tex}
%\cleardoublepage
%
%
%% \cleardoublepage
%% % -----------------------------------------------------------------------------
%\chapter{Geodetic Tools}
%\begin{myfancybox}
%The objectives of this chapter are:
%\begin{itemize}
% \item Describe features of the geodetic tools Hazard Modeller's Toolkit
% \item Run simple calculations using the geodetic tools
%\end{itemize}
%\end{myfancybox}
% \input{geodetic_tools.tex}
%\cleardoublepage
% -----------------------------------------------------------------------------
% -----------------------------------------------------------------------------
% -----------------------------------------------------------------------------
%%\cleardoublepage
%\bibliographystyle{apalike}
%\bibliography{./bibliography/hazard}
%\cleardoublepage
%\printglossaries
%\printindex
%% -----------------------------------------------------------------------------
% --------------------------------------------------------------------------