Electron temperature profile from optically grey X3-mode of electron cyclotron emission at Wendelstein 7-X using Bayesian analysis

The third harmonic extraordinary (X3) mode of electron cyclotron emission is investigated, aiming at its diagnostic capability towards the measurement of electron temperature, T e , of plasmas with higher densities exceeding the second harmonic extraordinary (X2) mode cutoff. A Bayesian data-analysis approach is adopted through the forward modeling of the X3 emission observations to extract the underlying T e profile. Bayesian analysis shows that the high field side of the X3 emission spectrum is sufficient to provide the T e profile. Additionally, for plasma control purposes, a correction factor is provided to track continuous core T e from the measured radiation temperature of the optically grey X3 emission.


Introduction
For fusion relevant plasma parameters, electron cyclotron emission (ECE) from the lower harmonics such as the first harmonic ordinary mode (O1-mode) and second harmonic extraordinary mode (X2-mode) have high absorption coefficients resulting in a high optical depth [1][2][3]. ECE from these harmonics behave as a black-body emission, and the emission intensities can be directly mapped to the local electron 1  * Author to whom any correspondence should be addressed.
Original Content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. temperature, T e , of the plasma using Rayleigh-Jeans law. A heterodyne radiometer measures the optically thick X2 emission to provide T e profile at Wendelstein 7-X (W7-X) [4,5]. However, for a magnetic field of 2.5 T at the plasma center, the X2 emission has a cutoff at a density, n e , of ≈ 1.2 × 10 20 m −3 such that it cannot be used as T e diagnostic for higher density operation of W7-X.
The triple product for stellarators, with confinement time from ISS04 scaling, depends linearly on n e , and high n e is required to improve the plasma confinement by increasing the triple product [6,7]. For a fusion reactor, ECE is also a power loss mechanism, and as an example, for the international fusion project ITER, the estimated ECE power loss at T e > 30 keV and moderate n e is a significant fraction of heating power [8]. For such scenarios, high n e is essential to achieve high plasma pressures at reduced T e to avoid power losses. Moreover, high n e facilitates divertor detachment [9,10]. In a burning fusion plasma, high n e is advantageous, as it keeps the fast ion population at a low level by reducing the fast ion slowing-down time [11]. Tokamaks have a Greenwald limit on increasing n e because of the presence of plasma current [12]. The density increase beyond the Greenwald limit typically leads to plasma disruptions terminating the plasma confinement [13]. Because of the absence of toroidal currents, stellarators are not prone to Greenwald density limit, and therefore, it is easier to achieve high densities in a stellarator [14]. Specially, for W7-X, the neoclassical transport optimization [15] favors high n e . However, there is an upper n e limit present in stellarators because of the radiation limit set by impurities [16]. Nevertheless, stellarators can use the high-density parameter space for improved plasma confinement. The high n e operation of W7-X beyond X2 emission cutoff is a motivation for investigating the X3 emission as an extension of ECE parameter space.
The magnetic field gradient along the line of sight of ECE determines the spectral separation of different harmonics. For example, the Joint European Torus (JET) tokamak has a low aspect ratio of ≈3 resulting in steep magnetic field gradient, which leads to the overlapping of the ECE harmonics and complicates the interpretation of the emission spectrum [17]. In contrast, W7-X stellarator has a high aspect ratio of ≈10 which results in a moderate magnetic field gradient along the ECE line of sight (see figure 1) leading to well separated ECE harmonics [18]. Hence, the geometry of W7-X stellarator facilitates the study of the higher ECE harmonics.
At W7-X, the plasma startup and heating is done with the X2-mode of electron cyclotron resonance at 140 GHz using gyrotrons [19]. For fusion reactor relevant conditions, W7-X must operate above the X2 emission cutoff density, which requires additional heating mechanisms. For this purpose, the second harmonic ordinary mode (O2-mode) of electron cyclotron resonance was used for plasma heating as it has a cutoff at a relatively higher n e of ≈ 2.4 × 10 20 m −3 [20]. Due to the low absorption in the plasma, the O2 heating was done with multiple plasma passes of gyrotron beams. It is essential to control T e to avoid plasma collapse as the absorption of O2 heating depends on T 2 e . At W7-X, ECE [5], Thomson scattering [21] and x-ray Imaging Crystal Spectrometer can measure T e . The ECE diagnostic has higher temporal resolution and can provide real-time temperatures which is why this diagnostic is preferred over others for continuous plasma control. Hence, continuous T e measurement for plasma control during high-density O2 heating is a strong motivation for investigating X3 emission for T e diagnostic capabilities. The X3 emission measurements have been done previously at different magnetic confinement devices [22][23][24][25].
W7-X is also planned to operate at lower magnetic field of 1.7 T for β-limit studies, and for these operations the existing 140 GHz electron cyclotron resonance heating (ECRH) system will be used for plasma heating with X3 polarization instead of X2 [26,27]. For these conditions, the existing 122-164 GHz radiometer which measures X2-mode at 2.5 T must derive T e from the X3 emission measurement at 1.7 T. Hence, the lower magnetic field operations of W7-X would benefit from the exploration of the X3 emission. A Martin-Puplett interferometer was commissioned to investigate broadband ECE [28][29][30][31][32]. The interferometer was absolutely calibrated with a ceramic black-body source through the hot-cold calibration technique in the spectral range of 100-300 GHz. Interferometer as an ECE diagnostic have been previously used at other magnetic confinement devices [17,[33][34][35][36] to provide T e profile and it will also be used at the international fusion project ITER [37,38]. The interferometer measures the radiation temperature spectrum, T rad (f), of ECE in a broad frequency range (2-4 harmonics).
The possibility to provide a T e profile from the ECE depends on precise knowledge of the degree of the reabsorption of the emission in the plasma. For an optically thick plasma, the origin of the emission is spatially localized in the plasma arising from a narrow layer of width ≈1 cm behind the cold resonance. Hence, for the optically thick emission, the T e profile is extracted through direct inversion of the experimental observed T rad . However, for the scenarios of low optical depth, the emission originates from a broader range of the plasma layers, and includes electrons with different kinetic energies. Hence, an inversion from T rad spectrum to T e profile is a non-trivial task. Therefore, a scheme of Bayesian dataanalysis is adopted for this work employing forward modeling of the X3 emission to extract T e from optically thin plasmas. Bayesian analysis and forward modeling of the ECE diagnostic measurements have been done before at different magnetic confinement devices for first and second harmonic ECE [39][40][41][42].
This paper presents the Bayesian forward analysis of the interferometer measurements of T rad spectrum around the optically grey X3 emission using radiation transport calculations to infer the T e profile.

Radiation transport calculations for X3 emission
The X3 emission is investigated with calculations of the radiation temperature spectrum, T rad (f) and the optical depth, τ , to identify the plasma parameter regime for direct T e diagnostic application. Radiation transport calculations were done with the ray-tracing code TRAcing VISualized (TRAVIS) [43], where the ECE branch contains the solver of radiation transport equation along precalculated trajectory back to the receiver. Typically, the ray trajectories are calculated using the cold dielectric tensor (as an option, weakly relativistic approach can be applied), while absorption and emissivity are calculated in fully relativistic approach. Apart from the spectra of radiative temperature, T rad (f), also the radial profile T rad (ρ) is outputted. For the mapping procedure, f → ρ, the spatial location of the emission line is calculated together with its spatial width. Due to this kind of mapping, the profile T rad (ρ) does not have any nonphysical shift (asymmetry with respect to ρ = 0) that usually is observed for mapping of frequency to the cold cyclotron resonance location.
In order to cover the case of optically grey plasmas, multipass trajectory is calculated. Because of the 3D shape of the plasmas and the reflecting surfaces, the trajectory for each pass is very different. The first reflection is happening at the special tiles installed on the inner wall, and all other ones are happening on the vacuum chamber. The reflection coefficient for all the surfaces is taken in calculations as equal to 1. The effect of depolarization due to reflection is more important. However, the standard way of accounting the scrambling effects [44,45] is not well applicable for the W7-X. Instead, depolarization due to exit and re-entrance is calculated directly. For the ray which leaves plasmas, polarization is fixed as in point of crossing last closed flux surface (LCFS). When the reflecting surface is met, the polarization is redefined respectively (ideal conductor is supposed), and in the point of reentrance the wave-field is projected onto the required field for the given wave-mode and from that the wave-mode purity can be obtained.
Since the sight-line (figure 1) for the ECE radiation in the W7-X cannot be strictly perpendicular to the magnetic field and the reflecting surfaces, the points of exit from LCFS and re-entrance are quite different (the distance between of them is approximately 7 cm for the first reflection and about of 23 cm for the second one). As consequence, the wave-mode purity for the first reflection is about 0.8-0.9, depending from the frequency, plasma parameters and magnetic equilibrium. Similarly, for the second reflection the wave-mode purity is about 0.46-0.55. Formally, for accounting the contribution from the reciprocal mode, an additional run can be performed and the sum of both contributions with the corresponding weights gives the expected result.
As a first step the X3 emission was studied with TRAVIS for different T e and n e values. To demonstrate the basic effects, the n e and T e profiles were chosen to be constant over plasma radius, ρ, and a fixed plasma flux-surface equilibrium was chosen. Additionally, the reflections effects were neglected at the back wall of the plasma vessel for the X3 estimations in this section, as the X3 emission starts to become optically thick for the concerned T e values. Figure 2 shows the resulting T rad (f) spectra and optical depth of the X2 and X3 emission. The high density operation of W7-X utilizes O2-ECRH and the absorption of the O2 heating is efficient only above 2 keV. Hence, the chosen T e values were in the range from 3 to 5 keV and the n e values were in the range 1.1 × 10 20 m −3 to 1.3 × 10 20 m −3 . These plasma parameters reflect the region of interest for the application of the X3 emission as a T e diagnostic for higher plasma density. For all three T e values, the X2 emission approximately from 135 to 165 GHz is optically thick with τ ⩾ 10 (for reference τ = 3 already results in 95% absorption), and hence, the T rad is equal to T e . The X2 emission is only fully present at n e below 1.1 × 10 20 m −3 and at a higher n e , the emission at LFS frequencies, corresponding to lower values of magnetic field along the line of sight (see figure 1), starts to gradually go into cutoff with T rad approaching zero. In contrast, the full X3 emission approximately from 190 to 240 GHz is present at high n e . For T e = 3 keV, majority of the X3 emission has a value of τ ≈ 2.5 except at few frequencies near 200 GHz where τ ≈ 5 (see bottom figure 2(b)). At these frequencies, T rad is nearly equal to T e (see bottom figure 2(a)). For T e = 5 keV, majority of the X3 emission is optically thick with τ > 5 (see top figure 2(b)) and T rad is nearly equal to T e (see top figure 2(a)). The optical depth for X3 emission from constant plasma profiles is asymmetric (see figure 2(b)). With increasing plasma β and increased diamagnetic downshift in the plasma center, the asymmetry becomes more pronounced as the magnetic field gradient becomes flatter on the LFS and steeper at the HFS.
From the absorption physics of the third harmonic, the optical depth depends strongly on T e and moderately on n e [46] and this can be seen in the radiation transport calculations. The simulation results show that X3 emission has a tendency to become optically thick at higher plasma densities and moderate T e values which can further be explored for the diagnostic purposes. For optically grey emission the radiation temperature is always lower than T e . Hence, for a direct application of the optically grey X3 emission as T e diagnostic for plasma control purposes without Bayesian analysis, a correction to T rad is required to derive T e . For practical purposes, the correction factor C f is defined by the following equation:   The T e and n e profile shapes was chosen to be constant over the plasma radius. The correction factor decreases with increased T e because the re-absorption of X3 emission increases and eventually, the emission becomes optically thick representing the black-body conditions for which the correction factor is negligible. As the optical depth integral has a strong dependence on the T e profile shape, it was found form TRAVIS calculations that the re-absorption is proportional to the degree of T e profile broadening.

Experimental spectra
A Martin-Puplett interferometer absolutely calibrated with a black-body source was used to measure T rad along the line of sight shown in figure 1 and the details of the diagnostic setup alongside the measurement process are given in [28]. A wire grid beam splitter was used for mode separation at the input to the interferometer. As the emission intensity from the higher ordinary mode (O-mode) harmonics was extremely low, hence only the X-mode emission observations are discussed in this section. Figure 4 shows the plasma profiles and corresponding X-mode emission spectra for three plasma heating scenarios which were available in the first operational phase of W7-X, namely X2-, O2-ECRH and NBI heating. The intensities of ECE harmonics for different plasmas depend on the heating power and fueling. The heating power for these chosen plasmas are as follows: P X2 = 4.5, P O2 = 6, and P NBI = 3.5 MW. In the case of ECRH, the strong background radiation from non-absorbed 140 GHz microwaves must be suppressed by a notch filter [29]. Hence, the X2 emission (top figure 4(c)) around 130-150 GHz was attenuated because of notch filter, however the X3 and X4 emission were observed. For purely NBI heated plasma (bottom figure 4(c)), the notch filter could be omitted and hence, both X2 and X3 emission were visible simultaneously. There were additional unknown spectral features present near 160 GHz. A possible reason behind these features could be the ECE from toroidally different locations of the stellarator with different magnetic field values reflected to the receiver optics via the vessel walls. The feature around 244 GHz was not from the plasma and it originates from the radiometer mixer signal, as both the interferometer and the radiometer share the same transmission line. Both ECE diagnostics shared a single wire grid beam splitter [28], which acted as a polarization separator and was used to split the beam between two diagnostics. If X-mode was accessed by the interferometer then radiometer could only access O-mode and vice versa. The second harmonic of the local oscillator of the radiometer mixer leaks into the shared transmission line. The leakage goes from the port of the local oscillator into the input port of the mixer. The local oscillator is of the order of a mW or more, which presents a lot of power compared to the ECE signal in the waveguides and also enters the interferometer. TRAVIS calculations suggests that the X4-mode emission is low at T e of ≈1 keV. As only the O2-ECRH and NBI heated plasmas were capable of achieving high densities, and hence, ECE from these plasmas are discussed in the following sections.

Bayesian data-analysis
The Bayesian data-analysis approach is based on the Bayesian probability theory which is a statistical inference. The classical statistical analysis is based on repeating the same experiment under identical conditions to extract the uncertainty of the observation. The drawback of this analysis is that the probability and uncertainty of the experimental observation vary with different numbers of repetitions of the experiment. However, the Bayesian probability is different from the classical probability, as it additionally includes the prior probability knowledge in the random variables or unknown parameters affecting the experiment. Prior probability gets updated with a new data set of measurements or by including additional observations, eventually increasing the knowledge of the experiment and factors affecting it. The increased knowledge on experiment is represented by a posterior probability. The interpretation of the Bayesian probability for this work is to infer the underlying physics parameters from the observations.
In the context of the experimental observation of T rad (f) affected by assuming only T e (ρ), the Bayes theorem [47] provides the conditional probability of T e (ρ) given that the observation of T rad (f ) is true: The term P(T e (ρ)) is the prior probability representing the knowledge of T e (ρ) irrespective of the experiment and P(T e (ρ)|T rad (f )) is the posterior probability which represents the updated state of knowledge on the profile with new measurement. The term P(T rad (f)|T e (ρ)) is the likelihood, which links the prior and posterior knowledge on the diagnostic. From Bayes theorem, the posterior probability is the prior probability times the likelihood. The Bayesian inference is characterized by models and parameters. The model is the formulation of how the experimental observation has been obtained from a certain diagnostic and the parameters are the unknown factors or variables affecting this observation. The prior and posterior probabilities are linked by likelihood, which is the forward calculated probability of a certain observation given that the prior knowledge on the parameters is true. The likelihood is determined from the associated model of the diagnostic and its measurement process.
For this work, the forward modeling of the diagnostic is done in the Bayesian Minerva modeling framework [48], which builds on directed acyclic graphical models. The necessary building blocks for the Bayesian data-analysis are the prior probability distribution function which is required to start the forward calculations, the algorithms which can find the position of the maximum a posteriori probability (MAP), and the functionality of Markov chain Monte Carlo (MCMC) simulations to sample the posterior distribution.
The diagnostic data-source is an essential part of the forward model as it provides the experimental observations which are compared with the predictions for the Bayesian inference of the free parameters. The main reason to use data-sources is to keep the model as generic as possible. Different diagnostic data-sources are treated as nodes in the graphical models of Minerva framework. This makes it easier to use multiple observations from different diagnostics in the forward model. The Martin-Puplett interferometer data-source provides the raw and analyzed data [28]. The analyzed data consists of absolutely calibrated T rad (f) covering the spectral range of the second and third harmonic ECE and the measurement uncertainties.
In the forward calculations, the T rad (f) is predicted from the radiation transport calculations done with the TRAVIS code and in TRAVIS calculations, the information of the equilibrium is inputted with the VMEC (Variational Moments Equilibrium Code) [49]. The free parameters of the forward model are as follows: T e profile, n e profile, X-mode contribution in the detected signal, a scaling parameter for central magnetic field strength and the variance scaling of the observational uncertainties. The predicted T rad is assumed to be a combination of X-mode and O-mode emission in the forward model to take care of any mode mixing effects possibly caused by the leakage of O-mode to X-mode measurements after mode separation. However, more weightage is assigned to X-mode and this weightage is a free parameter in the model and is named as X-mode contribution. A scaling parameter for central magnetic field strength is a free parameter of the model as well. For this work, a uniform distribution priors with an upper and lower limits were chosen for the X-mode contribution factor in the detected signal, for the central magnetic field scaling factor and for the variance scaling factor. The T e (ρ) and n e (ρ) were initialized similarly in the model using parameterization [43], which is given by the following equation: where a, height at the center, g, height at the edge, h, depth and w, width of hollowness at the center of the profile and two slope parameters, p and q. A uniform distribution function is assigned to each of these parameters, to construct the prior for T e (ρ) and n e (ρ).
A graphical model in the Minerva framework represents the Bayesian network of probabilistic nodes and their connections. Figure 5 shows a combined forward model of the Martin-Puplett interferometer and laser interferometer [50] (which measures the line integrated n e ). The addition of laser interferometer observation has the advantage of restricting the line integral of n e (ρ) profile to a level measured by the experiments. Each box in the graphical model represents a node constructed in Minerva modeling framework. These nodes can be the free parameters (blue boxes), the observations (grey ovals), or the model's physics hypothesis (white boxes). The end of an arrow at a node represents the conditional dependence of that node on other nodes. Nodes that are not connected are conditionally independent of each other. Figure 6 shows the predicted and observed T rad (f) for broadband ECE. It was found that for a single plasma pass of the ECE beam, the prediction of the X2 emission at the HFS frequencies around 135-150 GHz agrees well with the observation. However, the X2 emission at the LFS frequencies (lower than 120 GHz), unknown emission features around 155-180 GHz and moreover, the X3 emission do not agree with the observed data. Hence, as a next step to understand the spectrum better, the reflection effects inside the plasma vessel, were taken into account. Multiple ECE beam passes through the plasma were used for the radiation transport calculations. In addition, the angle of the plasma vessel back-wall tile, at the end of ECE sight-line, was varied in the TRAVIS calculation. These reflection effects, in terms of number of beam passes and back-wall tile angle, cannot be included as a free parameter of the forward model directly. As they were discrete values and the Minerva framework did not allow to have priors  with discrete distribution functions. Hence, the beam passes through plasma and tile angle were varied manually, and for each combination of these parameters, the forward calculations were repeated, to find the best prediction. After taking the reflection effects into account, the spectral features that were optically grey are emphasized more as radiation from a larger range of the sight-line is collected such as around 110-120 GHz. For 4 plasma passes, the intensity of the X3 emission increases and shifts to the HFS frequencies, and further increase in the passes did not lead to any improvements in prediction as it saturated. As for multiple reflections of ECE beam in the plasma vessel, the emission is also collected from the neighbouring magnetic field surfaces, and hence, only the optically grey X3 emission shifts to other frequencies and not X2. The maximum T rad of both, the X2 and X3 emission, agree well with the experimentally observed data. However, the frequencies of the X2 and X3 emission simultaneously do not agree with the observational frequencies. While the optically thick X2 emission corresponds to the magnetic field at the single pass sight-line, the optically grey X3 emission is prone of wall reflections. In the stellarator, the magnetic field varies toroidally and poloidally, and the plasma vessel tiles are tilted with respect to the line of sight. The vessel wall reflections of ECE sight-line from these tilted vessel tiles, result in multiple passes of the radiation through plasma in a zigzag path along the changing directions such that ECE from different toroidal and poloidal locations is collected.

Bayesian inference results
Even though multiple beam passes were taken into account and the tile angle was varied for radiation transport calculations, the collected emission could be from sight-lines of the back-wall tiles which pass the plasma at different toroidal or poloidal locations, which were not recovered with these calculations. This could be a possible reason behind the non-optimal prediction of full ECE spectrum from the plasma with rather low T e . Additionally, the forward calculations were not able to predict the spectral features around 155-180 GHz. This suggests that the physics hypothesis in the forward model was not sufficient for these features and an improved physics model with a more elaborate treatment of reflections [42,51,52] is required for spectral prediction in a broadband range. However, a possible explanation of these features could be the relativistically downshifted emission from the hot electrons towards the HFS wall, which were reflected and not sufficiently reabsorbed while passing the plasma. The outermost radiometer HFS channels, which are also affected by this feature, show an immediate response with switching of the heating power. It is therefore speculated that it represents the red-shifted emission of hot core electrons which enters the receiver via wall reflections.
The X2 and X3 emission spectra can also be predicted separately to infer the T e (ρ) and n e (ρ) profiles. Figure 7 shows the predicted T rad (f) for three measurements, and the inferred T e profiles from these predictions. The first two measurements were corresponding to the X2 and X3 emission from the same plasma heated with NBI and the third measurement is the X3 emission from an O2 heated plasma. Each spectrum (figure left column) has three curves: the observed T rad (f), the predicted T rad (f) and the MCMC spectra samples covering a wide free parameter space. The error bars on the observation of the T rad spectrum are from the fitting of the calibration factors. The error bars on the prediction of the T rad spectrum are the standard deviation from the MCMC samples. The shift in the predicted center frequency of the X3 emission peak ( figure 7(b)) for NBI plasma case compared to the broadband prediction (see figure 6) is the result of the central magnetic field scaling which is a free parameter in the forward model calculations.
The T e profiles (figure right column) represent the profile from prediction of T rad (f). In addition, just for the reference T e profile from the Thomson scattering measurement [21,53] is also shown, however it was not used for Bayesian analysis. Note that the errors bars given for the Thomson scattering measurement are purely statistical. Systematic effects were not taken into account which means that realistic error bars are maybe higher than shown. The inferred T e profile from the prediction of the X2 emission (see figure 7(a)) agrees well with the Thomson scattering data. For the same plasma, the inferred T e profile (see figure 7(b)) from the separate prediction of the X3 emission also agrees well with the Thomson scattering data, except few data points near the mid plasma radius, ρ = 0.5. For O2 heating, the inferred T e profile (see figure 7(c)) from predictions of X3 emission also agrees well with the Thomson scattering data near the edge of the plasma at ρ ⩾ 0.5. However, near the core of the plasma at ρ ⩽ 0.5, the inferred T e does not agree, and is slightly higher than Thomson scattering data. Possible reasons for the disagreement between two diagnostics could be unaccounted systematic errors of the Thomson scattering measurement [53] or poor calibration of the interferometer at lower frequencies [28]. Moreover, the reason behind disagreement could be that both diagnostics are measuring electrons in different phase space and similar observations have been reported from other magnetic confinement devices as well specially for ECRH plasmas [2].
In a semitransparent or optically grey plasma, the intensity of the ECE depends on the optical depth, thus, also on the plasma density. Hence, the optically grey X3 emission measurements also contain information about n e profile and it has been used previously to infer n e [54]. The forward calculation of X3 emission is therefore also capable of inferring the information on the n e (ρ) hidden in the ECE measurement. Figure 8 shows the inferred n e (ρ) profile from the X3 emission predictions shown in the figure 7(c). The line integration of the Bayesian inferred n e (ρ) profile stays within the experimentally observed values as the laser interferometer diagnostic was included in the Bayesian analysis of the X3 emission. It can be observed that the inferred n e profile from the X3 prediction agrees with the Thomson scattering data.
The inferred T e and n e profiles from the predictions discussed in the figures 7 and 8 were used as an input to radiation transport calculations code. The quantities of interest from these calculations are: the optical depth which quantifies the re-absorption of the emission, the velocity of the electrons responsible for the emission and width of the emitting layer. The optical depth of the X2 emission is high, τ ⩾ 10, in most part of the spectrum (see left figure 9(a)). The velocities of the electrons, responsible for this X2 emission, are close to the thermal velocities (see center figure 9(a)). The electron velocity closer to the thermal velocity represents the black-body condition at that emission frequency. Despite the moderate T e (ρ) ⩽ 1 keV in these NBI heated plasmas with high density, the X2 emission remains optically thick. This extends up to the plasma edge at the LFS and the optical depth decreases only moderately towards the HFS edge. The latter is the effect of the HFS plasma boundary which cuts the integral of the optical depth as further out and only a purely absorbing edge plasma exists [55]. The ECE at a given frequency is a distribution of emissions over electron velocities originating from different plasma layers. The effective plasma radius (right figure 9(a)) is the spatial location of the center of mass of the emission distribution at a given frequency. The horizontal error bars on the effective plasma radius represent the width of the emission distribution (or emission layer in the plasma for the specific frequency), while the vertical error bars are from the MCMC samples. The mapping of emission to the effective plasma radius shows that the emission at the LFS frequencies is the downshifted emission from the core electrons and comes from a broader plasma layer (large horizontal error bars). The emission at the HFS frequencies comes from a narrower plasma layer and hence is relatively more localized in the plasma than the emission at the LFS frequencies.
The X3 emission from the purely NBI heated plasma has an optical depth of ⩽0.2 (left figure 9(b)), which means that the plasma is nearly transparent for this emission. This is also reflected in the electron velocities (center figure 9(b)) as they are higher compared to the X2 emission electron velocities, and also have higher uncertainties. The mapping of the emission to the effective plasma radius (right figure 9(b)) shows that the emission at the LFS frequencies is coming from a broader plasma layer, while the emission at the HFS frequencies is coming from a relatively narrower plasma layer. Hence, the emission at the HFS frequencies is more localized in the plasma than the emission at the LFS frequencies. The reason Figure 9. The optical depth of the emission (note the vertical scale for three cases), the velocities of electrons (contributing to emission) normalized to the thermal velocity (ve/v th ), and T rad mapped to the effective plasma radius are shown. The optical depth (left column plots) and electron velocity (middle column plots) at a given frequency and the corresponding effective plasma radius for the emission at that frequency (right column plots) are indicated by the same color. These quantities are calculated with TRAVIS with the input of inferred Te and ne profiles discussed in figures 7 and 8. The negative plasma radius represents the plasma location corresponding to the LFS, and the positive plasma radius represents the HFS. The numerical upper limit of this normalized velocity is set to 7, similarly, the upper limit of optical depth is ≈10.
behind this is also the plasma boundary, which cuts the integral of the optical depth.
The X3 emission from the plasma heated with O2-ECRH has slightly higher optical depth ≈3.5 (left figure 9(c)) for part of the spectrum. However, most of the frequencies have a low optical depth leading to optically grey plasma. Only for few frequencies (also where the optical depth is higher ≈3.5) the electron velocity is closer to the thermal velocity (normalized electron velocity is ⩽2) (center figure 9(c)). For the X3 emission at these frequencies, the plasma is optically thick. But for the rest of the frequencies, the plasma is optically grey. From the mapping of the emission to effective plasma radius (right figure 9(c)), the emission at the LFS frequencies is the downshifted emission from the core plasma electrons and is coming from a broader plasma layer. The emission at the HFS frequencies is originating from a narrower plasma layer than emission at the LFS frequencies but it is still less localized than X2 emission. Some degree of localization results as, the emitting layer is limited by the cold resonance on the LFS and by the plasma boundary on the HFS. These results led to the exploration of the inference on T e profile only from the prediction of the X3 emission only at the HFS frequencies. Figure 10 shows the prediction of the X3 emission at the HFS frequencies for the measurements from the O2-ECRH plasma (same measurements as shown in left figure 7(c)). In the previous section, for the full X3 emission spectrum prediction, the inferred T e profile (see right figure 7(c)) near the plasma core did not agree well with Thomson scattering data. However, for the prediction of the same X3 emission spectrum only at the HFS frequencies, already improves the inferred T e profile (see figure 10(b)) with respect to the Thomson scattering data.

Conclusions
The X3 emission has been studied theoretically and experimentally for the geometry of the W7-X stellarator. These studies focus on a higher plasma density application of ECE beyond the X2 emission cutoff at 1.2 × 10 20 m −3 . To achieve densities above the X2-mode cutoff, plasmas were heated with O2-ECRH. The absorption of O2 heating in plasma depends on T 2 e and hence, for the control of the O2 heated plasma discharge, T e should be monitored continuously. For the W7-X specific parameters, it was found that a T e ⩾ 2 keV was required for sufficient absorption of O2 heating power. Hence, the X3 emission was studied using the radiation transport calculations for T e in a range of 2-5 keV and n e in a range of 1.1 × 10 20 m −3 -1.5 × 10 20 m −3 . At these plasma densities, the X3 emission was found to be optically thick with τ ⩾ 3 for broader T e profiles having core plasma temperature ⩾3 keV. For the rest of T e parameter space, the X3 emission was found to be optically grey. Hence, for a direct T e diagnostic application of optically grey X3 emission, a correction factor to the T rad is provided from the radiation transport calculations. However, the T e profile shape strongly influences the correction factor and hence, the practical applicability of the correction factor would be improved upon with the experimental knowledge in the next campaign of the W7-X.
During the W7-X operation, the X3 emission was measured with a Martin-Puplett interferometer diagnostic from both O2-ECRH and NBI heated plasmas. For the experimentally available plasma parameters, the measured X3 emission was found to be optically grey at majority of emission frequency range and a direct assignment of a certain frequency to an associated emission layer as in the case of standard ECE diagnostic is not possible. Hence, a classical direct inversion of the measured X3 emission spectrum to a T e profile is a nontrivial exercise.
A more advanced Bayesian data-analysis approach through the forward modeling of the Martin-Puplett interferometer was adopted to interpret the measured ECE spectrum. Forward calculations of the full X-mode spectrum (100-300 GHz) predicted the measured ECE spectrum well except some unidentified spectral features (around 155-180 GHz). An improved physics model by including better wall reflection modeling is essential for the prediction of the broadband X-mode spectrum. The focus of this particular work is the X3 emission, therefore, two measurements from higher density plasmas heated with NBI and the O2-ECRH were chosen respectively as examples for the Bayesian analysis.
For NBI heated plasma with low T e ≈ 1.2 keV, the forward prediction of the X3 emission spectrum generates a T e profile which agrees well with the Thomson scattering measurements within the inferred uncertainty. The radiation transport calculations done with the generated T e profile showed that the corresponding X3 emission has a very low optical depth τ ⩽ 0.2. Hence, even for this extreme case of low optical depth, a T e profile was successfully generated from the measurements of the X3 emission spectrum. Correspondingly, the velocity of electrons responsible for emission is higher than the thermal velocity suggesting that high energy electrons in the tail of the Maxwell-Boltzmann distribution are responsible for the emission. The X3 emission at the LFS frequencies originates from a broader plasma layer suggesting that emission is not localized in the plasma. In contrast, the X3 emission at the HFS frequencies has a narrower emission layer behind cold resonance indicating that the emission at the HFS frequencies is more localized in plasma than emission at the LFS frequencies. The localization of the emission at the HFS frequencies is a result of the plasma boundary and can be understood as the geometrical aspect of localization.
For the O2-ECRH plasma with relatively higher T e ≈ 2.5 keV, the generated T e profile from forward predictions also agrees well with the Thomson scattering measurements within the inferred uncertainty at the plasma edge, however, the generated profile has slightly higher values at the plasma core. The radiation transport calculations done with the generated T e profile showed that the corresponding X3 emission has relatively higher optical depth τ ⩽ 3.5 approaching nearly black-body conditions. The X3 emission spectrum at the LFS frequencies turns out to be predominantly downshifted emission from the hot core and the broader emission layer suggests that emission is not localized in the plasma. Additionally, the velocity of electrons responsible for the emission at the LFS frequencies is higher than the thermal velocity, hence, the high energy electrons from tail of the Maxwell-Boltzmann distribution are responsible for the emission. In contrast, the X3 emission at the HFS frequencies has relatively narrower emission layer in the plasma and the emission is more localized because of the geometrical aspect of localization. The velocity of electrons responsible for the emission at the HFS frequencies is relatively closer to thermal velocity, hence, the low energy electrons from the Maxwell-Boltzmann distribution are responsible for the emission suggesting that emission is optically black. From Bayesian analysis results, it can be concluded that the emission at the HFS frequencies is more localized irrespective of optical thickness. Hence, as a next step, only the observations of the X3 emission at the HFS frequencies were predicted and the generated T e profile agreed well with the Thomson scattering measurements all over the plasma radius.
The paper shows that the X3 emission spectrum is suitable for providing the T e profiles for the higher density plasmas beyond X2 emission cutoff. Moreover, a measurement of the X3 emission spectrum at the HFS frequencies is preferable and sufficient to provide the T e profile information.

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