\documentclass[a4paper,11pt] {article}
\usepackage[utf8]{inputenc}
\usepackage[left=2.5cm,right=2.5cm,top=1cm,bottom=4cm]{geometry}
\usepackage{color}
\usepackage{colortbl}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{eurosym}
\usepackage{lastpage}
\usepackage{multirow}
\usepackage{pifont}
\usepackage[colorlinks=true, urlcolor=blue, linkcolor=black, citecolor=red]{hyperref}
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[color]{changebar}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{setspace}
%\usepackage{threeparttable}
%\usepackage{hyperref}
\usepackage[yyyymmdd]{datetime}
\usepackage{bm}
\usepackage{empheq}

\usepackage[printonlyused]{acronym}

%\usepackage{background}  % Uncomment to print a 'Draft Version' watermark


\setlength{\headheight}{75pt}
\pagestyle{fancy}


\definecolor{pink}{rgb}{0.55,0,0.52}
\definecolor{mygreen}{rgb}{0.19,0.55,0.11}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{verbgray}{gray}{0.9}
\definecolor{lightblue}{rgb}{0.85,0.9,1}
\definecolor{lightgreen}{rgb}{0.85,1,0.85}
\definecolor{lightorange}{rgb}{1,0.94,0.8}

\usepackage{tikz}
\usepackage{tikz-3dplot}

\definecolor{Darkgreen}{rgb}{0,0.4,0}


\lstnewenvironment{termcmd}{%
  \lstset{backgroundcolor=\color{lightblue},
  frame=single,
  framerule=0pt,
  basicstyle=\ttfamily,
  columns=fullflexible}}{}

\lstnewenvironment{termres}{%
  \lstset{backgroundcolor=\color{verbgray},
  frame=single,
  framerule=0pt,
  basicstyle=\ttfamily,
  columns=fullflexible}}{}

\lstnewenvironment{lisafile}{%
  \lstset{backgroundcolor=\color{lightgreen},
  frame=single,
  framerule=0pt,
  basicstyle=\ttfamily,
  columns=fullflexible}}{}

\lstnewenvironment{code}{%
  \lstset{backgroundcolor=\color{lightorange},
  frame=single,
  framerule=0pt,
  basicstyle=\ttfamily,
  columns=fullflexible}}{}




\begin{document}


 %%%%%%%%%%%%%%% Set the global variables values  %%%%%%%%%%%%%%%
\newcommand{\ReportTitle}{LISA Data Challenge Manual }     % Report Title
\newcommand{\ReportShortTitle}{LDC Manual}     % Report Title
\newcommand{\ReportIssue}{0}                                                       % Issue number
\newcommand{\ReportRevision}{1}                                                  % Revision number
\newcommand{\ReportRef}{LISA-LCST-SGS-MAN-001}                        % Report reference number
\newcommand{\ReportCurrentAuthor}{S. Babak}                              %  Current author
\newcommand{\ReportCurrentAuthorInstitute}{APC}    % Institute of the current author
                                                        
 %%%%%%%%%%%%%%% %%%%%%%%%%%%%%% %%%%%%%%%%%%%%%


%%%%%%%%%%%%%%% 
%%% New commands, environment, etc
\definecolor{pink}{rgb}{0.55,0,0.52}
\definecolor{mygreen}{rgb}{0.19,0.55,0.11}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{verbgray}{gray}{0.9}
\definecolor{lightblue}{rgb}{0.85,0.9,1}
\definecolor{lightgreen}{rgb}{0.85,1,0.85}
\definecolor{lightorange}{rgb}{1,0.94,0.8}
\definecolor{forestgreen}{rgb}{0.1,0.49,0.07}

\newcommand{\todo}[1]{\textcolor{red}{[TODO: #1]}}
\newcommand{\TBC}{\textcolor{red}{(to be checked)}}
\newcommand{\TBD}[1]{\textcolor{red}{\textit{TBD} #1}}
\newcommand{\tbc}[1]{\textcolor{red}{\textit{TBC} #1}}

\newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}

%%%% Comments : 
\newcommand{\cSB}[1]{\textcolor{red}{\textit{[Stas] #1}}} 
\newcommand{\sSB}[2]{\textcolor{red}{#1 \textit{[Stas] #2}}} 

\newcommand{\cMV}[1]{\textcolor{red}{\textit{[Michele] #1}}} 
\newcommand{\sMV}[2]{\textcolor{red}{#1 \textit{[Michele] #2}}} 

\newcommand{\cAP}[1]{\textcolor{red}{\textit{[Antoine] #1}}} 
\newcommand{\sAP}[2]{\textcolor{red}{#1 \textit{[Antoine] #2}}} 

\newcommand{\cQ}[1]{\textcolor{red}{\textit{[?] #1}}} 

\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}

\lstnewenvironment{rawtxt}{%
  \lstset{backgroundcolor=\color{verbgray},
  frame=single,
  framerule=0pt,
  basicstyle=\ttfamily,
  columns=fullflexible}}{}
  
  
\newcommand{\vn}{\mbox{\boldmath${n}$}}
\newcommand{\vL}{\mbox{\boldmath${L}$}}
\newcommand{\vk}{\mbox{\boldmath${k}$}}
\newcommand{\vu}{\mbox{\boldmath${u}$}}
\newcommand{\vv}{\mbox{\boldmath${v}$}}
\newcommand{\vp}{\mbox{\boldmath${p}$}}
\newcommand{\vq}{\mbox{\boldmath${q}$}}
\newcommand{\vx}{\mbox{\boldmath${x}$}}
\newcommand{\vy}{\mbox{\boldmath${y}$}}
\newcommand{\vz}{\mbox{\boldmath${z}$}}
\newcommand{\ve}{\mbox{\boldmath${e}$}}
\newcommand{\veps}{\mbox{\boldmath${\epsilon}$}}
\newcommand{\sinc}{\mbox{sinc}}
\def\be{\begin{equation}}
\def\en{\end{equation}}
\def\bea{\begin{eqnarray}}
\def\ena{\end{eqnarray}}
\def\bsub{\begin{subequations}}
\def\esub{\end{subequations}}
\def\di{\partial}
\def\msun{\,{\rm M_\odot}}
\def\mF{\mathcal{F}}
\newcommand{\sYlm}{{}_{-2}Y_{\ell m}}
\newcommand{\sYlmstar}{{}_{-2}Y_{\ell, -m}^{*}}
\newcommand{\sYlminusmstar}{{}_{-2}Y_{\ell, -m}^{*}}

\def\v#1{{\bm{#1}}}

\newcommand{\delay}[1]{\mathcal{D}_{#1}}
\newtheorem{app}{Approximation}[section]
%%%%%%%%%%%%%%%




\pagenumbering{arabic}

\begin{titlepage}
\thispagestyle{fancy}

%\lhead{\begin{tabular}{c m{0.4\textwidth}}  \multirow{2}{*}{\includegraphics[scale=0.3]{Figures/Logo_LISA_ESA_1711_ImageOnly.png}} & \Large{\textbf{Laser Interferferometer}} \\   &  \Large{\textbf{Space Antenna}} \end{tabular} }
%\chead{}
%\rhead{\begin{tabular}{|m{0.2\textwidth}|m{0.15\textwidth}|} \hline \multicolumn{2}{|l|}{Ref : \ReportRef} \\ \hline Issue :  \ReportIssue &  Revision : \ReportRevision \\ \hline Date :  \today  & Page : \thepage / \lastpageref{LastPage}  \\ \hline \end{tabular}}

\lhead{\begin{tabular}{c m{0.4\textwidth}}  \multirow{2}{*}{\includegraphics[scale=0.3]{Figures/Logo_LISA_ESA_1711_ImageOnly.png}} & \Large{\textbf{Laser Interferometer}} \\   &  \Large{\textbf{Space Antenna}} \end{tabular} }
\chead{}
\rhead{\begin{tabular}{|m{0.2\textwidth}|m{0.15\textwidth}|} \hline \multicolumn{2}{|l|}{Ref : \ReportRef} \\ \hline Issue :  \ReportIssue &  Revision : \ReportRevision \\ \hline Date :  \today  & Page : \thepage / \pageref{LastPage}  \\ \hline \end{tabular}}


\cfoot{{\tiny This document is the property of the LISA Consortium and cannot be reproduced or distributed without its authorization.}}

\begin{center}

{\Huge \textbf{ \ReportTitle}}\\
\vspace{1cm}

\begin{tabular}{@{}|p{0.12\textwidth} | p{0.8\textwidth} | @{}}
\hline 
 & \\
{\bf N/Ref}  : &  \ReportRef  \\
 & \\
\hline 
 & \\ 
 {\bf Title} & \textbf{\ReportTitle} \\ 
 & \\
\hline 
 & \\
 %%%%%%%%%%%%%%% ABSTRACT HERE  %%%%%%%%%%%%%%%
{\bf Abstract} & Users and developpers manual of the \ac{LDC}
 %%%%%%%%%%%%%%% %%%%%%%%%%%%%%% %%%%%%%%%%%%%%%
\\
&
\\
\hline
\end{tabular}

\vfill

\begin{tabular}{| m{0.18\textwidth} | m{0.28\textwidth} | m{0.12\textwidth} | m{0.22\textwidth} |}
\hline 
 & {\bf Name} & {\bf Date} & {\bf Signature} \\
\hline
Prepared by & LDC WG & \today &  \\[20pt]
\hline
Checked by &  &  &  \\[20pt]
\hline
Checked by (QA)  & &  &  \\[20pt]
\hline
Approved by  & &  &  \\[20pt]
\hline 
\end{tabular}

\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage

\lhead{\begin{tabular}{c m{0.4\textwidth}}  \multirow{2}{*}{\includegraphics[scale=0.3]{Figures/Logo_LISA_ESA_1711_ImageOnly.png}} & \large{\textbf{LISA}} \\   &  \large{\ReportShortTitle} \end{tabular} }

\begin{center}

{\Large \textbf{Document Change Record}}\\
\vspace{0.5cm}

 %%%%%%%%%%%%%%% CONTRIBUTOR  LIST  %%%%%%%%%%%%%%%
 \vspace{1.0cm} 

{\Large \textbf{Contributor List}}\\
\vspace{0.5cm}
 
\begin{tabular}{|m{0.25\textwidth}| >{\centering\arraybackslash}m{0.25\textwidth}| >{\centering\arraybackslash} m{0.3\textwidth} |}
\hline 
{\bf Author's name} & {\bf Institute} & {\bf Location } \\
Babak Stas &  APC & Paris \\
Petiteau Antoine &  APC & Paris \\
... &   &  \\
\hline

\hline 
\end{tabular}
 %%%%%%%%%%%%%%% %%%%%%%%%%%%%%% %%%%%%%%%%%%%%%

\vspace{1.0cm} 

 %%%%%%%%%%%%%%% TABLE FOR CHANGE RECORD  %%%%%%%%%%%%%%%
\begin{tabular}{|m{0.05\textwidth}|m{0.12\textwidth}|m{0.24\textwidth}|m{0.35\textwidth}|m{0.1\textwidth}|}
\hline 
{\bf Ver}. & {\bf Date} & {\bf Author} & {\bf Description} & {\bf Pages} \\
\hline
0.1 & 2018-01-12  & S. Babak, A. Petiteau & Initial version & all \\

\hline
\ReportIssue.\ReportRevision & \today & \ReportCurrentAuthor\ (\ReportCurrentAuthorInstitute) & Current Version & \\
\hline 
\end{tabular}
 %%%%%%%%%%%%%%% %%%%%%%%%%%%%%% %%%%%%%%%%%%%%%

\vspace{1.0cm} 

{\Large \textbf{Distribution list}}\\
\vspace{0.5cm}

 %%%%%%%%%%%%%%% DISTRIBUTION LIST  %%%%%%%%%%%%%%%
\begin{tabular}{|m{0.52\textwidth}| >{\centering\arraybackslash}m{0.2\textwidth}| >{\centering\arraybackslash} m{0.2\textwidth} |}
\hline 
{\bf Recipient} & {\bf Restricted} & {\bf Not restricted} \\
\hline
LISA Consortium &  & \ding{55}  \\
LDC Participants &  &  \ding{55} \\
\hline 
\end{tabular}
 %%%%%%%%%%%%%%% %%%%%%%%%%%%%%% %%%%%%%%%%%%%%%

\end{center}

\end{titlepage}

% Set page counter to 3 (no reset after the title pages)
\setcounter{page}{3} 

\tableofcontents
\clearpage

 %%%%%%%%%%%%%%% WRITE YOUR DOCUMENT HERE  %%%%%%%%%%%%%%%


% ############################################################
\newpage
\section{Acronyms and Glossary}

% ============================================================
\subsection{Acronyms}

\begin{acronym}
  \input{LISA_Acronyms}
\end{acronym}


% ============================================================
\subsection{Glossary}


% ############################################################
\section{Purpose and Scope}

\ac{LISA}

It is more than just fun, it is really critical for the LISA project!

\section{Short description of Data Releases}
This section collects the data releases. Each data release might contain multiple data sets united by a common purpose. Once you define the well posed question which you want to answer, you decided which sources you want to include in the data and if you want a simple or complex data. These define the number of data sets.  The names of the data releases should reflect the purpose/project, though it might have a nick-name (just don't be rude, be funny). 
Each data set contains $X, Y, Z$ TDI combinations (for the fractional frequency) in time domain.

\subsection{Training data release ``Radler''}
 This is the first data release after a long break. The main purpose if this data release is to build the LDC data production pipeline which eventually will be a part of  a more complext end-to-end simulator. This challenge also aims at testing the collaboration tools (git lab, wiki, zoom, data base with the web interface). We have adopted hdf5 as a main data format for this challenge and the hdf5 file is a central part of the pipeline, 
 we start with generating the hdf5 file based on the request (description of the data set) from user. This hdf5 file is get updated as it propagates trough the pipeline.  
 
 Scientific aim of this data release is build the data analysis tools and prototype of the pipeline. The data sets will not be very sophisticated.  The tools used for analysing these 
 data sets will be used as tutorials and examples.  So the data sets are as follows:
 \begin{enumerate}
     \item \acf{MBHB} source: The gaussian instrumental noise and a single \acf{GW} signals from MBHB. The data will be generated in the time domain using LISACode (for the response).  We use IMRPhenomD waveform which describes inspiral-merger-ringdown in the frequency domain  for non-precessing systems. The spins of both \acf{BH}s are parallel to the orbital angular momentum. The signal contains only the dominant ($l=2, m=\pm 2$) mode.  It is generated  ($h_{+}, h_{\times}$) in frequency domain and Fourier transformed to the time domain, then passed through the LISACode.  The \acf{SNR} will be 100-500.  Duration of the signal 0.6-1.2 years. Time step is 10 sec. Duration of observation is assumed to be 41943040 seconds. 
     
     \item MBHB source: The gaussian instrumental noise and a single GW signal from MBHB. It will be similar to the first data set with the following exceptions: (i) The signal will be generated completely in the frequency domain, including the TDI response (approximation). This procedure  is described in the section~\ref{S:W_IMRD}. 
     
 
     \item {\color{mygreen} We might also release the data set with a single MBHB signal similar to above. The instrumental noise will be assumed gaussian but its level will be chosen uniform $U[1, 2]$ of the nominal value for each link. The complications of this data set is that we do not know the level of the noise in each link and one cannot easily construct the TDI combination $A, E, T$ with uncorrelated noise.}
     
     \item \acf{EMRI} source: The gaussian noise plus one EMRI GW signal as was used in the old MLDC, this is the model described in \cite{Barack:2003fp}. This model is not a faithful representation of the expected GW signal but fast to produce. In the data analysis algorithm the participants should not rely strongly on the model for the detection purposes. The SNR of the signal will be in the range 40-70, duration 1-1.5 years. Time step is 15 sec. Duration of observation is assumed to be 62914560 seconds.
     
     
     \item {\color{mygreen} EMRI source. The gaussian noise plus one EMRI signal.  This data set is similar to the above one, but the model for the GW signal is based on the AAK (augmented analytic kludge) suggested in \cite{Chua:2017ujo}. }
     
     
     \item Galactic binaries: The gaussian noise and GW signals from the population of Galactic white dwarf binaries. The population contains about 30 millions of binary systems. The waveform ($h_+, h_{\times}$) is produced by Taylor expansion of the phase (up to first derivative in frequency) at the $t_0$ (beginning of observations). The response function is approximate and described in details \cite{Cornish:2007if}. Time step is 15 sec.  Duration of observation is assumed to be 62914560 seconds.\\
     
     We have posted another data set which contains 10 verification binaries. Finding and characterizing those sources should be rather easy and could serve as an excersise for the undergraduate students.

     
     
     
     \item Stellar mass black hole binaries: The gaussian noise plus the GW signal from the population of the stellar mass binary BHs. Those are the binaries simiar to those detected by LIGO-VIRGO. Some of those binaries will be detectable in the band of ground based detectors several years after being observed in LISA. The waveforms $h_+, h_{\times}$ are produced using the time domain (IMRPhenomD) model.
The waveform (including the TDI response) is completely produced in the frequency domain using the approach described in~\ref{S:W_IMRD} and then transformed into time domain. The signal was not tapered, so Gibbs oscillations are present in the time domain data. In addition the time step (5 sec.) imposes the Nyquist frequency 
0.1 Hz, so all signals are generated up to this frequency, as result some signals are terminated abruptly in time domain. We assume that this data set will be analyzed in the frequency domain. Duration of observation is assumed to be 83886080 seconds. The population contains 21721 black hole binaies. 

    \item Bright stellar mass black hole binaries: this data set is similar to the above but we have used only the signals which have the total SNR above 5.0 (against the instrumental noise!). Those binaries are identical in parameters as in the data set above. Those interested in the stochastic signal produced by SOBBH
    (stellar origin binary black holes) can subtract this signal from the data set with a whole population.   


     \item Stochastic GW signal.  Here we will have a gaussian noise plus stochastic GW signal. 
The stochastic GW signal has flat (across the whole frequency band) spectrum. The stochastic signal is isotropic
    \item Stochastic GW signal. This data set is similar to the above but the spectrum is more complicated and described in the section~\ref{S:W_SGWB}
    


 \end{enumerate}
  
All datasets are  stored together with the metadata (used to produce it) in hdf5 files. In particular we store $h_+, h_{\times}$ if we have used LISACode to generate the dataset otherwise we store $X, Y, Z$ TDI channels (for the fractional frequency measurements). In all datasets (besides 3rd) we have used the noise with the same properties in each link, so one can form noise uncorrelated  TDIs by a linear combination: 
$$
A = (Z-X)/\sqrt{2}\;\;\;\;  E = (X-2Y+Z)/\sqrt{6}, \;\;\;\; T= (X+Y+Z)/\sqrt{3}.
$$
Note that $T$ combination is not sensitive to GW signal at low frequencies. 


% ############################################################
\newpage
\section{Quick start}
\label{sec:QuickStart}

For the quick start instruction, you can have a look at the \verb+README.md+ or 
directly at the \href{https://gitlab.in2p3.fr/stas/MLDC}{home webpage of the project on gitlab (https://gitlab.in2p3.fr/stas/MLDC)}. 




% ############################################################
\newpage
\section{Installation}
\label{sec:Install}

% ============================================================
\subsection{Docker for user}
\label{sec:InstallDockerUser}

There is a ready-to-use docker image containing an installation of all the \ac{LDC} tools. 
This image is automatically updated after each push passing the tests. 
To use the image you need \href{https://www.docker.com/}{Docker (https://www.docker.com/)} installed on your system. 
Once installed Docker, you can use it by entering following commands in your terminal:


\begin{termcmd}
    docker login gitlab-registry.in2p3.fr
    docker pull gitlab-registry.in2p3.fr/stas/mldc:master
    docker run -it -v PathMyLocalDir:/workspace gitlab-registry.in2p3.fr/stas/mldc:master
\end{termcmd}

\begin{itemize}
  \item \verb+PathMyLocalDir+ is the path to a local directory on your computer that is mirrored with the 
  directory \verb+workspace+ on the docker instance. 
  It is use to exchange files between docker and the rest of your computer.
  \item \verb+master+ is the branch used to build the image
\end{itemize} 

If everything went well, the last line of your terminal should start with 
\verb+bash-4.2#+. 
If it's the case you are in the docker machine contianing the \ac{LDC} tools.
You are in the \verb+/workspace+ directory on docker which is a mirror 
 of your local directory \verb+PathMyLocalDir+:
 \begin{termres}
    bash-4.2# pwd
    /workspace
    bash-4.2#
 \end{termres}




% ============================================================
\subsection{Docker for developer}
\label{sec:InstallDockerDev}

There is docker image containing all the necessary packages to install and to run the LDC tools.
To use the image you need \href{https://www.docker.com/}{Docker (https://www.docker.com/)} installed on your system.

Once installed Docker, make sure you have \verb+git+ installed and then:
\begin{enumerate}
  \item Clone the LDC git repository somewhere on your computer (\verb+MYDIR/LDC+):
\begin{termcmd}
    cd MYDIR/LDC
    git clone git@gitlab.in2p3.fr:stas/MLDC.git  
\end{termcmd}

\item Start docker 

\begin{termcmd}
  docker login gitlab-registry.in2p3.fr
  docker pull gitlab-registry.in2p3.fr/elisadpc/docker:ldc_env
  docker run -it -v /PATH_TO_DIR_WITH_LDC:/workspace \
      gitlab-registry.in2p3.fr/elisadpc/docker:ldc_env
\end{termcmd}

The last line of your terminal should start with \verb+workspace#+: 
your terminal is in the docker instance which a
standard unix environment (CentOS) and containing all the tools necessary for the LDC.
The directory \verb+workspace+ on the docker instance is a mirror of your local directory 
\verb+/PATH_TO_DIR_WITH_LDC+ which should be the directory containing the \verb+MLDC+ 
directory cloned from git.
If you type \verb+ls+ you should see the \verb+MLDC+ directory.

\item Install the LDC tools and run the tests:
\begin{termcmd}
  cd MLDC
  python master_install.py
  export PYTHONPATH=/workspace/LDC/software/LDCpipeline/scripts/:$PYTHONPATH
  export PATH=/workspace/LDC/software/LDCpipeline/scripts/:$PATH
  python -m unittest discover
\end{termcmd}

The two \verb+export+ lines are needed for indicating where are the function that 
some script are calling and that are tested. 
\verb+/workspace/LDC+ is the path to the LDC directory on the docker machine.

Now, you can make your change on the \ac{LDC} scripts,etc and run the tools in the terminal

\end{enumerate}

% ============================================================
\subsection{Manual installation}
\label{sec:InstallManual}

\subsubsection{How to}
\label{sec:InstallManualHow}
\begin{enumerate}
  \item Make sure you have all the dependencies (see section~\ref{sec:InstallManualDependencies}) installed.

   \item Clone the repository:
  \begin{termcmd}
    git clone git@gitlab.in2p3.fr:stas/MLDC.git
  \end{termcmd}
  
  \item Run the \verb+master_install+:
  \begin{termcmd}
    cd MLDC
    python master_install.py --prefix=WhereToInstall
  \end{termcmd}
\end{enumerate}


\subsubsection{Dependencies}
\label{sec:InstallManualDependencies} 
You will need to install:
\begin{itemize}
  \item \verb+c+++ compiler
  \item \verb+python+
  \item \verb+gsl+
  \item \verb+fftw+
  \item \verb+cython+
  \item \verb+swig+
  \item \href{https://gitlab.in2p3.fr/elisadpc/LISACode}{LISACode (https://gitlab.in2p3.fr/elisadpc/LISACode)} (optional. if you want to apply response in the time domain)
\end{itemize}
%- 
%- 
%We also recommend installation of anaconda.  


% ############################################################
\newpage
\section{Waveform inventory}
\label{sec:Waveform}



% ============================================================
\subsection{Convention for binary systems}
\label{sec:Binary}



\tdplotsetmaincoords{60}{110}
%
\pgfmathsetmacro{\rvec}{1.3}
\pgfmathsetmacro{\thetavec}{30}
\pgfmathsetmacro{\phivec}{60}
%
\subsubsection{Source frame}

We start by introducing a source frame defined by unit vectors $(\vx_{S}, \vy_{S}, \vz_{S})$. The orientation of this source frame with respect to the binary system considered is left to the waveform model, as different choices might be preferable for different systems. An example is given by the NR convention of~\cite{NRinj2017, PfeifferFrames}, where the unit separation vector is $\bm{n} = \vx_{S}$ and the normal to the orbital plane is $\hat{\bm{L}}_{N} = \vz_{S}$ at the start of the waveform.

In this source frame, we introduce standard spherical coordinates $(\theta_{S}, \phi_{S})$, and the associated spherical orthonormal basis vectors $(\ve^S_{r}, \ve^S_{\theta}, \ve^S_{\phi})$. The unit vector $\vk$ defines the direction of propagation of the gravitational waves, from the source towards the observer. Expressed in spherical coordinates,
%\be
%<<<<<<< HEAD
%e^{+}_{ij} = (\ve_{\theta}\outer \ve_{\theta} - \ve_{\phi} \outer \ve_{\phi})_{ij}, \;\;\; 
%e^{\times}_{ij} = (\ve_{\theta} \ve_{\phi} + \ve_{\phi}\ve_{\theta})_{ij}
%\en
%We can associate this polarization basis with unit vectors 
%$\vp \sim \vL \times \vk, \;\; \vq = \vp \times \vk$ which are frequently used in the literature: 
%$\vp = \ve_{\phi},\;\; \vq = \ve_{\theta}$.  The GW strain can be decomposed in this basis
%\bea
%h_{ij} = \ve^{+}_{ij} h^S_{+} + \ve^{\times}_{ij} h^S_{\times}
%\ena
%Those two polarizations can be decomposed in the spin-weighted (-2) spherical harmonics \cite{2007arXiv0709.0093A}:
%\begin{eqnarray}
 % h^S_{+} - i h^S_{\times} = \sum_{l=2}^{\infty} \sum_{m=-l}^{l} H_{lm}(t) ^{-2}Y_{lm}(\theta_o,\phi_o),
%\end{eqnarray}
%which implies
%\bea
%h_{+}^S(t) = \frac1{2} \sum_{l,m} Y_{lm}H_{lm}(t) + Y_{lm}^*H^*_{lm}(t) \label{Eq:hpTDFull}\\
%h_{\times}^S(t) = \frac{i}{2} \sum_{l,m} Y_{lm}H_{lm}(t) - Y_{lm}^*H^*_{lm}(t) \label{Eq:hcTDFull}
%\label{Eq:genericPC}
%\ena
%We have droped the supscript of weight $(-2)$ for convenience.
%=======
\be
	\vk = \ve_{r}^{S} = \{\sin{\theta_{S}}\cos{\phi_{S}}, \sin{\theta_{S}}\sin{\phi_{S}}, \cos{\theta_{S}}\} \,.
\en
The explicit expressions for the other vectors of the spherical basis are
\bsub
\begin{align}
	\ve^S_{\theta} = { \partial  \ve_{r}^{S} \over \partial \theta_{S}} &= \{\cos{\theta_{S}}\cos{\phi_{S}}, \cos{\theta_{S}}\sin{\phi_{S}},-\sin{\theta_{S}}\} \,,\\
	\ve^S_{\phi} = {1 \over \sin \theta_{S}} { \partial  \ve_{r}^{S} \over \partial \phi_{S}}  &= \{-\sin{\phi_{S}}, \cos{\phi_{S}}, 0\} \,.
\end{align}
\esub

\begin{figure}[tbh]
  \centering
\begin{tikzpicture}[scale=4,tdplot_main_coords]
    \coordinate (O) at (0,0,0);
    \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$\vx_{S}$};
    \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$\vy_{S}$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$\vz_{S}$};
    %\tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
    \tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
    \draw[-stealth,color=red] (O) -- (P) node[above right] {$\bf{k}$};
    \draw[dashed, color=red] (O) -- (Pxy);
    \draw[dashed, color=red] (P) -- (Pxy);
    \tdplotdrawarc{(O)}{0.2}{0}{\phivec}{anchor=north}{$\phi_{S} = \varphi_{0}$}
    \tdplotsetthetaplanecoords{\phivec}
    \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.2}{0}%
        {\thetavec}{anchor=south west}{$\theta_{S} = \iota_{0}$};
    %\draw (1,1,1) node[anchor=south] {.}  
    \tdplotsetcoord{r}{1.0}{\thetavec}{\phivec};
    \draw (r) node {.};
%    \pgfmathsetmacro{\x1}{\rvec*cos(\phivec)*sin(\thetavec)}
%    \pgfmathsetmacro{\y1}{\rvec*cos(\phivec)*sin(\thetavec)}
%    \pgfmathsetmacro{\z1}{\rvec*cos(\thetavec)}
    \tdplotsetcoord{rth}{1.0}{\thetavec+12.0}{\phivec};
    \tdplotsetcoord{rph}{1.0}{\thetavec}{\phivec+25};
%    \draw[thick,->] (r)--(0.25,0.433, 0.866-1);
    \draw[-stealth, color=Darkgreen] (r)--(rth) node[right] {$\ve_{\theta}^S = \bf{p}$};
    \draw[-stealth, color=Darkgreen] (r)--(rph) node[right] {$\ve_{\phi}^S = \bf{q}$};
    \fill (r) circle[radius=0.3pt] node[anchor=south west]{};
    
    \draw[dashed,tdplot_rotated_coords] (1.0,0,0) arc (0:90:1.0);
    \draw[dashed] (1.0,0,0) arc (0:90:1.0);    
\end{tikzpicture}
\caption{Source frame. }
\label{F:source_frame} 
\end{figure}


Next, introduce the polarization basis vectors: 
\be
	\vp = \ve^S_{\theta}, \;\; \vq = \ve^S_{\phi}
\en
which form together with $\vk$ the radiation frame or wave-frame: $(\vp, \vq, \vk)$. They can be defined from $\vz_{S}$ only as
\be\label{eq:defpq}
	\vq = \frac{\vz_{S} \times \vk}{|\vz_{S} \times \vk|} \,, \quad \vp = \vq \times \vk.
\en
The source frame and the polarization vectors are shown in the fig.~\ref{F:source_frame}. Defining the polarization tensors
\be\label{eq:defeplusecross}
	\ve^{+}_{ij} = (\vp \otimes \vp - \vq \otimes \vq)_{ij} \,, \quad
	\ve^{\times}_{ij} = (\vp \otimes \vq + \vq \otimes\vp)_{ij} \,,
\en
the GW strain in transverse-traceless gauge takes the form
\be
	h_{ij}^{\rm TT} = \ve^{+}_{ij} h_{+} + \ve^{\times}_{ij} h_{\times} \,.
\en
This defines the polarizations $h_{+}$ and $h_{\times}$, functions of time. They are also given by the inverse relations
\be
	h_{+} = \frac{1}{2} h_{ij}^{\rm TT}\ve^{+}_{ij} \,, \quad h_{\times} = \frac{1}{2} h_{ij}^{\rm TT} \ve^{\times}_{ij} \,.
\en

The terminology used in the code tries to stay close to usual names and notation. The $0$ subscript reminds us that these angles are constants.
\begin{empheq}[box=\widefbox]{align}
	\text{Inclination :} & \quad \iota_{0} \equiv \theta_{S} \,, \\
	\text{Observer phase :} & \quad \varphi_{0} \equiv \phi_{S} \,.
\end{empheq}

%We will associate the polar angle $\theta_{obs}$ with an inclination angle for the non-precessing binaries (sometimes also denoted as $\iota$): 
%\be
%\cos{\iota} = \cos{\theta_{obs}} = (\vz^S. \vk) \propto (\vL.\vk). 
%\en
%The second (azimuthal) angle, $\phi_{obs}$, for the non-precessing binaries could be either associated with the position of the observer in the source frame or with the intial orientation of the masses in $(\vx^S, \vy^S)$ plane (initial orbital phase). 

%\paragraph{Frequency domain}
%Now consider the waveform in the frequency domain, we adopt the convention for the Fourier transform used in FFTW (and in numpy):
%\be
%\tilde{H}_{lm}(f) = \int H_{lm}(t)e^{-i2\pi ft} dt.
%\en
%\begin{eqnarray}
  %\widetilde{h_k} = \sum h_j \ e^{-2 \pi i { j k \over N } } \; ; \quad  h_j = \sum \widetilde{h_k} \ e^{2 \pi i { j k \over N } }
%\end{eqnarray}

%The equivalent convention for continuous Fourier transform is: 
%\begin{eqnarray}
  %\widetilde{H_{lm}} (f) &=& \int H_{lm} (t) e^{-2 \pi i  f t } dt  
  %\; ; \quad 
  %\widetilde{H^*_{lm}} (f) = \int H^*_{lm} (t) e^{-2 \pi i  f t } dt  
%\end{eqnarray}

%We deduce the following usefull equalities:
%\begin{eqnarray}
  %\left( \widetilde{H_{lm}} \right)^* (f) &=& \int H^*_{lm} (t) e^{-2 \pi i  (-f) t } dt \nonumber \\
  %\widetilde{H_{lm}}^* (f) & = & \widetilde{H^*_{lm}} (-f) \\
  %\widetilde{H^*_{lm}} (f) & = & \widetilde{H_{lm}}^* (-f) \\
  %H_{l-m} & = & (-1)^l H_{lm}^* \\
  %\widetilde{H_{l-m}} (f) & = & (-1)^l \widetilde{H_{lm}^*} (f) = \widetilde{H_{lm}}^* (-f) \label{Eq:ConvHlmm}
  %\end{eqnarray}
 %%
 %where the last equality is only true for the non-precessing systems (as it uses the symmetry of the modes). Assuming again 
%$H_{lm}(t)= A_{lm}e^{im\Phi(t)}$ (which is true for non-precessing systems) we can show that the $\widetilde{H_{lm}}$ is non-zero for 
%$f>0,\; m>0$ and $f<0,\; m<0$.  Taking the Fourier transform of the two polarizations (eqns~\eqref{Eq:hpTDFull} and \eqref{Eq:hcTDFull}) we get
%\begin{eqnarray}
  %\widetilde{{h}^S}_+ (f) & = & \frac1{2} \sum_{l,m} Y_{lm} \widetilde{H}_{lm}(f) + Y_{lm}^* \widetilde{H^*}_{lm}(f) \\
  %& = & \frac1{2} \sum_{l,m} Y_{lm} \widetilde{H}_{lm}(f) + Y_{lm}^* \widetilde{H}^*_{lm}(-f) \\
%\widetilde{h_{\times}^S}(f) & = & \frac{i}{2} \sum_{l,m} Y_{lm} \widetilde{H}_{lm}(f) - Y_{lm}^*\widetilde{H}^*_{lm}(-f)
%\end{eqnarray}
%%
%We can again consider only $(2, \pm 2)$ mode for non-precessing systems and for positive frequencies (!) we have:
%\bea
%2 \widetilde{h_+} & = &
 %\left.  \left( Y_{22} \widetilde{H_{22}} + Y_{2-2} \widetilde{H_{2-2}} \right) \right|_f +
 %\left.  \left( Y_{22}^* \widetilde{H_{22}}^* + Y_{2-2}^* \widetilde{H_{2-2}}^* \right) \right|_{-f}
 %\ena
%Using~\eqref{Eq:ConvHlmm}:
%\bea
%2 \widetilde{h_+} & = &
 %\left.  \left( Y_{22} \widetilde{H_{22}} + Y_{2-2} \widetilde{H_{2-2}} 
 %+ Y_{22}^* \widetilde{H_{2-2}} + Y_{2-2}^* \widetilde{H_{22}} \right) \right|_{f} \\
 %\tilde{h}_+(f>0) &=& \frac1{2}\widetilde{H_{22}}(Y_{22} + Y_{2-2}^*)
 %\ena
 
 
%\be
%e^{+}_{ij} = (\ve_{\theta}\otimes \ve_{\theta} - \ve_{\phi} \otimes \ve_{\phi})_{ij}, \;\;\; 
%e^{\times}_{ij} = (\ve_{\theta} \ve_{\phi} + \ve_{\phi}\ve_{\theta})_{ij}
%\en
%We can associate this polarization basis with unit vectors 
%$\vp \sim \vL \times \vk, \;\; \vq = \vp \times \vk$ which are frequently used in the literature: 
%$\vp = \ve_{\phi},\;\; \vq = \ve_{\theta}$.  The GW strain can be decomposed in this basis
%\bea
%h_{ij} = \ve^{+}_{ij} h^S_{+} + \ve^{\times}_{ij} h^S_{\times}
%\ena
%Those two polarizations can be decomposed in the spin-weighted (-2) spherical harmonics \cite{2007arXiv0709.0093A}:
%\begin{eqnarray}
% h^S_{+} - i h^S_{\times} = \sum_{l=2}^{\infty} \sum_{m=-l}^{l} H_{lm}(t) ^{-2}Y_{lm}(\theta_o,\phi_o),
%\end{eqnarray}
%which implies
%\bea
%h_{+}^S(t) = \frac1{2} \sum_{l,m} Y_{lm}H_{lm}(t) + Y_{lm}^*H^*_{lm}(t) \label{Eq:hpTDFull}\\
%h_{\times}^S(t) = \frac{i}{2} \sum_{l,m} Y_{lm}H_{lm}(t) - Y_{lm}^*H^*_{lm}(t) \label{Eq:hcTDFull}\label{Eq:genericPC}
%\ena
%We have droped the supscript of weight $(-2)$ for convenience.

 
\subsubsection{From the source frame to the SSB frame}
\label{sec:FrameSrcToSSB}

We now introduce as a detector frame a Solar System Barycenter (SSB) frame $(\vx, \vy, \vz)$, based on the ecliptic plane. Note that although we parallel here the geometric definitions of \texttt{LAL}~\cite{lal}, in their case this detector frame is a different frame, geocentric and based on the celestial equator.

Like for the source frame, we introduce standard spherical coordinates in the SSB-frame $(\theta, \phi)$, and the associated spherical orthonormal basis vectors $(\ve_{r}, \ve_{\theta}, \ve_{\phi})$. The position of the source in the sky will be parametrized by the ecliptice latitude $\beta = \pi/2-\theta$ and the ecliptic longitude $\lambda = \phi$. The GW propagation vector $\vk$ in spherical coordinates is now
\be	
	\vk = - \ve_{r} = \{-\cos{\beta}\cos{\lambda}, -\cos{\beta}\sin{\lambda}, -\sin{\beta}\} \,.
\en
Again, the explicit expressions for the other vectors of the spherical basis are
\bsub
\begin{align}
	\ve_{\theta} &= \{\sin{\beta}\cos{\lambda}, \sin{\beta}\sin{\lambda},-\cos{\beta}\} \,,\\
	\ve_{\phi} &= \{-\sin{\lambda}, \cos{\lambda}, 0\} \,.
\end{align}
\esub
Introduce reference polarization vectors as
\bsub
\begin{align}
	\vu = -\ve_{\phi} & = \{\sin{\lambda}, -\cos{\lambda}, 0\} \,,\\
	\vv = -\ve_{\theta} & = \{-\sin{\beta}\cos{\lambda}, -\sin{\beta}\sin{\lambda}, \cos{\beta}\} \,,
\end{align}
\esub
so that $(\vu, \vv, \vk)$ form a direct orthonormal triad. Equivalent expressions directly in terms of $\vk$ and $\vz$ are
\be
	\vu = \frac{\vz \times \vk}{|\vz \times \vk|} \,, \quad \vv = \vk \times \vu.
\en
The SSB frame and its reference polarization vectors are given schematically in the fig~\ref{F:SSB_frame}.

%\bea
%\vu = { \partial  \vk \over \partial \beta} & = & \{\sin{\beta}\cos{\lambda}, \sin{\beta}\sin{\lambda},-\cos{\beta}\} \nonumber \\
%      &=& \{\cos{\theta}\cos{\phi}, \cos{\theta}\sin{\phi},-\sin{\theta}\}\\
%\vv = {1 \over \sin \theta} { \partial  \vk \over \partial \lambda}  &=& \{\sin{\lambda}, -\cos{\lambda}, 0\} \nonumber \\
%      &=&  \{\sin{\phi}, -\cos{\phi}, 0\}
%\ena

\begin{figure}[tbh]
  \centering
  \begin{tikzpicture}[scale=4,tdplot_main_coords]
    \coordinate (O) at (0,0,0);
    \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$\vx$};
    \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$\vy$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$\vz$};
    %\tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
    \tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
    %\draw[-stealth,color=red] (P) -- (O) node[above right] {$\bf{k}$};
    \draw[thick,color=red] (P) -- (O) ;
    \draw[dashed, color=red] (O) -- (rxy);
    \draw[dashed, color=red] (r) -- (rxy);
    \tdplotdrawarc{(O)}{0.2}{0}{\phivec}{anchor=north}{$\lambda$}
    \tdplotsetthetaplanecoords{\phivec}
    \tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.3}%
        {\thetavec}{90}{anchor=south west}{$\beta$};
    %\draw (1,1,1) node[anchor=south] {.}  
    \tdplotsetcoord{r}{1.0}{\thetavec}{\phivec};
    \draw (r) node {.};
%    \pgfmathsetmacro{\x1}{\rvec*cos(\phivec)*sin(\thetavec)}
%    \pgfmathsetmacro{\y1}{\rvec*cos(\phivec)*sin(\thetavec)}
%    \pgfmathsetmacro{\z1}{\rvec*cos(\thetavec)}
    \tdplotsetcoord{rth}{1.0}{\thetavec-12.0}{\phivec};
    \tdplotsetcoord{rph}{1.0}{\thetavec}{\phivec-20};
    \tdplotsetcoord{rr}{0.7}{\thetavec}{\phivec};
%    \draw[thick,->] (r)--(0.25,0.433, 0.866-1);
    \draw[-stealth, color=blue] (r)--(rth) node[above] {$ \bf{v} = -\ve_{\theta}$};
    \draw[-stealth, color=blue] (r)--(rph) node[below left] {$\bf{u} = -\ve_{\phi}$};
     \draw[-stealth, color=red] (r)--(rr) node[below right] {$\bf{k} = -\ve_{r}$};
    \fill (r) circle[radius=0.3pt] node[anchor=south west]{};
    
    \draw[dashed,tdplot_rotated_coords] (1.0,0,0) arc (0:90:1.0);
    \draw[dashed] (1.0,0,0) arc (0:90:1.0);
    \draw[dashed] (1,0,1.19) arc (0:60:1.0);
     
\end{tikzpicture}
  \caption{SSB frame}
  \label{F:SSB_frame}
\end{figure}

The last degree of freedom between the frames corresponds to a rotation around the line of sight, and is represented by the polarization angle $\psi$. We define the polarization to be the angle of the the rotation around $\vk$ that maps $\vu$ to $\vp$ (see figure~\ref{fig:PolarisationAngle1}):
\bsub
\begin{align}
    \vp &= \vu \cos{\psi} + \vv \sin{\psi}, \\
    \vq &= -\vu \sin{\psi} + \vv \cos{\psi}.
\end{align}
\esub
The polarization angle can be computed as\footnote{With the convention that $\arctan_{2}[x,y]$ is the polar angle of the point of coordinates $(x,y)$. Note that the function \texttt{numpy.arctan2} uses a reverse ordering $[y,x]$.}
\be
	\psi = \arctan_{2} \left[ \vp \cdot\vu, \vp \cdot\vv \right] \,.
\en

Given the direction of $z_S = \{\cos{\phi_{z^S}}\sin{\theta_{z^S}}, 
\sin{\phi_{z^S}}\sin{\theta_{z^S}}, \cos{\theta_{z^S}}\}$ in SSB we can compute the inclination and polarization as

\bea
\iota_o &=& \arccos\left[ 
-\cos{\theta_{z^S}}\sin{\beta} - \cos{\beta}\sin{\theta_{z^S}}\cos{(\lambda-\phi_{z^S})}
\right]\\
\tan \psi & = &    \frac{- \sin \beta \sin \theta_{z^S} \cos \left( \lambda - \phi_{z^S} \right) + \cos \theta_{z^S} \cos \beta } 
{ \sin \theta_{z^S} \sin \left( \lambda  - \phi_{z^S} \right)}
\ena

\begin{figure}[htbp]
\centering
%\includegraphics[width=0.3\textwidth]{Figures/PolarisationAngle1.pdf}
\begin{tikzpicture}[scale=3]
    \coordinate (O) at (0,0);
    \draw[thick, color=red] (0,0) circle (0.05);
    \draw[thick, color=red, fill=red] (0,0) circle (0.02) node[anchor=north east]{$\bf{k}$};
    
    \draw[thick,blue,-stealth] (0,0) -- (1,0) node[anchor=north east]{$\bf{u}$};
    \draw[thick,blue,-stealth] (0,0) -- (0,1) node[anchor=north west]{$\bf{v}$};
    
    \draw[thick,color=Darkgreen,-stealth] (0,0) -- (0.87, 0.5) node[anchor=north west]{$\bf{p}$};
    \draw[thick,color=Darkgreen,-stealth] (0,0) -- (-0.5, 0.87)  node[anchor=north east]{$\bf{q}$};
    
    \draw[-stealth, thick] (0,0.25) arc (90:120:0.25cm) node[above]{$\psi$};
    \draw[->, thick] (0.25,0) arc (0:30:0.25) node[right]{$\psi$};
    %\tdplotdrawarc{(O)}{0.2}{0}{\phivec}{anchor=north}{$\phi_{obs}$}
     
\end{tikzpicture}

\caption{Polarization angle.}
\label{fig:PolarisationAngle1}
\end{figure}

%The relation between two polarization tensors is given as 
%\bea
%e^+ &=& \epsilon^+ \cos{2\psi} + \epsilon^{\times} \sin{2\psi},\\
%e^{\times} &=& -\epsilon^+ \sin{2\psi} + \epsilon^{\times} \cos{2\psi}.
%\ena


% We define the polarization angle to be the angle between $\ve_{\phi}$ and $\vv$:
%\be
%\tan{\psi} &=& - \frac{\ve_{\phi}.\vu}{\ve_{\phi}.\vv}, \\
%\en

%\begin{figure}[htbp]
%\centering
%\includegraphics[width=0.25\textwidth]{Figures/PolarisationAngle.pdf}
%\caption{Convention for polarisation.}
%\label{fig:PolarisationAngle}
%\end{figure}


%This gives the following transformation between the polarization basis vectors: 
%\begin{equation}
%  \left\{
%  \begin{array}{rcl}
%    \ve_{\theta} &=& \vu \cos{\psi} + \vv \sin{\psi}, \\
%    \ve_{\phi} &=& -\vu \sin{\psi} + \vv \cos{\psi},
%  \end{array}
%  \right.
%\end{equation}
%

Defining as in~\eqref{eq:defeplusecross} polarization basis tensors associated to $(\vu, \vv)$ as
\be\label{eq:defeplusecross}
	\veps^{+}_{ij} = (\vu \otimes \vu - \vv \otimes \vv)_{ij} \,, \quad
	\veps^{\times}_{ij} = (\vu \otimes \vv + \vv \otimes\vu)_{ij} \,,
\en
the relation between the polarization tensors is
\bsub
\begin{align}
	\ve^+ &= \veps^+ \cos{2\psi} + \veps^{\times} \sin{2\psi},\\
	\ve^{\times} &= -\veps^+ \sin{2\psi} + \veps^{\times} \cos{2\psi}.
\end{align}
\esub
and corresponding representation of the strain in the SSB frame is 
\be
 h_{ij}^{SSB}  =  \left( h_{+} \cos 2 \psi  -  h_{\times} \sin 2 \psi  \right) \veps^{+}_{ij} 
  + \left( h_{+} \sin 2 \psi  + h_{\times} \cos 2 \psi  \right) \veps^{\times}_{ij}.  
\en
The terminology used in the code is:
\begin{empheq}[box=\widefbox]{align}
	\text{Ecliptic longitude :} & \quad \lambda \equiv \phi \,, \\
	\text{Ecliptic latitude :} & \quad \beta \equiv \pi/2 - \theta \,, \\
	\text{Polarization :} & \quad \psi \,.
\end{empheq}

%and the GW strain can then be writen in terms of polarizations in the SSB basis is :
%\begin{eqnarray}
%  h_{ij} & = & \left( h^S_{+} \cos 2 \psi  -  h^S_{\times} \sin 2 \psi  \right) \epsilon^{+}_{ij} 
%  + \left( h^S_{+} \sin 2 \psi  + h^S_{\times} \cos 2 \psi  \right) \epsilon^{\times}_{ij} 
%\end{eqnarray}

%
%The inclination becomes :
%\bea
%\cos{\iota} & =&  (\vz^S. \vk) \propto (\vL.\vk) \\
%& =  & - \cos \theta \cos \theta_{z^s} - 
% \cos \left( \phi - \phi_{z^s} \right) \sin \theta \sin \theta_{z^s} \\
% & =  & - \sin \beta \cos \theta_{z^s} - 
% \cos \left( \lambda - \phi_{z^s} \right) \cos \beta \sin \theta_{z^s} 
%\ena
%
%Using the definition of $\vq$, eq~\eqref{eq:defpq}, we get the polarization angle:
%\bea
%\tan \psi & = &   \frac{-\cos \theta \sin \theta_{z^s} \cos \left( \phi - \phi_{z^s} \right) + \cos \theta_{z^s} \sin \theta } 
%{ \sin \theta_{z^s} \sin \left( \phi  - \phi_{z^s} \right)} \\
%& = &   \frac{- \sin \beta \sin \theta_{z^s} \cos \left( \lambda - \phi_{z^s} \right) + \cos \theta_{z^s} \cos \beta } 
%{ \sin \theta_{z^s} \sin \left( \lambda  - \phi_{z^s} \right)}
%\ena

%
%The inclination can be computed as 
%\begin{eqnarray}
%  \cos \iota & = &  \vz^S . \vk \\
%& = & -\cos \theta  \cos \theta_{z^s} - \sin \theta  \sin \theta_{z^s} \cos ( \phi - \phi_{z^s}).
%\end{eqnarray}
%

\subsubsection{Mode decomposition}

Those two polarizations can be decomposed in the spin-weighted (-2) spherical harmonics:
\be
 	h_{+}(t) - i h_{\times}(t) = \sum_{\ell=2}^{+\infty} \sum_{m=-\ell}^{\ell} h_{\ell m}(t) \sYlm(\iota_{0}, \varphi_{0}) \,.
\en
Our convention for the spin-weighted spherical harmonics is the same as the one used in \texttt{LAL}~\cite{lal}, in~\cite{2007arXiv0709.0093A} and~\cite{BlanchetLivingReview}:
\bsub
\begin{align}\label{eq:defsYlm}
	&\sYlm (\iota_{0}, \varphi_{0}) = \sqrt{\frac{2\ell +1}{4\pi}} d^{\ell}_{m,2}(\iota_{0}) e^{i m \varphi_{0}} \,,\\
	&d^{\ell}_{m,2}(\iota_{0}) = \sum_{k = k_{1}}^{k_{2}} \frac{(-1)^{k}}{k!} \frac{\sqrt{(\ell+m)! (\ell - m)! (\ell+2)! (\ell-2)!}}{(k-m+2)! (\ell+m-k)! (\ell-k-2)!} \left( \cos \frac{\iota_{0}}{2} \right)^{2\ell + m - 2k -2} \left( \sin \frac{\iota_{0}}{2} \right)^{2k - m +2} \,,
\end{align}
\esub
with $k_{1} = \max (0,m-2)$ and $k_{2} = \min(\ell +m, \ell -2)$. The polarizations can be expressed as
\bsub
\begin{align}\label{eq:hphcmodesgeneric}
	h_{+} = \frac{1}{2} \sum_{\ell, m} \left( \sYlm h_{\ell, m} + \sYlmstar h_{\ell, m}^{*} \right) \,,\\
	h_{\times} = \frac{i}{2} \sum_{\ell, m} \left( \sYlm h_{\ell, m} - \sYlmstar h_{\ell, m}^{*} \right) \,,
\end{align}
\esub
Note that our polarization vectors~\eqref{eq:defpq} differ from the PN convention of~\cite{BlanchetLivingReview} by a rotation of $\pi/2$, which translates into an overall factor $(-1)$ in the polarizations $h_{+,\times}$ and in the modes $h_{\ell m}$.

For non-precessing binary systems, with a fixed equatorial plane of orbit, an exact symmetry relation between modes holds:
\be\label{eq:nonprecsymmetry}
	h_{\ell, -m} = (-1)^{\ell} h_{\ell m}^{*} \,.
\en
When this symmetry is verified, we can write
\be\label{eq:hpcKpc}
	h_{+,\times} = \sum_{\ell, m} K_{\ell m}^{+, \times} h_{\ell m} \,, 
\en
with
\bsub\label{eq:defKpc}
\begin{align}
	K_{\ell m}^{+} =\frac{1}{2} \left( \sYlm + (-1)^{\ell} \sYlminusmstar \right) \,,\\
	K_{\ell m}^{\times} = \frac{i}{2} \left( \sYlm - (-1)^{\ell} \sYlminusmstar \right) \,.
\end{align}
\esub

As an example of the connection between modes and polarizations, let us consider the emission from a non-precessing binary system on a circular orbit, at the leading post-Newtonian order. The source frame is such that $\vz_{S} = \hat{\bm{L}}_{N}$ is the normal to the orbital plane, and $\Phi$ denotes the phase of the binary separation vector $\bm{y}_{1} - \bm{y}_{2} = r \bm{n}$ (with $\bm{y}_{1,2}$ the position of the two bodies) in the plane $(\vx_{S}, \vy_{S})$. We also use the orbital frequency $\omega = \dot{\Phi}$.

At leading PN order, only the dominant $\{\ell, m\} = \{2,\pm2\}$ mode enters. From Sec. (9.5) of~\cite{BlanchetLivingReview}, taking into account the sign change caused by the difference in the definition of $\vp,\vq$,
\bsub
\begin{align}
	h_{22} &= -\frac{2 G m \nu x}{R c^{2}} \sqrt{\frac{16\pi}{5}} e^{-2i\Phi} \,, \\
	h_{2,-2} &= h_{22}^{*} \,,
\end{align}
\esub
where we introduced $m=m_{1}+m_{2}$ the total mass, $\nu = m_{1}m_{2}/m^{2}$ the symmetric mass ratio, $x = (G m \omega/c^{3})^{2/3}$ is the PN parameter and $R$ is the distance to the source. The expressions of the spin-weighted spherical harmonics~\eqref{eq:defsYlm} for $\{\ell, m\} = \{2, \pm 2\}$ are
\bsub
\begin{align}
	{}_{-2}Y_{22} (\iota_{0}, \varphi_{0}) &= \frac{1}{2} \sqrt{\frac{5}{\pi}} \cos^{4} \frac{\iota_{0}}{2} e^{2 i \varphi_{0}} \,,\\
	{}_{-2}Y_{2,-2} (\iota_{0}, \varphi_{0}) &= \frac{1}{2} \sqrt{\frac{5}{\pi}} \sin^{4} \frac{\iota_{0}}{2} e^{-2 i \varphi_{0}} \,.
\end{align}
\esub
Using the combinations~\eqref{eq:defKpc},
\bsub
\begin{align}
	h_{+} &= K^{+}_{22}h_{22} + K^{+}_{2,-2} h_{2,-2} \nonumber\\
	&= -\frac{4 G m \nu x}{R c^{2}} \frac{1 + \cos^{2} \iota_{0}}{2} \cos \left(2(\Phi - \varphi_{0}) \right) \,,\\
	h_{\times} &= K^{\times}_{22}h_{22} + K^{\times}_{2,-2} h_{2,-2} \nonumber\\
	&= -\frac{4 G m \nu x}{R c^{2}} \cos \iota_{0} \sin \left(2(\Phi - \varphi_{0}) \right) \,.
\end{align}
\esub
%NOTE: find a clearer reference where both polarization and modes appear
%This is indeed in agreement with Sec. (9.5) of~\cite{BlanchetLivingReview}, with the expected sign change.

%
%Let us consider here a non-precessing binary system in time domain, moreover we will use only the dominant $\{2,\pm2\}$ mode. 
%For non-precessing systems we can associate $\vz^S$ with orbital or with the total momentum of the system, then the orbital plane is in the $(\vx^S, \vy^S)$ plane.
%For non-precessing systems we have additional symmetry $H_{l-m} = H^*_{lm}$ which we will use below. In this case we have: 
%%
%\begin{eqnarray}
%  h^S_{+} - i h^S_{\times} = H_{22}(t) \ ^{-2}Y_{22}(\theta_{obs},\phi_{obs}) +  H_{2-2}(t) \  ^{-2}Y_{2-2}(\theta_{obs},\phi_{obs}).
%\end{eqnarray}
%We assume the following form for the $2,2$-mode, NOTE that the orbital phase is assume to be zero at the reference time/frequency:
%\begin{eqnarray}
%  H_{22} = A_{22} \ e^{2 i \Phi(t) }.
%\end{eqnarray}
%
%%We drop the spin weight index ($-2$) from the spherical harmonics. 
%The plus and cross polarizations correspond to the real and imaginaty parts, let us derive them explicitely. For plus polarization we have:
%\begin{eqnarray}
%  2 h^S_{+} & = & \left( h^S_+ - i h^S_{\times} \right) + \left( h^S_+ - i h^S_{\times} \right)^* \\
%  & = & H_{22} \ Y_{22} + H_{2-2} \ Y_{2-2} + H^*_{22} \ Y^*_{22} + H^*_{2-2} \ Y^*_{2-2} \nonumber \\
%  & = & H_{22} \ Y_{22} + H^*_{22} \ Y_{2-2} + H^*_{22} \ Y^*_{22} + H_{22} \ Y^*_{2-2} \nonumber \\
%& = & H_{22} \left(  Y_{22} +  Y^*_{2-2}  \right)  + H^*_{22} \left(  Y^*_{22} +  Y_{2-2}  \right)  
%\end{eqnarray}
%
%Following the convention defined in \cite{2007arXiv0709.0093A}, we use:
%\bea
%Y_{22}   & = & \sqrt{5 \over 64 \pi} \left( 1 + \cos \theta_{obs} \right)^2 e^{2 i \phi_{obs}} \label{Eq:Y22} \\
%Y_{2-2} & = & \sqrt{5 \over 64 \pi} \left( 1 - \cos \theta_{obs}\right)^2 e^{- 2 i \phi_{obs}} \label{Eq:Y2m2}
%\ena
%so 
%\bea
%Y_{22} + Y^*_{2-2}   & = & 2 \sqrt{5 \over 64 \pi} \left( 1 + \cos^2 \theta_{obs} \right) e^{2 i \phi_{obs}} \\
%Y^*_{22} + Y_{2-2}   & = & 2 \sqrt{5 \over 64 \pi} \left( 1 + \cos^2 \theta_{obs} \right) e^{- 2 i \phi_{obs}}. 
%\ena
%The angles $\theta_{obs}, \phi_{obs}$ are the spherical polar angles in the source frame which define the direction of GW propagation. 
%Note that we did not define the source frame here explicitely, it is incorporated in the GW harmonics $H_{lm}$. Using the above expressions we can write the final expression for the $+$ polarization:
%\begin{eqnarray}
%  2 h^S_{+} & = & A_{22} \ e^{ 2 i \Phi} \  2 \sqrt{5 \over 64 \pi} \left( 1 + \cos^2 \theta_{obs} \right) e^{2 i \phi_{obs}}
%  + A_{22} \ e^{- 2 i \Phi} \  2 \sqrt{5 \over 64 \pi} \left( 1 + \cos^2 \theta_{obs} \right) e^{-2 i \phi_{obs}} \\
%  & = & A_{22} \  2 \sqrt{5 \over 64 \pi} \left( 1 + \cos^2 \theta_{obs} \right) \ 
%  \left( e^{2 i \left( \Phi + \phi_{obs} \right) } +  e^{- 2 i \left( \Phi + \phi_{obs} \right) }  \right)  \nonumber \\
%h^S_{+}  & = &  2 A_{22} \sqrt{5 \over 64 \pi} \left( 1 + \cos^2 \theta_{obs} \right) \cos \left( 2 \left( \Phi + \phi_{obs} \right) \right)
%\end{eqnarray}
%
%
%Similarly we can derive the cross polarization:
%\begin{eqnarray}
%  - 2 i h^S_{\times}  & = & \left( h^S_+ - i h^S_{\times} \right) - \left( h^S_+ - i h^S_{\times} \right)^* \\
%   & = & H_{22} \ Y_{22} + H_{2-2} \ Y_{2-2} - H^*_{22} \ Y^*_{22} - H^*_{2-2} \ Y^*_{2-2} \nonumber \\
%  & = & H_{22} \ Y_{22} + H^*_{22} \ Y_{2-2} - H^*_{22} \ Y^*_{22} - H_{22} \ Y^*_{2-2} \nonumber \\
%& = & H_{22} \left(  Y_{22} -  Y^*_{2-2}  \right)  - H^*_{22} \left(  Y^*_{22} -  Y_{2-2}  \right)  
%\end{eqnarray}
%
%From \eqref{Eq:Y22} and \eqref{Eq:Y2m2}, we obtain:
%\bea
%Y_{22} - Y^*_{2-2}   & = & 4 \sqrt{5 \over 64 \pi} \ \cos \theta_{obs} \ e^{2 i \phi_{obs}} \\
%Y^*_{22} - Y_{2-2}   & = & 4 \sqrt{5 \over 64 \pi} \ \cos \theta_{obs} \ e^{- 2 i \phi_{obs}} 
%\ena
%which yields the final result:
%\begin{eqnarray}
%  - 2 i h^S_{\times} & = & A_{22} \ e^{2 i \Phi } \  4 \sqrt{5 \over 64 \pi} \cos \theta_{obs} \ e^{2 i \phi_{obs}}
%  - A_{22} \ e^{- 2 i \Phi } \  4 \sqrt{5 \over 64 \pi} \cos \theta_{obs} \ e^{-2 i \phi_{obs}} \\
%  & = & A_{22} \  4 \sqrt{5 \over 64 \pi} \cos \theta_{obs}  
%  \left( e^{2 i \left( \Phi + \phi_{obs} \right) } -  e^{- 2 i \left( \Phi + \phi_{obs} \right) }  \right)  \nonumber  \\
%  & = & A_{22} \  4 \sqrt{5 \over 64 \pi} \cos \theta_{obs} \ 2 i \sin \left(2 \left( \Phi + \phi_{obs} \right) \right) \nonumber \\
%h^S_{\times}  & = &  -4  A_{22} \sqrt{5 \over 64 \pi} \cos \theta_{obs} \ \sin \left( 2 \left( \Phi + \phi_{obs } \right) \right)
%\end{eqnarray}
%
%We can introduce $A = 2A_{22} \sqrt{5 \over 64 \pi}$ and write: 
%\bea
%h_{+}^{S} &=& A \left( 1 + \cos^2 \theta_{obs} \right) \cos \left( 2 \left( \Phi + \phi_{obs} \right) \right) \\
%h_{\times}^{S} &=& -2A \cos{\theta_{obs}} \sin \left( 2 \left( \Phi + \phi_{obs} \right) \right).
%\ena
%
%Dealing with (2,2) mode for non-precessing binary allows us to define the basic angles and conventions which will be further extended for more complex binaries later.

\subsubsection{Time and phase}

\subsubsection{Frequency domain}

For the definitions of the Fourier transform (FT), we use the same convention as in~\cite{lal}, used also  \texttt{numpy} (and up to normalization in \texttt{FFTW}): for a function of time $F(t)$
\be\label{eq:defFourier}
	\tilde{F}(f) = \int dt\; F(t)e^{-2i\pi f t} \,, \quad F(t) = \int df\; \tilde{f}(f) e^{2i\pi f t} \,.
\en
The discrete Fourier transform for $N$ time samples $F_{j}$ and frequency samples $\tilde{F}_{k}$ is then
\be
	 \tilde{F}_{k} = \sum_{j = 0}^{N-1} F_{j} e^{-2 i\pi { j k \over N } } \,, \quad  F_{j} = \frac{1}{N}\sum_{k=0}^{N-1} \tilde{F}_{k} e^{2i \pi { j k \over N } } \,.
\en
For a real time-domain signal,
\be\label{eq:FTreal}
	F(t) \in \mathbb{R} \implies \tilde{F}(-f) = \tilde{F}(f)^{*} \,,
\en
and we recall the following useful relation valid in general:
\be
	\widetilde{F^{*}} (f) = \tilde{F}(-f)^{*} \,.
\en
For non-precessing systems, \eqref{eq:nonprecsymmetry} implies
\be
	\tilde{h}_{\ell, -m} (f) = (-1)^{\ell} \tilde{h}_{\ell m} (-f)^{*} \,.
\en

Since a given mode has a phase dependency $h_{\ell m} \propto \exp[- i m \phi_{\rm orb}]$, with the  orbital phase verifying $\dot{\phi}_{\rm orb} > 0$, an approximation often used for non-precessing systems (or in the precessing frame for a binary with misaligned spins) is
\bsub\label{eq:neglectposmposf}
\begin{align}
	\tilde{h}_{\ell m} (f) &\simeq 0 \; \text{for} \; m > 0 \,, f > 0 \,,\\
	\tilde{h}_{\ell m} (f) &\simeq 0 \; \text{for} \; m < 0 \,, f < 0 \,,\\
	\tilde{h}_{\ell 0} (f) &\simeq 0 \,.
\end{align}
\esub
Note that in the Fourier convention~\eqref{eq:defFourier}, this approximation means that for positive frequencies $f>0$ the mode $\tilde{h}_{2,-2}(f)$ has support while $\tilde{h}_{22}(f)$ is negligible\footnote{Note that because of this, some parts of the LDC code internally use the opposite sign convention in the exponentials of~\eqref{eq:defFourier}, so as to have support for the modes $m>0$ for $f>0$. This amounts to a mapping $f\leftrightarrow -f$, which can be undone at the end of the computation by conjugating the FT of the observables, which are real signals (see~\eqref{eq:FTreal}).}. When using the approximation~\eqref{eq:neglectposmposf}, \eqref{eq:hpcKpc} becomes for $f>0$
\be\label{eq:hpcKpc}
	\tilde{h}_{+,\times} (f) = \sum_{\ell} \sum_{m<0} K_{\ell m}^{+, \times} \tilde{h}_{\ell m} \,.
\en

%\begin{eqnarray}
%  \left( \widetilde{H_{lm}} \right)^* (f) &=& \int H^*_{lm} (t) e^{-2 \pi i  (-f) t } dt \nonumber \\
%  \widetilde{H_{lm}}^* (f) & = & \widetilde{H^*_{lm}} (-f) \\
%  \widetilde{H^*_{lm}} (f) & = & \widetilde{H_{lm}}^* (-f) \\
%  H_{l-m} & = & (-1)^l H_{lm}^* \\
%  \widetilde{H_{l-m}} (f) & = & (-1)^l \widetilde{H_{lm}^*} (f) = \widetilde{H_{lm}}^* (-f) \label{Eq:ConvHlmm}
%  \end{eqnarray}
% %
% where the last equality is only true for the non-precessing systems (as it uses the symmetry of the modes). Assuming again 
%$H_{lm}(t)= A_{lm}e^{im\Phi(t)}$ (which is true for non-precessing systems) we can show that the $\widetilde{H_{lm}}$ is non-zero for 
%$f>0,\; m>0$ and $f<0,\; m<0$.  Taking the Fourier transform of the two polarizations (eqns~\eqref{Eq:hpTDFull} and \eqref{Eq:hcTDFull}) we get
%\begin{eqnarray}
%  \widetilde{{h}^S}_+ (f) & = & \frac1{2} \sum_{l,m} Y_{lm} \widetilde{H}_{lm}(f) + Y_{lm}^* \widetilde{H^*}_{lm}(f) \\
%  & = & \frac1{2} \sum_{l,m} Y_{lm} \widetilde{H}_{lm}(f) + Y_{lm}^* \widetilde{H}^*_{lm}(-f) \\
%\widetilde{h_{\times}^S}(f) & = & \frac{i}{2} \sum_{l,m} Y_{lm} \widetilde{H}_{lm}(f) - Y_{lm}^*\widetilde{H}^*_{lm}(-f)
%\end{eqnarray}
%%
%We can again consider only $(2, \pm 2)$ mode for non-precessing systems and for positive frequencies (!) we have:
%\bea
%2 \widetilde{h_+} & = &
% \left.  \left( Y_{22} \widetilde{H_{22}} + Y_{2-2} \widetilde{H_{2-2}} \right) \right|_f 
% \left.  \left( Y_{22}^* \widetilde{H_{22}}^* + Y_{2-2}^* \widetilde{H_{2-2}}^* \right) \right|_{-f}
% \ena
%Using~\eqref{Eq:ConvHlmm}:
%\bea
%2 \widetilde{h_+} & = &
% \left.  \left( Y_{22} \widetilde{H_{22}} + Y_{2-2} \widetilde{H_{2-2}} 
% + Y_{22}^* \widetilde{H_{2-2}} + Y_{2-2}^* \widetilde{H_{22}} \right) \right|_{f} \\
% \tilde{h}_+(f>0) &=& \frac1{2}\widetilde{H_{22}}(Y_{22} + Y_{2-2}^*)
% \ena
%
% 
% \bea
%2 \widetilde{h_{\times}} & = &
% \left. i \left( Y_{22} \widetilde{H_{22}} + Y_{2-2} \widetilde{H_{2-2}} 
% - Y_{22}^* \widetilde{H_{2-2}} - Y_{2-2}^* \widetilde{H_{22}} \right) \right|_{f} \\
%\tilde{h}_{\times}(f>0) &=& \frac{i}{2}\tilde{H}_{22}(Y_{22} - Y_{2-2}^*)
%\ena


\subsubsection{Link to the LAL conventions}

In conclusion of this section we explain of our conventions relate to those used in \texttt{LAL} (software library used by LIGO/Virgo collaborations~\cite{lal}), which are standardized in the documents~\cite{NRinj2017, PfeifferFrames}. First, in \texttt{LAL} the source frame is constructed by convention~\cite{NRinj2017} setting the unit separation vector $\bm{n} = \vx_{S}$ and the normal to the orbital plane $\hat{\bm{L}}_{N} = \vz_{S}$, at the start of the waveform. In our case we have not specified how this source-frame is built, as this construction might differ for different physical systems (SMBHs, EMRIs, \dots).

Translated in the notations we used above, the choice of polarization vectors for LAL is
\bsub\label{eq:pqLAL}
\begin{align}
	\vp_{\rm LAL} &= - \vp \,,\\
	\vq_{\rm LAL} &= - \vq \,,
\end{align}
\esub
which amounts to a rotation of $\pi$ of the polarization basis. Because the polarizations $h_{+,\times}$ transform with $\cos 2\psi,\sin 2\psi$ under a change of polarization, this means that there is no difference here, provided the source-frame is identical:
\bsub
\begin{align}
	h_{+}^{\rm LAL} &= h_{+} \,,\\
	h_{\times}^{\rm LAL} &= h_{\times} \,.
\end{align}
\esub
The phase quantity used in \texttt{LAL} differs from our definition by
\be
	\Phi_{\rm LAL} = \frac{\pi}{2} - \varphi_{0} \,.
\en
Although the geometric definition of the reference polarization vectors $\vu$, $\vv$ is the same, the detector frame $(\vx, \vy, \vz)$ is different. In the case of \texttt{LAL}, it is a geocentric frame based on the celestial equator, while in our case it is the SSB frame based on the ecliptic plane. For the polarization, a difference of $\pi$ in the definition also comes from~\eqref{eq:pqLAL}:
\be
	\psi_{\rm LAL} \leftrightarrow \psi \,: \text{diff. of } \pi \text{ and different frame} \,.
\en
For the sky position, \texttt{LAL} uses $\mathrm{ra}, \mathrm{dec}$ instead of our ecliptic $\lambda, \beta$:
\be
	(\alpha_{\rm LAL}, \beta_{\rm LAL}) \leftrightarrow (\lambda, \beta) \,: \text{ different frame} \,.
\en
We leave for future work this exact map, relating the SSB frame to the geocentric frame.

%This way we have defined the non-precessing binary systems.
%Note that this is also the polarization convention used in LISACode.
%Three angles ($\iota, \phi_o, \psi$) define the relative orientation of the source frame and the SSB frame.
%
%
%Now we introduce the source frame without fully specifying it for now, this is possible in case of the non-precessing binaries and 
%while considering only the leading mode. We can define the polarization basis (in the source frame) using the orbital angular momentum and direction of GW propagation:
%\bea
%\vp & = & - { \vL \times \vk \over \left| \vL \times \vk \right|} \\
%\vq &=& \vk \times \vp
%\ena
%and the associated polarization basis tensors
%\be
%e^{+}_{ij} = p_i p_j - q_i q_j, \;\;\; 
%e^{\times}_{ij} = p_i q_j + q_i p_j.
%\en
%
%We define the inclination in the source frame, as an angle between 
%:
%\begin{eqnarray}
%  \cos \iota & = &  \vL . \vk \\
%& = & -(\cos \theta  \cos \theta_L + \sin \theta  \sin \theta_L \cos ( \phi - \phi_L) )
%\end{eqnarray}
%{\bf NOTE that we have used the orbital angualr momentum to define the polarization basis and the inclination. Alternatively we could have taken the total momentum of the system $J$. It does not matter for nonprecessing systems but later on we will have to make a choice!!!} 
%
%Since here we have define the polarization and inclination w.r.t the orbital angular momentum, it is convenient to associate it with the $z$-axis of the source frame. In this case $\theta_d = \iota$. The second angle $\phi_0$ is the azimuthal position of the observe (SSB) in the source frame. In case of non-precessing binaries it is totally degenerate with the initial orbital phase, so we leave its interpretation unspecified so far and fix it once we introduce precessing binaries with multiple harmonics.
%
%Next we need to define the polarization angle and here we will use the radiative frame (defined by the triad $\vk, \vp, \vq$) as primary (see figure~\ref{fig:PolarisationAngle2})
%
%\begin{figure}[htbp]
%\centering
%\includegraphics[width=0.5\textwidth]{Figures/PolarisationAngle2.pdf}
%\caption{Convention for polarisation.}
%\label{fig:PolarisationAngle2}
%\end{figure}
%
%With this notation we have: 
%\begin{eqnarray}
%  \tan \psi & =&  - {\vp . \vv \over \vp . \vu } \\
%   & = & { \cos \theta \sin \theta_L \cos \left( \phi - \phi_L \right) - \cos \theta_L \sin \theta
%  \over \sin \theta \sin \left( \phi  - \phi_L \right)   } 
%\end{eqnarray}

%{\bf NOTE that we have used the orbital angular momentum to define the polarization basis and 
%the inclination. Alternatively we could have taken the total momentum of the system $J$. 
%It does not matter for nonprecessing systems but later on we will have to make a choice!!!} 
%
%Since here we have define the polarization and inclination w.r.t the orbital angular momentum,
% it is convenient to associate it with the $z$-axis of the source frame. In this case $\theta_d = \iota$. 
% The second angle $\phi_0$ is the azimuthal position of the observer (SSB) in the source frame. 
% In case of non-precessing binaries it is totally degenerate with the initial orbital phase, 
% so we leave its interpretation unspecified so far and fix it once we introduce precessing binaries 
% with multiple harmonics.
%
%Next we need to define the polarization angle and here we will use the radiative frame 
%(defined by the triad $\vk, \vp, \vq$) as primary (see figure~\ref{fig:PolarisationAngle2})
%
%\begin{figure}[htbp]
%\centering
%\includegraphics[width=0.5\textwidth]{Figures/PolarisationAngle2.pdf}
%\caption{Convention for polarisation.}
%\label{fig:PolarisationAngle2}
%\end{figure}

%Using $ \ve_{\phi} = \vp = \vL \times \vk$, we have: 
%\begin{eqnarray}
%  \tan \psi & =&  - {\vp . \vu \over \vp . \vv } \\
%  \tan \psi & = & { \sin \theta_L \sin \left( \phi  - \phi_L \right)  \over \cos \theta \sin \theta_L \cos \left( \phi - \phi_L \right) - \cos \theta_L \sin \theta } 
%\end{eqnarray}

%\begin{equation}
%  \left\{
%  \begin{array}{rcl}
%    \vp & = & - \sin \psi \ \vu + \cos \psi \ \vv \\
%    \vq & = & \cos \psi \ \vu + \sin \psi  \ \vv
%  \end{array}
%  \right.
%\end{equation}
%
%This gives us the following relation between 
%the source polarisation basis $\{ e^{+}_{ij} ,  e^{\times}_{ij}\}$
%and the SSB polarisation basis $\{ \epsilon^{+}_{ij} ,  
%\epsilon^{\times}_{ij}\}$:
%\begin{equation}
%  \left\{
%  \begin{array}{rcl}
%    e^{+}_{ij} & = & - \cos 2 \psi \ \epsilon^{+}_{ij} - \sin 2 \psi \ \epsilon^{\times}_{ij} \\
%    e^{\times}_{ij} & = & - \sin 2 \psi \ \epsilon^{+}_{ij} + \cos 2 \psi  \ \epsilon^{\times}_{ij}.
%  \end{array}
%  \right.
%  \label{Eq:SrcPolBasis}
%\end{equation}

%The GW strain then writen in terms of to polarizations in the SSB basis is :
%\begin{eqnarray}
%  h_{ij} & = & \left( h^S_{+} \cos 2 \psi  -  h^S_{\times} \sin 2 \psi  \right) \epsilon^{+}_{ij} 
%  + \left( h^S_{+} \sin 2 \psi  + h^S_{\times} \cos 2 \psi  \right) \epsilon^{\times}_{ij} 
%\end{eqnarray}

%and then the expression of the gravitational wave in the SSB basis :
%\begin{eqnarray}
%  h_{ij} & = & \left( h^S_{+} \cos 2 \psi  - h^S_{\times} \sin 2 \psi  \right) \epsilon^{+}_{ij} 
%  + \left( h^S_{+} \sin 2 \psi  + h^S_{\times} \cos 2 \psi  \right) \epsilon^{\times}_{ij} 
%\end{eqnarray}
%
%
%
%
%

%\subsubsection{Choice 2 for polarization angle}
%We define the polarisation angle as the angle from $\vp$ to $\vu$ (see figure~\ref{fig:PolarisationAngle1})
%\begin{figure}[htbp]
%\centering
%\includegraphics[width=0.5\textwidth]{Figures/PolarisationAngle2.pdf}
%\caption{Convention for polarisation.}
%\label{fig:PolarisationAngle1}
%\end{figure}
%
%corresponding to :
%\begin{eqnarray}
%  \tan \psi & =&  - {\vp . \vv \over \vp . \vu } \\
%   & = & { \cos \theta \sin \theta_L \cos \left( \phi - \phi_L \right) - \cos \theta_L \sin \theta
%  \over \sin \theta \sin \left( \phi  - \phi_L \right)   } 
%\end{eqnarray}

%\begin{equation}
%  \left\{
%  \begin{array}{rcl}
%    \vp & = & \cos \psi \ \vu - \sin \psi  \ \vv \\
%    \vq & = & \sin \psi \ \vu + \cos \psi \ \vv
%  \end{array}
%  \right.
%\end{equation}
%
%We obtain the following relation between 
%the source polarisation basis $\{ e^{+}_{ij} ,  e^{\times}_{ij}\}$
%and the SSB polarisation basis $\{ \epsilon^{+}_{ij} ,  
%\epsilon^{\times}_{ij}\}$:
%\begin{equation}
%  \left\{
%  \begin{array}{rcl}
%    e^{+}_{ij} & = &  \cos 2 \psi \ \epsilon^{+}_{ij} - \sin 2 \psi \ \epsilon^{\times}_{ij} \\
%    e^{\times}_{ij} & = & \sin 2 \psi \ \epsilon^{+}_{ij} + \cos 2 \psi  \ \epsilon^{\times}_{ij} 
%  \end{array}
%  \right.
%\end{equation}

%and then the expression of the gravitational wave in the SSB basis :
%\begin{eqnarray}
%  h_{ij} & = & \left( h^S_{+} \cos 2 \psi  + h^S_{\times} \sin 2 \psi  \right) \epsilon^{+}_{ij} 
%  + \left( - h^S_{+} \sin 2 \psi  + h^S_{\times} \cos 2 \psi  \right) \epsilon^{\times}_{ij} 
%\end{eqnarray}
%
%Note that this is the convention used in LISACode.
%


% ============================================================
\subsection{MBHB: Massive black hole binaries}
\label{sec:WaveformMBHB}

\subsubsection{IMRPhenomD}\label{S:W_IMRD}
IMRPhenomD was introduced in \cite{Khan:2015jqa} and we will not repeat here its description. 
Instead we will describe how the TDI data was produced. By construction the Fourier transformation of $h+, h_{\times}$ into time domain is such that the merger is around  $t=0$. 
We  shift the waveform by $T_c$ (coalescence time). Then data is passed through the LISACode  to apply the instrument response. For generation of MBHBs we have used the reference frequency to be 3mHz. For generation of SOBBH we have used reference time to be start of observation and the reference frequency is the instantaneous GW frequency at the beginning of observation. 
Location: \url{software/Waveforms/MBH_IMR/IMRPhenomD/}.


\subsection{TDI response in frequency domain}

We also could generate the $X, Y, Z$ TDIs in the frequency domain (approximately). The key procedure is described in the document \cite{Marsat:2018oam} and test/example python notebooks are provided in \url{/MBH_IMR/IMRPhenomD/examples/}. We generate the full waveform with response in the frequency domain, and 
Fourier transform it to the time domain. This was done for one data set containing MBHBs and for data sets with SOBBHs. The most complete code which uses the FD response is \url{software/LDCpipeline/scripts/MakeSOBBH_FD.py}, the MBHB uses basically the same code but with stencil order equal to zero and instead of $f_0$
uses $t_c$ to determine the starting frequency.

\subsection{MBHB parametrization.}
 
 Parameters for the source together with units are stored in the hdf5 file.
 In the table \ref{T:MBHB} we give parameters describing the MBHB signal. 

\begin{table}[htp]
\begin{center}
\begin{tabular}{|c|c|c|} \hline
 Parameter & Description   &  units   \\ \hline
  $\beta$ & EclipticLatitude &   Radian \\ \hline
  $\lambda$ &   EclipticLongitude & Radian \\ \hline
  $\theta_{S1} $ &  PolarAngleOfSpin1 & Radian \\ \hline
  $\theta_{S2} $ & PolarAngleOfSpin2  & Radian \\ \hline
  $\phi_{S1} $ &   AzimuthalAngleOfSpin1  & Radian \\ \hline
  $\phi_{S2}$ &  AzimuthalAngleOfSpin2 &  Radian \\ \hline
  $s_1$   &   magnitude  Spin1 &  MassSquared \\ \hline
  $s_2$   &  magnitude Spin2  &  MassSquared \\ \hline
  $m_1$   &  Mass1   &  SolarMass \\ \hline
  $m_2$   & Mass2   &  SolarMass  \\ \hline
  $t_c$   &  CoalescenceTime  &  Second \\ \hline
  $\phi_{ref}$  &  PhaseAtCoalescence &  Radian \\ \hline
  $\theta_L$  & InitialPolarAngleL    &  Radian \\ \hline
  $\phi_L $   &  InitialAzimuthalAngleL &  Radian \\ \hline
     -  &    Approximant & 				     ModelName \\ \hline
  $\Delta t$ &   Cadence  &            Seconds \\ \hline
  $ z $ &  Redshift &            dimensionless \\ \hline
  $ D_L $  &  Distance (luminosity)  &  Gpc \\ \hline
  $ T_{obs}$ &  ObservationDuration &   Seconds  \\ \hline
\end{tabular}
\end{center}
\caption{Parametrization used for MBHBs.}
\label{T:MBHB}
\end{table}

Let us also  give some necessary explanations. We create those parmeters to cover also precessing binaries (eccentric binaries will require an extension of this table), therefore some parameters ($\phi_{S1}, \phi_{S2}$) are redundant. 
The spin used for the IMRPhenomD model are computed as $a_i = s_i \cos{\theta_{Si}}$. Masses quoted in the hdf5 files are always redshifted masses. 
The time of coalescence roughly corresponds to the merger of two BHs. 

We have given redundant information: redshift $z$ and the luminosity distance $D_L$ are connected by adopted cosmological model (based on Planck2015 parameters). 


\subsection{Technical detail on the  production of Radler data sets.}
The script used to produce the MBHB data sets is \url{software/LDCpipeline/scripts/ProduceMBHB_Radler.py} and parameter file is \url{software/LDCpipeline/scripts/Param_RadlerMBHB.txt}. We use the source catalogues to select the source 
specified in the parameter file. In the next sections we will specify the conventions for TDI and the waveforms, those conventions are coded up as a
class ``LW'' \url{software/LDCpipeline/scripts/LW_simple.py}. The comparison between three codes (LISACode, LW, and FD (frequency domain response) is given by 
running script  \url{software/LDCpipeline/scripts/MBHB_LW_FD_LC_SNR.py} there we
also compute the SNR of the signal in the data set. We have used LISACode 
as a reference and to have an agreement we had to modify the polarization angle 
as $\psi \to \psi_{FD} = \pi/2 - \psi$ and $\psi \to \psi_{LW} = \pi/2 + \psi$
for the ``FD'' and ``LW'' implementations.
The command used to produce the data set: 
\begin{termcmd}
 $ python ProduceMBHB_Radler.py --verbose \
 --seed=54321 --param=Param_RadlerMBHB.txt LDC1-1_MBHB_v1.hdf5
\end{termcmd} 



\subsection{EMRI}

\subsubsection{Analytic Kludge model}
The AK model used in the Radler challenge is based on \cite{Barack:2003fp}
for generation of $h_{+}, h_{\times}$ in the SSB frame. The major modification 
is that we fix the number of harmonics (similar to how it was done in the old MLDC \cite{Arnaud:2007jy}). The TDI response is applied using LISACode. 

We summarize in the table~\ref{T:EMRI_AK} the waveform parametrization.
The Radler data set was produced using the script \url{software/LDCpipeline/scripts/ProduceEMRI.py}.

\begin{table}[htp]
\begin{center}
\begin{tabular}{|c|c|c|c|} \hline
Description & Parameter & Notation   &  units   \\ \hline
Sky position (SSB) & $\beta$ & EclipticLatitude  &  Radian \\ \hline
Sky position (SSB) & $\lambda$ &  EclipticLongitude & Radian \\ \hline
 Mass of SMBH & $M$ &  MassOfSMBH  & SolarMass \\ \hline
Mass of compact object & $\mu$ & MassOfCompactObject & SolarMass \\ \hline
 SMBH spin & $S$ & SMBHspin & MassSquared \\ \hline
SMBH spin orient. (in SSB) & $\theta_K, \phi_K$ &  PolarAngleOfSpin & Radian \\ \hline
Radial orb. freq. ($t=0$) & $\nu_0$ & InitialAzimuthalOrbitalFrequency & Hertz \\ \hline
Orb. mean anom. ($t=0$) & $\Phi_0$ & InitialAzimuthalOrbitalPhase & Radian \\ \hline
Eccentricity ($t=0$) & $e_0$ & InitialEccentricity & 1 \\ \hline
Dir. of pericenter ($t=0$) & $\tilde{\gamma}_0$ & InitialTildeGamma & Radian \\ \hline
Azimuthal angle of orb. ($t=0$) & $\alpha_0$ & InitialAlphaAngle & Radian \\ \hline
Inclination of orbit & $\Lambda$ & LambdaAngle  & Radian \\ \hline
Luminosity distance & $D_L$ & Distance & Gpc \\ \hline
time of plunge & $t_{pl}$ & PlungeTime & Second \\ \hline
 - & Approximant & AK &	ModelName \\ \hline
 - & ObservationDuration & - & Seconds \\ \hline
 - & Cadence & - &  Seconds \\ \hline
\end{tabular}
\end{center}
\caption{Parametrization used for EMRI (AK).}
\label{T:EMRI_AK}
\end{table}
One remark, the plunge time and $\nu_0$ are related, so either of them could be used to parametrize the waveform. 
The command used to produce the data set: 
\begin{termcmd}
$ python ProduceEMRI.py --verbose --seed=1234 \
 --param=Param_RadlerEMRI_AK.txt LDC1-2_EMRI_v1.hdf5
\end{termcmd} 
 

\subsubsection{Augmented Analytic Kludge model}

\subsection{Galactic Binaries}

\subsubsection{The signal description in the source frame}
The GW signal from Galactic white dwarf binaries in the source frame is 
defined as: 

\bea
h_{+}^S &=& \mathcal{A} (1 + \cos^2{\iota}) \cos(\Phi(t))\\
h_{\times}^S &=& -2 \mathcal{A} \cos{\iota} \sin(\Phi(t))
\ena
The phase is described as 
\bea
\Phi(t) = \phi_0 + 2\pi f_0 t + \pi \dot{f}_0 t^2,
\ena
where we have used the fact that the frequency evolves slowly and we 
retained only the first derivative of frequency. The subscript $0$
implies that those are constants and given at the initial moment of time 
$t=0$, and $\phi_0$ is initial GW phase. 
%
The expression for the GW strain in the SSB frame is described 
in the section \ref{sec:Binary}.

%We need to transform this waveform to the SSB (solar system barycenter). We introduce the direction of GW propagation for the source defined by ecliptic coordinates latitude: $\beta$ which is related to the spherical polar angle as $\theta_s = \pi/2 - \beta$, and longitude $\lambda$:
%\bea
%\vk = - \{\cos{\beta}\cos{\lambda}, \cos{\beta}\sin{\lambda}, \sin{\beta}\}
%\ena
%Introduce the polarization basis vectors
%\bea
%\vu &=& \{\sin{\beta}\cos{\lambda}, \sin{\beta}\sin{\lambda},-\cos{\beta}\}\\
%\vv &=& \{\sin{\lambda}, -\cos{\lambda}, 0\}
%\ena
%and associated polarization basis
%\be
%\epsilon^{+}_{ij} = u_i u_j -v_i v_j, \;\;\; 
%\epsilon^{\times}_{ij} = u_iv_j + v_i u_j.
%\en
%Then the wavorms in SSB is given by
%\bea
%h^{+} &=& -h_S^{+}\cos{2\psi} - h_S^{\times}\sin{2\psi}\\
%h^{\times} &=& h_S^{+}\sin{2\psi} - h_S^{\times}\cos{2\psi}
%\ena
%where we have introduced the polarization angle $\psi$. 
%The full GW amplitude is then defined as 
%\bea
%h_{ij} &=& \epsilon^{+}_{ij} h_{+} + \epsilon^{\times}_{ij} h_{\times}\\
% &=& h_S^{+}(-\epsilon^{+}_{ij}\cos{2\psi} + \epsilon^{\times}_{ij} \sin{2\psi} ) + h_S^{\times}(-\epsilon^{+}_{ij}\sin{2\psi} - \epsilon^{\times}_{ij} \cos{2\psi} )
%\ena
 


\subsubsection{Implementation}

The waveform generation is split into two parts: (i) generation of the response in the time domain and fourier transformed in the frequency domain (ii) adding the ``fast'' (the carrier signal) in the frequency domain. The main description
of this method is given in \cite{Cornish:2007if}. The implementation is located in 
\url{software/Waveforms/Galaxy/}.  The Radler data sets were produced using the following scripts \url{software/LDCpipeline/scripts/ProduceGB_Radler.py}, \url{software/LDCpipeline/scripts/Produce_VGB.py}  The waveform generation was cross-validated agains the ``LW'' class and script which compares the waveforms is 
\url{software/LDCpipeline/scripts/GB_LW_FD_LC_SNR.py}. 
The command to produce the Galaxy is 
\begin{termcmd}
 $ python ProduceGB_Radler.py --verbose --seed=12345 \
 --param=ParamsGalaxy.txt  LDC1-4_GB_v1.hdf5
\end{termcmd}
\begin{termcmd}
 $ python ProduceGB_Radler.py --verbose --seed=12345 \
 --param=ParamsVGB.txt  LDC1-3_VGB_v1.hdf5
\end{termcmd}

\subsubsection{Parametrization}

In the table \ref{T:GBs} we summarize the parametrization of the GB signal.

\begin{table}[htp]
\begin{center}
\begin{tabular}{|c|c|c|} \hline
 Parameter & Notation   &  units   \\ \hline
 $\beta$ & EclipticLatitude  &  Radian \\ \hline
 $\lambda$ &  EclipticLongitude & Radian \\ \hline
 $\mathcal{A}$ & Amplitude &   strain \\ \hline
 $f_0$  &  Frequency &  Hz \\ \hline
 $\dot{f}_0$   &  FrequencyDerivative  &  $Hz^2$ \\ \hline
 $\iota$ &  Inclination &   Radian \\ \hline
 $\psi$  &   Polarization &  Radian \\ \hline
 $\phi_0$ &   InitialPhase &  Radian \\ \hline
 $T_{obs}$ & ObservationDuration &  Seconds \\ \hline
 $\Delta t$ & Cadence &  Seconds \\ \hline
\end{tabular}
\end{center}
\caption{Parametrization used for GB signal.}
\label{T:GBs}
\end{table}
Note that $\phi_0$ is an initial GW phase.  



\subsubsection{Hierarchical triplets}
\subsubsection{Episodic accretion}

\subsection{Sollar mass binary BHs}

We use the IMRPhenomD (the low frequency part of it) model to generate the 
signal in the frequency domain. We also apply the TDI response in the frequency domain \cite{Marsat:2018oam}. We use the
initial frequency (at $t=0$) to parametrize the waveform and implement only 
the dominant harmonics $l=2, m= \pm 2$. The duration of the signal in the 
frequency (time) domain is defined by the amount of evolution from the initial 
frequency, by the nyquist frequency and duration of the data set. Based on this 
many signal have abrupt cut-off in the frequency domain and the high frequency sources have cut also in time domain (due to Nyquist frequency). 

\subsubsection{Implementation and parametrization}
The parametrization of SOBBH signal is given in the table \ref{T:SOBBHs}.

\begin{table}[htp]
\begin{center}
\begin{tabular}{|c|c|c|} \hline
 Parameter & Notation   &  units   \\ \hline
 $\beta$ & EclipticLatitude  &  Radian \\ \hline
 $\lambda$ &  EclipticLongitude & Radian \\ \hline
  $s_1$   &   magnitude  Spin1 &  MassSquared \\ \hline
  $s_2$   &  magnitude Spin2  &  MassSquared \\ \hline
  $m_1$   &  Mass1   &  SolarMass \\ \hline
  $m_2$   & Mass2   &  SolarMass  \\ \hline
   $\theta_{S1} $ &  PolarAngleOfSpin1 & Radian \\ \hline
  $\theta_{S2} $ & PolarAngleOfSpin2  & Radian \\ \hline
  $\phi_{S1} $ &   AzimuthalAngleOfSpin1  & Radian \\ \hline
  $\phi_{S2}$ &  AzimuthalAngleOfSpin2 &  Radian \\ \hline
 $f_0$  &  Frequency &  Hz \\ \hline
 $\iota$ &  Inclination &   Radian \\ \hline
 $\psi$  &   Polarization &  Radian \\ \hline
 $\phi_0$ &   InitialPhase &  Radian \\ \hline
  $ z $ &  Redshift &            dimensionless \\ \hline
  $ D_L $  &  Distance (luminosity)  &  Gpc \\ \hline
  $ T_{obs}$ &  ObservationDuration &   Seconds  \\ \hline
   $\Delta t$ & Cadence &  Seconds \\ \hline
\end{tabular}
\end{center}
\caption{Parametrization used for SOBBH signal.}
\label{T:SOBBHs}
\end{table}
Note again (like in the case of MBHB) the azimuthal angles of spins are redundant here (due to use of IMRPhenomD model). The redshift $z$ and the luminocity distance are ralted by cosmological parameters (Planck2015). To be consistent with MBHB we have also use $\psi \to \psi_{FD} = \pi/2 - \psi$ and $\psi \to \psi_{LW} = \pi/2 + \psi$ modification for the polarization. 

The waveform generation (including TDI) is implemented in \url{software/LDCpipeline/scripts/MakeSOBBH_FD.py} and the Raddler data production script 
is \url{software/LDCpipeline/scripts/ProduceSOBBHs.py} which was used to produce the data sets with full population and with only bright sources. 

As before we have done comparison with ``LW'' class. Note that due to approximations done in ``LW'' and due to high frequency of SOBBH the very good agreement could be achieved only if the order of stencil is zero. The script which performs comparison and computes SNR of all bright sources is \url{software/LDCpipeline/scripts/SOBBH_FD_LW_LC.py}.  
 
The commands to produce the SOBBH data sets are 
%\begin{lstlisting}[language=bash]
\begin{termcmd}
 $ python ProduceSOBBHs.py --verbose --seed=12345 \
 --parFile=Param_BrightSOBBH.txt LDC1-5_SOBBH_Bright.hdf5
\end{termcmd}
%\end{lstlisting}
\begin{termcmd}
 $ python ProduceSOBBHs.py --verbose --seed=12345 \
 --parFile=Param_RadlerSOBBH.txt LDC1-5_SOBBH_FD.hdf5
\end{termcmd}



\subsection{Stochastic GW signal}\label{S:W_SGWB}

\newpage
\section{Common tools}
\label{S:tools}
We have set of tools located in \url{software/Packages/common/} and they are installed as packages. We give a brief description of those modules here. 

{\bf Cosmology} This package computes luminosity/compving distance based on the redshift (and vice versa). We use Planck2015 parameters for the cosmological model. 

{\bf GenerateFD SignalTDIs} module used to generate the MBHB and SOBBH data with TDI response in frequency domain. 


{\bf FrequencyArray} module used to store the data in the frequency array. It comes with several useful features and is used for GB and SOBBHs. 

{\bf tdi} module to compute the noise TDIs (analytic) with or without Galactic confusion (fit) as well as sensitivity (approximate, analytic). And more...

{\bf LISAConstants} this module is still the work in progress. The idea is to use the same constants for all codes (C, C++, python). Each constant should have a proper reference.


{\bf LISAhdf5} important module which is used to read and write the hdf5 files.


 
% ############################################################
\newpage
\section{LISA Instrument}
\label{sec:LISA}


% ============================================================
\subsection{LISA orbits}
\subsubsection{Equal arm analytic orbit}
This is very simple and not realistic orbits. We use it in the Radler data release.  The orbital motion for each LISA spacecraft: 
\bea
x_n &=& a\cos{\alpha} + a e \left( 
\sin{\alpha} \cos{\alpha} \sin{\beta_n} - (1+ \sin^2{\alpha} )\cos{\beta_n}\right)\nonumber \\
\\
y_n &=& a\sin{\alpha} + a e \left( 
\sin{\alpha} \cos{\alpha} \cos{\beta_n} - (1+ \cos^2{\alpha} )\sin{\beta_n}\right)\nonumber \\
\\
z_n &=& -\sqrt{3} ae \cos(\alpha-\beta_n)
\ena
where those are the coordinates in the solar system barycentric (SSB) frame and the phases are 
\bea
\beta_n = (n-1) \frac{2\pi}{3} + \lambda \\
\alpha(t) = \frac{2\pi}{1\, \rm{year}} t + \kappa
\ena 
and $\kappa = 0$, $\lambda = 0$ define the initial conditions.
The parameter $a$ is equal to 1 AU (Astronomical Unit). The orbital eccentricity is computed based on the armlength: $ e = L/(2a \sqrt{3} )$ .



% ============================================================
\subsection{TDI noises}
\label{sec:LISA_TDInoise}

The intrumental noises are directly produced by the simulator. 

The global noise levels are described in the file \verb+software/Packages/common/LISAParameters.py+ 
All noise sources are combined into two low and high frequency contributions:
\begin{itemize}
  \item $S^{Acc}$ : the PSD of the acceleration noise,
  \item $S^{IMS}$ : the PSD of the Interferometric Measurement System.
\end{itemize}
 


% ============================================================
\subsection{TDI convention}
\label{sec:LISA_TDIconv}
Let us introduce the LISA constellation and notations, schematically it is given in the figure~\ref{F:LISA}.
\begin{figure}[h]
\centering
%\includegraphics[width=0.7\textwidth]{/Users/stas/Documents/Papers/TDI/LISAtriangle}
\includegraphics[width=0.7\textwidth]{Figures/LISAtriangle}
\caption{LISA's constellation.}
\label{F:LISA}
\end{figure} 
The guiding center is moving around sun about $20^{\circ}$ behind Earth and each spacecraft (labeled $1,2,4$) is in the cartwheeling motion around $O$.  We have explicitly showing non-equal arm configuration, the separation between s/c is a function of time and is not equal pair-wise $L_1, L_2, L_3$.  We have six independent measurement, two (back and forth) along each arm.



Introduce Michelson $X$-TDI variable , we work here with the first generation of TDIs:
\bea
X = y_{1-32, 32-2} + y_{231, 2-2} + y_{123, -2} + y_{3-21} - \nonumber \\
\left[
y_{123, -2-33} + y_{3-21, -33} + y_{1-32,3} + y_{231} 
\right]
\label{Eq:Xfull}
\ena
The $Y, Z$ channels are obtained by cyclic permutation of indices $1 \to 2 \to 3 \to 1$. 
We have used a short hand notation for delays:
\be
y_{slr, i}(t) \equiv y_{slr}(t - L_i)
\en  

If the noise is uncorrelated and similar in each link the total noise in the $X$ TDI (the same in $Y, Z$):
The resulting noise PSD is 
\be
S_X = 16\sin^2{\omega L} \left[ 
2(1 + \cos^2{\omega L})S^{Acc} + S^{IMS}
\right].
\en

Note that the noise is correlated between $X, Y, Z$ with the cross-spectrum: 

\be
S_{XY} = -8 \sin^2{\omega L}\cos{\omega L}\left( 
S^{IMS} + 4S^{Acc} \right)
\en

We can construct the noise independent data combinations, called here $A, E, T$. Note that these combinations are not uniquely defined as
\be
E = \frac{X - 2Y + Z}{\sqrt{6}}, \;\; A= \frac{Z-X}{\sqrt{2}}, \;\; T= \frac{X+Y+Z}{\sqrt{3}}
\en
The numerical coefficients for $A$ and $E$ are chosen so that they have equal noise PSD:
\bea
S_A &=& S_E =  (S_X - S_{XY})  = \nonumber \\
&& 8\sin^2{\omega L} \left[ 
4(1+\cos{\omega L} + \cos^2{\omega L})S^{Acc} + (2 +\cos{\omega L })S^{IMS}
\right]\nonumber \\
\ena
Similarly we can compute PSD for $T$: $S_T = S_X + 2S_{XY}$,
\bea
S_T = 32\sin^2{\omega L} \sin^2{\frac{\omega L}{2}} \left[ 
4\sin^2{\frac{\omega L}{2}} S^{Acc} + S^{IMS}
\right].
\ena

Now let us describe the response to the GW signal. We start with the single arm response:

\bea
y_{slr}^{GW} =  \frac{\Phi_l(t_s - \vk \v{R}_s(t_s)) - \Phi_l(t - \vk\v{R}_r(t))}{2(1-\vk\vn_l)}
\ena
where the subscriots $slr$ mean ``s''ender, ``l''ink, ``r''eciever and 
\be
\Phi_l = \vn_l h_{ij} \vn_l
\en
is the projection of the GW strain on the unit vector of link defined by a unit vector $\vn_l$. The time $t_s$ could be approximated as follows
 $t_s = t - |\v{R}_r(t) - \v{R}_s(t_s) | \approx t - L_l$, and 
$L\vn_l \approx \v{R}_r(t) - \v{R}_s(t_s)$. The vecors $\v{R}_i$ define the position of ``i''-th spacecraft. We assume here that arms are approximately equal $L_i \approx L$.

Using this approximation we have 
\be
y_{slr}^{GW} = \frac{\Phi_l(t - \vk \v{R}_s - L_l) - \Phi_l(t - \vk\v{R}_r)}{2(1-\vk\vn_l)}
\en
Substitute $h_ij$ decomposed in the polarization basis in SSB we get

\bea
\Phi_l &=& (\vn_l \vn_l)^{ij} \left[h_{+}^S \mathcal{E}_{ij}^+
+ h_{\times}^S \mathcal{E}_{ij}^{\times} \right] 
\equiv F^{+}_l h_+^S + F^{\times}_l h_{\times}^S
\ena
where
\bea
 \mathcal{E}_{ij}^+ &=& (-\epsilon^{+}_{ij}\cos{2\psi} + \epsilon^{\times}_{ij} \sin{2\psi} ) \\
 \mathcal{E}^{\times}_{ij} &=& (-\epsilon^{+}_{ij}\sin{2\psi} - \epsilon^{\times}_{ij} \cos{2\psi} )
\ena
and $h^S_{+,\times}$ are given in the source frame. 
It is convenient to write the GW signal in the complex form 
(if the signal is given in the Fourier domain we use it as is):

\bea
h_{+} &=& A_{+} \cos{\Phi(t)} \equiv \frac1{2}A_+ e^{i\Phi(t)} + c.c.\\
h_{\times} &=& A_{\times} \sin{\Phi(t)} \equiv -\frac{i}{2}A_{\times} e^{i\Phi(t)} + c.c.
\ena
We will drop the ``complex conjugate'' part assuming that it is always there. 
The further simplifications assume that the amplitudes is slowly varying 
functions of time, and that the orbital time scale is much smaller compared to 1 year (period of LISA's orbital motion). Then we can neglect all delays in the amplitude $A_{+,\times}$ and antenna functions
$F_l$. We also separate the position of each s/c in SSB into position of 
the guiding center $O$ and vectors connecting $O$ and s/c: 
$$
\v{R}_i = \v{R}_o + \vq_i
$$
Note that $\vq_s + \vn_l L = \vq_r$ and $q_i$ are of order $L$. After a little bit of algebra we obtain

\bea
y_{slr}^{GW} = -i\frac{\omega L}{2} A_l e^{i\Phi(t - \vk\v{R}_0)} e^{-i\omega\vk\vq_r}
\sinc \left[ \frac{\omega L}{2} (1- \vk\vn_l) \right] 
e^{-i \frac{\omega L}{2}(1 - \vk\vn_l)},
\label{Eq:yslr}
\ena
where
\be
A_l = \frac1{2}[A_{+}F^l_{+} - i A_{\times}F_{\times}^l].
\en
In the long wavelength limit ($\omega L \ll 1$) and at leading order we get
\be
y_{slr}^{LW} = -i\frac{\omega L}{2} A_l e^{i\Phi(t - \vk\v{R}_0)}
\en 

Now we compute the $X$-Michelson TDI given by expression (\ref{Eq:Xfull}). We 
again use approximation that the delays are small: $y_{slr,1} = y_{slr}(t-L_1)\approx y_{slr} e^{-i\omega L}$, and obtain

\bea
X = -2i \sin{\omega L} \left[
(y_{1-32}^{GW} - y^{GW}_{123})e^{-i\omega L} + y^{GW}_{231} - y^{GW}_{3-21})
\right]e^{-i\omega L}
\label{Eq:X}
\ena

We can also introduce the response $R_X$ given as 
\be
X = R_X Ae^{i\Phi(t - \vk\v{R}_0)},
\en
where the amplitude $A$ is a common part of $A_{+}, A_{\times}$.
We need to add complex conjugate to (\ref{Eq:X}) (or to take twice the real part) to get the real expression. Other two Michelson combinations ($Y, Z$)
are obtained by rotation of indices $1\to 2\to 3\to 1$. 

At the end we want to outline the the generation of the data in the 
frequency domain. The IMR waveform is often generated as set of modes 
(expansion in the spin-weighted spherical harmonics $Y_{lm}(\theta, \phi)$, 
we omit the spin weight index (-2)). For the non-precessing binaries, the dominant GW modes are: 
\bea
\tilde{h}_+ &=& \frac1{2}(Y_{22} + Y_{2-2}^*)A_{22}e^{i\Psi(f)}\\
\tilde{h}_{\times} &=& \frac{-i}{2}(Y_{22} - Y_{2-2}^*)A_{22}e^{i\Psi(f)} 
\ena

Assuming the convention for the Fourier transform as $\tilde{x}(f) = 
\int x(t) e^{-i 2\pi f t} dt$, we get for the delays: 
\bea
\Phi_l(t-\delta t) \to \tilde{\Phi}_l(f) e^{-i\omega\delta t},
\ena
where with tilde we denote the functions in the Fourier (frequency) domain.
Next we need to put the correspondence between time and instantaneous frequency 
of the GW mode: 
\bea
t_f = -\frac1{2\pi} \frac{d\Psi_{lm}(f)}{d f}.
\ena
In the first (''Radler'') challenge we work only with the dominant modes. 
Note that the IMRPhenomD shifts the waveform so that the coalescence time 
corresponds to the $t=0$, which needs to be corrected. The rest of derivations 
are similar to what we have done in the time domain. We refer to separate documentation which describes in details the generation of the response in the 
frequency domain beyond leading order \cite{Sylvain}.
The expression for the single link is the same as (\ref{Eq:yslr}) with replacement 
$$
A_l e^{i\Phi(t - \vk\v{R}_0)} \to A_l e^{i(\Psi(f) - \omega\vk\v{R}_0)}.
$$




% ############################################################
\newpage
\section{For users}
\label{sec:User}


% ============================================================
\subsection{User request file}
\label{sec:UserRequest}

%---------------------------------------
\subsubsection{Common required parameters for the \ac{GW} sources}
\label{sec:UserReqCommon}

\begin{itemize}
  
    \item \verb+SourceType+   Type of source ; see~\ref{sec:UserReqSrc}
  
   \item \verb+NumberSources+ Number of sources of the given type
   
\end{itemize}



%---------------------------------------
\subsubsection{Source type (\texttt{SourceType})}
\label{sec:UserReqSrc}

% - - - - - - - - - - - - - - - - - - - - - - -
\paragraph{\acf{MBHB}}
\label{sec:UserReqSrcMBHB}


\begin{itemize}
   \item \verb+Catalogues+ ...
   
   \item \verb+CoalescenceTime+
   
   \item \verb+MassRatio+ ...
   
   \item \verb+Spin1+ ...
   
   \item \verb+Spin2+ ...
   
   \item \verb+Model+ ...
   
   \item \verb+RequestSNR+ ...
   
   \item \verb+TimeStep+ ...
   
   \item \verb+ObservationDuration+ ...
   
\end{itemize}

Example:
\begin{lisafile}
==============================

SourceType           MBHB
NumberSources        1
Catalogues           "catalogues/MBHs/catalog_Q3_delay_real106.out"
CoalescenceTime      0.1-0.25
MassRatio            1.0-10.0
Spin1                0.5-0.99
Spin2                0.5-0.99
Model                IMRPhenomD
RequestSNR           100.0-500.0
TimeStep             10.0
ObservationDuration  1966065.0

==============================
\end{lisafile}


% - - - - - - - - - - - - - - - - - - - - - - -
\paragraph{\acf{EMRI}}
\label{sec:UserReqSrcEMRI}
...


% - - - - - - - - - - - - - - - - - - - - - - -
\paragraph{\acf{SGWB}}
\label{sec:UserReqSrcSGWB}


\begin{itemize}
  
  \item \verb+Approximant+ Approximative model use to generate the background. The only method implemented at the moment is \verb+LISACode2SGWB+

   \item \verb+Sky+: Sky distribution. 
   \begin{itemize}
     \item \verb+Isotropic+ 
     \item \verb+Anisotropic+ (not available at the moment)
   \end{itemize}

   \item \verb+FrequencyShape+: Frequency  shape of the signal 
   \begin{itemize}
   
     \item \verb+PowerLaw+: power law model defined as:
     \begin{equation}
       \Omega (f) = \Omega_0 \,\left(\frac{f}{f_{*}}\right)^{\gamma}
     \end{equation} 
     
     \begin{equation}
       PSD(f) = { 3 H_0^2 \Omega(f) \over 4 \pi^2 f^3} \ Hz^{-1}
                   = { 3 H_0^2 \Omega_0 \over 4 \pi^2 f_{*}^{\gamma} } f^{\gamma-3} \ Hz^{-1}
     \end{equation}
     with $H_0 = 2.175 \times 10^{-18}$ Hz
   
    \item \verb+3PowerLaws+ (Not yet implemented)
 
 
   \end{itemize}
   
   


     \item \verb+EnergyAmplitude+: $\Omega_0$ Energy density or range of energy density. Only use for model \verb+FrequencyShape+ = 
     \verb+PowerLaw+.

   \item \verb+EnergySlope+: $\gamma$ Slope of the power law background or range of slope. Only use for \verb+FrequencyShape+ = \verb+PowerLaw+)

   \item \verb+FrequencyRef+: $f_{*}$ reference frequncy in Hertz. Only use for model \verb+FrequencyShape+ = 
   \verb+PowerLaw+.
   
   

\end{itemize}

Example:

\begin{lisafile}
==============================

SourceType           SGWB
NumberSources        1
Approximant          LISACode2SGWB
Sky                  Isotropic
FrequencyShape       PowerLaw
EnergySlope          0.666667
FrequencyRef         25
EnergyAmplitude      0.5e-9:4.5e-9

==============================
\end{lisafile}


% ============================================================
\subsection{Catalogs}
\label{sec:UserCatalogs}

\subsubsection{\acf{MBHB}}
\label{sec:UserCatMBHB}

\begin{itemize}
\item MBHB catalogs are located in /catalogues/MBSs, and are those used in \cite{2016PhRvD..93b4003K} (\href{https://arxiv.org/pdf/1511.05581.pdf}{https://arxiv.org/pdf/1511.05581.pdf}, K16 hereinafter).
\item There are 3 population models in 3 directories pop3, Q3\_nodelays, Q3\_delays. Description of the distinctive physical properties of each model can be found in K16.
\item There are 10 files in each model directory. Each file contains {\it all merging MBHBs in the universe} in 1 yr (for a total of 10 yr of data).
\item No selection based on LISA detectability has been performed to generate the catalogs.

\item in each file, colums are:  
\begin{enumerate}
\item column 1: redshift of coalescence;  
\item column 2: intrinsic mass of primary (solar masses);
\item column 3: intrinsic mass of secondary (solar masses); 
\item column 4: spin magnitude of primary; 
\item column 5: spin magnitude of secondary; 
\item column 6: angle between $s_1$ and $L$ ($L$ is the binary orbital angular momentum) in radians; 
\item column 7: angle between $s_2$ and $L$ in radians;  
\item column 8: angle between the two projections of $s_1$ and $s_2$ into a plane perpendicular to $L$ (i.e., in the plane of the binary) in radians. The angle is randomly picked in the range $[0,2\pi]$;
\item column 9: coalescence time in seconds (random between 0 and 5 years, this can be re-drawn...); 
\item column 10: $\theta$ sky location, uniform in $\cos \theta$; 
\item column 11: $\phi$ sky location, uniform in $[0,2\pi]$; 
\item column 12: inclination $\iota$ defined as the angle between $L$ and the line of sight, uniform in $\cos \iota$;
%\item {\bf columns 13-14-15: those are three additional angles (uniform between $[0,2\pi]$) that define univocally the system. However I do not remember exactly what they are, they should be polarization, ascending node, and some rigid rotation of the spin configuration that I think is still free as per the angles above. I have to email AntoineK, who knows exactly what those are. Apologies for the inconvenience...}
%  
\end{enumerate}
%\item {\bf Also, I don't know exactly how info in column 6,7,8 are used. I don't know whether those are assumed at the ISCO and then equations are integrated back. Or whether those are assumed 'far away' from coalescence. This is also something that has to be agreed upon.}

\end{itemize}


\subsubsection{\acf{EMRI}}
\label{sec:UserCatMBBH}

\begin{itemize}
\item EMRI catalogs are located in /catalogues/EMRIs, and are those used in \cite{2017PhRvD..95j3012B} 

(\href{https://arxiv.org/pdf/1703.09722.pdf}{https://arxiv.org/pdf/1703.09722.pdf}, B17 hereinafter).
\item There are 12 population models in 12 directories M1,...,M12. The labels correspond to the models reported in Table 1 of B17. Description of the distinctive physical properties of each model can be found in there.
\item There are 10 files in each model directory. Each file contains EMRIs detected in 1 yr (for a total of 10 yr of data) with total SNR$>20$ assuming the AKK waveform model. Note that in M7 and M12 every year catalog (EMRICAT101*, EMRICAT102*, etc) is subdivided in 3 or 4 subfiles denoted with SNR0, SNR1, etc (for computational purposes). The sum of each subfile is still worth 1 yr EMRI detections
\item The content of the files are specifided in the first row column headers; columns are:
%  \begin{enumerate}
%  \item plunge time from the start of the mission; random [0,2yr]
%  \item log of the CO mass (in sec?)
%  \item log of the MBH mass (in sec?)
%  \item eccentricity at plunge
%  \item $\nu$ (orbital frequency?) at plunge
%  \item $\gamma$
%  \item $\phi$
%  \item cosine of $\theta$ sky; random [-1,1]
%  \item $\phi$ sky; random [0,2$\pi$]
%  \item cosine of $\lambda$
%  \item $\alpha$ at plunge
%  \item MBH adimensional spin parameter
%  \item cosine of $\theta$ spin wrt the initial orbital angular momentum direction (I guess?); random [-1,1]
%  \item $\phi$ spin wrt the initial orbital angular momentum direction (I guess?); random  [0,2$\pi$]
%  \item Zeta parameter (what's that exactly?)
%  \item MBH quadrupole moment (is this the deviation from Kerr?)
%  \item SNR in LISAI
%  \item SNR in LISAII
%  \item total SNR
%  \end{enumerate}
\end{itemize}

...  \todo{Alberto/Enrico: describe the catalogs here }



% ============================================================
\subsection{Run the pipeline to generate data}
\label{sec:RunPipeline}

We assume here you start from the docker image (see 
section~\ref{sec:InstallDockerUser}).

% --------------------------------------------------------------------------------
\subsubsection{Generate source list}
\label{sec:RunPipelineSrc}

\begin{itemize}
  \item Start a configuration file. In the example, we copy \verb+Ref_Param.txt+ from \verb+examples+:  
 \begin{termcmd}
  cp /codes/LDC/examples/Ref_Param.txt Param.txt
 \end{termcmd}

\item Choose the sources and produce the \verb+hdf5+
 \begin{termcmd}
 ChooseSources.py --paramFile=Param.txt --filename=MySim_Param.hdf5 --seed=12345  
 \end{termcmd}

\item You can check the parameters using \verb+LISADhdf5+ \verb+python3+ class. Start \verb+ipython3+ then:
\begin{code}
  from LISAhdf5 import *
  f = LISAhdf5('MySim_Param.hdf5')
  print("Number of sources = ", f.getSourcesNum())
  print("Name of sources = ", f.getSourcesName())
  p = f.getSourceParameters('MBHB-0')
  p.display()
\end{code}
\end{itemize}

% --------------------------------------------------------------------------------
\subsubsection{Generate $h_{+}$ and $h_{\times}$}
\label{sec:RunPipelinehphc}

\begin{itemize}
  \item Generate $h_{+}$ and $h_{\times}$:
  \begin{termcmd}
   Compute_hphc.py MySim_Param.hdf5
 \end{termcmd}
 
 \item To check the waveform. Start \verb+ipython3+ then:
 \begin{code}
  from LISAhdf5 import *
  import matplotlib
  matplotlib.use('Agg')
  import matplotlib.pyplot as plt
  LH = LISAhdf5('MySim_Param.hdf5')
  thphc = LH.getSourceHpHc('MBHB-0')
  plt.plot(thphc[:,0],thphc[:,1])
  plt.xlabel('Time(s)')
  plt.ylabel('h+')
  plt.savefig('hphc_MBHB0.png')   
 \end{code}
 
\end{itemize}

% --------------------------------------------------------------------------------
\subsubsection{Configure Instrument and Noises}
\label{sec:RunPipelineConfig}
\begin{itemize}
  
  \item Configure instrument:
  \begin{termcmd}
    ConfigureInstrument.py --duration=31457265 MySim_Param.hdf5
  \end{termcmd}
  
  \item Duration is 1 year instead of 4 years for default. See \verb+ConfigureInstrument.py --help+
   for more options (timestep, duration, TDI, orbits, ...). 
   For example, if you want to use the MLDC orbits, add the option \verb+--orbits=MLDC_Orbits+.

 \item Configure noises:
 \begin{termcmd}
   ConfigureNoises.py MySim_Param.hdf5
 \end{termcmd}
 
 Options:
 \begin{itemize}
   \item \verb+--LevelRandom=+$x$ : Specify randomisation of noises level in percent [default 0]
   \begin{eqnarray}
      PSD_{level} = PSD_{level,0}\left(1+{\alpha \over 100}\right) \quad \textrm{ with random} \; 
      \alpha \in [-x,x]
   \end{eqnarray}
                 
 \end{itemize}
     
\end{itemize}


% --------------------------------------------------------------------------------
\subsubsection{Run simulation}
\label{sec:RunPipelineSimu}
\begin{itemize}
  
  \item Run simulation using LISACode2:
  \begin{termcmd}
    RunSimuLC2.py MySim_Param.hdf5
  \end{termcmd}

  \item To check the waveform. Start \verb+ipython3+ then:
  \begin{termcmd}
  from LISAhdf5 import *
  import matplotlib
  matplotlib.use('Agg')
  import matplotlib.pyplot as plt
  LH = LISAhdf5('MySim_Param.hdf5')
  tTDI = LH.getPreProcessTDI()
  plt.plot(tTDI[:,0],tTDI[:,1])
  plt.xlabel('Time(s)')
  plt.ylabel('TDI X')
  plt.savefig('TDI_X.png')
  \end{termcmd}

\end{itemize} 


% ============================================================
\subsection{Manipulate LISAhdf5 files}
\label{sec:Manipulate}

\begin{itemize}
  \item General tool to manipulate \verb+hdf5+ file\\ \href{https://support.hdfgroup.org/products/java/hdfview/}{HDFView(https://support.hdfgroup.org/products/java/hdfview/)}

  \item Display \verb+LISAhdf5+
  \begin{termcmd}
    LISAh5_display.py MySim_Param.hdf5
  \end{termcmd}
  
  \item Edit \verb+LISAhdf5+
  \begin{termcmd}
    LISAh5_edit.py MySim_Param.hdf5
  \end{termcmd}

  \item  Extract TDI outputs from \verb+LISAhdf5+ in ASCII file:
  \begin{termcmd}
    LISAh5_tdi2ascii.py MySim_Param.hdf5 MySim_Param_TDI.txt
  \end{termcmd}

  \item  Plot \ac{PSD} of the TDI output from \verb+LISAhdf5+ (for more options see \verb+psd.py -h+):
  \begin{termcmd}
    psd.py MySim_Param.hdf5 
  \end{termcmd}

\end{itemize}





% ############################################################
\newpage
\section{For developpers}
\label{sec:Dev}






% ############################################################
\newpage
\section{Support and improvements}
\label{sec:Support}


\subsection{Issues }
\label{sec:SupportIssues}

If you have any issues or problems have a look at list of \ac{FAQ} below.
If you don't find the solution, use the \textit{Issues} 
section on gitlab (\href{https://gitlab.in2p3.fr/stas/MLDC/issues}{https://gitlab.in2p3.fr/stas/MLDC/issues})
or send an email to \href{mailto:lisa-ldc-helpdesk-l@in2p3.fr}{LDC WG (lisa-ldc-helpdesk-l@in2p3.fr)}

\subsubsection{\acs{FAQ}}

Before asking/sending e-mail, please make sure you have read this manual. 

%---------------------------------------
%\subsubsection{Issue 1}
%\label{sec:SupportIssues1}
%...


%\subsection{New suggestions or questions}
%\label{sec:SupportSuggestions}
%
%If you want to suggest new features, etc, 
%use the \textit{Issues} section on gitlab \\
%(\href{https://gitlab.in2p3.fr/stas/MLDC/issues}{https://gitlab.in2p3.fr/stas/MLDC/issues})
%or send an email to Stas Babak (stas@apc.in2p3.fr)




\bibliographystyle{plain}
\bibliography{refs}

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

\end{document}







