\section{Photoemission}
Electron photoemission embraces all the processes where an 
atom, a molecule or a surface is ionized under the effect of an external electromagnetic field.
In experiments, the ejected electrons are measured with detectors that are capable 
of characterizing their kinetic properties. 
Energy-resolved, $P(E)$, and momentum-resolved, $P(\vec{k})$, photoemission probabilities are quite 
interesting observables since they carry important information, for instance, on the parent 
ion~\cite{Puschnig_2009,Wie_ner_2014} or on the ionization process itself~\cite{Huismans_2010}. 
The calculation of these quantities is a difficult task because the process requires the 
evaluation of the total wavefunction in an extremely large portion of space (in principle a macroscopic one) 
that would be impractical to represent in real space. 

We have developed a scheme to calculate photoemission based on real-time TDDFT that is currently implemented in Octopus. We use a mixed real- and momentum-space approach. Each KS orbital is propagated in real space on a restricted simulation box, and then 
matched at the boundary with a momentum-space representation.

The matching is made with the help of a mask function $M(\vec{r})$, like the one shown 
in Fig.~\ref{fig:pes_sheme}, that separates each orbital into a bounded $\phi_i^A(\vec{r})$ 
and an unbounded component $\phi_i^B(\vec{r})$ as follows:
\begin{equation}\label{eq:mask_split}
  \phi_i(\vec{r},t) = \underbrace{M(\vec{r})\,\phi_i(\vec{r},t)}_{\phi_i^A(\vec{r},t)}+\underbrace{\left[1-M(\vec{r})\right]\phi_i(\vec{r},t)}_{\phi_i^B(\vec{r},t)}\, .
\end{equation}
