# 9.4.2 The fitting

The fitting is performed using forward modelling, where simulations of Gaia observations are compared to the observed windows. This forward model relies on the Radon transform as described in detail in Krone-Martins et al. (2013).

The Radon transform offers a good description of how Gaia rectangular pixels and windowing scheme transforms the continuous two-dimensional fluxes of sources on the sky into the Gaia one dimensional observations. For extended objects such as galaxies or host galaxies of quasars, Gaia observations are actually samplings of the object signal in the Radon space.

The Radon transform has not been extensively used in the astronomical community or other scientific aspects (see (Lanzavecchia et al. 1999; Starck, J. L. et al. 2003)). Recent studies suggest that using the Radon transform allows to better characterise the position angles of galaxies (Stark et al. 2018). In the $\mathbb{R}^{2}$, the Radon transform of a certain function $f(x,y)$ is defined as all line integrals of $f(x,y)$ over all lines $L$: $\check{f}=\int_{L}f(x,y)\mathrm{d}s.$ For lines with a certain angle $\phi$ with respect to the original reference system, the rotated coordinate system is written as

 $\left(\begin{array}[]{c}x\\ y\end{array}\right)=\begin{pmatrix}\cos\phi&-\sin\phi\\ \sin\phi&\phantom{-}\cos\phi\end{pmatrix}\left(\begin{array}[]{c}\rho\\ s\end{array}\right),$ (9.1)

accordingly, $\check{f}$ can be written explicitly:

 $\check{f}(\rho,\phi)=\int_{-\infty}^{\infty}f(\rho\cos\phi-s\sin\phi,\rho\sin% \phi+s\cos\phi)ds.$

When the function $\check{f}(p,\phi)$ is known for all the $(\rho,\phi)$ the Radon transform of the function $f(x,y)$ is known. The space of the coordinates $(\rho,\phi)$ is known as Radon space, and its sampling is known as sinogram.

## The forward modelling

For the construction of the forward model a two-dimensional over-sampled synthetic image of the source is produced. The parameters of the profiles being randomly trialled in a bounded domain (see Table 9.1).

Afterwards, given the scan angles in which the object was observed by Gaia, the numeric Radon transform of the resulting array is computed. Finally, the binning of the SM and AF windows are applied to extract synthetic AF and SM windows to be compared to the observational data.

The observations of a source as well as the synthetic observations are organised in two ‘sinograms’ presenting against the transit angle, the flux of the samples of the median-AF windows on one side and of the SM windows on the other.

The fitting is then performed as the solution for $min_{p}=\|f(p)-d\|^{2}$, where $p$ is the vector with the model parameters at the solution, $f(p)$ is the forward model computed with the parameters $p$ and $d$ are the observed window (AF and SM) data.

This optimisation problem is solved with a hybrid optimiser, on a two step strategy. First an approximate global optimisation (using multivariate normal distribution) is performed, to locate the region of the parameter-space where the L2-norm global optimum is likely to be found. This algorithm starts by generating randomly (using a uniform distribution) $10\,000$ sets of parameters using the domains of search described in Table 9.1. Then, the L2-norm is computed between the observed samples (SM and median AF) and the computed ones. The 30 best sets of parameters having the lowest norm are kept for computing statistics such as the mean, standard deviation and covariance matrix. Using these values and the multivariate normal distribution $10\,000$ sets of parameters are re-generated. These last steps are executed till it attains a certain level of convergence. Several tests are applied to stop this process, such as the number of iterations (less than 500), or the number of consecutive iterations not improving the convergence. Then, the output of the global optimisation is used as a initial step to a local optimisation (updating therefore the boundaries of parameters used). The local optimisation considered is CMAES (Hansen 2006) that is applied to accelerate the convergence and locate more efficiently the problem optimal solution. Moreover, the adoption of the local optimiser allows the estimation of the optimisation errors at the solution.

The L2-norm is calculated as the weighted sum of two l2 norms as follows:

 $L2=\frac{\sqrt{\sum(SM_{i}-d_{SM_{i}})^{2}}}{N_{SM}}+\frac{\sqrt{\sum(AF_{i}-d% _{AF_{i}})^{2}}}{N_{AF}}$

where $SM$ and $AF$ corresponds to aligned and binned SM and AF windows, $d_{SM}$ and $d_{AF}$ to windows extracted from the simulation, $N_{SM}$ and $N_{AF}$ the number of valid windows for SM and AF.

The convergence is reached when the algorithm attains a certain amount of iterations or when the five new random set of parameters did not improve the convergence function.