% authors credentials
\newcommand{\lucjbourhisatdurham}{Luc J. Bourhis\\(Durham University, UK)}
\newcommand{\lucjbourhis}{Luc J. Bourhis\\(Bruker-AXS SAS, France)}
\newcommand{\rjgildea}{Richard J. Gildea\\(Durham University, UK)}

% programming
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\cctbx}{\code{cctbx}\xspace}
\newcommand{\iotbx}{\code{iotbx}\xspace}
\newcommand{\smtbx}{\code{smtbx}\xspace}
\newcommand{\scitbx}{\code{scitbx}\xspace}
\newcommand{\mmtbx}{\code{mmtbx}\xspace}
\newcommand{\cpp}{C\nolinebreak\raisebox{.4ex}{\tiny\bf +}\nolinebreak\raisebox{.4ex}{\tiny\bf +}\xspace}
% mathematical notations: convenience and centralised look
\newcommand{\re}{\operatorname{Re}}
\newcommand{\im}{\operatorname{Im}}
\renewcommand{\vec}[1]{\mathbf{#1}}
\newcommand{\mat}[1]{\mathbf{#1}}
\newcommand{\mean}[1]{\left\langle #1 \right\rangle}
\newcommand{\modulus}[1]{\left| #1 \right|}
\newcommand{\norm}[1]{\| #1 \|}
\newcommand{\sym}[2]{\left( #1\,\vert\, #2 \right)}
\newcommand{\cov}[2]{\mathrm{Cov}\left(#1,#2\right)}
\newcommand{\fourier}[1]{\mathrm{FFT}\left[#1\right]}
\newcommand{\kernel}{\operatorname{Ker}}
\newcommand{\image}{\operatorname{Im}}
\newcommand{\dimension}{\operatorname{dim}}
\newcommand{\scalarprod}[2]{#1 \cdot #2}
\newcommand{\braket}[2]{\left\langle #1 \vphantom{#2} \right| \left. \vphantom{#1} #2 \right\rangle}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
\newcommand{\partialder}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\partialderxx}[2]{\frac{\partial^2 #1}{\partial #2^2}}
\newcommand{\partialderxy}[3]{\frac{\partial^2 #1}{\partial #2 \partial #3}}
\newcommand{\grad}[2][]{%
        \ifthenelse{ \equal{#1}{} } { \nabla #2 }
                                              { \nabla_{#1} {#2} }
}
