## 1 Introduction  
Transmission electron microscopy (TEM) is a well-known microscopy technique which enables resolving materials down to their atomic scale. On top of the imaging capabilities, powerful spectroscopic techniques such as electron energy-loss spectroscopy (EELS) and energy dispersive X-ray spectroscopy (EDX) are commonly used. EELS measures the energy loss of the incoming electron when it interacts with matter via the use of a magnetic prism which provides information e.g., on the elements present in the sample and their electronic structure. EDX uses the fluorescence X-rays emitted from atoms excited by the primary electron beam. These X-rays are collected, and their energy analyzed from which the energy spectrum of the emitted X-rays is obtained, holding information on the chemical content of the sample. Both techniques are often performed with a condensed electron probe that is scanned over the sample and at each position the signal is recorded. In conventional analytical TEM, the electron and X-ray signals are gathered using an integrated method where the entire signal landing on the detector is integrated for a certain exposure time which typically varies from us to seconds or even minutes. For EELS, the integration time is typically of the order of ms where the lower end is determined by the finite read out speed of the pixelated detector. In EDX, the integration time can be chosen more freely and typically ranges from us up to minutes. Modern digital pulse processors (DPP) allow analysis of not only the energy of the X-ray events, but also their time-of-arrival(TOA) [1; 2; 3]. For electron detection, the advent of so-called Timepix detectors [4; 5] enables the detection of individual electrons on a pixelated detector with nanosecond precision. Hence compared to recording frames, the individual events are now detected from which the TOA is recorded. Placing such a detector in the detection plane of an EELS spectrometer makes event-based EELS detection a reality. For an X-ray to be emitted, an incoming electron should scatter inelastically with the atom, exciting it to a higher energy state. Hence, for every emitted X-ray, one electron should have scattered inelastically, losing at least the energy of the emitted X-ray. We therefore can expect a correlation between X-ray and EELS events as excitation and recombination of core level states typically occur quasi instantaneously at the femtosecond time scale [6; 7]. This idea to measure the time coincidence between X-rays and inelastic electrons has been applied by [PERSON] et al. [8] where a gating circuit was developed which only collects electrons/X-rays when an X-ray/electron is detected within a short time interval. The disadvantage of this method was that by online filtering, the conventional EELS and EDX signal was lost, and highly inefficient serial EELS acquisition was used as parallel detectors that were fast enough did not exist at that time. In a previous work, we demonstrated a setup using a microchannel plate coupled to a delay-line detector [9; 10] to detect the electron events. For the energy and TOA determination of single X-rays, a comparator circuit with a time-to-digital converter was used [11]. Although the delay line was able to record single electron events with ps precision, the microchannel plate was radiation sensitive, a gain reference was needed, and the number of pixels was quite limited (100 \(\times\) 100). For the X-ray detection, the comparator circuit was only able to record the signal of two of the four available X-ray detectors due to limitations in the time-to-digital converter that was used. In this work, the setup is upgraded via the use of a Timepix3 direct electron detector [12] and DPP [1; 2; 3] where additionally a versatile scan engine with extended triggering capabilities [13] is used in order to scan the electron beam over the sample enabling scanning transmission electron microscopy (STEM) coincidence mapping as an extension to conventional EELS and EDX mapping.