% Fourier Transform to angular momentum space
\newcommand{\F}[1]{\ensuremath{{\mathcal F}\left\{ {#1} \right\}}}
% Fourier Transform to frequency space
\newcommand{\Ff}[1]{\ensuremath{{\mathcal F}_f\left\{ {#1} \right\}}}

% Integral from #1 to #2 of #4 with respect to #3
\newcommand{\integral}[4]{\ensuremath{\int_{#1}^{#2} {#4} \dd{#3}}}
% Integral from -infty to +infty of #2 with respect to #1
\newcommand{\iInfInf}[2]{\integral{-\infty}{\infty}{#1}{#2}}
% Integral from 0 to +infty of #2 with respect to #1
% note that the second char in the name is a capital o, not a 0
% because ?Latex doesn't allow digits in command names
\newcommand{\iOInf}[2]{\integral{0}{\infty}{#1}{#2}}
% #3 evaluated at #2 and #1
\newcommand{\evaluated}[3]{\ensuremath{\left.{#3}\right|_{#1}^{#2}}}
% #2 evaluated at #1
\newcommand{\eval}[2]{\ensuremath{\left.{#2}\right|_{#1}}}
% evaluated at infty and -infty
\newcommand{\eInfInf}[1]{\evaluated{-\infty}{\infty}{#1}}
% evaluated at infty and 0
\newcommand{\eOInf}[1]{\evaluated{0}{\infty}{#1}}

% we do a lot of lim t_T -> infty, so macro that out
% lim as #1 -> infty
\newcommand{\limInf}[1]{\ensuremath{\lim_{{#1}\rightarrow \infty}}}
\newcommand{\limT}{\limInf{t_T}}
\newcommand{\normLimT}{\limT \frac{1}{t_T}\ } % '\ ' for a normal space
% lim as t_T -> infty of integral from -t_T/2 to t_T/2 of #1 with respect to t
\newcommand{\iLimT}[1]{\normLimT \integral{-t_T/2}{t_T/2}{t}{#1}}

\newcommand{\magSq}[1]{\ensuremath{\left|{#1}\right|^2}}
\newcommand{\PSD}{\ensuremath{\operatorname{PSD}}}

% complex conjugate
\newcommand{\conj}[1]{\ensuremath{\overline{#1}}}

% Symbol denoting the contour C
\newcommand{\C}{\ensuremath{\mathcal{C}}}
% Integral about contour C of #1 with respect to z
\newcommand{\iC}[1]{\integral{\C}{}{z}{#1}}
\newcommand{\Reals}{\ensuremath{\mathbb{R}}}
\newcommand{\Imags}{\ensuremath{\mathbb{I}}}
\newcommand{\Real}{\ensuremath{\operatorname{Re}}}
\newcommand{\Imag}{\ensuremath{\operatorname{Im}}}
\newcommand{\Res}[2]{\operatorname{Res}\left({z=#1},{#2}\right)}
\newcommand{\limZ}[1]{\lim_{z \rightarrow {#1}}}
\newcommand{\limZp}{\limZ{z_p}}
\newcommand{\CPV}{\ensuremath{\mathbb{P}}}

\newcommand{\supScript}[1]{\ensuremath{^{\mathrm{#1}}}}
\newcommand{\st}{\supScript{st}}
\newcommand{\nd}{\supScript{nd}}
\newcommand{\rd}{\supScript{rd}}
\newcommand{\sth}{\supScript{th}} % th, TH already taken

\newcommand{\colA}[1]{\textcolor{Red}{#1}}
\newcommand{\colB}[1]{\textcolor{Blue}{#1}}
\newcommand{\colAB}[1]{\textcolor{Purple}{#1}}
\newcommand{\colC}[1]{\textcolor{Green}{#1}}
