Phase-sensitive nuclear target spectroscopy (PHANTASY)

M\"ossbauer nuclei feature exceptionally narrow resonances at hard x-ray energies, which render them ideal probes for structure and dynamics in condensed-matter systems, and a promising platform for x-ray quantum optics and fundamental tests. However, a direct spectroscopy at modern x-ray sources such as synchrotrons or x-ray free electron lasers is challenging, because of the broad spectral bandwidth of the delivered x-ray pulses, and because of a limited spectral resolution offered by x-ray optics and detectors. To overcome these challenges, here, we propose a spectroscopy technique based on a spectrally narrow reference absorber that is rapidly oscillating along the propagation direction of the x-ray light. The motion induces sidebands to the response of the absorber, which we scan across the spectrum of the unknown target to gain spectral information. The oscillation further introduces a dependence of the detected light on the motional phase at the time of x-ray excitation as an additional controllable degree of freedom. We show how a Fourier analysis with respect to this phase enables one to selectively extract parts of the recorded intensity after the actual experiment, throughout the data analysis. This allows one to improve the spectral recovery by removing unwanted signal contributions. Our method is capable of gaining spectral information from the entire measured intensity, and not only from the intensity at late times after the excitation, such that a significantly higher part of the signal photons can be used. Furthermore, it not only enables one to measure the amplitude of the spectral response, but also its phase.


I. INTRODUCTION
Spectroscopy is an indispensable tool to study matter and its dynamics. Starting from initial work in the visible regime, by now its different variants are established across vast ranges of the electromagnetic spectrum, covering many orders of magnitude on the frequency scale, and there is a continuous progress in further advancing the different spectroscopy techniques. Over the last years, in particular spectroscopy at soft and hard x-ray energies has undergone a revolutionary development, due to improved x-ray sources and advances in x-ray optical elements and detection techniques [1][2][3][4][5][6][7][8]. Towards hard x-ray energies, however, atomic resonances are broadened due to their intrinsically low lifetime, such that it is difficult to find sharp electronic resonances. An interesting alternative are Mössbauer nuclei, which feature spectrally narrow transition in the hard x-ray regime [9][10][11]. These are narrow due to the Mössbauer effect, i.e., the recoil-free interaction between x-rays and matter [9]. They can be viewed as almost ideal two-level systems, have very high quality factor, and form the basis for a wide range of applications [10][11][12][13][14][15][16]. However, due to the exceptionally small line width, dispersive or diffractive elements to directly spectrally resolve their response are not readily available.
One way of performing spectroscopy on Mössbauer nuclei is to use radioactive x-ray sources, which offer sufficiently narrow source line widths to probe the spectra of unknown samples [11]. In contrast, modern pulsed xray sources are orders of magnitude broader than typical nuclear resonances even after monochromatization using crystal optics [10]. One approach to overcome this challenge is to measure in the time domain [17,18], which allows one to separate the off-resonant background and the scattered signal light via temporal gating. However, this approach does not directly provide spectral information, since detectors only register the intensity without phase information in a limited time after the excitation, such that a direct Fourier transformation of the response is not possible. Another ansatz is to use nuclei themselves to monochromatize the incoming x-ray light for the subsequent experiment, which enables the direct measurement of spectra in the energy domain [19][20][21][22][23][24].
A qualitatively different approach is to add a spectrally narrow reference absorber to the experiment, and to scan its resonance across the spectrum of the unknown sample, e.g., via Doppler shifts induced by relative motions between sample and absorber with constant velocity [25][26][27][28][29][30][31]. The combined response of unknown sample and reference absorber integrated over time then enables one to recover the energy spectrum of the sample, as function of the detuning of the reference absorber. However, it was found that the recovered spectra depend sensitively on the integration range [10,29,32], e.g., because of Fourier time-window effects introduced by gating away the off-resonant photons in the exciting x-ray pulse. One way of addressing this issue is stroboscopic detecion [33,34], in which the scattered light is measured in periodically spaced short intervals only. In recent experiments, instead, an integrating only over detection times late after the initial excitation was used [28][29][30][31]35], which we denote as Doppler-drive method in the following. This approach can be understood by noting that the desired spectral information is encoded in those signal photons which interacted with both, the sample and the reference absorber, and therefore were delayed The goal is to measure the spectral response of an unknown target containing Mössbauer nuclei using a short, spectrally broad x-ray pulse delivered by an accelerator-based source. The target is illustrated by a thin-film cavity containing the resonant nuclei. To introduce an energy selectivity, a spectrally narrow reference absorber also containing nuclei is introduced into the x-ray pathway. This reference absorber performs rapid oscillations in direction along the beam propagation. Subsequently, the scattered radiation is measured using avalanche photo diodes in dependency of the time t after excitation, the oscillation frequency of the piezo ωp, the oscillatory offset ϕ0 of the piezo, and the oscillation amplitude p. In (b), the operation principle of the spectroscopy approach is illustrated. The target spectrum to be measured is shown as the black solid line with asymptotic value 0. The oscillations introduce sidebands to the spectrum of the reference absorber shown as green solid and dashed lines with asymptotic values 1. The reference absorber has the central frequency S. One of the sidebands (n = 1) at S − ωp is scanned across the target spectrum by varying the oscillation frequency ωp. The dashed orange dashed line shows the product of the analyzer spectrum and the target energy spectrum, which determines the signal measured by the detector in the time domain. Importantly, the spectrum of the reference absorber depends on the phase of the motion ϕ0 at the time of excitaiton, indicated by the shape of the sidebands for ϕ0 = 0 (solid) and ϕ0 = π /2 (dashed line). We show that this dependence can be used to remove all unwanted contributions to the detection signal, and to recover amplitude and phase of the target response. twice until they reach the detector, thereby contributing to the late detection times. In contrast, at early detection times, the desired spectroscopy information is masked by those photons which interacted with either the target or the analyzer, but not both, and therefore were delayed only once. As a result, the requirement to restrict the analysis to late detection times severely restricts the part of the signal photons contributing to the recovery of the spectrum due to the near-exponential decay of the signal. Furthermore, this method as well as most other techniques for Mössbauer nuclei only allow one to measure the magnitude of the target response, but not its phase. However, the stroboscopic detection can access phase information [34], and there are interferometric techniques [30,36].
Here, we put forward a spectroscopy method to characterize the amplitude and phase of the response of an unknown sample containing Mössbauer nuclei, which we denote as phase-sensitive nuclear target spectroscopy (PHANTASY). It also uses a spectrally narrow reference absorber, but employs oscillatory motions of the reference absorber, instead of the conventional motion with constant velocity, see Fig. 1(a). This motion gives rise to a sequence of sidebands to the absorber resonance, which we scan across the unknown target response [see Fig. 1 The key difference to the previous approaches is that the oscillatory motion introduces a sensitivity of the detection signal to the phase ϕ 0 of the absorber motion at the time of arrival of the x-ray pulse. We exploit this by establishing the Fourier analysis with respect to ϕ 0 as a powerful analysis tool. It enables one to split the experimentally accessible detection signal into different components after the actual experiment, throughout the data analysis. Most notably, this technique enables one to remove all unwanted contributions to the detection signal arising from photons which only interacted with the target, but not with the reference absorber. As a consequence, the integration range to recover the target spectrum can significantly be enlarged towards shorter detection time, thereby considerably increasing the fraction of signal photons contributing to the recovery of the signal. To facilitate the spectral recovery, we derive a compact expression for the detection intensity using a Fourier analysis with respect to ϕ 0 and an additional spectral filtering, which can both be applied in the data analysis. Interestingly, because of the sensitivity to ϕ 0 , this expression provides access not only to the amplitude, but also to the phase of the desired target response. Next to oscillatory motions, we also introduce a second motional pattern, which is more challenging to implement in practice, but directly enables one to generate a tunable single-line absorber rather than a sequence of sidebands. In this case, no additional filtering is required, and the measurement also has the favorable dependence on ϕ 0 .
The required oscillatory or step-like motions of the reference absorber can be realized, e.g., using piezo transducers, and are well-established in the Mössbauer community [37][38][39][40][41][42][43][44][45][46][47]. They have been used, e.g., to calibrate Möessbauer spectrometer [39], to dynamically couple and decouple different nuclear targets [40], to explore the propagation of the x-ray through nuclear absorbers [41,42], to shape given x-ray pulses favorably in the time-or energy domain [43][44][45][46], or for the coherent control of nuclear dynamics using x-ray light [47]. In particular, it is known that oscillatory motions give rise to spectral sidebands [45,46], and experimental data has already been selectively analyzed as function of the motional phase ϕ 0 at the time of arrival of the x-ray pulse [45]. However, we are not aware of a separation of the data in terms of a Fourier analysis with respect to ϕ 0 , nor the spectroscopy applications introduced below.
The article is organized as follows. In Sec. II, we introduce the theoretical background of nuclear resonance scattering, and the time-and energy representations of the response of stationary and moving targets containing Mössbauer nuclei to incident x-ray radiation. Further, we introduce the motional patterns used in our analysis. The following Sec. III then introduces the PHANTASY method. Starting from the combined response of moving absorber and unknown target, we in particular establish the Fourier-analysis with respect to the phase ϕ 0 as a powerful tool in Sec. III B. Next, we numerically explore the capabilities of the spectroscopy method in Sec. IV, and compare it to the existing Doppler-shift-based spectroscopy method. Finally, Sec. V discusses and summarizes our results.

A. General setting
The general setup of our method is depicted in Fig. 1(a). The aim is to measure the spectral response of an unknown target using a short x-ray pulse delivered by an accelerator-based source such as a synchrotron radiation facility. In the figure, the target is illustrated by a thin-film cavity containing resonant nuclei. Due to their short temporal duration, the spectrum of the x-ray pulses is orders of magnitude broader than the target spectrum to be measured, such that a scan of the source cannot give spectral information on the target. Also the avalanche photo detector cannot resolve the desired spectral information.
To overcome this challenge, a spectrally narrow singleline reference absorber is introduced into the x-ray beam. Different from previous spectroscopy approaches, this reference absorber is mounted on a piezo transducer which rapidly oscillates the position of the analyzer parallel to the beam propagation direction. Further, the intensity of the scattered light is measured as a function of time t after the x-ray excitation, the oscillation frequency of the piezo ω p , the oscillation phase ϕ 0 at the time of excitation, and as function of the oscillation amplitude A. To this end, we propose to use an event-based detection system, which can record different quantities for each signal photon separately [44,47,48] for the later data analysis.
The operation principle of our spectroscopy technique is illustrated in Fig. 1(b). The rapid oscillation introduces sidebands in the spectral response of the reference absorber, which are separated by the oscillation frequency ω p . As example, the transmittance of the oscillating absorber is shown as the green solid line in the figure, with the fundamental frequency and two sidebands. This transmittance depends on the phase ϕ 0 , which determines the spectral shape of the different sidebands. To obtain spectral information, the first sideband of the analyzer is scanned across the unknown spectrum of the target via a suitable change of the oscillation frequency ω p . To allow for a selective coupling of one sideband to the target, an energy offset S between the resonance frequency of the stationary analyzer and the target spectrum is introduced, such that the other sidebands are sufficiently far away from the target spectrum during the scan. This can be achieved, e.g., by mounting the target on a Doppler drive moving with constant velocity, or by adding a linear component to the oscillatory analyzer motion.
In the following, we revisit the theoretical background to describe this setting. Afterwards, our spectroscopy approach will be discussed in detail in Sec. III.

B. Response of the stationary nuclear reference analyzer
We start by analyzing the propagation of x-rays through a stationary analyzer featuring a single nuclear resonance. This is the starting point for the reference absorber used to probe the spectra of the unknown sample. In the frequency domain, the spectral response of the analyzer can be written as [10,49] where γ is the single-nucleus linewidth and ω 0 the resonance frequency of the nuclei. Here and in the following, a "hat" indicates that the formula refers to the frequency domain. The parameter describes the thickness d of the analyzer foil, and is proportional to its optical depth. Here, ρ N is the nuclear number density, k 0 the wave number of the resonance, f LM the Lamb-Mössbauer factor, and α the internal conversion factor. In case of the archetype Mössbauer nucleus 57 Fe, the numerical values of these parameters are ρ N = 83.18 nm −3 , k 0 = 73.039 nm −1 , f LM ≈ 0.8, α = 8.56, γ = 4.7 neV and ω 0 = 14.4 keV.
With the help of Eq. (1), the outgoing x-ray field E out (ω) can be calculated from the incident fieldÊ in (ω) asÊ If the incident field is spectrally much broader than the nuclear resonance, as it is the case for temporally short synchrotron pulses, the input field has no relevant frequency dependence E in (ω) ≈ 1. Consequently, the outgoing field is proportional to the response function.
For the following analysis, it is convenient to rewrite Eq. (1) asR (5) Here, the "1" correspond to the zeroth scattering order and describes light which passes the analyzer without interaction with the nuclei. The remaining partR S (ω) contains all higher order of the scattering between x-rays and nuclei, and the subscript S indicates this part of the response due to scattering. For a thin analyzer, an expansion ofR S (ω) to leading order in the thickness parameter b leads to a Lorentzian frequency response, as expected for a single resonance. However, higher-order scattering processes in thicker analyzers lead to non-Lorentzian spectral responses. The corresponding response function in the timedomain can be obtained by Fourier-transform as [10] In the time domain, the zeroth-order response corresponding to x-ray passing through the analyzer without interactions is given by the δ(t)-contribution, whereas the contributions R S (t) arising from the interaction between x-rays and nuclei are delayed to times t ≥ 0 due to the narrow nuclear line width.
To calculate the outgoing field amplitude E out (t) in the time-domain, the input field E out (t) is convoluted with the response function, C. Response of the moving nuclear reference analyzer Next, we consider modifications to the nuclear response discussed in Sec. II B due to fast mechanical motions of the absorber. To this end, we transform the incoming pulse from the laboratory frame into the moving rest frame of the analyzer. Within this frame, the interaction between x-rays and analyzer can be calculated as in the static case. Afterwards, the scattered light is transformed back to the laboratory frame. For a near-instantaneous δ(t)-like incident x-ray pulse as it is provided by a synchrotron radiation source, one finds for the response of the moving analyzer [44,45,50] where z(t) describes the motion of the target.

Harmonic oscillation
An important class of analyzer motions are harmonic oscillations [37,38,42,45,51], for which the piezo motion can be described by Here, A is the oscillation amplitude, and ϕ 0 describes the phase of the oscillation at the time t = 0 at which the incident x-ray pulse hits the analyzer. Using Eq. (8), we find for the response of an oscillating single-line analyzer described by Eq. (6) where p = A · k 0 is a dimensionless quantity characterizing the oscillation amplitude.
To transform this equation to the frequency domain, we expand the exponential function using the Jakobi-Anger relationship, and findR We thus recover the well-known result that the oscillation gives rise to spectral sidebands, which are separated by multiples of the oscillation frequency ω p . Each sideband comprises the stationary responseR S , shifted to the corresponding center frequency ω 0 − nω p , and multiplied by the prefactors α n . These prefactors not only determine the relative weights of the different sprectral sidebands via the Bessel functions J n (p), but also contain relative phases depending on ϕ 0 , which modify the spectral shape of the sidebands from Lorentzian to more general Fano line shapes. An example for this is given in Fig. 1, where as an example the sidebands n = 0, 1, 2 are shown for ϕ 0 = 0 (solid green line) and ϕ 0 = π /2 (dashed green line). For applications in spectroscopy, we will find in the following discussion that it is favorable to realize situations in which a single sideband is of relevance. In this case, approximating to the n = 1 sideband only, Eq. (13) reduces tô 2. Phase-sensitive single line absorber In the case of an oscillating analyzer, the single-line case can only be realized in an approximate way, or using further processing of the experimental data, as discussed in Sec. III. However, there is an alternative motion, which directly leads to a single spectral line, while preserving a variable phase ϕ 0 in the spectral response. It is given by which corresponds to a step-like jump immediately after the excitation due to the incident short x-ray pulse in order to impose the relative phase ϕ 0 , and a linear motion to induce a Doppler shift by ω p , thereby tuning the resonance energy of the single spectral line. In the frequency domain, the corresponding response iŝ This result qualitatively agrees to the single line approximation of the harmonic motion Eq. (14), except for a different form of the prefactor, which is not of relevance for the spectroscopy applications discussed in Sec. III. This motional pattern is ideally suited for applications in spectroscopy, and does not require removing the contributions of additional sidebands from the experimental data in a postprocessing step. However, it is considerably more challenging to precisely implement and control the step-like motion experimentally, because of the requirement to abruptly displace the analyzer immediately after the excitation via the x-ray pulse. We note, however, that only the relative motion between analyzer and target is of relevance. For this reason, it is possible to split the motion across the two. For example, one could apply the linear motion to the analyzer using a conventional Doppler-drive, and a variable step-like jump immediately after the excitation to the target to introduce the phase sensitivity, as realized in [44].

III. PHASE SENSITIVE NUCLEAR TARGET SPECROSCOPY (PHANTASY)
With the theoretical background of Sec. II at hand, we now proceed by discussing the phase-sensitive nuclear target spectroscopy method. We consider an unknown target containing nuclei, which is exemplified by the case of an x-ray cavity containing nuclei in Fig. 1. The goal is to determine the spectral responseR T (ω) of this target, or equivalently the temporal response function R T (t). For this, we insert the harmonically oscillating analyzer foil in front of the target, such that the outgoing x-ray field at the detector is given bŷ Here, we again neglectÊ in (ω) ≈ const. for simplicity, assuming the case of spectrally broad synchrotron radiation. We further introduce a frequency offset S between the center frequency of the target's response and that of the analyzer's response, which will become important in the later analysis.
To fully exploit the power of the phase-sensitive spectroscopy, we assume an event-based detection, in which for each signal photon the time of arrival t, the phase ϕ 0 at the time of excitation, the oscillation frequency ω p and the oscillation amplitude p are recorded, similar to that employed in [44,47]. One approach is to record a trace of the time-dependent voltage applied to the transducer inducing the motion of the analyzer around each photon arrival time. Fitting a sine function to this trace provides both, ϕ 0 and p.
In order to relate the experimental data recorded in the time domain to Eq. (17), one would also like to transform the latter to the time domain, However, this is not possible in a straightforward way, due to the unknown frequency dependence of the target response. The experimental data in turn cannot directly be transformed in to the frequency domain, since only the light's amplitude is recorded by the detector, but not its phase. In the following, we will show how one can overcome this challenge, and thereby extract the amplitude and the phase of the target response from the experimentally accessible data.

A. Sensing Head Approximation
As a first step, we employ an approximation which allows us to analytically perform the transformation Eq. (18) to the time domain. This approximation is also employed in the Doppler-drive spectroscopy method [28,29,52], and we denote it as "sensing head approximation" in the following, illustrating the role of the reference absorber. We start by rewriting Eq. (18) using Eqs. (17) and (6) as The key idea of the approximation now is to assume that the spectral response of the analyzer is narrow as compared to that of the target, which in practice is realized by using thin analyzer foils. This assumption allows us to expand the frequency-dependence of the target response in the last line of Eq. (19) around the respective sideband frequencies of the oscillating analyzer, where Inserting this approximation into Eq. (19), it is now possible to perform the Fourier transformation, to give As a result of this approximation, we find that the timedependent signal E D (t) at the detector contains information about the desired frequency-response of the target (22), we evaluate the intensity registered by the detector as The first addend depends only on the time-dependent response of the target. The second part I Sq is the sum term in Eq. (23) squared. The final part I Re is the interference contribution, which will turn out to be most useful for applications in spectroscopy. It is apparent from Eq. (23) that the detection signal is a complicated mixture of contributions arising from different sidebands in the spectrum of the oscillating absorber. One way of simplifying this result is to replace the oscillating absorber by the phase-sensitive single-line absorber introduced in Sec. II C 2. In this case, all sums over n in Eq. (23) disappear, substantially simplifying the expression. Alternatively, we will show in the following how a comparable single-line information can be gained from the total detection signal in case of an oscillating absorber, by employing two different filter methods.
B. Disentangling the detector signal using the ϕ0 -filter Next, we introduce a method to exploit the dependence of the detection signal on ϕ 0 to selectively extract certain parts from it. In an experiment, the harmonic oscillation typically is not frequency-locked to the repetition rate of the x-ray pulses, such that throughout the measurement the phase ϕ 0 is automatically sampled over its entire range [0, 2π[. An event-based detection scheme registering this phase for each signal photon separately then provides the basis for a powerful analysis technique introduced below.
The key idea of the ϕ 0 -filter is to perform a Fourier analysis of the detection signal in Eq. (23) with respect to ϕ 0 , in order to separate the total detection signal into the various frequency components of this phase. In the following, the Fourier-conjugate variable to ϕ 0 will be called f , such that for x ∈ {T, Sq, Re}. Hence, I f x is the Fourier coefficient describing the signal part oscillating with the frequency of f ϕ 0 .
The first addend I T of Eq. (23) has no dependency on ϕ 0 , such that ( Since the other contributions only depend on ϕ 0 via α n , we next evaluate the Fourier-transformations of the combinations of α n which appear in Eq. (23). For I Sq , the absolute square leads to contributions of the form α n α * m , which transform to . (26) I Re contains the ϕ 0 -dependent contributions α n and α * n . Using again the Jakobi-Anger relation Eq. (11), we obtain Using these results, we now can evaluate the fcomponent of detection signal, to obtain As a result, we find that the Fourier analysis with respect to ϕ 0 separates the total detection signal into different components. Since the Fourier transform only has contributions at integer values of f , this separation can reliably be performed even in the presence of experimental imperfections. Afterwards, the different components can selectively be analyzed or combined. Most notably, choosing f = 0 enables one to completely remove the contribution I T which is favorable since it does not contain the desired dependence onR T , and usually renders the desired components in the time-dependent detection signal inaccessible at early detection times.
C. Disentangling the detector signal using the t -filter The t-filter discussed in this section is analogous to the ϕ 0 -filter, but exploits Fourier transformations between the time-and frequency spaces. In the following, the conjugated variable to t in the Fourier space is called ν. While the ϕ 0 -filter conveniently allows one to remove the contribution I T from the detected signal, the remaining signal contributions in Eqs. (28) still comprise sums over different sidebands n in each f -component. The purpose of the t-filter therefore is to further select a single sideband component from the ϕ 0 -filtered signal. However, the t-filter is more difficult to implement than the ϕ 0 -filter, since spectral components contributing to the detection signal are not discrete, in contrast to the integer f -components contributing to the ϕ 0 -dependence. The origin of this is that the different sideband contributions are broadened in ν-space due to the convolution with the target response, such that they may spectrally overlap. This is illustrated in Fig. 2, where the positions of the different sidebands are symbolized using triangles, whereas their broadening due to the convolution with the target response is indicated by the dashed black lines.
Because the sidebands separation depends on ω p , in order to implement the t-filter, we demand that this frequency is large enough such that the different spectral components created by the harmonic motion do not spectrally overlap. To quantify this criterion, we define l such that the relevant frequency range of the target spectrum is contained within the interval [ω 0 − l, ω 0 + l]. In Fig. 2, l corresponds to the half width of the dashed broadened lines.
We start by extracting the frequencies of the dominant time dependencies of the sideband components from Eqs. (28), given by ±(S − nω p ) for I f Re and by ±f ω p for I f Sq . The ν-range shown in Fig. 2 includes two sidebands of I f Re at S − ω p and −(S − 2ω p ) (blue triangles), as well as two sidebands of I f Sq at 0 and ω p (orange triangles). The broadening of the peaks due to the convolution with the unknown target spectrum is indicated by the black dashed lines. l denotes the half-width of this broadening. To ensure that there is no spectral overlap between the broadened peaks such that a t-filter can be applied, the distances between the relevant peaks should be separated at least by 2l.
Since in the proposed setup the sideband with n = 1 is used to scan the target resonance, the aim of the t-filter is to extract the component with dominant frequency ±(S − 1 · ω p ) from the measured signal. The dominant frequencies of the other spectral components therefore should be separated by more than 2l in the ν-space. To quantify this condition, we find from Fig. 2 that the closest unwanted frequency component of I f Re to (S − ω p ) is −(S − 2ω p ). Their frequency difference is |3ω p − 2S|.
Since ω p has to be scanned within the interval [S −l, S +l] to cover the entire target spectrum, the frequency difference is smallest for ω p = S −l. In this case, the frequency difference evaluates to |S − l3|, which should be larger than 2l. As a result, we find the condition S > 5l (29) in order to be able to successfully apply the t-filter. This condition can be interpreted in a straightforward way. With increasing S, the oscillation frequency ω p also has to increase in order to scan across the target spectrum. Due to this increase, the different sidebands move further apart. This leads to a minimum value for S in order to be able to separate the spectral components, on a scale set by the width of the target spectrum 2l. Next, we analyze I f Sq . In the above case, all components with dominant evolution frequency ±f ω p for f = 0 are separated from the desired frequency component ±(S − ω p ) by more than 2l. The f = 0 contribution of I f Sq , however, overlaps with the ±(S − ω p ) component of I f Re for ω p ≈ S, i.e., in the center of the target spectrum, such that the two cannot be separated by the t-filter alone.
As a result, we thus find that the t-filter also is a powerful method to extract particular information from the measured data, if condition Eq. (29) is fulfilled. How-ever, like the ϕ 0 -filter, the t-filter alone cannot be used to extract the response of a single sideband component of the data. Therefore, a combination of both is needed to achieve the reduction to a single sideband component.

D. Extracting the contribution of a single sideband by combining the ϕ0-and the t-filters
Here, we show that the combination of the ϕ 0 -and the t-filter enables one to extract the response of a single spectral component from the measured data. To this end, we first use the ϕ 0 -filter to select the f = ±1 components from the data. The relevant contributions of the signal evaluate to Here, we for clarity only indicate the residual dominant time dependency in the I ±1 Sq contributions. Note that this step removed the problematic f = 0 component of I Sq at ν = 0 from the data. Therefore, now the t-filter can next be applied in order to select the dominant (S − ω p ) component. The filtered detection signal becomes A straightforward comparison shows that Eq. (31) coincides with the result one would obtain by calculating the total detector signal within the single-line approximation of the oscillating analyzer in Eq. (14). We therefore conclude that the ϕ 0 -and the t-filter together enable one to extract the response of a single sideband from the full measured data. Inspecting Eq. (31) further, we find that it contains the phase of the target response, even though the detector registers intensities only. This dependence arises due to the ϕ 0 -dependence of the oscillating analyzer response, and offers the possibility to measure amplitude and phase of the desired target response, as we will demonstrate in the next Section. A further simplification is achieved if we assume that the oscillatory motion has a particular modulation depth p 0 such that J 0 (p 0 ) = 0. In this case, E. Reconstruction of amplitude and phase of the target's spectral response With the analytical expression for the filtered detection signal Eq. (31) at hand, we are now in the position to discuss the recovery of the desired amplitude and phase of the target spectrum. For simplicity, we illustrate the method for the case of Eq. (32), assuming a modulation depth such that J 0 (p 0 ) = 0. For this, we rewrite and make use of the relation R S (t) = |R S (t)| exp(−iω 0 t) [see Eq. (6)] to obtain where This result can be interpreted in the following way. The filtered detection signal is proportional to the amplitude of the desired target spectrum C(ω p ). The corresponding phaseφ T is contained in the total phase a, and because of the dependence of the argument of the cos function on ϕ 0 , a tomographic reconstruction ofφ T becomes possible by suitable variation of ϕ 0 . Additionally, the total signal has a time-dependent prefactor B(t, τ 1 ), due to the individual decay of the responses of target and analyzer with increasing time. Note that Eq. (6) mixes the temporal representation R T (t) and its frequency versionR T (ω) in a single expression due to the sensing hat approximation.

Fit of the experimental data
As the first step of the recovery, the function is fitted to the experimental data for each parameter pair (ω p , t), see Fig. 3. Note that the possibility to perform this analysis crucially relies on the event-based multidimensional detection, which enables one to evaluate the experimental data with respect to any combination of the different variables.

Reconstruction of the amplitude |RT(ω)| of the target's spectral response
For the reconstruction of the amplitude of the target spectrum, we use the fit parameter D(t, ω p ) = B(t, τ 1 )C(ω p ). Like in the Doppler-drive spectroscopy method, we integrate this parameter over the time t, in order to make use of all recorded signal photons for the recovery. Note, however, that the ϕ 0 -and the t-filter already removed all unwanted contributions from the detection signal. As a result, a priori the integration time range is not restricted to late times, as it is the case in the Doppler-drive spectroscopy method.
In addition to the increased measurement statistics, the time integration serves two further purposes in our method. First, it reduces the residual dependence on the parameter τ 1 introduced because of the sensing-head approximation. τ 1 depends on ω p and therefore could lead to distortions of the recovered spectrum. However, it merely acts as a shift of D in time. Therefore, its effect can be reduced using an integration over a larger time range. Second, our numerical simulations suggest that higher-order contributions not accounted for in the sensing-head approximation lead to additional oscillations in D with time. Also these oscillations can be reduced using a time integration. However, since the amplitude of the measured data decreases exponentially in time, the latter two effects are most effective if the contributions at all times contribute equally. To achieve this, the maximum of D is normalized to unity at each instance in time t separately, before the integration over all times t is performed. Furthermore, since D is proportional to the magnitude of the energy spectrum, the data is squared before the average is taken in order to obtain the spectral intensity.

Reconstruction of the phaseφT(ω) of the target's spectral response
For the reconstruction of the spectral phase, the fit parameter a(t, Due to the periodicity of the cosine function, the value of a(t, ω p ) is only determined modulo 2π, or π if the sign of D is variable. This leads to a degeneracy of the fit parameters which needs to be corrected for. Next, we subtract the (ω 0 + S − ω p )t contribution from a(t, ω p ). The remaining part only depends via the desired spectral phaseφ T on the oscillation frequency ω p , while the other parts only form an irrelevant overall phase offset. Finally, taking the modulus of 2π of the remaining part yields the desired spectral phase, up to an irrelevant overall phase.
Note that also for the recovery of the phase, it is useful to average the measured data over time. Since the parameter a(t, ω p ) does not depend on the amplitude D(t, ω p ), no normalization is necessary in this averaging.

A. Numerical simulation
In this Section, we numerically explore the potential of the PHANTASY method. As target, we consider a thin film cavity structure shown in Fig. 4, probed by the x-rays in grazing incidence. It comprises two layers of Pt acting as mirrors for the x-rays, and a guiding layer made of C. This guiding part further contains a thin layer of 57 Fe featuring the resonances to be probed. In order to compare results for spectra of different complexity, we consider three different magnetic field configurations, summarized in Fig. 4. The case without magnetic splitting can be realized, e.g., by implementing the nuclear layer in the form of stainless steel [10]. In case of α-Fe, a Zeeman splitting occurs, and the nuclei in general feature six different transition frequencies in the spectrum [10]. By applying weak external magnetic fields of different orientations, the magnetization axis of the nuclei can be aligned, thereby determining the coupling of the different transition dipole moments to the linearly polarized incident x-rays. In all cases, the cavity is irradiated by π-polarized x-ray light, and only π-polarized scattered light is measured. For the analyzer, we consider a stainless steel foil ( 57 Fe 55 Cr 25 Ni 20 ) of thickness of d = 1 µm that features a single absorption line.
To perform the simulation, we calculate the intensity registered by the detector as it would be recorded in an experiment using Eq. (13) and the software package pynuss [53] to calculate the theoretical complex amplitudes of the cavity. Since experimental constraints related to the strong off-resonant component of the incident x-ray pulse typically prevent one from reliably measuring the time-dependent intensity in the first few ns after the  In (a,b), the time integration ranges are t1 = 15 ns, t2 = 130 ns. In (c), the range is t1 = 42 ns, t2 = 49 ns. The two grey curves further show corresponding results for the range in (a), while the two red (purple) curves show results for the individual time 80 ns (130 ns). In the latter cases, the two curves each differ only in an overall phase shift, which is chosen such that the curves agree to the reference either at the left or at the right edge of the plot. excitation, we exclude the first 15 ns from the reconstruction. As upper limit for the time range, we use 192 ns which corresponds to the bunch separation of the 40bunch mode at PETRA III (DESY) [54]. Both limits are set before any further processing of the data is applied, to simulate the conditions in the experiment. Based on this truncated data, we then perform the analysis as explained in Sec. III.

Amplitude of the target's spectral response
Results for the amplitude of the target spectrum together with corresponding exact reference spectra are shown in Fig. 5. For the first configuration without magnetic splitting in (a), a single resonance is observed, as expected. The second configuration (b) features two rel-atively broad resonances. The third configuration (c) shows all six spectral lines offered by 57 Fe. It can be seen that in all cases, the reconstruction agrees very well with the actual target spectra. As expected, the recovery works best for broad spectral features, and becomes worse for more narrow features due to the finite thickness of the reference absorber, as seen for the two central peaks in (c).
However, we note that it is not true in general that very narrow spectral features are not resolved or cannot be captured in the recovery. To illustrate that, the inset of (a) shows a small part around ∆ = 0, where the reference spectrum has a very narrow and low-amplitude dip, which is an effect of the finite thickness of the iron layer in the cavity [55]. It can be seen that this tiny spectral feature is reflected in the recovered spectrum, even though its shape is not accurately captured.
To obtain these spectra, we averaged the data from t 1 = 15 ns to t 2 = 120 ns. This demonstrates that the PHANTASY method indeed enables one to recover the spectra from the early times after the excitation, where the signal intensity is highest. Also, a single time integration range could be used for all three target spectra, illustrating the robustness of the method against the integration range. These aspects will be further analyzed and compared to the Doppler-drive spectroscopy method in Sec. IV B.
2. Phase of the target's spectral response Figure 6 shows the the reconstruction of the spectral phase for the three cases in Fig. 5. In all cases, the overall phase therefore is set to zero at the left boundary of the plot. Similar to the reconstruction of the spectral intensity, in case of setup (a) and (b), the reconstruction of the phase works very well, and is robust against variations in the time-integration range. The results in (a,b) are obtained by integrating from t 1 = 15 ns to t 2 = 130 ns, again showing that the method allows one to use the part of the data with highest intensity. The recovery of the more complicated spectrum in (c) is also good, but less accurate than (a) and (b) especially at ∆ ≈ ±10γ, close to the two resonances with smallest spectral width, where the phase has local extrema and changes rapidly with ∆.
We further found that the reconstruction of the phase is less robust against variations in the time integration range than the reconstruction of the amplitude. The result shown in (c) was obtained by integrating from t 1 = 43 ns, t 2 = 53 ns. To illustrate the impact of the integration range, we also show the phase recovered using the same integration range as in (a) and (b) as the two gray dashed lines in Fig. 6(c), as well as results for the times 80 ns and 130 ns individually. In each of the three latter cases, the results are shown twice in the figure.
One of the curves is plotted with an overall offset agreeing to the reference at ∆ = −100γ, whereas the other one has the overall phase fixed to the reference value at ∆ = +100γ. We find that all reconstructions work well and agree to each other except for the region close to the narrow resonances around ∆ ≈ ±10γ. It is important to note that each phase value as function of ∆ is recovered independently. Therefore, even if there are parts in the spectrum which are problematic, e.g., due to narrow spectral structures, it can be expected that the recovery of the other parts is stable against variations in the integration intervals. This feature also allows one to choose suitable integration ranges, and to identify problematic spectral regions, by comparing recoveries for different integration ranges, thereby identifying stable time integration ranges. Furthermore, one can use large time intervals for simple parts of the spectrum in order to make use of most of the measurement statistics, and only restrict the problematic areas of the spectrum to smaller integration ranges to increase the accuracy of the recon-

struction.
B. Quantitative analysis of the PHANTASY method

Doppler-Drive spectroscopy method as a reference
A well-established method to measure spectra using spectrally broad x-ray pulses is the "Doppler-drive method" [28,29,35]. It also assumes the "Sensing head approximation", but the analyzer foil is scanned in energy using a Doppler-drive, which moves the analyzer with a constant velocity relative to the target, in contrast to the oscillatory motion of the PHANTASY method. Therefore, no phase ϕ 0 appears in the analysis. Also, in the Doppler-drive method, no filters are applied to the recorded data. Instead, the spectrum usually is recovered by integrating over late times only, at which the unwanted contributions to the recorded intensity such as I T (t) ideally have already decayed away.
In order to obtain reference spectra for the comparison with the results of the PHANTASY method, we also simulated the Doppler-drive spectroscopy method for the three cavity settings in Fig. 4. Since the quality of the recovery depends on the integration range and the analyzer thickness, we optimized t 1 , t 2 , and the thickness for each of the Doppler-drive spectra separately, to obtain the best possible results. Results are shown in Fig. 7. In (a) and (b), the recovery works well. In (c), the recovery is less good, also connected to the narrow resonances around ∆ ≈ ±10, like in the PHANTASY method. However, the PHANTASY method is able to reconstruct the number of peaks and dips correctly, while the Doppler-drive generates spurious spectral splittings and small residual oscillations across the entire spectrum. Furthermore, to achieve these best results, the integration ranges [t 1 , t 2 ] had to be chosen in the late time range, where the experimental count rates are low. The best integration ranges are different in the three cases, namely, [117,192] for (a), [175,192] for (b), and [150,192] for (c). Further, the analyzer thickness is d = 3 µm in (a,c), and d = 2.5 µm in (b). To illustrate the impact of the integration range, panels (b,c) also show corresponding results with the integration range of (a) as dashed green curves. It can be seen that in (b), the overall form of the spectrum is still recovered, while quantitatively the shape is not precisely reproduced. In (c), the number and the shape of the resonances depends on the integration range. Importantly, (b) and (c) show that the deviations between the different integration ranges also appear in the less problematic areas away from the center of the spectrum. The inset in (a) further shows that the narrow tiny structure in the exact spectrum is not well-recovered by the Doppler drive method.
These results already demonstrate key advantages of the PHANTASY method over the Doppler-drive method: It allows to recover the spectrum from earlier times than the established Doppler-drive method, such that higher experimental count rates can be included in the analysis. Second, it is more robust against variations in the time integration range. Third, it provides access to the phase of the target response, which is inaccessible in the Doppler-drive method. In the following section, we will analyze the impact of the integration time range in the two methods in more detail.

Comparison of suitable integration ranges in the two methods
In this Section, we analyze the impact of the timeintegration range on the performance of the PHANTASY method and the Doppler-drive method in more detail. To this end, we systematically perform the spectral recovery with the two methods as function of the integration ranges t 1 and t 2 . To evaluate the quality of the recovery, we sum the squared difference between the recovered spectra and the corresponding exact theoretical calculation over the recovered spectral range.
Results for this analysis are shown in Fig. 8 for the PHANTASY method, and in Fig. 9 for the Doppler-drive method. These plots shows the quality of the reconstruction as function of t 1 and t 2 , where the color encodes the difference between the recovered spectrum and the true spectrum. Dark blue colors indicate good recovery, whereas light yellow colors indicate that the recovery is not fully reliable. White areas appear since t 2 must be larger than t 1 . In both figures, the panels (a,b,c) again correspond to the three target settings defined in Fig. 4. It can be seen that the PHANTASY method works well over a significantly broader range of integration times. Most importantly, in all three cases, best results are achieved if a large integration range is chosen, with a start time t 1 chosen close to the lower limit 15 ns, and the upper limit well beyond 100 ns. This allows one to include the majority part of the experimental counts into the analysis. In contrast, the Doppler-drive method only works at late integration times, such that only a small fraction of the experimental counts can be used. Furthermore, the PHANTASY method features an area of integration ranges (indicated by the red crosses that show the integration ranges used in Fig. 5) which works very well for all three configurations. In contrast, no such common integration range exists for the Doppler method. We note that these general observations persist even if in the In comparison to Fig. 9, here, the thickness of the analyzer is not kept fixed, but optimized for each pair t1, t2 separtely, thereby simulating optimum conditions for the Doppler-drive approach. Nevertheless, as compared to the results of the PHANTASY method in Fig. 8, integration over early times with high signal intensity remains unfavorable even in this optimum case.
case of the Doppler-drive method, the analyzer thickness is optimized for each integration range [t 1 , t 2 ] separately, thereby simulating optimum conditions for the Dopplerdrive approach. The corresponding results are shown in Fig. 10. In real experiments, such an optimization usually is not possible, due to a lack of suitable analyzer foils, and since the optimum thickness usually cannot easily be determined a priori.
We thus conclude that the PHANTASY method is significantly more stable with respect to the choice of the integration range, and in particular allows one to perform the recovery using the early times, where the timedependent intensity is highest. This allows one to include most of the experimentally recorded signal into the spectral recovery. In contrast, the Doppler-drive method operates at late integration times, restricting the method to only small parts of the exponentially decaying timedependent intensity.

V. DISCUSSION AND SUMMARY
In this paper, we introduced the PHANTASY method, which allows for phase-sensitive spectroscopy on nuclear resonances in the hard x-ray regime. Like previous methods, it uses a spectrally narrow resonance absorber in order to introduce spectral information on the relevant energy scales of the nuclei to the measured data. But in contrast to previous spectroscopy methods, in the PHANTASY method, the analyzer performs rapid oscillatory motions along the direction of the x-ray beam. These oscillations lead to the emergence of sidebands in the analyzer response, at multiples of the oscillation frequency ω p . By tuning this frequency, one of the sidebands is scanned across the spectral response of the target. The key advantage of the oscillatory motion is the availability of the motional phase ϕ 0 at the time of arrival of the x-ray pulse as an additional degree of freedom.
As in other Mössbauer spectroscopy approaches, the total detection signal comprises desired components, and spurious background components, which usually cannot be separated from each other in a straightforward way. We showed that their different dependencies on ϕ 0 allow one to introduce a powerful filter method to separate the total detected intensity into different parts a posteriori, throughout the data analysis. The method is based on a Fourier-transformation with respect to ϕ 0 , and a subsequent filtering in the Fourier space.
For the PHANTASY scheme, this ϕ 0 -filtering enables us to remove those contributions from the measured intensity which arise from photons which scattered only on the target, but not on the analyzer. These do not provide spectroscopy information and therefore form an unwanted background. Note that this filtering is possible even though the desired components and the unwanted background usually are indistinguishable since they overlap in time.
For the PHANTSY method, we augment the ϕ 0 -filter by a second filter, based on the Fourier transform between time and frequency space. This t-filter becomes possible, since after a suitable ϕ 0 -filtering, the different components contributing to the remaining signal are wellseparated in frequency space. After the two filters, the remaining detection signal is equivalent to that which could have been recorded using a single-sideband analyzer, while retaining the ϕ 0 -dependence.
In a numerical simulation of the PHANTASY method, we showed that the filtered data enables one to reliably recover the desired amplitude and the phase of the spectral response of the target. A detailed comparison to the established "Doppler-drive" method confirmed the key advantages of the PHANTASY method predicted from the analytical results. First, the PHANTASY method is capable of recovering the target spectrum from the detection signal at early times. In contrast, the Dopplerdrive method operates at times late after the arrival of the x-ray pulse, where most of the excitation has already decayed. Therefore, a signficantly higher part of the detection signal can be used for the spectral analysis in PHANTASY. Second, we found that the recovery is more stable against variations in the time integration range and the analyzer thickness than the Doppler-drive method. Third, PHANTASY also provides access to the phase of the spectral response, while the Doppler-drive method is restricted to the amplitude only. For this comparison, we used realistic spectra of different complexity, obtained from thin-film cavities containing nuclei as targets. For these example, we also found that the PHAN-TASY method is capable of better resolving spectrally more narrow structures than the Doppler-drive method.
Regarding an experimental implementation, we note that the oscillatory motion has the advantage that it is comparably easy to implement and characterize experimentally. However, the ϕ 0 -and the t-filters are required to select the response of a single oscillatory sideband from the total detection signal, to perform the recovery of the target spectrum. As an alternative, we proposed a second motion, which directly leads to a single-sideband response with phase information. This alleviates the need for the filtering, but the motion incurs step-wise jumps, which are more challenging to implement and characterize experimentally.
Regarding the data analysis, the recovery of the complex target response using PHANTASY discussed here provides a number of avenues to further improve the spectroscopy. For example, the complex response can be verified and refined using self-consistency checks between the recovered spectrum and the measured data, e.g., by calculating the total detection signal expected for the recovered target response and comparing it to the measured data. Also, since the reconstructed quantity a(t, ω p ) also contains the complex phase ϕ T (t) of the target in the time domain, one can extend the evaluation such that this phase is reconstructed as well. Since this allows one to independently determine the time-and the frequency-domain phases of the target response, they can be verified against each other using a Fourier transform. Using an iterative algorithm, this cycle can be performed several times until the measured data and the recovered data in the time-and frequency domains are self consistent. We further suggest to perform an analysis similar as in Figs. 8 and 9 to optimize the averaging interval [t 1 , t 2 ]. Since the theoretical reference obviously is not known, it can be replaced by the recovered response for a particular interval. Alternatively, the plot can be modified to display the difference of the recovered spectrum to the neighboring intervals. This way, stable [t 1 , t 2 ] intervals covering as much of the measured data as possible can be determined, and the quality of the reconstruction can be judged.
Finally, we note that the PHANTASY method crucially relies on an event-based detection method, which allows one to analyze the data after the experiment with respect to an arbitrary combination of the experimental parameters. For instance, this capability is the key requirement for the ϕ 0 -and t-filters proposed here, and we expect that these methods to separate otherwise indistinguishable signal contributions will find further applications beyond the PHANTASY method. Most importantly, the multi-dimensional measurement as function of various parameters such as time, detuning, oscillation frequency and amplitude allows one to perform much more stringent comparisons to theoretical predictions than the established one-dimensional spectra as function of only a single variable. Using such multi-dimensional fits to the data, ultimately, we envision a direct model-independent reconstruction of amplitude and phase of arbitrary target spectra. We have already demonstrated a similar approach to recover the precise piezo motion of a ref-erence absorber in a model-independent way [56], or to recover the nuclear quantum dynamics coherently controlled by a suitably shaped x-ray pulse [47]. Promoting this approach to a full spectroscopy technique has the additional advantage that the sensing head approximation is no longer required, thereby providing a perspective for the recovery of target spectra independent of source-and analyzer broadenings.