A new FILDSIM model for improved velocity-space sensitivity modelling and reconstructions

We present a new version of the FILDSIM code (Galdon-Quíroga et al 2018 Plasma Phys. Control. Fusion 60 105005), which significantly refines the modelling of the fast-ion loss detector (FILD) signal. We demonstrate that the FILD weight functions computed using this new version of FILDSIM are more accurate relative to synthetic benchmarks than those computed using the previous version. Thus, the new version enables higher-quality velocity-space sensitivity modelling and reconstructions. We validate the improvements on experimental data from discharge #75620 at TCV. Additionally, we present a novel approach for characterizing FILDs through a gross FILD measurement and a gross weight function based on the calculations from the new version of FILDSIM. We use them to characterize the TCV FILD.


Introduction
Fast ions generated through high-energy neutral beam injection (NBI), electromagnetic wave heating in the ion cyclotron range of frequencies (ICRF), and fusion reactions with energies ranging from tens of keV to several MeV play a crucial role in the heating and stability of fusion plasmas.In particular, fusion-generated alpha particles are responsible for keeping the energy of the thermal plasma of future fusion reactions sufficiently high by transferring their energy to the thermal plasma via collisions.Thus, fast-ion transport and confinement are of particular concern.In magnetically-confined nuclear fusion experiments, fast ions can escape confinement and strike the plasmafacing components of the device, leading to material degradation and a decline in reactor efficiency [1,2].This undesirable transport can be attributed to different mechanisms, including interactions with magnetohydrodynamic (MHD) activity [3,4] such as toroidicity-induced Alfvén eigenmodes (TAEs) [5][6][7] or edge-localized modes (ELMs) [8,9].Given these challenges, a precise understanding of the fast-ion velocityspace distribution function is crucial.This understanding assists in identifying loss mechanisms, optimizing control algorithms, and customizing auxiliary heating methods to populate velocity-space regions where fast ions are less prone to loss.Such estimates also enable the validation of predictive models that can be applied to future devices and help guide material engineering solutions designed to withstand fast-ioninduced wear and tear.
Fast-ion loss detectors (FILDs) provide valuable information on the velocity space of lost fast ions through measurements close to the plasma edge (∼3 cm) [10,11].The velocity space can be expressed in terms of the energy, E, and pitch, p, given by Here, v = (v 2 ∥ + v 2 ⊥ ) 1/2 , v ∥ is the ion velocity parallel to the magnetic field, and v ⊥ is the ion velocity perpendicular to the magnetic field.Since the Larmor radius ρ = mv ⊥ /qB is inversely proportional to the local magnetic field strength, FILDs act as magnetic spectrometers by measuring the energy and pitch of the lost fast ions; the ions follow magnetic field lines and strike a scintillator plate in a manner governed by the local magnetic field.Since FILDs provide essential data on lost fast-ion velocity distributions, they have been installed in numerous magnetically-confined fusion devices globally, including ASDEX Upgrade [11][12][13], DIII-D [14], EAST [15], JET [16], KSTAR [17], LHD [18], MAST-U [19,20], NSTX [21], and TCV [22].The FILD designs for ITER [23] and JT-60SA [24] underscore the importance of the diagnostic.
The paper is structured as follows: section 2 introduces the mechanics and design principles of FILDs and introduces the simulation code 'FILDSIM'.Section 3 describes our improvements to the current FILDSIM model.Section 4 evaluates the new FILDSIM model against its predecessor and identifies key physical factors leading to the discrepancies between the two models.Section 5 presents two novel ways of characterizing FILDs using the new FILDSIM model.Section 6 conducts an evaluation of reconstructions of lost fast-ion velocity distributions, specifically for discharge #75 620 at TCV, to compare the performance of the new FILDSIM model against its predecessor.Section 7 concludes the paper.

FILD mechanics and FILDSIM modelling
In a scintillator-based FILD, ions pass through a pinhole connected to a 3D collimator in the FILD probe head.The probe head is placed close to the plasma, in the far scrape-off layer.After passing through the pinhole, the collimated ions strike a scintillator plate, triggering the emission of photons from the scintillating material.A specialized camera setup captures these photons.See figure 1(a) for an illustration of the working principles of a FILD, and figure 1(b) for the placement of the FILD at TCV.
Computational modelling is invaluable for a more in-depth understanding of FILD measurements.The FILDSIM code [25] simulates trajectories of fast ions originating from the pinhole of the FILD and detects their collisions with either the scintillator plate or other components of the FILD probe head.A population of N ions with fixed energy and pitch is initialized at random locations within the spatial limits of the FILD pinhole and with random gyrophases within a predetermined gyrophase acceptance cone.The locations where the ions strike the scintillator plate are collectively used to define a strike-point distribution, reflecting where ions with specific energy and pitch may strike the scintillator plate.The value of N is chosen to balance computational feasibility with the accuracy of the resulting strike-point distributions.A typical simulation uses N = 3 • 10 4 markers resulting in a computation time of approximately 10 min.
Thus, ions with identical energy and pitch can strike the scintillator plate at different locations.This variability is due to two factors: the finite dimensions of the pinhole and the initial gyrophases of the ions.Consequently, a given set of ions with specific energy and pitch creates a distribution of strike points, effectively blurring the fast-ion velocity distribution.
Let P(y, z|E ′ , p ′ ) denote the strike-point distribution on the scintillator plate, conditioned on the ion energy E ′ and pitch p ′ .We establish a mapping ψ : S → V, where S ⊂ R 2 represents the scintillator plate and V ⊂ R 2 velocity space parametrized by (E ′ , p ′ ), defined as ( In this mapping, the centroid of the strike-point distribution P(y, z|E ′ , p ′ ) is mapped to the point (E ′ , p ′ ) ∈ V through ψ.This one-to-one mapping, traditionally used to analyze FILD measurements, is constructed by simulating the strikepoint distributions for various (E ′ , p ′ ) pairs, associating each centroid with its corresponding point in velocity space, thus forming a bijection termed a 'strike map'.The raw camera measurement M raw = M raw (y, z) is mapped to the fast-ion velocity distribution using the strike map.However, this mapped version termed the 'mapped FILD measurement' and denoted M f , is not a one-to-one mapping onto the actual fast-ion velocity distribution f.The discrepancy arises from the spatial distribution of strike points on the scintillator for specific values of energy and pitch of the lost fast ions.The relation between the mapped FILD measurement and the fast-ion velocity distribution can be modelled as a Fredholm integral equation of the first kind where the kernel W is a weight function that weighs the contributions from all points in velocity space to a single point in the mapped FILD measurement [25,26].Unprimed coordinates refer to the mapped FILD measurement, and primed coordinates to the lost fast-ion velocity space.
The continuous integral equation ( 3) is recast into the matrix-vector equation b = Ax (4) using numerical quadrature.Specifically, we partition velocity space using a uniformly-distributed grid, approximating the value of each grid cell by its midpoint value and the integral by the midpoint sum [27].The 'system matrix' A ∈ R m×n contains rows of discretized weight functions.Here, m represents the number of grid points in the discretized mapped FILD measurement b, and n is the number of grid points in x.This framework is consistent with similar models for confined fastion diagnostics [26,[28][29][30][31][32][33][34][35][36][37][38][39].

Improved FILDSIM modelling
A fundamental challenge in interpreting FILD measurements exists due to the variability in strike points for ions with the same energy and pitch.Knowledge of the discharge conditions can partially assist in mitigating this issue; for example, during an NBI discharge with an injection energy of 30 keV, measurements from prompt losses at 30 keV and 15 keV are expected from the beam's full-and half-energy components.While contextual knowledge aids in a nuanced interpretation of the FILD data, the most reliable inference is obtained from solving the inverse problem in (4).
Prior FILDSIM simulations have used Gaussian distributions to model the strike-point distributions, f p and f E , in both pitch and energy.For the pitch, where p 0 is the actual pitch of the ion and σ p the standard deviation of the pitch strike-point distribution.We denote such Gaussian distributions by N p; p 0 , σ p .The energy was described by a skew-Gaussian distribution, given by where Φ (x; β, E 0 , σ E ) is the skewness parameter function defined as Here, β is the parameter governing the degree of skewness, E 0 is the energy of the ion, and σ E is the standard deviation of the energy strike-point distribution.The skewness of the strikepoint distributions is linked to how fast ions traverse the collimator.This results in ions of identical energies striking the scintillator at varying locations due to limitations in collimation.Notably, the skewness increases with an increase in ion energy.This skewness is observed for all types of fast ions, irrespective of their generation method, whether it be NBI, ICRF, or fusion reactions.
The collimator factor f col E ′ , p ′ = ∆θN E ′ , p ′ /2π N ′ , accounting for the fraction of the number of ions striking the scintillator relative to the number of ions initialized in the pinhole within the gyrophase acceptance cone ∆θ/2π of the collimator, is also included in the FILDSIM model, and a yield function ϵ(E) describing the number of photons emitted by the scintillator plate as a function of the energy of the ion.In constructing the unified model, the equation for the strike-point distribution f pE directly multiplies the individual distributions, assuming statistical independence of the components: For the computation of the kernels, the three parameters σ E , σ p , and β are determined by minimizing the residual sum of squares between the model and the strike-point distributions obtained from FILDSIM.The fit is achieved through an iterative process over predefined parameter ranges.The computations are performed using N = 3 • 10 4 markers, a number that ensures sufficient statistical robustness for optimal parameter fitting.

Skewness and kurtosis
The Gaussian and skew-Gaussian models exhibit several inaccuracies that warrant revisiting.Let X E and X p be random variables representing the ion energy and pitch.The skew-Gaussian model p sG for X E diverges significantly from the empirical probability density function (pdf) pE (x), particularly in the tails corresponding to higher energies.Similarly, the Gaussian model for X p is too narrow, significantly underestimating the ion counts at pitches close to the ion's true pitch value, and the tails are too broad.These shortcomings not only compromise the accuracy of the model but also introduce errors in the reconstructions.To address these issues, we investigate alternative distributions that more accurately represent the simulated strike-point distributions.
In classical data analysis, statistical distributions are generally characterized by their first and second momentsthe mean µ and variance σ 2 .However, in systems exhibiting non-Gaussian behaviour, this characterization is insufficient.Consequently, there is a need to consider higher-order moments-specifically the third and fourth moments, termed 'skewness' and 'kurtosis.' Let X be a random variable whose moment-generating function M X (t) = E e tX exists for some interval around t = 0.The nth moment about the origin is then where E is the expectation value.From this, we calculate the skewness and kurtosis about the mean µ as Skewness quantifies the degree of asymmetry about the mean, while kurtosis quantifies the concentration of extreme values in the tails of the distribution.Importantly, skewness and kurtosis offer a more nuanced approach to characterizing non-Gaussian aspects, enabling us to rectify the shortcomings in the Gaussian models by capturing the inherently non-Gaussian aspects.
For pitch strike-point distributions, an ideal model would have zero skewness and a kurtosis significantly lesspotentially half-than that of the previous FILDSIM model.A suitable pdf is Wigner's semicircle, described by the equation Here, p 0 is the true pitch of the ion, and p R is the radius of the semicircle, determined through an optimization process similar to that used for other model parameters.The distribution is supported on p ∈ p 0 − p R , p 0 + p R .This function offers desirable attributes for modelling the pitch distributions.Specifically, it has short tails, which help to avoid the overestimation problems inherent in the Gaussian model, and a larger width near the peak, providing a more accurate representation of the high-density regions around p 0 typical in the pitch distributions.From the analytical expressions for the pdfs of the Gaussian and Wigner's semicircle distributions, we can calculate their skewness and kurtosis for a quantitative comparison.Their respective moment-generating functions M X,G (t) and M X,W (t) are [40] M X,G (t where I 1 is the modified Bessel function of the first kind.Straightforward computations give The kurtosis values for the Gaussian and Wigner's semicircle distributions are based on their well-established theoretical properties.These values are intrinsic to the distributions and do not depend on specific model parameters.The lower kurtosis of Wigner's semicircle is advantageous as it mitigates the extended tails inherent in the Gaussian model, yielding a more localized representation around the peak pitch value p 0 .
For energy strike-point distributions, the goal is to maintain a skewness of the candidate distributions close to that of the previous model while reducing the kurtosis by approximately 1-5%.This adjustment aims to provide a more accurate representation of the distribution's behaviour at higher energies.With this goal in mind, we propose three candidate pdfs to model the energy distributions: the raised cosine distribution f, the Cauchy distribution g, and the logistic distribution h.These distributions were initially selected based on their statistical moments being similar but not identical to those of a Gaussian distribution.Their mathematical representations are Here, f(x; µ, σ) is supported on [µ − σ, µ + σ], 2γ is the full width at half-maximum (FWHM) of the Cauchy distribution, and s is a scale parameter.These distributions are illustrated and compared with a Gaussian distribution in figure 2.
The third and fourth moments of the three candidate distributions multiplied by the skewness parameter function do not have analytical expressions.However, analytic expressions can be determined for the expressions in (14), revealing their differences relative to a Gaussian distribution.By symmetry, the raised cosine distribution and the logistic distribution have a skewness of zero, whereas the Cauchy distribution The Gaussian distribution N (x; 0, 1) plotted with the candidate distributions: (a) the raised cosine distribution f(x; 0, 2.5), (b) the Cauchy distribution g(x; 0, 1), and (c) the logistic distribution h(x; 0, 1).The parameter values can be determined by comparing the expressions given here with those in (14).The difference between the Gaussian and candidate distributions is also plotted and indicated by the green curves.Note that the raised cosine distribution is the only distribution with shorter tails than the Gaussian distribution.
does not have a well-defined third moment since the integrals ´∞ −∞ x k g(x; µ, γ) dx diverge for k ⩾ 1.With the momentgenerating functions for the raised cosine distribution [41] and the logistic distribution [42], where is the beta function expressed in terms of the standard Gamma function, their kurtoses can be shown to be: for some scalars c 1 and c 2 .It follows that distributions with a kurtosis different from k G = 3 can be more accurately described in terms of the raised cosine and logistic distributions by optimally fitting σ and s.
To introduce controlled skewness, we multiply each distribution by the skewness parameter function Φ.Note that multiplying a distribution p(x) by Φ changes its moments, since the nth moment M n is given by whereas Still, the initial guesses of candidate distributions based on their similarity to the Gaussian distribution are also a good guess for their skewed variants.The candidate distributions are illustrated in figure 3 for intervals relevant to FILD measurements at TCV.The illustrations concentrate solely on the candidate distributions, excluding the FILDSIM simulation histograms, to present a clear comparison of their skewness and tails relative to the skew-Gaussian distribution.The skewness and kurtosis of these distributions, calculated to assess their alignment with targeted Gaussian and skew-Gaussian properties, are tabulated in table 1.For energy strike-point distributions, the raised cosine distribution has the best fit, with its skewness identical to the skew-Gaussian's at 1.8 and a kurtosis of 4.7, slightly lower than the skew-Gaussian's 4.8.For pitch strike-point distributions, the Gaussian and Wigner's semicircle distributions meet the targeted skewness of 0. However, Wigner's semicircle markedly surpasses the Gaussian in kurtosis, having a value of 2.6 compared to the Gaussian's 4.1.The elevated kurtosis of the Gaussian distribution, as seen in figure 3(d), is characterized by its more pronounced tails compared to those of the Wigner's semicircle.This distinction underscores our selection of the Wigner's semicircle for its relatively shorter tails.
The discrepancy between the theoretical kurtosis values in (13a) and (13b) and the emipirical values in table 1 can be attributed to several factors.Despite the large sample size, the kurtosis calculated by MATLAB is a sample-based estimate, which uses a specific estimator designed to correct for finite sample sizes.This estimator deviates from the theoretical population kurtosis and is subject to sample-to-sample variability.Moreover, MATLAB's pseudo-random number generation algorithms, which underlie the simulation, may introduce additional approximation errors.Therefore, the values in table 1 should be considered approximate, albeit closely aligned, representations of their theoretical counterparts, as they are influenced by the method of kurtosis calculation, random variability, and computational approximations.
By incorporating the raised cosine and Wigner's semicircle distributions, we have refined the FILDSIM model for fitting the strike-map distributions in energy and pitch.The mathematical representation of this new model is:  This formulation meets our statistical criteria: it allows for manipulating skewness in energy through β has a kurtosis less than the Gaussian model for both energy and pitch, in line with our initial objectives.

Evaluation of FILDSIM models at TCV
We have implemented the proposed model for the TCV FILD.The energy and pitch strike-point distributions along with the skew-Gaussian/Gaussian and the skew-raised cosine/Wigner's semicircle model fits are illustrated in figure 4, simulated with N = 3 • 10 4 a value at which the residual errors and the χ 2 have saturated (see below).We will refer to these models as the 'standard Gaussian model' (SGM) and the 'raised cosine model' (RCM).Compared to the SGM, the RCM provides a more accurate fit for both energy and pitch strike-point distributions, specifically eliminating the gap in the upper tails of the energy distributions and removing the tails in the pitch distributions entirely.
Recall the χ 2 statistic defined by where O i and ξ i denote the observed and expected frequencies for measurement i, and k is the total number of measurements.
For the purpose of comparing the SGM and RCM in fitting the energy strike-point distributions, both models yield com-  To further quantify the improvement of the RCM over the SGM, we define the directional residual difference (DRD) as where R ik is the ith residual of model k j for j = 1, 2. It follows that (DRD i ) k1k2 < 0 when the ith residual of k 1 is closest to 0, and (DRD i ) k1k2 > 0 when the ith residual of k 2 is closest to 0. The DRD for k 1 = RCM and k 2 = SGM are illustrated in figure 5. Since the improvements in the RCM compared to the SGM for the strike-point distributions in energy occur at the upper tails, only the DRDs for the upper 90th percentile are illustrated.For both energy and pitch strike-point distributions, almost all residuals of the RCM are closer to zero than those of the SGM, so DRD i < 0, indicating an improved model.The SGM's overestimation of the tails is clearly evident, manifesting as more negative DRD values in these regions.

SGM and RCM weight functions
In this section, we contrast the SGM and RCM weight functions.Consider an ion initialized at (E ′ , p ′ ).The velocityspace distribution of this ion is a delta function f = δ E ′ , p ′ .All possible strike points from ions initialized at this point in velocity space form a strike-point distribution.Reshaping each strike-point distribution into a column vector and horizontally concatenating them results in a 2D array in which each column is a strike-point distribution corresponding to one point in velocity space, and the rows are weight functions.They indicate which points in velocity space can strike a specific point on the scintillator.
In the following, we focus on the weight function corresponding to E = 25 keV and p = 0.57.This point was chosen as it is central to a measurement to be analyzed in section 6.The weight functions at other points in velocity space display the same characteristics.The numerically calculated weight function is used as a benchmark for comparison; see figure 6(a).The SGM and RCM weight functions are illustrated in figures 6(b) and (c).The RCM weight function closely aligns with the numerically calculated weight function in both pitch and energy.Specifically, the sharp cut-off in pitch and the behaviour of the upper tails are well-represented.On the other hand, the SGM weight function exhibits noticeably longer tails in both energy and pitch, and its high-intensity regions do not qualitatively mirror those of the numerically calculated weight function.
To evaluate the accuracy of the SGM and RCM models, we introduce difference weight functions ∆W ℓ defined as  where W ℓ is the SGM or RCM weight function, and W num is the numerically calculated weight function considered to be the benchmark.The difference weight functions ∆W SGM and ∆W RCM are illustrated in figure 7. Visual inspection of ∆W SGM indicates a noticeably larger width in pitch and elongated tails compared to W num , as well as quantitatively larger deviations compared to ∆W RCM .Building on this definition, we introduce the absolute error E A,ℓ of model ℓ to quantify the total deviation across all elements of the difference weight function: where m and n are the number of rows and columns in ∆W ℓ .The absolute error for the difference weight functions under consideration according to the SGM and the RCM is Thus, the RCM is a 49% improvement in the absolute error over the SGM.Importantly, this improvement is not a localized phenomenon restricted to the specific weight function under consideration; rather, similar improvements are observed in all weight functions.

Characterization of FILDs
This section introduces two novel ways of characterizing FILDs: the gross FILD measurement M gross and the gross weight function W gross .To determine the regions in the FILD camera where the most counts would be generated given a uniform distribution of ions in velocity space, we integrate the strike-point distributions for all initial energies and pitches.The resulting integrated measurement, denoted as M gross , is calculated by setting f = 1 in (3) and evaluating the integrals: The gross FILD measurement is the mapped FILD measurement for uniformly distributed ions in velocity space.Since the individual strike-point distributions can overlap, the magnitude of the gross FILD measurement at a given point should not be interpreted as the absolute number of counts attributable to a single ion from a particular location in velocity space.Instead, it serves as a relative density measurement indicating the likelihood of photon emission at different locations on the scintillator.
We define the 'gross weight function' W gross E ′ , p ′ as the sum of all individual weight functions W E ′ , p ′ |E, p [43]: where m 1 m 2 = m is the number of grid points of the mapped FILD measurement.The magnitude of the gross weight function indicates the counts per ion at each point of velocity space, irrespective of where the ion ends up striking the scintillator.The constructs M gross and W gross offer distinct yet complementary insights into the generation and interpretation of the FILD measurement.Specifically, the gross FILD measurement reveals the regions in the FILD camera where the most counts will be measured, assuming a uniform distribution of initial energies and pitches.On the other hand, the gross weight function quantifies the relative contributions of ions from different points in velocity space to the FILD measurement.In summary, the gross FILD measurement offers a 'forward model' of photon emission, whereas the gross system matrix provides an 'inverse perspective,' making them mutually informative for a comprehensive understanding of the FILD measurement.
Figure 8 provides a visual comparison of the gross FILD measurement and the gross weight function for the TCV FILD, with the first row displaying the gross FILD measurement and the second row the gross weight function, computed using the SGM and the RCM in the first and second column, respectively.According to the SGM-generated gross FILD measurement, the most impacts on the scintillator occur at energies around 45 keV and pitches around 0.45.Conversely, in the RCM-generated gross FILD measurement, most impacts occur at energies around 38 keV and pitches around 0.73.The peak in the RCM occurs at energies lower relative to the peak in the SGM since the overestimation of the upper tails of the energy distributions in the SGM is corrected in the RCM.Furthermore, the SGM overestimates the tails of the pitch distributions more severely for lower pitch values compared to larger ones.This leads to a wider high-intensity region at these lower pitches.In contrast, the RCM provides a more accurate estimation of the width in pitch across its entire range.This accuracy reduces the number of counts at lower pitch values.As a result, the peak shifts to a higher pitch value.
In the SGM-generated gross weight function, ions with an energy of 35 keV and a pitch of 0.45 contribute the most to the FILD measurement.On the other hand, the RCM indicates the contribution to the FILD measurements is largely independent of pitch across energies of approximately 30-40 keV.However, there is a subtle increase in the number of counts as the pitch increases.Notably, the RCM shows a significant reduction in the contribution from ions with energies exceeding 35 keV compared to the SGM.This suggests that the RCM provides a different understanding of the ion dynamics across different energy and pitch values.This new understanding extends beyond the specificities of any individual fusion device.The relevance to TCV in this context is through its applied magnetic field and the specific geometry of its FILD detector.

Reconstructions of discharge #75 620
With a mapped FILD measurement and the system matrix from FILDSIM simulations, it is possible to estimate the velocity distribution of the lost fast ions by solving the inverse problem in (4), as explored in multiple studies on velocityspace tomography in fusion plasmas [25,28,32,[44][45][46][47][48][49][50][51][52][53][54][55][56].The inverse problem is ill-posed, so regularization techniques are essential to obtain stable solutions.Among regularization methods, Tikhonov regularization is typically used to compute reconstructions of fast-ion velocity distributions [46-48, 50, 51, 54, 55].For Tikhonov regularization, the optimal regularized solution x * minimizes the objective function where L is the regularization matrix penalizing deviation from certain desired characteristics of the solution.Minimizing (30) can be viewed as a numerical optimization  x * = argmin where the parameters x ∈ R n are the values of the approximating lost fast-ion velocity distribution at each grid point in velocity space.The regularization parameter λ balances the trade-off between data fidelity (Ax − b) and solution regularity (Lx).Its value is typically chosen based on techniques like the L-curve [50,57] or a priori knowledge.This knowledge stems from our understanding of expected features in fast-ion velocity distributions, such as the locations of full, one-half, and one-third NBI injection energy peaks.By incorporating these expectations into our analysis, we can choose a value of λ that ensures the reconstructed distributions not only align with the measured data but also reflect the anticipated physical characteristics.
We compute reconstructions of experimental FILD measurements acquired with the TCV FILD.Specifically, our analysis focuses on the FILD measurement at t = 1005 ms during discharge #75 620 measured at a radial distance of r = −17 mm from the plasma, approximately co-planar with the magnetic axis, where z FILD = 0.050 m and z mag = 0.052 m.This time point corresponds to an L-mode confinement regime five milliseconds after the start of the last 'on' phase of the NBI-1 injector, as indicated in figure 9(a).The relevant experimental parameters at this time point were: injection power, The raw FILD measurement is illustrated in figure 9(b) with the strike map superimposed in white, the mapped FILD measurement in figure 9(c), and the reconstructions computed using the SGM and RCM in figure 11.The bright spots observed in figure 9(c) around E = 10 keV and p = 0.45 − 0.57 stem from reflections due to a damaged area on the scintillator plate.These are recognized artefacts and were removed during data preparation, which explains their absence in the reconstruc-tions shown in figure 11.We set the regularization matrix L equal to the identity matrix I, intentionally avoiding additional constraints on the solution.Figure 11 displays three different reconstructions: one thought to be under-regularized, an 'optimal' one, and one over-regularized, shown in the first, second, and third rows, The first column presents reconstructions computed using the SGM, and the second reconstructions computed using the RCM.Firstly, the reconstructions display a high-intensity region at approximately 25 keV and a pitch of 0.57.These parameters are consistent with the injection peak from the full energy component of the NBI, verifying the accuracy of the reconstructed velocity distributions.Secondly, at energies around 20 keV and a pitch of 0.55, certain qualitative differences are observable between the SGM and RCM reconstructions.Thus, the choice of FILDSIM model shapes the characteristics of the reconstructions, though not always in a directly correlated manner with the model features.Consequently, while we anticipate that the RCM may offer improved representations of the true velocity distribution of lost fast ions, this is subject to the inherent complexities of the reconstruction process.

Conclusion
This paper presents a new FILDSIM model of simulated strike-point distributions.We implement a skew-raised cosine distribution in energy and Wigner's semicircle distribution in pitch.These new distributions refine the model fits, particularly improving the model's ability to accurately capture the shape of the tails at high energies and the correct width in pitch.Importantly, while our work primarily focuses on NBIgenerated ions, the versatility of the FILDSIM model extends its applicability to other fast-ion species.Since FILDSIM models the trajectory of any fast ion, regardless of its originbe it NBI, ICRF, or fusion reactions-the enhanced model is equally pertinent to fusion products and RF-heated ions.
As a direct result of these improvements, the synthetic data generated by the new FILDSIM model shows strong qualitative agreement with experimental FILD measurements.Moreover, these methodological improvements enable more accurate reconstructions, thereby contributing to a better understanding of lost fast-ion velocity distributions.
Additionally, we introduce new analytical tools-the gross FILD measurement and gross weight function-to characterize the TCV FILD.These tools provide a structured framework to assess the instrument's measurement capabilities and may guide future experimental designs and data interpretation strategies.

Data availability statement
The data that support the findings of this study are available from the authors upon reasonable request.

Figure 1 .
Figure 1.(a) FILD probe head schematic: Blue trajectories illustrate collimated lost fast ions passing through the FILD pinhole and striking a plate coated with a scintillating material (green).Photons (yellow) are emitted at the impact locations.The red trajectory illustrates a lost fast ion which, upon colliding with the collimator, is blocked from passing through the pinhole.(b) Trapped orbit of a lost fast ion measured by the TCV FILD (black box) located in the midplane of the vessel.

Figure 2 .
Figure 2.The Gaussian distribution N (x; 0, 1) plotted with the candidate distributions: (a) the raised cosine distribution f(x; 0, 2.5), (b) the Cauchy distribution g(x; 0, 1), and (c) the logistic distribution h(x; 0, 1).The parameter values can be determined by comparing the expressions given here with those in(14).The difference between the Gaussian and candidate distributions is also plotted and indicated by the green curves.Note that the raised cosine distribution is the only distribution with shorter tails than the Gaussian distribution.

Figure 5 .
Figure 5. (a) DRD for energy and (b) DRD for pitch: Directional residual differences between SGM and RCM residuals for the strike-point distributions in figure 4. Most points fall below 0 for all energies and pitches, indicating that the RCM residuals are generally closer to zero, thus providing a better fit than the SGM.

Figure 6 .
Figure 6.(a) Numerically calculated weight function using FILDSIM for E ′ = 25 keV and p ′ = 0.57.(b)-(c) Weight functions according to the SGM and RCM, respectively, under the same conditions as (a).The weight functions are zero in the white regions.

Figure 7 .
Figure 7. (a)-(b) Difference weight functions ∆W SGM and ∆W RCM , representing the discrepancy between the weight functions fitted using the SGM and RCM and the numerically calculated weight function using FILDSIM.Observe the SGM's significant overestimation in the length of the upper tail in energy and the width in pitch.

Figure 8 .
Figure 8. (a), (b)The gross FILD measurement computed using the SGM and the RCM, respectively, for a magnetic field at the FILD probe head given by (B R , B ϕ , Bz) = (0.00, −1.14, 0.14) T. (c), (d) The gross system matrix computed using the SGM and the RCM, respectively, for the same magnetic field.

Figure 9 .
Figure 9. (a) NBI-injected energy throughout the discharge, with a vertical dashed line indicating t = 1005 ms.(b) The raw FILD measurement with the strike map superimposed in white.(c) Mapped FILD measurement in counts at the same time point, obtained using the strike map.

Figure 10 .
Figure 10.TCV discharge #75 620: (a) Spectrogram from a Mirnov coil showing low-frequency mode activity beginning at t = 1012 ms.(b) Spectrogram from the fast FILD camera.No resolved frequency is identified.The vertical dashed lines in both panels mark t = 1005 ms.

Table 1 .
Skewness and kurtosis for the candidate distributions in figure3.