\documentclass [12pt ,a4paper, english]{scrartcl}

\usepackage []{inputenc}
\usepackage [naustrian]{babel}
\usepackage {lmodern}
\usepackage [T1]{fontenc}

\usepackage {fancyhdr}
\usepackage {varioref}
\usepackage[colorlinks=true,linkcolor=black]{hyperref}

\usepackage {amsmath}
\usepackage {amssymb}
\usepackage {amsthm}
\usepackage {parskip}

\usepackage{xcolor}
\usepackage[pdftex]{graphicx}

\usepackage{listings}
\usepackage{color}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

{
\lstset{frame=tb,
  language=Java,
  aboveskip=3mm,
  belowskip=3mm,
  showstringspaces=false,
  columns=flexible,
  basicstyle={\small\ttfamily},
  numbers=none,
  numberstyle=\tiny\color{gray},
  keywordstyle=\color{blue},
  commentstyle=\color{dkgreen},
  stringstyle=\color{mauve},
  breaklines=true,
  breakatwhitespace=true,
  tabsize=2,
  showspaces=false,
  showtabs=false,
}

\DeclareMathOperator{\spn}{span}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{conj}[thm]{Vermutung}
\newtheorem{bsp}[thm]{Beispiel}
\newtheorem{bem}[thm]{Remark}

\theoremstyle{remark}
\newtheorem*{note}{Notiz}
\newtheorem{case}{Case}

\author{Christoph Hofer\\ 0955139 \and Stefan Lew \\ 0856722}

\title{Mitzi - Exercise 2}
\fancyhf{}
\pagestyle {fancy}
\lhead {\textsc {\nouppercase{\leftmark}}}
\setlength\headheight{15pt}
\lfoot {Christoph Hofer, Stefan Lew}
\rfoot {Seite \thepage}
\renewcommand{\footrulewidth}{0.5 pt}
\renewcommand{\headheight}{29 pt}

\begin{document}
\maketitle
\newpage
\tableofcontents
\newpage
\section{Implementation of artificial chess players}
	As requested, we have implemented three different agents for playing. The first type is a random player, who choses randomly among all possible moves for a situation, see \verb+RandyBrain.java+ in section~\vref{sec:randybrain}. The second type is an interface for human players, who can enter their moves in long algebraic notation (e.\,g. d2d4), see \verb+HumanBrain.java+ in section~\vref{sec:humanbrain}.
\subsection{MitziBrain}
The heart of our program is our (somewhat) intelligent player \verb+MitziBrain.java+ in section~\vref{sec:mitzibrain}.

The basic evaluation algorithm is a standard implementation of Negamax with Alpha-Beta-Pruning. On top of this we are using techniques like iterative deepening, aspiration windows, transposition tables, different approaches to move ordering, and a quiescence search.

The correct procedure is to create the current \verb+GameState+, e.\,g. by applying a sequence of moves to the initial game state or by entering the current position as a FEN string. This game state is then handed over to \verb+MitziBrain+ and the command \verb+search+ starts the evaluation procedure. At the moment, search can be limited by depth and by evaluation time. The method returns one move, it considers to be best.

For debugging reasons, Mitzi keeps printing some status updates, like the number of nodes searched per second (nps), the current search depth, the current principal variation (pv) and the percentage of maximum cache size currently in use.

\section{Implementation of a chess game}

An example for using our engine is given in \verb+ChessGame.java+, see section~\vref{sec:chessgame}. After starting this example program, you can enter your move and, in this case, our random player will answer. As you will see: you cannot expect high quality games against this opponent.

\begin{lstlisting}
Lets play chess!
e2e4
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3
Randy plays:e7e6
rnbqkbnr/pppp1ppp/4p3/8/4P3/8/PPPP1PPP/RNBQKBNR w KQkq -
d2d4
rnbqkbnr/pppp1ppp/4p3/8/3PP3/8/PPP2PPP/RNBQKBNR b KQkq d3
Randy plays:a7a6
rnbqkbnr/1ppp1ppp/p3p3/8/3PP3/8/PPP2PPP/RNBQKBNR w KQkq -
g1f3
rnbqkbnr/1ppp1ppp/p3p3/8/3PP3/5N2/PPP2PPP/RNBQKB1R b KQkq -
Randy plays:d8g5
rnb1kbnr/1ppp1ppp/p3p3/6q1/3PP3/5N2/PPP2PPP/RNBQKB1R w KQkq -
\end{lstlisting}
The game played was: 1.\,e4\,e6 2.\,d4\,a6 3.\,Nf3\,Qg5??. A more than dubious opening.~;)

\subsection{Game against mitzi}

\begin{lstlisting}
Lets play chess!
d2d4
rnbqkbnr/pppppppp/8/8/3P4/8/PPP1PPPP/RNBQKBNR b KQkq d3
info score cp -2 depth 1 seldepth 1 pv b8c6 time 0
info score cp -3 depth 1 seldepth 1 pv d7d6 time 16
info string Boards found: 0
info score cp 9 depth 2 seldepth 2 pv d7d6 c1f4 time 48
info string Boards found: 0
info score cp -5 depth 3 seldepth 5 pv d7d6 b1c3 c8f5 time 204
info string Boards found: 0
info score cp 27 depth 4 seldepth 6 pv d7d6 c1f4 g8f6 e2e3 time 1249
info score cp 18 depth 4 seldepth 6 pv e7e6 g1f3 d7d5 c1f4 time 2257
info string Boards found: 58
info score cp 7 depth 5 seldepth 6 pv e7e6 c1f4 b7b6 b1c3 f8b4 time 2398
info score cp 1 depth 5 seldepth 7 pv d7d6 e2e3 c8f5 f1d3 g8h6 time 2726
info score cp -5 depth 5 seldepth 8 pv d7d5 f2f3 c8f5 g2g4 f5c8 time 4535
info string Boards found: 414
info currmove d7d5 currmovenumber 1
info nps 19330
info hashfull 12
info score cp 27 depth 6 seldepth 12 pv d7d5 c1f4 c8f5 b1c3 e7e6 e2e3 time 6160
info currmove d7d6 currmovenumber 2
info currmove e7e6 currmovenumber 3
info score cp 13 depth 6 seldepth 12 pv e7e6 c1f4 g8e7 e2e4 e7g6 f4e3 time 9452
info currmove b8c6 currmovenumber 4
info currmove g8f6 currmovenumber 5
info currmove b8a6 currmovenumber 6
info currmove g8h6 currmovenumber 7
info currmove e7e5 currmovenumber 8
info currmove c7c5 currmovenumber 9
info currmove f7f5 currmovenumber 10
info currmove b7b5 currmovenumber 11
info currmove g7g5 currmovenumber 12
info currmove h7h5 currmovenumber 13
info nps 33286
info hashfull 37
info currmove a7a5 currmovenumber 14
info currmove c7c6 currmovenumber 15
info currmove f7f6 currmovenumber 16
info currmove b7b6 currmovenumber 17
info currmove g7g6 currmovenumber 18
info currmove h7h6 currmovenumber 19
info currmove a7a6 currmovenumber 20
info string Boards found: 2861
info string task completed
Mitzi plays:e7e6
rnbqkbnr/pppp1ppp/4p3/8/3P4/8/PPP1PPPP/RNBQKBNR w KQkq -
c1f4
rnbqkbnr/pppp1ppp/4p3/8/3P1B2/8/PPP1PPPP/RN1QKBNR b KQkq -
info string Boards found: 1
info string Boards found: 1
info string Boards found: 1
info string Boards found: 1
info score cp 1 depth 5 seldepth 5 pv g8e7 e2e4 e7g6 f4e3 f8b4 time 329
info string Boards found: 375
info currmove g8e7 currmovenumber 1
info score cp 24 depth 6 seldepth 9 pv g8e7 e2e4 b8a6 d1f3 f7f6 f3e3 time 1999
info currmove d8f6 currmovenumber 2
info currmove d8g5 currmovenumber 3
info currmove d8e7 currmovenumber 4
info currmove d8h4 currmovenumber 5
info currmove f8c5 currmovenumber 6
info currmove f8d6 currmovenumber 7
info currmove b8c6 currmovenumber 8
info currmove g8f6 currmovenumber 9
info nps 33029
info hashfull 62
info score cp 16 depth 6 seldepth 10 pv g8f6 b1c3 f6h5 f4e3 d7d5 f2f3 time 9053
info currmove f8b4 currmovenumber 10
info currmove f8e7 currmovenumber 11
info currmove b8a6 currmovenumber 12
info currmove g8h6 currmovenumber 13
info currmove f8a3 currmovenumber 14
info currmove d7d5 currmovenumber 15
info currmove c7c5 currmovenumber 16
info nps 33640
info hashfull 79
info currmove f7f5 currmovenumber 17
info currmove b7b5 currmovenumber 18
info currmove g7g5 currmovenumber 19
info currmove e6e5 currmovenumber 20
info currmove d7d6 currmovenumber 21
info currmove h7h5 currmovenumber 22
info currmove a7a5 currmovenumber 23
info currmove c7c6 currmovenumber 24
info currmove f7f6 currmovenumber 25
info currmove b7b6 currmovenumber 26
info currmove g7g6 currmovenumber 27
info currmove h7h6 currmovenumber 28
info currmove a7a6 currmovenumber 29
info currmove e8e7 currmovenumber 30
info string Boards found: 4593
info string task completed
Mitzi plays:g8f6
rnbqkb1r/pppp1ppp/4pn2/8/3P1B2/8/PPP1PPPP/RN1QKBNR w KQkq -
d1d2
rnbqkb1r/pppp1ppp/4pn2/8/3P1B2/8/PPPQPPPP/RN2KBNR b KQkq -
info score cp -240 depth 1 seldepth 4 pv f6d5 f4e5 time 0
info string Boards found: 31
info string Boards found: 1
info string Boards found: 1
info string Boards found: 1
info string Boards found: 1
info string Boards found: 1
info score cp 21 depth 2 seldepth 2 pv f6d5 f4e5 b8c6 time 0
info score cp 16 depth 2 seldepth 4 pv f8d6 f4d6 c7d6 time 0
info score cp 10 depth 2 seldepth 4 pv b8a6 d2d1 time 0
info score cp 7 depth 2 seldepth 4 pv b7b5 d2d1 time 0
info string Boards found: 34
info score cp 9 depth 3 seldepth 3 pv f6d5 f4e5 b8c6 d2c3 time 0
info score cp -6 depth 3 seldepth 5 pv f6e4 d2d1 f8d6 time 16
info string Boards found: 112
info score cp -9 depth 4 seldepth 6 pv f6d5 f4e5 b8c6 d2c3 time 80
info string Boards found: 196
info score cp -16 depth 5 seldepth 9 pv f6d5 d2d1 f8c5 b1d2 d8f6 time 595
info string Boards found: 93
info currmove f6d5 currmovenumber 1
info score cp -9 depth 6 seldepth 12 pv f6d5 f4e5 b8c6 b2b4 d8e7 e5d6 time 2342
info string Boards found: 581
info string task completed
Mitzi plays:f6d5
rnbqkb1r/pppp1ppp/4p3/3n4/3P1B2/8/PPPQPPPP/RN2KBNR w KQkq -
\end{lstlisting}
The game played was 1. d2d4, 2. e7e6, 3. c1f4, 4. g8f4, 5. d1d2, 6. f6d5.

\subsection{UCI Protocol}
For communication with common chess GUIs we are supporting (parts of) an open protocol called UCI.
You can find the specification here: \url{http://wbec-ridderkerk.nl/html/UCIProtocol.html}.
\subsection{Forsyth–Edwards Notation (FEN)}
Representing a game situation is done in FEN: \url{https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation}.

\section{The Code}

\subsection{ChessGame.java}
\label{sec:chessgame}
\lstinputlisting{../src/mitzi/ChessGame.java}

\subsection{Piece.java}
\lstinputlisting{../src/mitzi/Piece.java}

\subsection{Side.java}
\lstinputlisting{../src/mitzi/Side.java}

\subsection{PieceHelper.java}
\lstinputlisting{../src/mitzi/PieceHelper.java}

\subsection{SquareHelper.java}
\lstinputlisting{../src/mitzi/SquareHelper.java}

\subsection{IBrain.java}
\label{sec:ibrain}
\lstinputlisting{../src/mitzi/IBrain.java}

\subsection{IMove.java}
\lstinputlisting{../src/mitzi/IMove.java}

\subsection{IPosition.java}
\lstinputlisting{../src/mitzi/IPosition.java}

\subsection{IPositionAnalyzer.java}
\lstinputlisting{../src/mitzi/IPositionAnalyzer.java}

\subsection{RandyBrain.java}
\label{sec:randybrain}
\lstinputlisting{../src/mitzi/RandyBrain.java}

\subsection{HumanBrain.java}
\label{sec:humanbrain}
\lstinputlisting{../src/mitzi/HumanBrain.java}

\subsection{Move.java}
\lstinputlisting{../src/mitzi/Move.java}

\subsection{Direction.java}
\lstinputlisting{../src/mitzi/Direction.java}

\subsection{Position.java}
\lstinputlisting{../src/mitzi/Position.java}

\subsection{AnalysisResult.java}
\lstinputlisting{../src/mitzi/AnalysisResult.java}

\subsection{BasicMoveComparator.java}
\lstinputlisting{../src/mitzi/BasicMoveComparator.java}

\subsection{BoardAnalyzer.java}
\lstinputlisting{../src/mitzi/BoardAnalyzer.java}

\subsection{Flag.java}
\lstinputlisting{../src/mitzi/Flag.java}

\subsection{GameState.java}
\lstinputlisting{../src/mitzi/GameState.java}

\subsection{IrreversibleMoveStack.java}
\lstinputlisting{../src/mitzi/IrreversibleMoveStack.java}

\subsection{KillerMoves.java}
\lstinputlisting{../src/mitzi/KillerMoves.java}

\subsection{MateScores.java}
\lstinputlisting{../src/mitzi/MateScores.java}

\subsection{MitziBrain.java}
\label{sec:mitzibrain}
\lstinputlisting{../src/mitzi/MitziBrain.java}

\subsection{ResultCache.java}
\lstinputlisting{../src/mitzi/ResultCache.java}

\subsection{UCIReporter.java}
\lstinputlisting{../src/mitzi/UCIReporter.java}

\end{document}


\documentclass[aps,showpacs,twocolumn,prd,superscriptaddress,nofootinbib]{revtex4}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{color}
\usepackage{enumerate}
\usepackage{ulem}

\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand\ud{{\mathrm{d}}}
\newcommand\uD{{\mathrm{D}}}
\newcommand\calO{{\mathcal{O}}}
\newcommand\bfx{\mathbf{x}}
\newcommand{\ov}[1]{\overline{#1}}
\newcommand{\ph}[1]{\phantom{#1}}
\newcommand{\cte}{\mathrm{cte}}
\newcommand{\nn}{\nonumber}
\newcommand{\hatk}{\hat{k}}
\newcommand{\Hz}{\,\mathrm{Hz}}
\newcommand{\sinc}{\,\mathrm{sinc}}
\newcommand{\Msol}{M_{\odot}}

\begin{document}

\title{Bayesian methods for black hole merger parameter estimation with LISA.}

\author{John G. Baker}
\affiliation{Gravitational Astrophysics Laboratory, NASA Goddard Space Flight Center, 8800 Greenbelt Rd., Greenbelt, MD 20771, USA}
\author{Sylvain Marsat}
\affiliation{Department of Physics, University of Maryland, College Park, MD 20742, USA}
\affiliation{Gravitational Astrophysics Laboratory, NASA Goddard Space Flight Center, 8800 Greenbelt Rd., Greenbelt, MD 20771, USA}
\affiliation{Max Planck Institute for Gravitational Physics (Albert Einstein Institute), Am M\"uhlenberg 1, Potsdam-Golm, 14476, Germany}

\date{\today}

\begin{abstract}

[Abstract]

\end{abstract}

\pacs{
04.70.Bw, % classical black holes
04.80.Nn, % Gravitational wave detectors and experiments
95.30.Sf, % relativity and gravitation
95.55.Ym, % Gravitational radiation detectors
97.60.Lf  % black holes (astrophysics)
}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Introduction}
\label{sec:intro}

[Introduction]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Methodology}
\label{sec:intro}

\subsection{Fast frequency domain LISA response}
\label{sec:response}

-- Geometric setting, definitions, summarize the FD response

\subsection{Reduced order model for EOBNRv2 waveforms.}
\label{sec:waveforms}

-- Waveforms: EOBNRv2HMROM + PNext

\subsection{Fast likelihood computation}
\label{sec:likelihood}

-- Likelihood computation: fast overlaps

\subsection{Fisher matrix parameter estimation}
\label{sec:Fisher}

-- Fisher matrices computation: step self-tuning,...

\subsection{Bayesian sampling}
\label{sec:samplers}

-- Bayesian samplers: Multinest, PTMCMC

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Morphology of the signals}
\label{sec:morph}

- Morphology of the response

\subsection{Temporal development of SNR}
\label{sec:timeSNR}

-- SNR accumulation with time or frequency: inspiral/MRD balance across mass range

\subsection{LISAframe parameters}
\label{sec:LISAframe}

-- LISA frame angles

\subsection{The low-frequency limit}
\label{sec:low-freq}

-- make the connection to low-f response (2 interferometers)

\subsection{A simplified likelihood model}
\label{sec:simple-like}

-- simplified response and closed-form likelihood

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Illustrating examples}
\label{sec:examples}

- Demonstration/examples

\subsection{A non-degenerate case}
\label{sec:high-M-non-deg}

-- High-mass system, non-degenerate, 22 and HM + Fisher - stacked SNR contours
eg:

Case 12?
m1,    m2,    t0,D,     phi0,i,   lam,  bet, psi
8.89e5,1.11e5,0, 3.67e4,pi/3,pi/2,3pi/4,pi/3,pi/3

Case 0

-- Performance: waveform and likelihood costs, number of sampler evaluations

\subsection{Stellar origin black holes}
\label{sec:SOBH}

-- SOBH system, SNR sufficient for clean analysis + Fisher - stacked SNR contours
-- Performance: waveform and likelihood costs, number of sampler evaluations

\subsection{Highlighting degeneracies}
\label{sec:degen}

- Highlighting degeneracies

-- High-mass degenerate example, 22 vs HM - stacked SNR contours
-- show degenerate waveforms
-- simplified response and closed-form likelihood, full degeneracies
-- (explore simplified response further: parameter maps, other off-the-shelf samplers ?)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Discussion}
\label{sec:discussion}

- Summary/conclusions

----------------
Other questions:
- special orientations/sky locations ?
- Fisher matrix qualification - explore parameter choices
- continuously increase SNR - include on these examples
- continuously accumulate information over time
- full exploration of parameter space for all of the above...

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}


\documentclass{scrartcl}

\usepackage{graphicx}
\usepackage{longtable}
\usepackage{mathdots}
\usepackage{url}

\title{et\_simul -- A Framework for Simulating Eye~Trackers}
\author{Martin B\"ohme \\
University of L\"ubeck, Germany \\
\texttt{boehme@inb.uni-luebeck.de}}
\date{}

\setlength\LTleft\parindent
\setlength\LTright\fill
\setlength\LTpre\smallskipamount
\setlength\LTpost\smallskipamount

\begin{document}
\maketitle

\section{Introduction}

This is et\_simul, a framework for simulating eye trackers -- in particular,
the gaze estimation step. For a paper describing the framework and some
experiments performed using it, see~\cite{BoDoGrMaBa08}.

To get started, start \texttt{interpolate\_test.m} (which tests a simple
interpolation-based algorithm) from a Matlab command line.

The project uses a pseudo-object-oriented philosophy, i.e.\ Matlab structures
are used to represent the various objects in the system (eyes, lights,
cameras), and methods are implemented as functions that take the object they
operate on as their first argument. The name of a method should start with the
name of the type of object it operates on (e.g.\ \texttt{eye\_look\_at()},
\texttt{camera\_project()}); methods that create objects (``constructors'')
have the suffix \texttt{\_make} (e.g.\ \texttt{eye\_make()},
\texttt{camera\_make()}).

\section{Geometric conventions}

The following conventions are used in geometrical calculations:

\begin{itemize}
\item All points and vectors are represented in homogeneous coordinates

\item All vectors are column vectors

\item All coordinate systems are right-handed:

\vspace{1em}
\includegraphics{coordinate_system.eps}
\vspace{1em}

  Note: For a camera whose image plane is the x-y-plane, this would mean that
  its optical axis points along the \emph{negative} z-axis.

\item All measurements are in metres

\item Object transformation matrices always transform object coordinates to
  world coordinates.

  Rationale: Consider a transformation matrix of the following form

\[
\left(
\begin{array}{cccc}
\ddots &   &  \iddots & \vdots \\
  & A &   & d \\
\iddots  &   & \ddots & \vdots \\
0 & 0 & 0 & 1
\end{array}
\right)
\]

  Then $d$ is just the position of the object in world coordinates; and to
  rotate an object around the centre of its local coordinate system by a
  matrix $B$, we just concatenate $B$ onto $A$.
\end{itemize}

\section{A Short Example}

The following short example is designed to introduce some of the functions in
the framework. The source files for the functions contain more detailed
documentation.

The example code can also be run using the file \texttt{example.m}.

To begin with, we will run a test of a simple interpolation-based gaze
estimation method:

\begin{verbatim}
interpolate_test();
\end{verbatim}

The test requires a few moments to run; when it is finished, it shows a plot
that visualizes the relative magnitude and direction of the error at different
positions of the screen. Note that the size of the error arrows is not to the
same scale as the screen coordinates.

\subsection*{Eye, light, and camera objects}

As mentioned above, the framework follows an object-oriented philosophy. An
eye object, for example, is created like this:

\begin{verbatim}
e=eye_make(7.98e-3, [1 0 0; 0 0 1; 0 1 0]);
\end{verbatim}

The eye has a corneal radius of 7.98~mm and its optical axis points along
the negative y-axis. (In the eye's local coordinate system, the optical axis
points along the negative z-axis. By specifying an eye-to-world transformation
matrix that exchanges the y- and z-axis, we make the optical axis of the eye
point along the negative y-axis of the world coordinate system.)

We now position the centre of the eye at $(x, y, z)=(0, 0.5, 0.2)$ (all
coordinates in metres):

\begin{verbatim}
e.trans(1:3, 4)=[0 500e-3 200e-3]';
\end{verbatim}

Note that we use the subscript \texttt{(1:3, 4)} to access the position
vector in the transformation matrix (denoted by $d$ in the previous section).

Next, we will create a light and set its position to (0.2, 0, 0):

\begin{verbatim}
l=light_make();
l.pos=[200e-3 0 0 1]';
\end{verbatim}

Because lights are modelled as perfect point light sources, they do not have
an orientation, and hence they do not need a full transformation matrix; only
the position has to be specified.

We also create a camera:

\begin{verbatim}
c=camera_make();
\end{verbatim}

In its local coordinate system, the camera points out along the negative
z-axis. We want to change the camera's orientation so that it points along the
positive y-axis, towards the eye:

\begin{verbatim}
c.trans(1:3,1:3)=[1 0 0; 0 0 -1; 0 1 0];
\end{verbatim}

By default, the camera is positioned at the origin of the world coordinate
system; we leave this default unchanged.

\subsection*{Visualizing an eye tracking setup}

We can now visualize our eye tracking setup:

\begin{verbatim}
draw_scene(c, l, e);
\end{verbatim}

This draws a three-dimensional representation of the following:

\begin{itemize}
\item The camera (the camera's view vector and the axes of its image plane)

\item The light (shown as a red circle)

\item The eye (showing the surface of the cornea, the pupil centre, the
cornea's centre of curvature, and the CRs)
\end{itemize}

Cell arrays containing more than one eye, light, or camera may also be passed
to \texttt{draw\_scene}.

\subsection*{Calculating positions of CRs}

We now wish to calculate the position of the corneal reflex in space, defined
as the position where the ray that emanates from the light and is reflected
into the camera strikes the surface of the cornea:

\begin{verbatim}
cr=eye_find_cr(e, l, c);
\end{verbatim}

We can now determine the position of the CR in the camera image:

\begin{verbatim}
cr_img=camera_project(c, cr);
\end{verbatim}

In reality, the position of features in a camera image cannot be determined
with infinite accuracy. To model this, a so-called \emph{camera error} can be
introduced. This simply causes \texttt{camera\_project} to offset the point in
the camera image by a small random amount. For example, the following
specifies a Gaussian camera error with a standard deviation of 0.5 pixels:

\begin{verbatim}
c.err=0.5;
c.err_type='gaussian';
\end{verbatim}

Note that the camera error is a property of the camera. By default, the camera
error is set to zero.

\subsection*{Eye tracker object}

An eye tracker is represented by an eye tracker object, which has the
following properties:

\begin{itemize}
\item A cell array \texttt{cameras} of one or several camera objects.

\item A cell array \texttt{lights} of one or several light objects.

\item A matrix \texttt{calib\_points} of calibration points.

\item A function handle \texttt{calib\_func} for the calibration function,
which is supplied with the observed positions of the pupil centre and CRs for
every calibration point and uses this information to calibrate the eye
tracker.

\item A function handle \texttt{eval\_func} for the evaluation function, which
is used to perform gaze measurements after calibration. It is supplied with
the observed positions of the pupil centre and CRs and outputs the gaze
position on the screen.
\end{itemize}

For more information, see the documentation in \texttt{et\_calib}.

The function \texttt{interpolate\_make} creates an eye tracker that uses a
simple interpolation-based gazed estimation scheme. The eye tracker can be
tested directly using the test harness \texttt{test\_over\_screen}:

\begin{verbatim}
test_over_screen(interpolate_make());
\end{verbatim}

\section{Functions}

This function summarizes the most important functions in the framework.
Detailed documentation for the functions can be found in the Matlab source
files.

\subsection*{Eye functions}

\begin{longtable}{p{4cm}p{9.2cm}}
\texttt{eye\_make} & Creates a structure that represents an eye \\
\texttt{eye\_draw} & Draws a graphical representation of an eye \\
\texttt{eye\_find\_cr} & Finds the position of a corneal reflex \\
\texttt{eye\_find\_refraction} & Computes observed position of intraocular
    objects \\
\texttt{eye\_get\_pupil\_image} & Computes image of pupil boundary \\
\texttt{eye\_get\_pupil} & Returns an array of points describing the pupil
    boundary \\
\texttt{eye\_look\_at} & Rotates an eye to look at a given position in
    space \\
\texttt{eye\_refract\_ray} & Computes refraction of ray at cornea surface
\end{longtable}

\subsection*{Light functions}

\begin{longtable}{p{4cm}p{9.2cm}}
\texttt{light\_make} & Creates a structure that represents a light \\
\texttt{light\_draw} & Draws a graphical representation of a light
\end{longtable}

\subsection*{Camera functions}

\begin{longtable}{p{4cm}p{9.2cm}}
\texttt{camera\_make} & Creates a structure that represents a camera \\
\texttt{camera\_draw} & Draws a graphical representation of a camera \\
\texttt{camera\_pan\_tilt} & Pans and tilts a camera towards a certain
    location \\
\texttt{camera\_project} & Projects points in space onto the camera's image
    plane \\
\texttt{camera\_take\_image} & Computes the image of an eye seen by a
    camera \\
\texttt{camera\_unproject} & Unprojects a point on the image plane back into
    3D space
\end{longtable}

\subsection*{Optical helper functions}

\begin{longtable}{p{4cm}p{9.2cm}}
\texttt{reflect\_ray\_sphere} & Reflects ray on sphere \\
\texttt{refract\_ray\_sphere} & Refracts ray at surface of sphere \\
\texttt{find\_reflection} & Finds position of a glint on the surface of a
    sphere \\
\texttt{find\_refraction} & Computes image produced by refracting sphere
\end{longtable}

\subsection*{Test harnesses}

\begin{longtable}{p{4cm}p{9.2cm}}
\texttt{test\_over\_observer} & Computes gaze error at different observer
    positions \\
\texttt{test\_over\_screen} & Computes gaze error at different gaze positions
    on screen
\end{longtable}

\subsection*{Preimplemented gaze estimation algorithms}

\begin{longtable}{p{4cm}p{9.2cm}}
\texttt{beymer\_*} & Method of Beymer and Flicker (2003) \\
\texttt{interpolate\_*} & Simple interpolation-based method \\
\texttt{shihwuliu\_*} & Method of Shih, Wu, and Liu (2000) \\
\texttt{yoo\_*} & Method of Yoo and Chung (2005) \\
\texttt{hennessey\_*} & Method of Hennessey, Noureddin, and Lawrence (2006)
\end{longtable}

\section{Legal Notice}

et\_simul is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License (version 3) as
published by the Free Software Foundation.

et\_simul 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.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
(version 3) along with et\_simul in a file called `COPYING'. If not, see
\url{http://www.gnu.org/licenses/}.

\begin{thebibliography}{[1]}
\bibitem{BoDoGrMaBa08}Martin B{\"o}hme, Michael Dorr, Mathis Graw, Thomas
Martinetz, and Erhardt Barth. A Software Framework for Simulating Eye
Trackers. \emph{Proceedings of Eye Tracking Research \& Applications (ETRA)},
2008 (to appear).
\end{thebibliography}

\end{document}


\chapter{{\tt MSMD}: \break
        {\tt M}ulti-{\tt S}tage {\tt M}inimum {\tt D}egree Object}
\par
We need an ordering for a sparse matrix.
The {\tt MSMD} object will provide one of three orderings:
\begin{itemize}
\item
a minimum degree ordering, or
\item
a multisection ordering if given with a domain/Schur-complement
partition, or
\item
a nested dissection ordering if given a domain/separator tree.
\end{itemize}
\par
But in what form do we want our ordering?
If all we want is a permutation vector,
there is a {\tt MSMD} method that will fill them.
If we want more information, a method returns the {\tt ETree}
object that is a front tree\footnote{
The {\tt ETree} object has the {\tt Tree} object that defines the
connectivity of the fronts, knows the internal and external size of
each front, and has a map from the vertices to the fronts.
}
for the ordering.
\par
The {\tt MSMD object} is complex, at least in its functionality.
However, its component methods are simple; one can put them together
in different ways to get a wide variety of algorithms.
\par
There are methods to eliminate a vertex or set of vertices in one
of three ways:
\begin{itemize}
\item
a single vertex, or
\item
a {\it step} of vertices, i.e., an independent set of vertices, or
\item
a {\it stage} of vertices, i.e., a set of vertices defined in
a number of consecutive steps.
\end{itemize}
How to choose a vertex to eliminate is based on a {\it priority},
currently one of:
\begin{itemize}
\item
external degree, or
\item
approximate external degree, (${\hat d}$ from
\cite{ame96-amd}) and \cite{sparsematlab}, or
\item
half external and half approximate,
(${\tilde d}$ from \cite{ame96-amd}),
or
\item
a constant priority (to induce maximal independent set
elimination).
\end{itemize}
We intend to add more priorities,
e.g., approximate deficiency from
\cite{ng96-mindefIdaho},
\cite{rot96-mindefIdaho}
and \cite{rot98-mindef}.
\par
Choose a priority, then specify the definition of a {\it step},
how to choose an independent set of vertices to eliminate at a time.
Then provide a map from each vertex to the {\it stage} at which it
will be eliminated.
\par
Presently there is one ordering method, {\tt MSMD\_order()}.
It orders the vertices by {\it stages}, i.e. vertices in stage $k$ will
be ordered before vertices in stage $k+1$.
Inside each {\it stage} the vertices are ordered by {\it steps}.
At each step an independent set of vertices is eliminated,
and the choice is based on their priorities.
When the ordering is finished one can extract permutation vectors
of a front tree.
\par
Here are three examples of how stages define an ordering method.
(These methods are supported by the present {\tt MSMD} object).
\begin{itemize}
\item
Set the stage of each vertex to be zero and we have a simple minimum
degree (priority) ordering.
\item
Given a domain/Schur complement partition or a domain/separator tree,
we can find a multisection ordering by setting the stage of a vertex
to be zero if it is a domain or one if it is in a separator.
\item
Given a domain/separator tree, we can find an incomplete nested
dissection ordering by specifying the stage of a vertex to be
the level of the separator or domain that contains it.
\end{itemize}
Here are three slightly more complicated examples.
\begin{itemize}
\item
Order the vertices in the domains, then order the
Schur complement graph both by nested dissection and minimum degree,
and then splice the better of the two orderings together with the
ordering of the domain vertices.
\item
Apply the above algorithm to the Schur complement graph
recursively.
\item
% By and large, multisection is consistently better than nested
% dissection, but there are graphs where the reverse holds,
% e.g., 3-d cubes.
Since multisection is nothing more than applying minimum degree to
the Schur complement graph, randomly permute the graph and apply
the minimum degree ordering. Repeat several times and take the best
ordering.
(Ordering the Schur complement graph is much, much less time
consuming than ordering the vertices in the domains.)
\end{itemize}
Any of these three algorithms is bound to be better than both nested
dissection and multisection.
The tools are largely written so any of these three algorithms can
be prototyped in a small amount of time and effort.


\chapter{Wrap-up}
This chapter connects the dots that are the many different observations and conclusions made in previous chapters, describing both what has been done and what could still be done and is meant to close the arc between my \acs{CESM} experiments (\chapref{chap:cesm-runs}) and theoretical studies (\chapref{chap:analysis}).

\secref{sec:outro-summary} gives a summary of the main results of my thesis, while \secref{sec:outro-outlook} discusses some open questions and how they could be tackled in future work.

\section{What Have We Learned?}
\label{sec:outro-summary}
The following sections describe the observations I have made when lowering the western boundary layer viscosity at the equator in \acs{CESM} experiments with low (\grid{x3}) and intermediate (\grid{x1}) resolution (\chapref{chap:cesm-runs}), along with my \q{best guess} on how to interpret these results, taking into account the theoretical findings from \chapref{chap:analysis}.

A particular focus lies on the generation of numerical noise (\secref{sec:outro-noise}), cross-equatorial flow in the Atlantic (\secref{sec:outro-amoc}), and the \ac{ITF} (\secref{sec:outro-itf}).

\subsection{Numerical Noise}
\label{sec:outro-noise}
The main result of \secref{sec:cesm-noise} is that, while an intact boundary layer with low grid scale Reynolds numbers is critical for numerical noise suppression in the equatorial regions\sidenote[-2]{Which I hypothesized to be the case because information always travels \emph{westward} in the ocean, hence noise created in the interior basin can not be dissipated without a western boundary layer.}, the smoothed velocity field is still a decent representation of the actual dynamics.

Noise is mostly created on grid scale and preferably in zonal direction, which is also observed in my shallow-water model. This is probably due to the fact that 1) meridional grid spacings are smaller than those in zonal direction close to the equator, and that 2) velocity shears are dominantly in zonal direction (due to the sharp western boundary layer).

The total amount of generated noise under viscosity reduction seems to depend critically on the given grid spacing --- much less noise is observed in \grid{x1} or the high-resolution shallow-water experiments, even when grid scale Reynolds numbers are high.

\subsection{The \acl{AMOC}}
\label{sec:outro-amoc}
The total transport carried by the \ac{AMOC} only depends weakly on viscosity. When only accounting for contours of the vertical \ac{AMOC} stream function that penetrate far into the opposite hemisphere, the transport changes by a maximum of \SI{-1.5}{\sv} (for \run{x3_nomunk}, where the Munk layer viscosity has been globally reduced to the much lower background value), while integrating directly over the velocity at the equator yields a maximum change of about \SI{-1.2}{\sv} (again, for \run{x3_nomunk}). This is less than anticipated intuitively, considering that, without friction, the required transformation of \ac{PV} to enable cross-equatorial flow is impossible. However, it is shown that the efficiency of \ac{PV} transformation inside a Munk boundary layer is independent of viscosity to a leading order (\secref{sec:killworth}).

On the other hand, I \emph{did} observe a clear correlation between viscosity and cross-equatorial transport, where lower viscosities always led to a decreased transport, and vice versa. In order to understand this behavior, I have tried to produce a similar response in an equatorial shallow-water model that is forced by a constant buoyancy forcing and uniform \q{upwelling} across the domain. After running several simulations in different scenarios (\secref{sec:equatorial-shallow-water}), I was not able to reproduce the observed response in this simple model\sidenote[0]{Instead, transports were either independent of viscosity, or increased for smaller viscosities (if the boundary layer was under-resolved).}. I thus conclude that the response of the ocean in \ac{CESM} depends on effects that were not included in my model (some possible candidates are discussed in \secref{sec:outro-moc-viscosity}).

Looking at the flow field around the equator in the Atlantic in \ac{CESM}, I noticed deep, zonal equatorial jets (similar to those described in \cite{greatbatch-jets}) that emerge along the equator and extend all the way to the eastern boundary, where it seems like some boundary layer interactions took place. In \ac{CESM} experiments with extreme viscosity modifications, a roughly equal amount of water crosses the equator in the eastern and western parts of the basin. \emph{The structure and efficiency of the western boundary thus indeed seems to be affected heavily by strong viscosity modifications.}

\subsection{The \acl{ITF}}
\label{sec:outro-itf}
The total transport crossing the \ac{ITF} shows roughly the same dependence on viscosity as the \ac{AMOC}, with maximum changes of about \SI{-2}{\sv} in \grid{x3}, and \SI{-0.5}{\sv} in \grid{x1}.

On top of these small modifications of the total transport (which are expected to be small considering Munk layer theory as in \secref{sec:killworth}), dramatic changes of the composition of the \ac{ITF} are observed in the \grid{x3} experiments\sidenote[-2]{\grid{x1} experiments seem to be largely unaffected because of a very different geometry around the Indonesian islands.}. The \ac{BSF} suggests that, for extreme viscosity modifications, about half of the total \ac{ITF} originates in the southern hemisphere, versus a purely northern source when using default viscosity parameters. This is reinforced by the salinity profile of this region, which shows a considerably saltier \ac{ITF} for low viscosities, which also hints towards a southern source.

In \secref{sec:island-rule}, I have reviewed Godfrey's Island Rule. Since the Island Rule predicts an \ac{ITF} that only depends on the atmospheric forcing and geometry, the observed dependency of the transport on viscosity seems like a contradiction. An extension of the Island Rule with friction (from \cite{wajsowicz}) predicts a \emph{weaker} transport for \emph{higher} viscosities, \ie the opposite of what is observed in \ac{CESM}. It thus seems like the Island Rule, while it delivers a good first approximation, is indeed not strictly valid at the equator.

After all, the processes that determine the source of the \ac{ITF} are still unclear. Some additional possibilities are discussed in \secref{sec:outro-itf-origin}.

\section{Open Questions}
\label{sec:outro-outlook}
The following sections are meant to point out some loose ends in this study, where future work would be necessary to get a clearer understanding, and presents some further ideas that fell out of the scope of this thesis.

In particular, there are two major open questions, one concerning the total strength of the overturning (\secref{sec:outro-moc-viscosity}), and one concerning the \ac{ITF} (\secref{sec:outro-itf-origin}).

\subsection{How is the overturning modified when changing viscosity?}
\label{sec:outro-moc-viscosity}
Since my shallow-water model could not reproduce \ac{CESM}'s dependence of the overturning on viscosity, it is still unclear \emph{how} the total cross-equatorial transport can be modified by changing viscosity, even though theory predicts that it should be constant to a leading order (\secref{sec:killworth}). Apparently, this response is created by an effect that was not modeled in the shallow-water experiments. Some likely candidates are:
%
\begin{enum}
	\item boundary topography, which modifies the balance between friction and Coriolis force if the boundary layer is not strictly meridional, and bottom topography (see \eg \cite{nofbc2} and \cite{swaters});
	\item interactions between multiple layers, as discussed \eg in \cite{nofbc1}, or the effect of a vanishing layer height (\cf \eqref{eq:munk-friction-balance});
	\item additional forcing by the wind; and
	\item a feedback between the forcing of the model and the amount of equator-crossing flow.
\end{enum}
%
For starters, an enhanced model could include a realistic geometry of the North Atlantic, and explicitly model both branches of the \ac{AMOC} (northward, shallow and southward, deep). This model should be much closer to reality, and hopefully give a realistic dependence on viscosity\sidenote[-3]{One possibility would be to use a verified \acs{GCM} such as the MIT General Circulation Model (MITgcm), which supports idealized processes and geometries, instead of a self-developed model.}.

Another clue towards the processes in a low-viscosity Atlantic is given by the equatorial jets that are observed in some experiments. These jets are studied and modeled in \cite{kitamura}, and a similar study could reveal their connection to cross-equatorial transport and viscosity.

\subsection{What controls the origin of the \acl{ITF}?}
\label{sec:outro-itf-origin}
The origin of the \ac{ITF} is in fact highly discussed in literature\sidenote{\Eg in \cite{nofind}; \cite{godfreyind}; \cite{lukas}; \cite{gordon}.}, and observations suggest a predominantly northern source. However, none of these studies seems to include the dependence of the \ac{ITF} composition on viscosity. Possible explanations for the observed, sensitive dependence of the \ac{ITF} on viscosity are:
%
\begin{items}
	\item In \cite{nofind}, \citeauthorfull{nofind}%
	\sidefigure{The \ac{ITF} model presented in \cite{nofind}.}[fig:nof-setup]{%
		\includegraphics[width=\marginparwidth]{figures/outro/nof}%
	}[1]%
	considers a nonlinear, frictionless model of the \ac{ITF} with an idealized geometry (\figref{fig:nof-setup}). He shows that the determining factor for the origin of the \ac{ITF} in this model is (1) the geometry of the basin and (2) the undisturbed layer heights at certain points of the current system in the \ac{ITF}. While not taking viscosity into account explicitly, these layer heights are certainly influenced by the Munk layer viscosity in this region, which could yield an explanation for the observed behavior.
	\item Since the most direct effect of a reduced viscosity is a lower boundary layer width, it is certainly possible that the ensuing geometrical alteration of the flow path has a direct influence on the solution in the \ac{ITF} region. Even a slightly displaced path may have a large influence eventually, \eg through a spatially dependent wind stress, or the \q{collision} with other currents.
	\item In fact, since the efficiency of the cross-equatorial transport in a western boundary layer \emph{was} found to be influenced dramatically by viscosity in the Atlantic, it seems like the same may be the case here --- flow that fails to dump excess vorticity follows the coast of New Guinea without crossing the equator further than a few Rossby radii of deformation, and then curves back into the southern hemisphere. The flow does not need to form a jet as in the Atlantic, since it never actually crosses the equator in \grid{x3}\sidenote{In contrast to the \grid{x1}-grid, where additional islands require the flow to reach further north in order to curve into the \ac{ITF}, which is thus suppressed.}. However, this interpretation still needs careful testing, \eg in another idealized model with a geometry that is similar to that of the Indonesian islands and New Guinea.
\end{items}
%
%\parabreak
%
\emph{It seems thus, that frictional control of cross-equatorial flow is indeed possible in low-resolution models, and that the chosen model viscosity does have a decisive influence on the flow in the equatorial regions} (though not so much on its total magnitude).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{LTS Transformations}
\label{sec:lts-transformation:transformations}

In this section, we formalize refinement steps as transformations of networks of LTSs.
A network is transformed by transforming the individual process LTSs that constitute it and adding additional synchronization rules.

\subsection{Transformation Rules}
LTSs are transformed by applying transformation rules.
These rules are defined as follows.

\begin{definition}
\label{def:lts-transformation:transformationrule}
An LTS transformation rule $r = \transruletuple{r}$ consists of a left pattern LTS~$\Llts^r = \ltstuple{\Llts^r}$ and a right pattern LTS~$\Rlts^r = \ltstuple{\Rlts^r}$, with~$\initialstates{\Llts^r} = \initialstates{\Rlts^r} = (\states{\Llts^r} \cap \states{\Rlts^r})$.
\end{definition}

States $\states{\Llts^r} \cap \states{\Rlts^r}$, also referred to as the glue-states, are all initial and define how $\Rlts^r$ should replace $\Llts^r$.
All changes to an LTS are applied relative to these glue-states.
We call a rule~$r = \transruletuple{r}$ applicable on an LTS~$\graph$ iff there exists a match $m_r:\states{\Llts^r} \to \states\graph$ for which the following holds.

\clearpage

\begin{definition}
\label{def:lts-transformation:transmatch}
A transformation rule $r = \langle \Llts^r, \Rlts^r \rangle$ has a match~$m_r: \states{\Llts^r} \to \states{\graph}$ on an LTS~$\graph = \ltstuple{\graph}$ iff $m_r$ is injective and
\begin{enumerate}
\item $\forall s_1\xrightarrow{a}_{\Llts^r} s_2. m_r(s_1)\xrightarrow{a}_\graph m_r(s_2)$;
\item $\forall s_1 \in \states{\Llts^r} \setminus \states{\Rlts^r}, s_2 \in \states{\graph}:$
	\begin{itemize}
 	\item $m_r(s_1) \xrightarrow{a}_\graph s_2 \implies \exists s \in \states{\Llts^r}. s_1\xrightarrow{a} s \wedge m_r(s) = s_2$;
 	\item $s_2 \xrightarrow{a}_\graph m_r(s_1) \implies \exists s \in \states{\Llts^r}. s\xrightarrow{a} s_1 \wedge m_r(s) = s_2$.
	\end{itemize}
\end{enumerate}
\end{definition}

The second condition of Definition~\ref{def:lts-transformation:transmatch} is related to what are often called dangling edges.
In graph transformation, dangling edges (transitions) are usually removed as part of a transformation.
Here, we decide to make a rule non-applicable in case dangling transitions are present.
Otherwise, the effect of a transformation would be hard to predict based only on the rule itself, because it may cause states that are not present in the rule to become unreachable.

\begin{figure}[hbt]
\centering
\includegraphics[scale=0.19]{lts-transformation/figs/matching}
\caption{Transformation rule matching}
\label{fig:lts-transformation:match}
\end{figure}

In the middle of Figure~\ref{fig:lts-transformation:match}, a transformation rule is shown.
All initial and glue-states are colored black in this figure.
The rule defines that any state matched on state~$\it{ii}$ of the left pattern of the rule should be removed and replaced by a new state, which is labeled $\it{iv}$ in the rule.
Therefore, the left pattern can be matched on states~$\{ 0,1,2\}$ of the LTS on the left of the figure, but not on states~$\{ 1,2,3\}$.
The latter match would result in the removal of state~2 and lead to a dangling transition.

If a rule $r$ is applicable to an LTS~$\graph$, then $\graph$ can be transformed as follows.

\begin{definition}
\label{def:lts-transformation:transformation}
The transformation of an LTS~$\graph = \ltstuple{\graph}$ according to a rule~$r = \transruletuple{r}$ and a given match $m_r:\states{\Llts^r} \to \states{\graph}$ is defined as follows.
$T_r^{m_r} (\graph) = \langle \tstates{r}{m_r}, \tactions{r}{m_r}, \ttransitions{r}{m_r}, \initialstates{\graph} \rangle$, where
\begin{itemize}
\item
$\tstates{r}{m_r} =
( \states{\graph}
  \setminus
  \{m_r(s) \mid s \in (\states{\Llts^r} \setminus \states{\Rlts^r}) \}
)
\cup
(\states{\Rlts^r} \setminus \states{\Llts^r})$;

\item
$\ttransitions{r}{m_r} =
(
  \transitions{\graph}
  \setminus
  \{\langle m_r(s_1), a, m_r(s_2) \rangle \mid s_1 \xrightarrow{a}_{\Llts^r} s_2\}
)
\cup \\
\{\langle s_1, a, s_2 \rangle \mid s_1, s_2 \in (\states{\Rlts^r} \setminus \states{\Llts^r}) \wedge s_1 \xrightarrow{a}_{\Rlts^r} s_2 \}
\cup \\
\{
  \langle m_r(s_1), a, s_2 \rangle
  \mid
  s_1 \in (\states{\Llts^r} \cap \states{\Rlts^r}) \wedge s_2 \in (\states{\Rlts^r} \setminus \states{\Llts^r}) \wedge s_1 \xrightarrow{a}_{\Rlts^r} s_2
\}
\cup \\
\{
  \langle s_1, a, m_r(s_2) \rangle
  \mid
  s_1 \in (\states{\Rlts^r} \setminus \states{\Llts^r}) \wedge s_2 \in (\states{\Llts^r} \cap \states{\Rlts^r}) \wedge s_1 \xrightarrow{a}_{\Rlts^r} s_2
\}
\cup \\
\{
  \langle m_r(s_1), a, m_r(s_2) \rangle
  \mid
  s_1, s_2 \in (\states{\Llts^r} \cap \states{\Rlts^r}) \wedge s_1 \xrightarrow{a}_{\Rlts^r} s_2
\}
$;
\item
$\tactions{r}{m_r} = (\actions{\graph} \setminus \actions{\Llts^r}) \cup \actions{\Rlts^r} \cup \{\tau\}$.
\end{itemize}
\end{definition}

The new set of states \tstates{r}{m_r} consists of \states{\graph} without the states that correspond to the states in the left pattern that do not exist in the right pattern, the removed states, and with the states in the right pattern that do not exist in the left pattern, the newly added states.
We assume that the latter states are fresh in \tstates{r}{m_r}.
Furthermore, transitions $\ttransitions{r}{m_r}$ consist of $\transitions{\graph}$ without the transitions that correspond to the transitions in the left pattern and with the transitions that correspond to those in the right pattern.

Figure~\ref{fig:lts-transformation:match} illustrates the application of a transformation rule.
The LTS on the right of the figure is the result of applying the rule in the middle to the LTS on the left.

\subsection{Rule Systems}
With transformation rules, a rule system~$\Sigma = \rulesystemtuple$ can be built, with~$R$ a set of transformation rules and~$\hat\synchrules$ a set of synchronization rules.
Contrary to related work on graph transformation, rule systems are not used to describe the semantics of a system in our setting.
Instead, they define how a network of LTSs is transformed into a more refined network.
Therefore, we are not interested in all possible interleavings of applications of the rules in a rule system.
Let $\graph \Rrightarrow_R \graph'$ denote the fact that an LTS $\graph'$ can be obtained by applying a rule $r \in R$ on one match in LTS $\graph$, and let $\Rrightarrow_R^*$ be the reflexive, transitive closure of $\Rrightarrow_R$.
Then, $\Sigma = \rulesystemtuple$ is terminating iff $\Rrightarrow_R$ is terminating, and $\Sigma$ is confluent iff the following holds.

\begin{definition}
\label{def:lts-transformation:confluence}
Let $\Sigma = \rulesystemtuple$ be a rule system and $\graph$ be an LTS. $\Sigma$ is confluent iff for all LTSs~$\graph_1$ and~$\graph_2$ with~$\graph \Rrightarrow_R^* \graph_1$ and~$\graph \Rrightarrow_R^* \graph_2$, there exists an LTS~$\graph_3$ such that~$\graph_1 \Rrightarrow_R^* \graph_3$ and~$\graph_2 \Rrightarrow_R^* \graph_3$
\end{definition}

In the remainder of this chapter, we assume that rule systems are terminating and confluent.
From graph theory, it is known that confluence is undecidable for general rule systems, but it is decidable under certain conditions~\cite{lambers.conflicts,plump.confluence05}.
Here, we ensure that a rule system~$\Sigma = \langle R,\hat\synchrules \rangle$ is terminating and confluent for an LTS~$\graph$ by requiring that the following two conditions hold.

\begin{enumerate}
\item \textbf{No new matches:}
$\forall r \in R . \actions{\Rlts^r} \cap \bigcup_{r' \in R} \actions{\Llts^{r'}} = \emptyset$;
\item \textbf{Remove single match:}
$\bigcap_{r \in R} \actions{\Llts^{r}} = \emptyset$,
\end{enumerate}

\noindent
The first condition ensures that the application of a transformation rule does not introduce new matches, by requiring that all actions in the right-hand patterns of the rules do not occur in any of the left-hand patterns.
The second condition ensures that exactly one match is removed, by requiring that none of the left-hand patterns contains an action that also occurs in another left-hand pattern.
Both conditions can be checked straightforwardly by inspecting the rule system only.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%, and with $m_r^{-1}$ to the inverse, i.e.\ $m_r^{-1}(m_r(\states_{\Llts^r})) = \states_{\Llts^r}$.
%%%%%%%Finally, $\hat m_r(\states_{\Llts^r})$ refers to the states which relate to non-glue-states in $\Llts^r$: $\hat m_r(\states_{\Llts^r}) = \{ s \in m_r(\states_{\Llts^r}) \mid m_r^{-1}(s) \not\in \states_{\Rlts^r} \}$.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

For terminating, confluent $\Sigma$, applying all $r \in R$ as often as possible results in a particular LTS, independent of the order of rule application.
We refer to that LTS as~$T_R^+ (\graph)$.
Finally, we define the transformation of a network of LTSs.

\begin{definition}
\label{def:lts-transformation:networktransformation}
Given a network $\smodel = \networktuple$ and a rule system $\Sigma = \rulesystemtuple$, the transformed network is defined as follows, for $n = \left|\Pi\right|$.
\[
T_\Sigma (\smodel) = \langle \langle T_R^+ (\Pi[1]), \ldots, T_R^+ (\Pi[n]) \rangle, \synchrules \cup \hat\synchrules \rangle
\]
\end{definition}


\section{Introduction}
\label{sec:intro}

The goal of this document is to present a focused partial overview of the state of the art in large scale computer vision (CV).  It aims at identifying areas of expertise in CV which are required or expected to be required in e-science projects at the Netherlands eScience Center \href{https://www.esciencecenter.nl/}{\underline{(NLeSC)}} as well as defining own research line(s) within the eScience Technology and (applied) research Platform \href{https://www.esciencecenter.nl/site/project/estep}{(\underline{eStep})} at the NLeSC.

\subsection{What is Computer Vision?}

Computer vision is the science and technology of machines that can see. As a scientific discipline, CV is concerned with the theory for building artificial systems that obtain information from images. It is a type of Artificial intelligence and intercepts a broad range of disciplines such as Optics, Robotics, Image Processing and Pattern Recognition.

\subsubsection{Why is CV difficult?}
A computer vision researcher always faces the problem to explain why automating vision is a very hard problem, while humans solve it with ease (powered by $30\%$ of the cortex). It is also important to explain the limitations of CV to the potential user of a CV system, especially to scientists from other disciplines. The short answer is: because {\bf seeing is not perceiving}. This illustrated by Figure \ref{fig:CV}.
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.8\textwidth]{fig/ManVsPC}
\end{center}
\caption{Human vision vs Computer vision.}
\label{fig:CV}
\end{figure}

Below some factors for deeper understanding of this difficulty are given (\cite{Sonka99}):

\begin{enumerate}
\item {\bf Loss of information 3D $\rightarrow$ 2D}. This is a phenomena which occurs in typical image capture device such as camera or a single eye. The corresponding mathematical model is the one of perspective projection- it maps points along rays, but does not preserve angles and collinearity.
\item {\bf Interpretation} of images. Humans use previous knowledge and experience along with the current observation, while a single image is often the only information the computer has. This is one of the  main motivation behind using machine learning in CV.
\item {\bf Noise} is inherently present in each measurement in the real world.
\item {\bf Large data volumes}. This is a main challenge in large scale CV systems.
\item {\bf Brightness measurements} comes by complicated image formation physics. The radiance (brightness, image intensity) depends on irradiance (light source type, intensity and position), observer's position, surface geometry and reflectance properties.
\item {\bf Local window vs. global view.} Usually image processing algorithms analyze a local part of an image (pixel, neighborhood, region), e.g. the computer sees the image trough e keyhole, which makes it hard to understand the global context.
\end{enumerate}

\subsection{Computer vision and other scientific disciplines}
From projects and proposals at NLeSc, where the data for the object of scientific research are captured as 2D/3D images, some main applications of CV can be identified:
\begin{enumerate}
\item {\bf Where is my object? (Localization).} For example, if the object of my study is a freely moving animal, while my camera is fixed somewhere in its habitat, can a CV system find automatically where (potentially) an animal appears on the recorded video, where most frames will probably be of no interest (also, can I keep only the meaningful data?)? Technically, the problem is how to automatically find the object of interest or reduce the data to be processed further, so they contain the object of interest (also efficient storage) in large collections of images/videos.
\item {\bf Is my object the same? (Identification).} For example, if I am studying a specific animal, named King Kong, which shares habitat with other animals of the same species, and all the habitat is monitored at different times, can a CV system find me the images where King Kong appears on, as I'm interested only in his movements? Technically, the problem is to (semi-) automatically determine if the study object is the same in multiple instances of photographing it, usually at different times, in different environment and under changing viewing conditions or camera equipment.
\item {\bf What is my object? (Classification).} For example, if King Kong is a gorilla sharing a habitat with other gorillas and chimps, I might like to separate the data of the chimps from those of the gorillas, and even identify new gorillas/chimps captured on camera, as I'm interested in the whole family, friends and enemies of King Kong. Hence, the problem is to (semi-) automatically classify the study object to one of possible categories. Usually the same camera equipment and modality are used to obtain the images/videos.
\item{\bf Large scale.} The common challenge for these questions is how to efficiently answer them from {\em large scale} scientific images/videos collections.
\end{enumerate}

 At NLeSC there have been projects which illustrate these types of questions to be addressed. In the systems biology  \href{https://blog.surf.nl/en/eyr4-blog-5-using-big-data-solutions-to-understand-worm-behavior/}{\underline{project}}, ``Using big data solutions to understand worm behavior'', the object of research is the {\em C.elegans} worm (see Figure \ref{fig:Celegans}). The source data are high resolution and long videos capturing the behavior of the worm. The first step is to {\em localize} precisely the worm in the large volume of imaging data.
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.8\textwidth]{fig/Celegans}
\end{center}
\caption{Behavioral analysis of Caenorhabditis elegans (roundworm) using video recordings.}
\label{fig:Celegans}
\end{figure}
This is a good example of how the object of interest is often studied in a controlled environment and one can assume that the most prominent ({\em salient}) object captured on images/videos is the object of interest. In this case, the lab plate ensures relatively uniform background where one can easily find the object of interest in foreground, the worm. The challenge is to find it automatically and to process efficiently large amounts of data.

The localization problem is often related to the {\em segmentation} problem, which is most challenging in the medical imaging domain (BiomarkerBoosting \href{https://www.esciencecenter.nl/project/biomarker-boosting}{\underline{project}} and \href{https://blog.surf.nl/eyr4-blog-7-lightpath-optical-coherence-tomography-oct-imaging/}{\underline{EYR4 project}} Light-path for OCT imaging at NLeSc). Illustration of the difficulty can be seen in Figures \ref{fig:hippo} and \ref{fig:oct}. There is little perceptual difference between the hippocampus and the surrounding brain tissue as well as between some of the retina layers, making it difficult to distinguish them even by a human eye.

\begin{figure}[H]
\begin{center}
\includegraphics[width=0.8\textwidth]{fig/hippo}
\end{center}
\caption{Hippocampus segmentation from a human brain MRI subvolume.}
\label{fig:hippo}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=0.9\textwidth]{fig/oct}
\end{center}
\caption{Optical Coherence Tomography (OCT) of retina layers segmentation: image data (left), image segmentation \& retina thickness map (right).}
\label{fig:oct}
\end{figure}

Because of the complexity of the problem, the large number of imaging modalities, equipment and even image formats, usually specific algorithms are developed to segment different body organs and tissues. Since specific solutions are required, which are hard to generalize for other structures, modalities, even less across scientific domains, the image segmentation is left out of the scope of this document.

An example of the {\em identification} problem, is the individual photo-identification of wildlife. This is illustrated on Figure \ref{fig:photoid}. Many species are individually recognizable by characteristic patterns or shape, i.e. by their phenotype.

\begin{figure}[H]
\begin{center}
\includegraphics[width=0.8\textwidth]{fig/photoid}
\end{center}
\caption{Example species with sufficient spot pattering what could be useful for automated photo-identification: (a) whale shark (with reference area),
(b) spotted  tree frog, (c) northern quill, (d) Amazon spotted frog, (e) striped blue crow and (f) mangrove snake.}
\label{fig:photoid}
\end{figure}

An example of the {\em classification} problem is shown on Figures \ref{fig:woodphotoid} and \ref{fig:treeid}. The question is to identify the tree species from microscopic images of wood samples. The {\em Acer} has a different appearance than {\em Toona}, but also within the family there are many species of {\em Toona} which differ- for example {\em Toona ciliata} differs subtly from {\em Toona sinesis} (Figure \ref{fig:treeid}), hence the classification problem could be hierarchical and increasingly difficult.

\begin{figure}[H]
\begin{center}
\includegraphics[width=0.8\textwidth]{fig/woodphotoid}
\end{center}
\caption{From left to right: tangential, radial and transversal tissue sections of stained mapple wood  (genus Acer).}
\label{fig:woodphotoid}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=0.8\textwidth]{fig/treeid}
\end{center}
\caption{Tangential section of stained wood. Left: Toona ciliata, Right: Toona sinesis.}
\label{fig:treeid}
\end{figure}

\subsection{Computer vision topics}
To address the related scientific challenges, four  CV research questions can be defined:
\begin{enumerate}
\item {\bf Visual salience:} How can the CV system determine automatically the most visual salient region(s) in an image?\label{item:sal}
\item {\bf Object/scene identification:} How can the CV system automatically determine whether two images, potentially taken with different cameras under different viewing conditions and transformations, represent the same object/scene?\label{item:ident}
\item {\bf Object/scene detection/classification:} How can the computer recognize automatically to what visual category the object/scene captured in an image belongs to? \label{item:und}
\item{\bf Large scale processing:} How can we perform saliency detection, identification and classification of large datasets.
\end{enumerate}

\pagebreak

\subsubsection{Other applications}
There are also numerous non-scientific applications related to the above research questions.  For example {\em visual saliency} (\ref{item:sal}) in important in tasks such as:
\begin{itemize}
\item Automatic target detection (see Fig. \ref{fig:sal})
\item Robot/car navigation using salient objects
\item Image and video compression
\item Automatic cropping/centering images for display on small portable screens, etc.
\end{itemize}

\begin{figure}[H]
\begin{center}
\includegraphics[width=0.65\textwidth]{fig/saliency}
\end{center}
\caption{Example of a saliency model detecting the vehicle as being the most salient object in a complex scene.}
\label{fig:sal}
\end{figure}

Some of the many applications related to {\em object/scene identification} (\ref{item:ident}) are:
\begin{itemize}
\item Stereo and wide-baseline matching
\item Image panorama stitching/creation
\item Automatic reconstruction of 3D scenes, etc.
\end{itemize}

Automatically {\em understating an object/scene} (\ref{item:und}) b the means of image classification, have many applications like:
\begin{itemize}
\item Image search engines
\item Organizing photo collections
\item Autonomous driving
\item Human machine interaction
\item Digital forensic investigation, etc.
\end{itemize}

This is a complex and high-level computer vision task, with the goal of making machines see like humans and be able to infer both general principles as well as current situations from images. Example of a trained system for scene categorization is shown on Fig.\ref{fig:mitdemo}.
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.8\textwidth]{fig/mitdemo}
\end{center}
\caption{ MIT Scene Recognition \href{http://places.csail.mit.edu/demo.html}{\underline{Demo}.}}
\label{fig:mitdemo}
\end{figure}

In fact, the majority of CV researchers traditionally work on non-scientific applications, focusing on the third and most challenging problem. Addressing the problems faced by other domain scientists, while still conducting generic and widely applicable computer vision research, seems to fit best the strategy of NLeSC and eStep. Another important aspect, where NLeSC can contribute a lot with expertise, is the development of {\em large scale} CV systems, i.e. the last research question.

\subsection{Structure}
The overview is by no means complete, it rather tries to summarize the research in the field along the above topics in the last years. The document is structured along the main outputs of the CV research, namely, scientific research (some of the topics are explained) and publications in Section \ref{sec:pubs}, software in Section \ref{sec:soft} and datasets in Section \ref{sec:db}. Some potential scientific applications are shown in Section \ref{sec:app}. The conclusions and recommendations are given is Section \ref{sec:conc}.

The CV researchers can benefit most from the \underline{\nameref{sec:pubs}} for overview of current research trends. The interested reader can also learn some of the terminology and methods in the field from that section.  For development and testing the most useful sections are \underline{\nameref{sec:soft}} and \underline{\nameref{sec:db}}.
The engineers can start by looking at section \underline{\nameref{sec:soft}}.
Readers interested in the application and directions of NLeSC are referred to sections \underline{\nameref{sec:app}} and \underline{\nameref{sec:conc}}.


\section{Introduction}

Computational methods for searching for homologous RNAs in sequence databases
%When searching for homologous RNAs in sequence databases, it is
%desirable to score
benefit from scoring both primary sequence and RNA secondary structure
conservation. Many tools have been developed which take different
approaches to how RNA sequence and secondary structure constraints
should be integrated and scored. Some tools implement specialized
rules for a specific RNA family, such as tRNAs
\citep{LoweEddy97,Laslett04}, snoRNAs \citep{LoweEddy99,Schattner06},
microRNAs \citep{Lai03,Lim03}, or SRP RNAs \citep{Lai03,Lim03}. Some
approaches use pattern matching methods and expertly designed query
patterns \citep{Macke01}. The most general approaches take as input
any RNA (or RNA multiple alignment), and construct an appropriate
statistical scoring system (often called a profile) that allows
quantitative ranking of putative homologs in a target sequence
database \citep{Gautheret01,ZhangBafna05,Huang08}.

Stochastic context-free grammars (SCFGs) provide a natural statistical
framework for combining sequence and (non-pseudoknotted) secondary
structure conservation information in a single consistent scoring
system \citep{Sakakibara94c,Eddy94,Brown00,Durbin98}. A particular
formulation of profile SCFGs, the covariance model (CM), was developed
specifically for the RNA similarity search problem.  A CM is a
probabilistic model built from a single RNA sequence or multiple
alignment with consensus secondary structure annotation marking which
positions of the alignment are single stranded and which are base
paired.
%CMs are organized as binary trees of different types of nodes that
%model different sequence and structural features of the RNA family
%they model. For example, there is a node type for single stranded
%residues, and a different node type for base pairs.
A CM is organized as a binary tree of different types of states that
model different sequence and structural features of the RNA family
they model. For example, there are different state types for single
stranded residues, basepairs, insertions, and deletions.  The states
include position specific scores for the four possible residues at
single stranded positions, the sixteen possible base pairs at paired
positions, and for insertions and deletions relative to the consensus
sequence and structure.  These scores are log-odds scores derived from
the observed counts of residues, base pairs, insertions and deletions
in the input alignment, combined with prior information derived from
structural ribosomal RNA alignments.  CM construction and
parameterization has been described in more detail elsewhere
\citep{Eddy94,Eddy02b,infguide03,NawrockiEddy07}.

A major use of CMs is within the \textsc{Rfam} database, which
contains alignments and CMs for over a thousand RNA families
\citep{Gardner09}.  \textsc{Rfam} uses CM similarity searches to
annotate RNAs in the RFAMSEQ, a 120 Gb nucleotide database derived
from the EMBL database \citep{Cochran08}.  A recent independent
benchmark of RNA similarity search found CM-based methods to be the
most sensitive, but also the slowest, of the several that were tested
\citep{Freyhult07}.  The high computational complexity and resulting
slow speed of CM dynamic programming search algorithms have been a
large obstacle to their practical application.

\begin{comment}
RNAs conserve sequence and structural features that are important to
their function. Computational tools for detecting and aligning
structural RNAs have benefitted from modelling both types of
conservation. These tools can be organized into two classes: those
that are specific to a single RNA family, and general ones that can be
used for any family. The former class includes programs for detecting
tRNAs, SRP RNA, tmRNA, snoRNAs, microRNAs, rho-independent terminators
and others. The general class of tools includes pattern matching
programs and probabilistic profile based methods, including the
'covariance model' (CM), a particular profile stochastic context-free
grammar formulation. In a recent benchmark of RNA similarity search, CM
methods were found to be the most sensitive of those tested, but also
the slowest. The computational complexity, and resulting slow speed of
CM methods have been a large obstacle to their practical application.
\end{comment}

Two complementary approaches have been taken to mitigate this high
computational cost.  The first is to accelerate the CM CYK similarity
search dynamic programming algorithm. We introduced a banded variant
of CYK that reduces the average case time complexity from $LN^{2.4}$
to $LN^{1.3}$, for a query of length $N$ residues (or consensus
alignment columns) and a target database of length $L$, at a small
cost to sensitivity \citep{NawrockiEddy07}. The second approach is to
reduce the search space (decrease $L$) by using a filter to quickly
prune away regions of the database that are unlikely to contain high
scoring hits to the CM. The CYK algorithm is then only used on the
surviving fraction of the database.

Several filtering techniques have been developed for
CMs. \textsc{Rfam} uses a BLAST-based filter on the RFAMSEQ target
database prior to searching with CMs. All sequences from the CM
training alignment are used as queries, any target subsequence scored
with an E-value less than 1000 to any query survives the filter and is
searched with the CM. Weinberg and Ruzzo introduced two types of HMM
filters, ``rigorous filter'' HMMs (\citep{WeinbergRuzzo04}) and ``ML
(maximum likelihood) HMMs'' \citep{WeinbergRuzzo06}. Rigorous filter
HMMs are parameterized to provably allow all target subsequences that
score better than a preset CM score threshold to survive.  ML HMMs are
built to be as similar as possible to the CM. ML HMM filtering aims to
prune away 99\% of the target database by setting the filter survival
threshold so that a predicted 1\% of the database will score better
than it.  \citet{ZhangBafna06} have described keyword based techniques
for filtering that require a database subsequence contain at least one
of a pre-generated list of keywords to survive the filter. Their
technique is similar to HMM rigorous filters in that all hits above a
preset CM score threshold are guaranteed to survive.

An important tradeoff exists between the acceleration gained and the
sensitivity lost from using a filter. Acceleration is dependent on the
speed of the filtering technique and the fraction of the database that
survives the filter. The sensitivity loss depends on the ability of
the filter to recognize (and not prune away) possible high scoring CM
hits. The aforementioned filtering strategies prioritize speed versus
sensitivity differently.  Weinberg/Ruzzo ML HMM filtering
is designed for speed by pruning away a target fraction of
the database. Alternatively, filter survival thresholds can be set to
achieve a target sensitivity. For example, with Weinberg/Ruzzo
rigorous filter HMMs and Zhang/Bafna keyword filters, the survival
threshold is set so that 100\% of the target subsequences that score
better than a preset CM threshold will survive, regardless
of the resulting survival fraction.

\begin{comment}
The \textsc{Rfam} BLAST filters and
Weinberg/Ruzzo ML HMM filters are designed for speed by pruning away a
target amount of the database. Both are simple to implement. The BLAST
filter threshold is set as an E-value cutoff of 1000, any BLAST hit
that scores with an E-value less than 1000 survives the filtering
step. ML HMM filter threshold scores are set after scanning a test
database with the filter, as the 1st percentile best HMM hit
score. Using this score as a filter survival threshold will eliminate
very nearly 99\% of a target database (assuming it has similar
properties as the test database).

Alternatively, filter survival thresholds can be set to achieve a target
sensitivity rather than a target speed or survival fraction. The
Weinberg/Ruzzo rigorous filter HMMs and Zhang/Bafna keyword filters
are a special case of this strategy. For both, the filter threshold is
set that will find 100\% of the hits at or above a specific CM
reporting threshold, regardless of the resulting survival fraction.
\end{comment}

\begin{comment}
Here, we propose and investigate the utility of a filter sensitivity
targeting (FST) strategy that will recognize an arbitrary fraction $F$
of the CM hits, allowing the filter score threshold to be set to
theoretically achieve any level of sensitivity.  We introduce a
general procedure for estimating these filter thresholds that can be
used with any type of filter, making it potentially useful for
evaluating and comparing different filters.
\end{comment}

%Relaxing the guarantee that all hits must be found (that
%is, $F = 1.0$) can improve the speed of the filter at a small cost to
%sensitivity.


\subsubsection{Year on Year Inflation Swap}

A Year on Year inflation swap is set up as a swap, with one leg of type {\tt YY}. Listing \ref{lst:yyswap} shows an
example. The YY leg contains an additional {\tt YYLegData} block. See \ref{ss:yylegdata} for details on the YY leg
specification.

\begin{listing}[H]
%\hrule\medskip
\begin{minted}[fontsize=\footnotesize]{xml}
    <SwapData>
      <LegData>
        <LegType>Floating</LegType>
        <Payer>true</Payer>
        ...
      </LegData>
      <LegData>
        <LegType>YY</LegType>
        <Payer>false</Payer>
        ...
        <YYLegData>
        ...
        </YYLegData>
      </LegData>
    </SwapData>
\end{minted}
\caption{Year on Year Swap Data}
\label{lst:yyswap}
\end{listing}


\newcommand{\pto}{\to_{*}}

\section{Notation}

This specification features some changes to the notation used in previous specifications.

\begin{description}
\item[Maps and partial functions] We use the notation $f : A \pto B$
  to denote a finitely supported partial function. If $B$ is a monoid,
  $f$ is a function such that $f a = 0$ for all but finitely many
  $a$. Otherwise it is a function $f : A \to B^?$ such that
  $f a = \Nothing$ for all but finitely many $a$.
\item[Map operations] We use standard notation for restriction and
  corestriction of functions to operate on partial functions as well.
\end{description}


\documentclass[11pt]{article}
% Command line: pdflatex -shell-escape compulse.tex
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{times}
\usepackage{bm}
\usepackage{fixltx2e}
\usepackage[outerbars]{changebar}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{color}
\usepackage{tabularx}
\usepackage{ulem}
%\usepackage{verbatim}
\usepackage{textcomp}
\usepackage{hyperref}
\hypersetup{colorlinks=false,urlcolor=blue,linkcolor=blue}
\usepackage{caption}

\epstopdfsetup{suffix=} % to remove 'eps-to-pdf' suffix from converted images
%\usepackage{todonotes} % use option disable to hide all comments

\usepackage[sort&compress]{natbib}
\bibpunct{[}{]}{,}{n}{,}{,}

%\usepackage[noend]{algpseudocode}

\usepackage{dsfont}
\usepackage{relsize}

%\usepackage{todonotes}

%\graphicspath{{Figure/}}

%changing the Eq. tag to use [] when numbering. use \eqref{label} to reference equations in text.
\makeatletter
  \def\tagform@#1{\maketag@@@{[#1]\@@italiccorr}}
\makeatother

\linespread{1.5}
%\setlength{\parindent}{0in}

% the following command can be used to mark changes made due to reviewers' concerns. Use as \revbox{Rx.y} for reviewer x, concern y.
\newif\ifmarkedup
\markeduptrue

\ifmarkedup
	\newcommand{\revbox}[1]{\marginpar{\framebox{\textcolor{blue}{#1}}}}
\else
	\newcommand{\revbox}[1]{}
	\renewcommand{\textcolor}[1]{}
	\renewcommand{\sout}[1]{}
\fi

%\newcommand{\bop}{$\vert B_1^+ \vert$}
\newcommand{\kt}{$k_\textrm{T}$}
\newcommand{\bmap}{$B_1^+$}
\newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}}  % tilde symbol
\mathchardef\mhyphen="2D

\begin{document}

\title{k-Space Domain Parallel Transmit Pulse Design}
\author{Jun Ma$^{1,2}$, Bernhard Gruber$^{3,4}$, Xinqiang Yan$^{1,5}$, and William A. Grissom$^{1,2,5*}$}
\maketitle
\begin{flushleft}
\vspace{-0.5cm}
$^1$Vanderbilt University Institute of Imaging Science, Nashville, TN, United States\\
$^2$Department of Biomedical Engineering, Vanderbilt University, Nashville, TN, United States\\
$^3$A. A. Martinos Center for Biomedical Imaging, Massachusetts General Hospital, Harvard Medical School, Charlestown, MA, United States\\
$^4$Division MR Physics, Center for Medical Physics and Biomedical Engineering, Medical University Vienna, Vienna, Austria\\
$^5$Department of Radiology and Radiological Sciences, Vanderbilt University, Nashville, TN, United States\\

\par
--------------------------

\par
Word Count: 5630 \\
*Corresponding author: \\
Will Grissom\\
Department of Biomedical Engineering\\
Vanderbilt University\\
5824 Stevenson Center\\
Nashville, TN 37235 USA \\
E-mail: will.grissom@vanderbilt.edu \\
Twitter: @wgrissom

\par Submitted to Magnetic Resonance in Medicine for consideration as a Full Paper.

\par
Acknowledgment: This work was supported by NIH grants R01 EB016695 and U01 EB 025162.

\end{flushleft}
\thispagestyle{plain}

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%% Abstract %%%%%%%%%%%%%%%%%%%%%%%

\section*{\underline{Abstract}}
{\bf Purpose:}
To accelerate the design of \textcolor{blue}{(under- or oversampled)}\revbox{R1.4} multidimensional parallel transmission pulses.
\\[1em]
{\bf Methods:}
A k-space domain parallel transmission pulse design algorithm was proposed that
produces a sparse matrix relating a \textcolor{blue}{complex-valued}\revbox{R1.1} target excitation pattern to the pulses that produce it,
and can be finely parallelized.
The algorithm was applied in simulations to the design of 3D SPINS pulses for inner volume excitation in the brain at 7 Tesla.
It was characterized in terms of the dependence of computation time, excitation error, and required memory
on algorithm parameters,
and it was compared to the spatial domain pulse design method in terms computation time, excitation error,
Gibbs ringing, and ability to compensate off-resonance.
\\[1em]
{\bf Results:}
The proposed algorithm achieved approximately 90\% faster pulse design compared to
an iterative spatial domain method, with the same number of parallel threads,
with the tradeoff of increased excitation error and RMS RF amplitude.
It reduced the memory required to store the design matrix by 98\% compared to a full matrix solution.
Even with a coarse design grid, the algorithm produced patterns that were free of Gibbs ringing.
It was similarly sensitive to k-space undersampling as the spatial domain method,
and was similarly capable of compensating for off-resonance.
\\[1em]
{\bf Conclusion:}
The proposed k-space domain algorithm accelerates and finely parallelizes parallel transmission pulse design,
with a modest tradeoff of excitation error and RMS RF amplitude.
\\[1em]
{\bf \noindent Key words:} Parallel Transmission; RF pulses; Ultra-high field MRI; RF pulse design; Selective excitation.

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%% Main Text %%%%%%%%%%%%%%%%%%%%%%%

\input{Introduction}

\input{Theory}

\input{Method}

\input{Result}

\input{Conclusion}

\pagebreak

\bibliographystyle{cse}
%\bibliography{kPtx_paper}

\begin{thebibliography}{10}
\providecommand{\url}[1]{\texttt{#1}}
\providecommand{\urlprefix}{URL }

\bibitem{Katscher:2003:Magn-Reson-Med:12509830}
Katscher U, B{\"o}rnert P, Leussler C, van~den Brink JS.
\newblock Transmit {SENSE}.
\newblock Magn Reson Med 2003;\hspace{0pt}49:144--150.

\bibitem{zhu2004parallel}
Zhu Y.
\newblock Parallel excitation with an array of transmit coils.
\newblock Magn Reson Med 2004;\hspace{0pt}51:775--784.

\bibitem{malik:mrm:2015}
Malik SJ, Hajnal JV.
\newblock Phase relaxed localized excitation pulses for inner volume fast spin
  echo imaging.
\newblock Magn Reson Med 2016;\hspace{0pt}76:848--861.

\bibitem{mooiweer:2016}
Mooiweer R, Sbrizzi A, Raaijmakers AJE, Van~den Berg CAT, Luijten PR, Hoogduin
  H.
\newblock Combining a reduced field of excitation with {SENSE}-based parallel
  imaging for maximum imaging efficiency.
\newblock Magn Reson Med 2016;\hspace{0pt}78:88--96.

\bibitem{Zhang:2007:Magn-Reson-Med:16526012}
Zhang Z, Yip CY, Grissom W, Noll DC, Boada FE, Stenger VA.
\newblock Reduction of transmitter {B1} inhomogeneity with transmit {SENSE}
  slice-select pulses.
\newblock Magn Reson Med 2007;\hspace{0pt}57:842--847.

\bibitem{cloos:kpstd:2012}
Cloos MA, Boulant N, Luong M, Ferrand G, Giacomini E, Le~Bihan D, Amadon A.
\newblock {$k_T$}-{Points}: {Short} three-dimensional tailored {RF} pulses for
  flip-angle homogenization over an extended volume.
\newblock Magn Reson Med 2011;\hspace{0pt}67:72--80.

\bibitem{deng:2009}
Deng W, Yang C, Alagappan V, Wald LL, Boada FE, Stenger VA.
\newblock Simultaneous z-shim method for reducing susceptibility artifacts with
  multiple transmitters.
\newblock Magn Reson Med 2009;\hspace{0pt}61:255--259.

\bibitem{Grissom:2006:MRM}
Grissom WA, Yip CY, Zhang Z, Stenger VA, Fessler JA, Noll DC.
\newblock Spatial domain method for the design of {RF} pulses in multicoil
  parallel excitation.
\newblock Magn Reson Med 2006;\hspace{0pt}56:620--9.

\bibitem{padormo:2016}
F.~Padormo, A.~Beqiri, J.~V. Hajnal, and S.~J. Malik.
\newblock Parallel transmission for ultrahigh-field imaging.
\newblock {NMR} Biomed 2016; 29(9):1145--1161.

\bibitem{deniz:2019}
C.~M. Deniz.
\newblock Parallel transmission for ultrahigh field {MRI}.
\newblock Top Magn Reson Imaging 2019; 28(3):159--171.

\bibitem{malik2012tailored}
Malik SJ, Keihaninejad S, Hammers A, Hajnal JV.
\newblock Tailored excitation in {3D} with spiral nonselective {(SPINS) RF}
  pulses.
\newblock Magn Reson Med 2012;\hspace{0pt}67:1303--1315.

\bibitem{davids2016fast}
Davids M, Schad LR, Wald LL, Guerin B.
\newblock Fast three-dimensional inner volume excitations using parallel
  transmission and optimized k-space trajectories.
\newblock Magn Reson Med 2016;\hspace{0pt}76:1170--1182.

\bibitem{setsompop2009}
K.~Setsompop, V.~Alagappan, B.~A. Gagoski, A.~Potthast, F.~Hebrank, U.~Fontius,
  F.~Schmitt, L.~L. Wald, and E.~Adalsteinsson.
\newblock Broadband slab selection with $b_1^+$ mitigation at 7{T} via parallel
  spectral-spatial excitation.
\newblock Magn Reson Med 2009; 61:493--500.

\bibitem{Malik:2010aa}
S.~J. Malik, D.~J. Larkman, D.~P. O'Regan, and J.~V. Hajnal.
\newblock Subject-specific water-selective imaging using parallel transmission.
\newblock Magn Reson Med 2010; 63(4):988--997.

\bibitem{stenger2000three}
Stenger VA, Boada FE, Noll DC.
\newblock Three-dimensional tailored {RF} pulses for the reduction of
  susceptibility artifacts in {$T_2^*$}-weighted functional {MRI}.
\newblock Magn Reson Med 2000;\hspace{0pt}44:525--531.

\bibitem{yang2010four}
Yang C, Deng W, Alagappan V, Wald LL, Stenger VA.
\newblock Four-dimensional spectral-spatial {RF} pulses for simultaneous
  correction of {B1+} inhomogeneity and susceptibility artifacts in
  {T2*}-weighted {MRI}.
\newblock Magn Reson Med 2010;\hspace{0pt}64:1--8.

\bibitem{orzada:2019}
Orzada S, Solbach K, Gratz M, Brunheim S, Fiedler TM, Johst S, Bitz AK,
  Shooshtary S, Abuelhaija A, Voelker MN, Rietsch SHG, Kraff O, Maderwald S,
  Fl\"oser M, Oehmigen M, Quick HH, Ladd ME.
\newblock A 32-channel parallel transmit system add-on for {7T MRI}.
\newblock PLOS ONE 2019;\hspace{0pt}14:1--20.

\bibitem{deng:2011}
Deng W, Yang C, Stenger VA.
\newblock Accelerated multidimensional radiofrequency pulse design for parallel
  transmission using concurrent computation on multiple graphics processing
  units.
\newblock Magn Reson Med 2011;\hspace{0pt}65:363--369.

\bibitem{setsompop2008magnitude}
Setsompop K, Wald L, Alagappan V, Gagoski B, Adalsteinsson E.
\newblock Magnitude least squares optimization for parallel radio frequency
  excitation design demonstrated at 7 {Tesla} with eight channels.
\newblock Magn Reson Med 2008;\hspace{0pt}59:908--915.

\bibitem{brunner2010optimal}
Brunner DO, Pruessmann KP.
\newblock Optimal design of multiple-channel {RF} pulses under strict power and
  {SAR} constraints.
\newblock Magn Reson Med 2010;\hspace{0pt}63:1280--1291.

\bibitem{hoyos:tmi:2014}
Hoyos-Idrobo A, Weiss P, Massire A, Amadon A, Boulant N.
\newblock On variant strategies to solve the magnitude least squares
  optimization problem in parallel transmission pulse design under strict {SAR}
  and power constraints.
\newblock IEEE Trans Med Imag 2014;\hspace{0pt}33:739--748.

\bibitem{grissom:ismrm18}
Grissom WA.
\newblock {k-Space} domain parallel transmit pulse design.
\newblock In Proceedings 26th Scientific Meeting, International Society for
  Magnetic Resonance in Medicine, Paris. 2018;\hspace{0pt} p. 3396.

\bibitem{luo2019grappa}
Luo T, Noll DC, Fessler JA, Nielsen JF.
\newblock A {GRAPPA} algorithm for arbitrary {2D/3D} non-{Cartesian} sampling
  trajectories with rapid calibration.
\newblock Magn Reson Med 2019;\hspace{0pt}82:1101--1112.

\bibitem{fessler2005toeplitz}
Fessler JA, Lee S, Olafsson VT, Shi HR, Noll DC.
\newblock Toeplitz-based iterative image reconstruction for {MRI} with
  correction for magnetic field inhomogeneity.
\newblock IEEE Trans Sig Proc 2005;\hspace{0pt}53:3393--3402.

\bibitem{lustig2008fast}
Lustig M, Kim SJ, Pauly JM.
\newblock A fast method for designing time-optimal gradient waveforms for
  arbitrary k-space trajectories.
\newblock {IEEE} Trans Med Imag 2008;\hspace{0pt}27:866--873.

\bibitem{Fessler:2003fk}
Fessler JA, Sutton BP.
\newblock Nonuniform fast {Fourier} transforms using min-max interpolation.
\newblock IEEE Trans Sig Proc 2003;\hspace{0pt}51:560--574.

\bibitem{Yip:2005:Magn-Reson-Med:16155881}
Yip CY, Fessler JA, Noll DC.
\newblock Iterative {RF} pulse design for multidimensional, small-tip-angle
  selective excitation.
\newblock Magn Reson Med 2005;\hspace{0pt}54:908--917.

\bibitem{cao2016array}
Cao Z, Yan X, Grissom WA.
\newblock Array-compressed parallel transmit pulse design.
\newblock Magn Reson Med 2016;\hspace{0pt}76:1158--1169.

\bibitem{Lee:2011:MRM}
D.~Lee, W.~A. Grissom, M.~Lustig, A.~B. Kerr, P.~P. Stang, and J.~M. Pauly.
\newblock {VERSE}-guided numerical {RF} pulse design: A fast method for peak
  {RF} power control.
\newblock Magn Reson Med 2012; 67:353--362.

\bibitem{lee2009tod}
D.~Lee, M.~Lustig, W.~A. Grissom, and J.~M. Pauly.
\newblock Time-optimal design for multidimensional and parallel transmit
  variable-rate selective excitation.
\newblock Magn Reson Med 2009, 61(6):1471--1479.

\bibitem{Xu:2008aa}
D.~Xu, K.~F. King, Y.~Zhu, G.~C. McKinnon, and Z.-P. Liang.
\newblock Designing multichannel, multidimensional, arbitrary flip angle {RF}
  pulses using an optimal control approach.
\newblock Magn Reson Med 2008, 59(3):547--560.

\bibitem{grissom:mrm:2008}
W.~A. Grissom, C.~Y. Yip, S.~M. Wright, J.~A. Fessler, and D.~C. Noll.
\newblock Additive angle method for fast large-tip-angle {RF} pulse design in
  parallel excitation.
\newblock Magn Reson Med 2008, 59(4):779--87.

\end{thebibliography}

\pagebreak

\section*{Table Captions}

\begin{table}[!h]
\centering
%\begin{tabular}{c | c}
%Inclusion Width & $\bm{W}$ Matrix Size (GB) \\
%\hline
%$\infty$ & 24.4 \\
%8 & 2.73 \\
%6 & 1.37 \\
%4 & 0.53 \\
%2 & 0.14
%\end{tabular}
\caption{$\bm{W}$ matrix sizes in gigabytes (GB) versus inclusion width in cycles/FOV.
An inclusion width of $\infty$ corresponds to a full matrix solution.}
\label{fig:wsize}
\end{table}

\pagebreak
%(Please see main document for caption with intended math typesetting)

\section*{Figure Captions}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{kspace_PTX_Patch}
	\caption{(a) A target point $\vec{k}_j$ and the nearby trajectory points that are included when calculating
	RF pulse weight contributions from this point.
	Inclusion width is defined as the distance from each target location $\vec{k}_j$ within which
	which all trajectory points are considered when solving for the $j$-th column of the design ($\bm{W}$) matrix.
	(b) Calculation of the $\bm{W}$ matrix can be performed column-by-column for each target location $\vec{k}_j$,
	or patches of target points can be solved for jointly.
	Here the 16 columns of $\bm{W}$ for a 4 $\times$ 4 patch of target points are solved together,
	and an inclusion width of 4 cycles/FOV dictates that all trajectory points within a 12 $\times$ 12 region
	centered on the patch are considered in the calculation.}
	\label{fig:Patch}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=6cm]{kspace_PTX_Coil}
	\caption{The 24-channel loop Tx array that was simulated in a human head model to obtain $B_1^+$ maps.
	The array has diameter 32 cm and height 28 cm. The 16 cm $\times$ 11 cm rectangular loops are arranged in 3 rows of 8.}
	\label{fig:Coil}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{kSpace_PTX_Pattern_Trajectory}
	\caption{(a) Middle axial, sagittal, and coronal slices of the target excitation pattern used for all pulse designs.
	(b) The SPINS trajectory used in the designs.
	(c) 10 ms minimum-time gradient waveforms that produce the SPINS trajectory.}
	\label{fig:Target}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{ErrorMap}
	\caption{ %\textcolor{red}{WAG: I think this is the figure that your example in Github should replicate.}
	Normalized excitation patterns (top row) and error maps (bottom row) in central axial, sagittal and coronal slices
	for k-space domain (left) and spatial domain designs (right).}
	\label{fig:ErrorMap}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{ComputationTime}
	\caption{(a) k-Space computation time versus number of parallel threads, for patch and inclusion widths of 4 cycles/FOV.
	(b) Computation time (blue axis) and RMSE (red axis) versus patch width, for an inclusion width of 4 cycles/FOV and 16 threads.
	(c) Computation time (blue axis) and RMSE (red axis) versus inclusion width, for patch widths of 4 and 8 cycles/FOV, and 16 threads.}
	\label{fig:ComputationTime}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{L_curve}
	\caption{L-curves for spatial domain and k-space domain pulse designs,
	repeated across five orders of magnitude of the methods' Tikhonov regularization parameters.
	The k-space domain designs were repeated using patch and inclusion widths of four versus solving for the entire domain at once (`Patch / Inclusion Widths = 4' versus `Patch / Inclusion Widths = $\infty$'),
	and using $B_1^+$ map product interpolation versus phase modulation to each trajectory location (`Interpolated Matrices' versus
	`Exact Matrices').}
	\label{fig:LCurves}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{GibbsRinging}
	\caption{Normalized error maps and RMSEs for
	(a) pulses designed using a trajectory that reaches 6 mm isotropic resolution
	and the spatial domain algorithm with a 32$\times$32$\times$24 grid,
	(b) pulses designed using the same trajectory and the spatial domain algorithm with a 64$\times$64$\times$48 grid,
	and (c) pulses designed using the same trajectory and the k-space domain algorithm with a 32$\times$32$\times$24 design grid.
	Red arrows indicate Gibbs ringing in the 32$\times$32$\times$24 spatial domain design.}
	\label{fig:GibbsRing}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{ReductionFactor}
	\caption{Normalized error maps, RMSEs, and computation times
	for spatial domain design (first row) and k-space domain design (second row),
	using excitation k-space trajectories with different reduction factors (third row).
	The reduction factors are referenced to the 10 ms trajectory in Figure \ref{fig:Target} (second column).}
	\label{fig:kspace_PTX_Acceleration}
\end{figure}

\begin{figure}[!h]
	\centering
	%\includegraphics[width=\textwidth]{OffResonance}
	\caption{
	(a) Normalized off-resonance map containing a Gaussian distortion centered above the frontal sinus,
	to mimic air-tissue susceptibility difference-induced $B_0$ inhomogeneity.
	(b) Normalized excitation maps and RMSEs for spatial domain design with off-resonance correction (first row),
	and k-space domain design without and with off-resonance correction (second and third rows).}
	\label{fig:kspace_PTX_B0}
\end{figure}

\end{document}