In this paper
AbstractIntroductionImplementationPhysical processesAlgorithmVerificationTime lag distributionsDifferent physical processesDemonstrationEnergy-dependent time lagSetupResultsCCFSetupResultsDiscussionApplicability to different radiative processesRelativistic effects and geometryCompatibility with SKIRT features and Monte Carlo performanceOutlookSummaryReferencesWorksPhysics and Astronomy
Photon arrival time lags in 3D radiative transfer with SKIRT
Abstract
Reprocessed X-ray emission from cold material surrounding compact objects carries critical information about the geometry and physical state of the system. In particular, the Fe K fluorescence line provides a powerful diagnostic through its spectral and timing properties relative to the direct emission. Interpreting these observables requires self-consistent modelling of radiative transfer (RT) in three-dimensional (3D) space. We aim to implement photon arrival time lags in SKIRT, a Monte Carlo RT code, thereby enabling self-consistent modelling of both the spectral and timing properties of reprocessed emission in 3D space. We modified the code to accumulate photon path lengths over their lifetimes and convert them into arrival time lags relative to the direct emission. The implementation is validated using simple geometries and then applied to a realistic model of an active galactic nucleus (AGN), for which we compute the time-lag and energy distribution and the cross-correlation functions (CCFs) between the fluorescence line and broad bands. The simulations reproduce the expected time-lag distributions and their energy dependence for both free-electron scattering and the photoelectric absorption fluorescence. In the AGN application, the model naturally yields distinct lag components from the inner and outer structures, as well as energy-dependent time lags associated with the fluorescence line. The derived CCFs successfully recover both the peak time lag and its finite width, which arise from the extended geometry and intrinsic variability. In X-rays, this capability provides a robust framework for interpreting high-resolution spectroscopic data in conjunction with timing information from current and future missions such as XRISM and NewAthena. A wide range of applications is foreseen, including reverberation mapping studies of accreting systems.
Introduction
Compact objects (black holes, neutron stars, and white dwarfs) are often surrounded by cold material, such as accretion disks, broad-line regions (BLRs), and dusty tori in active galactic nuclei (AGNs) (e.g. [3, 71, 48]); stellar winds in high-mass X-ray binaries (e.g. [41]); and accretion streams in cataclysmic variables and low-mass X-ray binaries (e.g. [4]). The structures of these surrounding media are key to understanding fundamental astrophysical questions, such as the evolution of compact objects and their feedback on their host environments (e.g. [69, 24] (Magorrian et al. 1998)). In particular, the properties of the reprocessed emission from the surrounding material relative to the direct emission from the compact object provide a powerful probe of their structure.
Of particular importance in the reprocessed emission is the Fe K fluorescence line at 6.4 keV, which is widely observed in many systems due to the high abundance of Fe and its large fluorescence yield (e.g. [70, 64]). The properties of this line relative to the direct emission are studied using both spectroscopic and timing methods. In the spectroscopic method, the line strength relative to the continuum level of the direct emission, typically quantified by the equivalent width (EW), constrains the geometry of the compact object, the surrounding material, and the observer (e.g. [14, 58, 59, 60, 16]). In the timing method, the time lag of the line band relative to the continuum band of the direct emission, measured using the cross-correlation function (CCF), enables reverberation mapping of the surrounding material (e.g. [44, 84, 50]).
In the spectroscopic method, significant advances have been made in recent years with the advent of X-ray microcalorimeter spectroscopy using the Resolve instrument ([36, 32]) on board the X-Ray Imaging and Spectroscopy Mission (XRISM; Tashiro et al. [68]). With its unprecedented spectral resolution for the Fe K line (; Porter et al. [62]), Resolve can distinguish narrow and broad line components (XRISM Collaboration [78]; Bogensberger et al. [15]), constrain bulk and thermal velocities (XRISM Collaboration [79, 81]), characterise the Compton shoulder of the line (Bianchi et al. [12]; XRISM Collaboration [80]; Fujiwara et al. [27]), and reveal atomic shifts of the line due to slightly ionised Fe (Nagai et al. [47]). These diagnostics provide constraints on the geometry and physical state of the surrounding material that are not accessible from the EW alone.
High spectral resolution is also beneficial for the timing method due to the effect of spectral dilution. The CCF is typically constructed between a narrow energy band centred on the Fe K line and a neighbouring continuum band. The narrow band contains not only the line emission but also the underlying continuum emission. As a result, the measured time lag is diluted by this continuum contamination (Miller et al. [45]; Omama et al. [53]), an effect that can be mitigated with higher spectral resolution.
To fully exploit observational data, both the spectroscopic and timing properties of the Fe K line relative to the direct emission need to be interpreted self-consistently using the same physical models. This requires radiative transfer (RT) calculations with timing capabilities in three-dimensional (3D) space. Among various numerical RT solvers, the Monte Carlo (MC) solver is particularly well suited for this purpose. In this solver, individual photons are tracked throughout the transfer medium from emission to either absorption or escape from the system (Steinacker et al. [66]; Noebauer & Sim [51]), and thus the implementation of the timing capability is much more straight-forward compared to two-stream solvers such as Cloudy (Ferland et al. [26]), XSTAR (Kallman et al. [34]), and SPEX (Kaastra et al. [33]) commonly employed in X-ray spectroscopic studies.
SKIRT is a state-of-the-art MCRT code (Baes et al. [6]; Camps & Baes [17, 19]) that features flexibility in the configuration of the geometry, radiation sources, transfer media, spatial grids, and detectors in 3D space. A key advantage of SKIRT is its implementation of a suite of MC acceleration techniques, including peel-off, forced scattering, continuous absorption (Baes et al. [9]), composite biasing (Baes et al. [7]), and explicit absorption (Baes et al. [5]). Without these techniques, synthesised spectra would suffer from severe MC noise at the high spectral resolution required for comparison with XRISM observations. SKIRT already incorporates the X-ray atomic processes necessary to model the Fe K spectra (Vander Meulen et al. [73, 74]). The only missing capability for our purpose is the treatment of timing.
In this paper, we present the enhancement of timing capabilities in SKIRT. We first describe the implementation in Sect. 2 and verify it using a simple geometry in Sect. 3. In Sect. 4, we demonstrate its application to Fe K line reverberation mapping of an AGN. Finally, we discuss some limitations and outlook in Sect. 5 before summarising the main results in Sect. 6.
Implementation
Physical processes
The Fe K fluorescence line is produced as a result of photoelectric absorption. X-ray photons with energies above the threshold (7.112 keV for neutral Fe) cause inner-shell ionisation, leaving a vacancy in the K shell. The resulting excited state can decay via multiple channels, one of which is radiative decay producing an Fe K () fluorescence photon. Because a single fluorescent photon is produced per photoionisation event, the fluorescence process can be treated analogously to a scattering process in the MC framework, with a probability given by the fluorescence yield of 0.3 (Krause [40]). This process is very rapid, as indicated by the Einstein A coefficient of for Fe (Palmeri et al. [55]). In competition with this is scattering by free electrons. The free electron scattering cross-section is comparable to the photo-electric absorption cross-section at the Fe K edge for cosmic abundances, making them the two dominant processes producing reprocessed emission in the X-rays. We hereafter refer to them as photo-electric absorption/fluorescence (PA/FL) and free-electron scattering (ES).
These processes are already implemented in SKIRT (Vander Meulen et al. [73]). For the PA/FL process, the photoelectric absorption cross-section is provided for elements with atomic numbers using the formulae of Verner & Yakovlev [76]; Verner et al. [75]. The fluorescence yield is taken from Perkins et al. [57]. The phase function is assumed to be isotropic. The emergent Fe K fluorescence line complex includes fine-structure transitions (Vander Meulen et al. [74]), which can be resolved with Resolve. For the ES process, the energy-dependent Klein-Nishina cross-section and scattering phase function (Klein & Nishina [38]) are used (Vander Meulen et al. [73]). These processes, along with others such as bound-electron scattering and dust scattering, can be enabled or disabled individually in simulations (Vander Meulen et al. [73]). Features involving multiple processes, such as the Compton shoulder of the Fe K line, can be computed self-consistently. The Müller matrix for each process is also implemented (Vander Meulen et al. [72]), enabling the modelling of X-ray polarisation spectra.
Algorithm
The algorithm for time tracking is straightforward. For each photon packet, we track the path length, denoted as , covered from emission to either absorption or escape from the system (Figure 1). We implement this in a manner compatible with the peel-off technique (Yusef-Zadeh et al. [82]), which is a powerful acceleration method for accumulating observed photon contributions. At each scattering and emission event, a peel-off photon is generated and directed towards the observer placed outside the system. This approach significantly reduces the MC noise in the reprocessed component of the synthesised spectra.

Figure 1. Concept of time tracking in SKIRT. A photon packet is launched from a point source located at position . Whenever a scattering event occurs at position (), a peel-off photon is generated and directed towards the observer as reprocessed emission, while the original photon packet is scattered into a direction determined by the phase function. The observer detects the peel-off photons from both the source (green) and each scattering location (blue).
The origin of the arrival time is defined as the time at which a photon emitted at the spatial origin arrives at the observer directly. The path length is initialised to 0 and calculated as the relative value with respect to this direct path. For peel-off photons emitted from a source position () in the simulation box, the path length at emission is corrected to
where is the unit vector pointing towards the observer. Therefore, the time lag can be negative for sources closer to the observer than the spatial origin.
Let us assume that a photon experiences scattering at () during its propagation. At each scattering event , the path length is updated as
to track for the distance travelled by the photon while scattering in the medium. At each scattering location, a peel-off photon is generated, for which the arrival time correction is calculated as follows
where the correction term represents the projected path length travelled in the direction of the distant observer before escape (peel-off). For instance, the path length at the -th scattering relative to direct path is given by . The peel-off photons are flagged with the number of scatterings experienced, allowing the synthesis of spectra for a given value of . Finally, the time lag is obtained by dividing the accumulated path length relative to direct emission from the origin by the speed of light . We assume that no additional time lag is introduced by the scattering processes themselves.
The SKIRT code calculates the observed photon flux by integrating the weighted flux contributions of peel-off photon packets in each arrival-time and energy bin. The weights are calculated based on the probability that a photon actually propagates toward the observer (Sect. 5.3). The resulting flux is expressed in units of photons . We refer to this as the ‘time-lag and energy distribution’, . Both the arrival-time and energy bins can be flexibly configured with either linear or logarithmic spacing. The ‘time-lag distribution’ is obtained by integrating over an energy range, , in units of photons . The ‘energy distribution’, or energy spectrum, is obtained by integrating over a time range, , in units of photons .
For the PA/FL process, we use the time-lag distribution obtained by integrating over the 6.38–6.42 keV band to focus on the Fe K line throughout the paper. For the ES process, we use the corresponding distribution obtained by integrating over the designated range specific for the purpose of the verification and demonstration.
Verification
We verify the timing implementation for PA/FL and ES separately, using the simple setup shown in Figure 2. The incident source is located at the origin and treated as an isotropic, unpolarised point source. The reprocessed emission is produced at a point within a cylinder located behind the source as seen by the observer, where is the radial distance from the central axis of the cylinder and is the depth from the front surface of the cylinder. The geometry of the cylinder is parameterised by its radius () and thickness (). The distance from the source to the cylinder is fixed at 10 pc, resulting in a minimum time lag of 20 pc/.

Figure 2. Verification setup. Incident photons are emitted from a point source at the origin. A cylinder is placed behind the source as seen from the observer. The time lag between the direct and reprocessed emission at is simulated.
The cylinder is filled with a neutral gas with no dust, characterised by the uniform hydrogen number density in the case of PA/FL, or with a free-electron medium characterised by the uniform electron number density in the case of ES. The corresponding hydrogen column density is and the electron column density is . The Fe abundance relative to H is denoted by . The material in the cylinder is assumed to be at rest, with no thermal, bulk, or microturbulent motion.
We use two different optical depths as proxies for and . The first is for the PA/FL process. Assuming that the photoelectric absorption cross-section at the K edge is ([76, 75]), the corresponding optical depth is . The second is for the ES process. Assuming that the cross-section is , the corresponding optical depth is , We adopt at 6.4 keV.
We calculate the time-lag and energy distribution for the reprocessed emission. The incident emission is assumed to have a power-law spectrum in energy with a photon index of . The total luminosity is erg in the 2–12 keV band. The observer is placed at a distance of 10 Mpc from the source. Accordingly, the time-lag and energy distribution of the incident emission is expressed as , where is the Dirac delta function. All simulations were run with photon packets.
We first verify whether the time-lag distribution, , is consistent with the cylinder geometry (Sect. 3.1). For simplicity, we include only the ES process in the cylinder. We then examine the for two different processes (Sect. 3.2) in preparation for the demonstration (Sect. 4). In this case, both the PA/FL and ES processes are tested. Several combinations of the cylinder parameters (, , , and ) are used for comparison.
Time lag distributions
The time-lag distribution is expected to reflect the spatial distribution of the locations where reprocessing occurs in the cylinder. Based on single scattering in the geometry, the time lag for single-scattered photons at radius and depth is given by
The time lag is minimal at and maximal at . This expectation is modified by multiple scattering in the cylinder. We fix pc and vary pc and . We used 2–12 keV band for evaluation.
Figure 3 shows the time-lag distribution for (a) pc and (b) pc. In panel (a), where the cylinder is geometrically thin, the time-lag distribution is primarily determined by the distribution of in . The minimum and maximum time lags are consistent with pc/c and pc/c, respectively. This is particularly the case for . The simulated time-lag distribution agrees well with the analytical solution considering single scattering because multiple scattering is relatively weak at such low scattering optical depths. The overall increase in the amplitude of from to 10 is due to the increase in the number of target electrons in the cylinder.
Figure 3. Time-lag distributions calculated with SKIRT for (a) a geometrically thin ( pc) and (b) a geometrically thick ( pc) cylinder. In each case, results for five optical depths, , are shown in different colours. In panel (a), the analytical solution for single scattering is also shown for comparison. In panel (b), the distributions of single (), double (), and triple scattering () photons are shown separately in their respective colours.
In panel (b), the cylinder has a significant depth, and thus the effect of multiple scattering is expected to be more apparent because a larger fraction of photons travel over longer path lengths. We plot the time-lag distribution for single-, double-, and triple-scattering photons separately, in addition to the total scattered photons. For single scattering, the time-lag distribution is expected to lie between the minimum pc/c and the maximum pc/c. As the number of scattering increases, this distribution is progressively modified, but with a decreasing contribution. For , the contribution of the -th scattering scales approximately as . For , including up to is sufficient to reproduce the total scattered photons within the dynamic range of shown. For , higher orders of scattering contribute significantly, and the resulting time-lag distribution exhibits a continuous smooth tail.
Different physical processes
We next verify the implementation of the physical processes by comparing the result of the two processes. In the time-lag and energy distribution , one process contributes more than the other at different energies. At keV, the PA/FL process dominates, whereas in the neighbouring continuum the ES process dominates. We ran two cases: (i) only the ES process is included (as in Sect. 3.1), and (ii) only the PA/FL process is included in the cylinder. We then investigate the optical depth dependence for each. In both cases, we used the 6.38–6.42 keV band.
The radiation from the point source is assumed to be unpolarised and a collimated beam directed towards the centre of the cylinder to make the geometrical interpretation simpler. We set the cylinder geometry to pc and pc, effectively treating it as a one-dimensional tube. We adopt cm and cm. The cylinder is optically thick for both processes. For cosmic abundances (; [2]), is of the same order as . To visually separate the simulation results for the two processes in the figure, we adopt an Fe abundance 10 times higher than the cosmic value. With this choice, and for the adopted .
The results are shown in Figure 4. The minimum time lag is pc/c, which holds for both processes. Because the optical depth is large, there is no clear distinction between different scattering levels, and the time-lag distribution roughly resembles exponential (straight line in log-linear plot), as in the case of ( pc, ) in Sect. 3.1.
Figure 4. Time-lag distributions for free-electron scattering (ES; blue) and photoelectric absorption/fluorescence (PA/FL; orange), considered separately in a geometrically and optically thick cylinder. The Fe abundance relative to H is increased by a factor of 10 compared to the cosmic value to emphasise the differences. The average of each distribution (Eq. (5)) is indicated by dashed lines, while the geometrical time lag (Eq. (6)) is indicated by dotted lines. The analytical solution for the flux of the ES distribution is also plotted in black for comparison.
The tail slope differs between the PA/FL and ES processes, as the characteristic time lag is determined by the time required to reach the skin depth of the cylinder. The PA/FL process has a smaller skin depth, and thus its time-lag distribution declines more rapidly than that of the ES process. To quantify this, we calculate the average time lag as
and compare it with the geometrical time lag defined as
where is the skin depth at which is reached from the surface. The detected photons propagate from the source toward the cylinder and subsequently escape toward the observer, meaning that the mean scattering point should occur at . For both the ES and PA/FL processes, the two quantities are in good agreement (Figure 4), supporting our implementation and interpretation of the results. A more quantitative estimate can be made for ES. It is expected to follow the transmission probability through the cylinder. Given the cylinder thickness and the optical depth , the intensity of photons travelling an additional distance is proportional to . Thus, the time-lag distribution should follow
This analytical expectation is in good agreement with our numerical results, further validating our implementation.
Demonstration
We confirmed that the time lag is calculated as expected and both the ES and PA/FL processes are implemented as intended (Sect. 3). We now demonstrate the capability of the code by applying it to an idealised AGN geometry designed to make the time lags clearly visible. We derive the energy-dependent time lag (Sect. 4.1) and the CCF for reverberation mapping (Sect. 4.2).
Energy-dependent time lag
Setup
The setup is shown in Figure 5 (b). The incident emission is assumed to originate from a point source at the origin, representing a supermassive black hole (SMBH) with a mass of . The spectrum is described by a power law in energy with a photon index of and a luminosity of in the 2–12 keV range. The radiation from the point source is assumed to be unpolarised and isotropic.
Figure 5. Simulation setup and results. Panel (b) shows the density map of the system, consisting of the incident source at the centre, a spherical fully ionised corona (M1), and a neutral torus (M2). Panel (c) displays the two-dimensional time-lag and energy distribution. The projections of this distribution onto the energy axis (energy spectrum) and the time axis (time-lag distribution) are shown in panels (a) and (d), respectively. In panel (a), the spectra integrated over the broad time interval ([0, ] s), M1 interval ((, ] s), and M2 interval ((, ] s) are shown, with prominent spectral features labelled. In panel (d), the time-lag distributions for the broad energy band (2–12 keV), Fe K band (6.38–6.42 keV), and continuum band (6.50–6.90 keV) are shown. The centroid fluxes for the Fe K and continuum bands are indicated by dotted lines. The direct emission is represented by the grey band at , while the secondary axis shows the corresponding geometrical distances.
Two distinct components, labelled M1 and M2, are placed around the incident source. In both M1 and M2, the material has no velocity components (i.e. bulk motion, thermal motion, and microturbulence are not considered). We adopt the cosmic abundances given by Anders & Grevesse [2]. For both components, the line-of-sight column density is set to in M1 and in M2, and the number density decreases radially as , where is the distance from the incident source.
M1 is located in the vicinity of the SMBH, representing the corona. It is modelled as a spherical gas distribution with an inner radius (equivalent to a time lag of ) and an outer radius (), where is the gravitational radius of the SMBH. The material in M1 is assumed to be fully ionised, so only the ES process operates.
M2 surrounds M1 and represents the torus and the BLR. It is modelled as an axisymmetric torus with a half-opening angle of . The inner () and outer () radii are set to and , corresponding to physical distances of () and (), respectively. The material in M2 is neutral, allowing both the ES and PA/FL processes to operate.
The time-lag distribution is divided into linearly spaced bins, corresponding to light-travel distances of 1 pc. The energy spectrum is divided into 1000 logarithmically spaced bins from 2 to 12 keV, approximately matching the spectral resolution of the Resolve instrument (Porter et al. [62]).
The simulation was run with photon packets using JAX’s high performance computer (JSS3; TOKI-RURI nodes, Intel Xeon Gold CPUs) as a single process using 24 threads, consuming a total of 118 core-hours. Enabling the newly implemented feature to track photon arrival times resulted in a negligible () increase in computational time compared to the run without this feature.
Results
Figure 5 (c) shows the time-lag and energy distribution, , simulated with SKIRT for a nearly edge-on inclination (). Note that this distribution includes both the reprocessed emission and the direct emission transmitted through M1 and M2 with no time lag (). The projections of this distribution onto the time axis (i.e. the time-lag distribution, ) and the energy axis (i.e. the energy spectrum, ) are shown in Figure 5 (d) and (a), respectively. Both projections show distinct features. The features in the time-lag distribution (Figure 5 (d)) correspond to geometrical distances divided by . The energy spectrum (Figure 5 (a)) reveals the K and K fluorescence lines of major elements (S, Ar, Ca, Cr, Mn, Fe, and Ni), as well as the Fe K edge. The strongest line, Fe K, exhibits a prominent Compton shoulder.
The time-lag and energy distribution (Figure 5 (c)) exhibits two major components corresponding to the reprocessed emission from M1 and M2. They are separated by a boundary at s, with shorter lags corresponding to M1 and longer lags to M2. In the M1 component, the time lag is nearly uniform across energies. This is because the reprocessed emission is driven solely by the ES process, which is nearly energy-independent in the response and reflect the spectral shape of the incident spectrum, as shown in Figure 5 (a). This component peaks at s and dominates until s due to multiple scattering in M1. Because the ES spectrum is nearly flat within each neighbouring energy band, the band-limited flux contributed by M1 is proportional to the width of the energy band. Consequently, the peak integrated flux in the continuum band (6.50–6.90 keV) is higher than that in the Fe K line band (6.38–6.42 keV) by an order of magnitude, as shown in Figure 5 (d).
In contrast, the M2 component shows a strong energy dependence, as shown in Figure 5 (a). It begins to contribute at the gap timescale ( s) and peaks at around s, as the observer primarily detects reprocessed emission at the inner edge of the torus on the far side (Figure 6). Around this peak, the Fe K band (6.38–6.42 keV) shows a much higher flux than the neighbouring continuum band due to the additional contribution from the PA/FL process. Beyond the peak, the time lag continues to increase due to multiple scatterings. The overall trend of larger time lags at higher energies arises because higher-energy photons can penetrate deeper into the torus, reflecting the strong energy dependence of the photoelectric absorption cross-section (). The time lag is locally enhanced at the energies of the fluorescent lines, because these photons are produced by higher-energy ionising photons that penetrate deeper into the torus. As a result, their production sites are deeper than those of the adjacent continuum photons, leading to longer total path lengths before escape.

Figure 6. Synthesised image using the observed photons in the (a) Fe K band (6.38–6.42 keV) and (b) the continuum band (6.50–6.90 keV).
CCF
Setup
First, we generate a mock light curve for the incident source outside SKIRT. We model the light curve using a damped random walk (DRW) process, which is widely used to reproduce AGN variability [e.g. 37]. The DRW process represents a random walk with mean reversion; thus, its power spectral density (PSD) exhibits a white noise profile () at low frequencies and a brown noise profile () at high frequencies, where is the frequency. We set the mean flux to 1 and the standard deviation to 0.3. The relaxation timescale, which characterises the return to the mean, is set to 108 days based on the mass-luminosity scaling relation [43]. The resulting normalised mock light curve as a function of time , , is shown in Figure 7 (a). We apply the same light curve across all energy bands.
Figure 7. (a) Mock light curve of the incident emission, (b) simulated band-limited light curve of the Fe K band (6.38–6.42 keV; red) and the neighbouring continuum band (6.5–6.9 keV; blue), and (c) the CCF between the two light curves. The light curves are displayed only for s, but the actual calculation covers the margin before . CCF is characterised by the peak and FWHM (black dashed line and shaded region), which are consistent with the expected values from calculation (red dotted line and shaded region).
The intensity of the incident emission at energy and time is expressed as . The intensity of the observed emission (both reprocessed and transmitted emission combined), , is obtained by convolving this incident emission with the normalised time-lag and energy distribution prior to the energy redistribution integration, as shown in Figure 5 (c),
The result is then integrated over specific energy ranges to extract band-limited light curves. For the light curve of the Fe K line,
For the light curve of the neighbouring continuum,
These light curves are shown in Figure 7 (b). Both curves are more smooth than the incident light curve, as the spatial distribution of the reprocessing region effectively acts as a low-pass filter for the reprocessed emission in the time domain. The Fe K light curve is clearly delayed relative to the continuum light curve.
We then compute the CCF between the two band-limited light curves. After normalising both light curves, the CCF as a function of time lag is given by
Results
The resulting CCF is shown in Figure 7 (c). First, the peak of the CCF, which corresponds to the time lag of the Fe K relative to the continuum band, is s (equivalent to days). This value is in good agreement with both the physical distance between M1 and M2 (corresponding to a light-travel time of s) and the difference in the mean time lags derived from the time-lag distribution (Figure 5 (c)) for the Fe K and continuum band emissions ( s).
Second, the CCF exhibits a finite width of s around its peak. This reflects the fact that the Fe K and continuum band emissions originate from extended spatial regions. In addition, the autocorrelation function (ACF) of the intrinsic light curve (Figure 7 (a)) also contributes to the overall width of the CCF. For comparison, we derive the width of the time response for the Fe K to be s and continuum band emissions from the time-lag distribution to be s (Figure 5 (d)) and the ACF width from the mock light curve to be s (Figure 7 (a)), and compute their quadrature sum as s. This is in excellent agreement with the simulated width of s.
Discussion
The implementation presented in this work introduces a general framework to compute photon arrival-time lags within the MCRT scheme of SKIRT. In this paper, the methodology has been demonstrated for X-ray radiative transfer involving electron scattering and photoelectric absorption followed by fluorescence. While the formalism itself is broadly applicable, its interpretation relies on a number of physical and numerical assumptions that define the regimes in which it can be robustly used.
Applicability to different radiative processes
The key assumption underlying the present implementation is that the time lag associated with each photon is fully determined by its geometrical path length, implying that interaction processes can be treated as effectively instantaneous. This is an excellent approximation for the processes considered in this work. In particular, electron scattering is intrinsically instantaneous, and fluorescence processes such as Fe emission occur on timescales ( s) that are entirely negligible compared to the light-travel times relevant for the systems under study ([55]).
The same methodology and formalism are directly applicable to a broader class of radiative transfer problems dominated by such instantaneous interactions. Examples include resonance scattering and dust scattering, both of which are implemented in SKIRT ([73, 20, 63]). However, care must be taken when extending the approach to processes in which energy exchange is not local in time.
A clear example is dust radiative transfer. Dust absorption followed by thermal re-emission is often treated as an effective scattering event in MC-RT simulations ([13, 8, 30]). However, unlike the instantaneous scattering by dust grains, this process in reality involves energy storage and re-emission over a finite timescale, which depends on grain properties and local conditions. A similar caveat may apply to photoionised plasmas, where recombination emission and line emission processes can introduce additional time lags. Typical recombination timescales depend strongly on density and ionisation state and can range from effectively instantaneous in dense environments to dynamically relevant in more rarefied media ([54]). In such cases, the present implementation would not capture the full time-delay behaviour, and a more general treatment including process-dependent delay times would be required.
Relativistic effects and geometry
The current implementation assumes photon propagation in a Euclidean space, neglecting general relativistic (GR) effects. This approximation is appropriate for regions sufficiently far from compact objects, where spacetime curvature is weak. In the demonstration presented in Sect. 4, the inner corona extends down to . At these scales, relativistic effects may already introduce non-negligible corrections to both the spectral and timing properties. In particular, light bending can increase effective path lengths, while gravitational time dilation alters the mapping between emission and observer time. Neglecting these effects may therefore bias the inferred geometry and size scales of the emitting regions.
A full treatment of these regimes would require coupling the radiative transfer calculation to a relativistic ray-tracing framework. Such an extension is currently not foreseen within SKIRT itself. However, dedicated GR radiative transfer tools are available and could, in principle, be combined with the present approach. Examples include MONK ([83]) and RAIKOU ([35]). Exploring such connections would be a promising direction for future work.
Compatibility with SKIRT features and Monte Carlo performance
A major strength of this work lies in implementing the timing capability within the established SKIRT framework. SKIRT supports several physical effects that were not explored in this work but combine naturally with the timing framework. Doppler shifts due to gas kinematics are fully supported and can be incorporated consistently into the radiative transfer calculation ([11]). Polarisation is likewise implemented ([56, 72]) and can be combined with time-lag measurements, provided that suitable instruments are defined.
Besides peel-off (Sect. 2.2), the photon-packet life cycle in SKIRT employs several variance-reduction techniques that steer the MC process towards outcomes of interest ([66, 51, 19]): at each event, the outcome is drawn from a biased rather than the physical probability distribution, and the packet weight, i.e. the fraction of the source luminosity carried by the packet, is adjusted to compensate. For example, the initial wavelength is by default drawn half of the time from the source spectrum and half of the time from a smooth logarithmic distribution, so that spectral ranges of low luminosity are also well sampled (composite biasing; [7]). In forced scattering, a packet is not allowed to escape and instead its weight is lowered by the fraction that would have escaped, so that the same packet samples many scattering events until its weight becomes negligible ([9]). At each emission and scattering event, a peel-off packet is sent to every instrument, with a weight equal to that of the parent packet multiplied by the emission profile or scattering phase function for the direction of the instrument, and attenuated by the extinction along the line of sight. The instrument adds this weighted contribution to the appropriate spatial, spectral, and time-lag bin.
Because of these successive biases, no simple formula describes the MC noise of the recorded results. SKIRT therefore offers optional statistics: for each bin of a spectrum, image, light curve, or spectral-time map, an instrument can record the sums of the first four powers of the packet contributions (the contribution moments). Contributions to a bin from the same launched packet are combined first, as they are not independent; these statistics cannot be reconstructed after rebinning. From these moments, SKIRT derives the relative error (the estimated standard error of a bin value relative to that value) and the variance of the variance (VOV), which quantifies the reliability of and is far more sensitive to rare, large contributions. Both are adopted from the nuclear particle transport code MCNP ([18] (X-5 Monte Carlo Team 2003)). Empirically, and VOV indicate a reliable result and allow to be interpreted as a relative error (X-5 Monte Carlo Team 2003; Camps & Baes [18]; Camps et al. [21]). The value of therefore provides a direct check of whether the number of photon packets, , is sufficient. High-precision time-lag distributions or higher-order timing diagnostics may demand a substantial , particularly in optically thick or multiple-scattering regimes.
The efficiency of a simulation is quantified by the figure of merit (FOM),
where the computing time. For large , and , so the FOM converges to a constant Camps & Baes [18]. The FOM, evaluated per bin, thus allows the effectiveness of different techniques to be compared. For the timing feature, statistical efficiency alone is not sufficient: the results must also remain physically correct, which requires that the propagation distance of each sampled photon packet is tracked properly.
We assessed each acceleration technique for both correctness and efficiency. Source biasing (spatial and spectral), the absorption/scattering split, forced scattering, and continuous absorption Baes et al. [9] are fully compatible with the timing feature: they change how events are sampled and weighted, but not the bookkeeping of propagation distances. Continuous absorption is relevant only when the radiation field is stored, which is not required in the X-ray regime. Explicit absorption, intended for media with stimulated emission Baes et al. [5], is also compatible but should be enabled only for such media. The one exception is line-core skipping, used in Ly radiative transfer to bypass large numbers of resonant scattering events [1, 22, 65]: the propagation distances and time delays associated with the skipped events are not tracked, so time-lag results must be interpreted with particular care.
One further setting deserves attention: forced-scattering packets are terminated once their weight has dropped below a fixed fraction ( by default) of the initial weight. As late-arriving flux is carried by long-lived, low-weight packets, this termination criterion truncates the tail of the time-lag distribution regardless of . In a dusty slab of transverse optical depth 5 (cf. Gordon et al. [28]), lowering the threshold to extended the reliable dynamic range of the light curve from about 5 to about 10 orders of magnitude below its peak.
Finally, path length stretching (PLS; Baes et al. [7]) draws, for half of the events by default, the optical depth to the next interaction uniformly over the optical depth available along the path instead of from the physical exponential distribution. Packets thus reach high optical depths more often. PLS can significantly accelerate typical dusty-galaxy simulations, but is less suited to regimes of high optical depth or high albedo, where compounded bias factors produce rare packets with very large weights. It is also not compatible with large wavelength jumps in scattering events, such as those in our fluorescence implementation: in the X-ray torus benchmark of Vander Meulen et al. [73], PLS reduced the FOM to two-thirds or less of its value without PLS. PLS is compatible with the timing feature, provided that the termination threshold is lowered as described above, since PLS lowers some packet weights even faster. For most X-ray applications, however, PLS is not advantageous because of the importance of fluorescence.
Outlook
Within these limitations, the present implementation provides a flexible framework for modelling the coupled spectral and timing properties of radiation in complex three-dimensional geometries. In addition to the Fe K reverberation mapping used in Sect. 4, it can be used for hard/soft-lag of the continuum emission as a function of energy often seen in accreting systems [25] (Mizumoto et al. 2019), dust scattering echo of SNR and X-ray binaries [23, 29], and pulsar timing delay due to scattering [31]. In particular, X-ray reflection from molecular clouds has been observed via Fe K emission from the Sagittarius B2 region [39, 49] and through the apparent superluminal motion of the reflected emission around Sagittarius A* [61], and it has also been extensively investigated using MCRT modelling [67, 52]. These phenomena are already observed with contemporary observatories. With the future observing instruments such as the X-IFU [10] onboard NewAthena, we will be able to construct the time-lag and energy distribution like Figure 5 (c) directly from observations.
Summary
We have implemented the photon arrival time lag in the 3D MC-RT code SKIRT. This framework calculates the time lag by accumulating the relative path length of each photon packet and scaling it by the speed of light. We verified the algorithm using a simple cylindrical geometry, confirming that the time-lag distribution and its two distinct physical processes are reproduced as intended for both free-electron scattering and photoelectric absorption/fluorescence processes.
We then demonstrate the capability of this feature by applying it to a realistic AGN model. Our results reproduce the expected CCF, explaining both the peak time lag and its width of the distribution in terms of the extended spatial geometry and the intrinsic light curve. These results show that photon arrival time lags have been self-consistently and robustly incorporated into SKIRT.
Acknowledgements. We thank the anonymous reviewer for the helpful comments and suggestions that improved this work. Y.M. acknowledges the hospitality by colleagues at ESTEC and Ghent University, where he stayed throughout the course of this work. This research made use of the JAXA’s high-performance computing system JSS3. Y.M. acknowledges support from the JSPS Core-to-Core Program (grant number: JPJSC22002002), the JSPS KAKENHI (grant numbers: JP25KJ0923 and 26H02075). B.V. acknowledges support through the European Space Agency (ESA) Research Fellowship Programme in Space Science.
References
- [1]Ahn, S.-H., Lee, H.-W., & Lee, H. M. 2002, ApJ, 567, 922
- [2]Anders, E. & Grevesse, N. 1989, Geochimica et Cosmochimica Acta, 53, 197
- [3]Antonucci, R. 1993, ARA&A, 31, 473
- [4]Armitage, P. J. & Livio, M. 1996, ApJ, 470, 1024
- [5]Baes, M., Camps, P., & Matsumoto, K. 2022, A&A, 666, A101
- [6]Baes, M., Davies, J. I., De Jonghe, H., et al. 2003, MNRAS, 343, 1081
- [7]Baes, M., Gordon, K. D., Lunttila, T., et al. 2016, A&A, 590, A55
- [8]Baes, M., Matsumoto, D., Davies, J. I., et al. 2005, New A, 10, 523
- [9]Baes, M., Verstappen, J., De Looze, I., et al. 2011, ApJS, 196, 22
- [10]Barret, D., Lam Trong, T., den Herder, J.-W., et al. 2018, SPIE Conf. Ser., 10699, 106991G
- [11]Barrientos Acevedo, D., van der Wel, A., Baes, M., et al. 2023, MNRAS, 524, 907
- [12]Bianchi, S., Vander Meulen, B., Bertola, E., et al. 2026, A&A, 710, A274
- [13]Bjorkman, J. E. & Wood, K. 2001, ApJ, 554, 615
- [14]Blandford, R. D. & McKee, C. F. 1982, ApJ, 255, 419
- [15]Bogensberger, D., Nakatani, Y., Yaqoob, T., et al. 2025, PASJ, 77, S209
- [16]Cackett, E. M., Bentz, M. C., & Kara, E. 2021, iScience, 24, 102557
- [17]Camps, P. & Baes, M. 2015, Astron. Comput., 9, 20
- [18]Camps, P. & Baes, M. 2018, ApJ, 861, 80
- [19]Camps, P. & Baes, M. 2020, Astron. Comput., 31, 100381
- [20]Camps, P., Behrens, C., Baes, M., Kapoor, A. U., & Grand, R. 2021, ApJ, 916, 39
- [21]Camps, P., Kapoor, A. U., Trcka, A., et al. 2022, MNRAS, 512, 2728
- [22]Dijkstra, M., Haiman, Z., & Spaans, M. 2006, ApJ, 649, 14
- [23]Dwek, E. & Arendt, R. G. 2008, ApJ, 685, 976
- [24]Fabian, A. C. 2012, ARA&A, 50, 455
- [25]Fabian, A. C., Zoghbi, A., Ross, R. R., et al. 2009, Nature, 459, 540
- [26]Ferland, G. J., Korista, K. T., Verner, D. A., et al. 1998, PASP, 110, 761
- [27]Fujiwara, K., Ueda, Y., Ogawa, S., et al. 2026, ApJ, 1003, 6
- [28]Gordon, K. D., Baes, M., Bianchi, S., et al. 2017, A&A, 603, A114
- [29]Heinz, S., Corrales, L., Smith, R., et al. 2016, ApJ, 825, 15
- [30]Heymann, F. & Siebenmorgen, R. 2012, ApJ, 751, 27
- [31]Hickox, R. C. & Vrtilek, S. D. 2005, ApJ, 633, 1064
- [32]Ishisaki, Y., Kelley, R. L., Awaki, H., et al. 2025, JATIS, 11, 042023
- [33]Kaastra, J. S., Mewe, R., & Nieuwenhuijzen, H. 1996, in UV and X-ray Spectroscopy of Astrophysical and Laboratory Plasmas, 411–414
- [34]Kallman, T. R., Palmeri, P., Bautista, M. A., Mendoza, C., & Krolik, J. H. 2004, ApJS, 155, 675
- [35]Kawashima, T., Ohsuga, K., & Takahashi, H. R. 2023, ApJ, 949, 101
- [36]Kelley, R. L., Ishisaki, Y., Costantini, E., et al. 2025, JATIS, 11
- [37]Kelly, B. C., Bechtold, J., & Siemiginowska, A. 2009, ApJ, 698, 895
- [38]Klein, O. & Nishina, T. 1929, Zeitschrift fur Physik, 52, 853
- [39]Koyama, K., Maeda, Y., Sonobe, T., et al. 1996, PASJ, 48, 249
- [40]Krause, M. O. 1979, J. Phys. Chem. Ref. Data, 8, 307
- [41]MacGregor, K. B. & Vitello, P. A. J. 1982, ApJ, 259, 267
- [43]McHardy, I. M., Koerding, E., Knigge, C., Uttley, P., & Fender, R. P. 2006, Nature, 444, 730
- [44]Miller, J. M., Cackett, E., Zoghbi, A., et al. 2018, ApJ, 865, 97
- [45]Miller, L., Turner, T. J., Reeves, J. N., et al. 2010, MNRAS, 403, 196
- [47]Nagai, Y., Enoto, T., Tsujimoto, M., et al. 2026, PASJ, psag015
- [48]Netzer, H. 2015, ARA&A, 53, 365
- [49]Nobukawa, M., Ryu, S. G., Tsuru, T. G., & Koyama, K. 2011, ApJ, 739, L52
- [50]Noda, H., Mineta, T., Minezaki, T., et al. 2023, ApJ, 943, 63
- [51]Noebauer, U. M. & Sim, S. A. 2019, Living Rev Comput Astrophys, 5, 1
- [52]Odaka, H., Aharonian, F., Watanabe, S., et al. 2011, ApJ, 740, 103
- [53]Omama, T., Tsujimoto, M., Ebisawa, K., & Mizumoto, M. 2023, ApJ, 945, 92
- [54]Osterbrock, D. E. & Ferland, G. J. 2006, Astrophysics of gaseous nebulae and active galactic nuclei
- [55]Palmeri, P., Mendoza, C., Kallman, T. R., Bautista, M. A., & Meléndez, M. 2003, A&A, 410, 359
- [56]Peest, C., Camps, P., Stalevski, M., Baes, M., & Siebenmorgen, R. 2017, A&A, 601, A92
- [57]Perkins, S. T., Cullen, D. E., & Seltzer, S. M. 1991, Tables and Graphs of Electron-Interaction Cross Sections from 10 eV to 100 GeV Derived from the LLNL Evaluated Electron Data Library (EEDL), Z = 1–100, Tech. Rep. UCRL-50400-Vol.31, Lawrence Livermore National Lab., CA (United States)
- [58]Peterson, B. M. 1993, PASP, 105, 247
- [59]Peterson, B. M. 2001, in Advanced Lectures on the Starburst-AGN, ed. I. Aretxaga, D. Kunth, & R. Mújica, 3
- [60]Peterson, B. M., Ferrarese, L., Gilbert, K. M., et al. 2004, ApJ, 613, 682
- [61]Ponti, G., Terrier, R., Goldwurm, A., Belanger, G., & Trap, G. 2010, ApJ, 714, 732
- [62]Porter, F. S., Kilbourne, C. A., Chiao, M., et al. 2025, JATIS, 11, 042016
- [63]Sameshima, N., Lauwers, A., Vander Meulen, B., et al. 2026, A&A, 714, A112
- [64]Shu, X. W., Yaqoob, T., & Wang, J. X. 2010, ApJS, 187, 581
- [65]Smith, A., Safranek-Shrader, C., Bromm, V., & Milosavljević, M. 2015, MNRAS, 449, 4336
- [66]Steinacker, J., Baes, M., & Gordon, K. D. 2013, ARA&A, 51, 63
- [67]Sunyaev, R. & Churazov, E. 1998, MNRAS, 297, 1279
- [68]Tashiro, M., Kelley, R., Watanabe, S., et al. 2025, PASJ, 77, S1
- [69]Tauris, T. M. & van den Heuvel, E. P. J. 2006, Compact Stellar X-ray Sources, 39, 623
- [70]Torrejón, J. M., Schulz, N. S., Nowak, M. A., & Kallman, T. R. 2010, ApJ, 715, 947
- [71]Ury, C. M. & Padovani, P. 1995, PASP, 107, 803
- [72]Vander Meulen, B., Camps, P., Savić, D., et al. 2024a, A&A, 689, A297
- [73]Vander Meulen, B., Camps, P., Stalevski, M., & Baes, M. 2023, A&A, 674, A123
- [74]Vander Meulen, B., Camps, P., Tsujimoto, M., & Wada, K. 2024b, A&A, 688, L33
- [75]Verner, D. A., Ferland, G. J., Korista, K. T., & Yakovlev, D. G. 1996, ApJ, 465, 487
- [76]Verner, D. A. & Yakovlev, D. G. 1995, A&AS, 109, 125
- [78]XRISM Collaboration. 2024, ApJL, 973, L25
- [79]XRISM Collaboration. 2025, Nature, 638, 365
- [80]XRISM Collaboration. 2026a, Nat Astron, 1
- [81]XRISM Collaboration. 2026b, Nature, 650, 309
- [82]Yusef-Zadeh, F., Morris, M., & White, R. L. 1984, ApJ, 278, 186
- [83]Zhang, W., Dovčiak, M., & Bursa, M. 2019, ApJ, 875, 148
- [84]Zoghbi, A., Miller, J. M., & Cackett, E. 2019, ApJ, 884, 26



