Inference of X-Ray Emission From a Plasma Focus Discharge: Comparison Between Characteristic Parameters and Neural Network Analyses

Pulsed plasma discharges, such as the plasma focus, are a source of pulsed X rays, therefore it is desirable to understand the relationship between this fast transient phenomena and the electrical variables of the discharge. Parameters from the electrical diagnostic signals are typically used to characterize the plasma focus discharge and for the correlations with X rays measurements via scatter plots. To further evaluate relevant information in the electrical signals, besides the characteristic parameters, an implementation of different types of machine learning algorithms, that included deep learning, was performed. A classification of pulses associated with an X rays measurement, in terms of the electrical signals data as input, was carried out. Two approaches were compared: the selection of the characteristic parameters and the use of the entire signals so the algorithms could find additional information for the classification task. The electrical diagnostic signals corresponded to: the voltage at the electrodes of the discharge chamber measured with a resistive voltage divider; time variation of the circuit current measured with a Rogowski coil and an inductive loop sensor; and the electromagnetic burst from the circuit measured with a Vivaldi antenna. The X rays measurement corresponded to the signal obtained from a scintillator-photomultiplier. In terms of the performance of the algorithms models in this classification problem, the results indicated that there is no significative improvements when using the entire signal or the selection of characteristic parameters. The best results were obtained when the following parameters were used: voltage at time of gas breakdown, voltage at time of pinch, current at time of pinch, time derivative of current at time of pinch, time from breakdown to pinch, and the Fast Fourier Transform of the part of the Vivaldi antenna signal related to the pinch event.

interest in this work, having this design an anode length larger than the anode diameter (aspect ratio > 1). The plasma focus device consists in a capacitor bank, a switch spark-gap and a discharge chamber [6]. The chamber is filled with a working gas, typically hydrogen or deuterium, at low pressures in the order of few or tens of mbar. The electrodes inside the chamber are placed in a coaxial configuration, i.e. a center electrode, the anode, and an outer electrode, the cathode, which is made of metal bars. The anode is partially covered with an insulator which is the region where the gas breakdown and formation of a current sheath occur.
The phenomena developed in the discharge process can be explained in six stages [4], [6], [20], [21]: I, the discharge of the capacitor bank produces the dielectric breakdown of the gas forming a current sheath (CS) over the insulator; II, the rundown process where the CS moves upwards along the anode due to the magnetic force; III, the compression phase at the end of the anode where the CS start to compress ionized gas; IV, the pinch phase where maximum compression of the ionized gas produces a highly dense plasma column; V, disruption of the pinch that produces an axial plasma shock [17] and, in addition, plasma jets are emitted from the top of the anode, VI [21]. In plasma focus devices, the pinch is typically regarded as the phase of most interest [4], [6]. In this particular stage (IV) are achieved the conditions that allow high energy radiation emission, such as X rays, or fusion reactions.
A diversity of methods to detect and measure the X rays emission has been reported [4], [6], [8], from radiographic films [12], [13], pinhole photography [22], semiconductor detectors [23] and scintillators in combination with photomultiplier tubes [6], [9], [24]. The detection (or emission measurement) of the X rays emission based on a scintillatorphotomultiplier system was the alternative used in this current work.
The common electrical diagnostic consists in measuring the time variation of circuit current with Rogowski coils (dI /dt) [25] and the discharge chamber voltage difference between its electrodes with fast voltage dividers. From the electrical diagnostic signals the discharge process can be interpreted and important parameters can be calculated. Features such as the voltage divider value at time of pinch, voltage induced at pinch, dI /dt value at time of pinch, circuit current, inductance and rate of change of inductance, have been previously used to characterize the discharge and to correlate them with other phenomena [4], [24], [26]- [28]. Although a trend can be identified, a significant data dispersion is found when correlating signal parameters, such as the voltage divider value or induced pinch voltage, with measurements of a photomultipler signal peak (X rays detection) [24] or the neutron yield [27]. In an effort to complement the information obtained with electrical signals, the use of antennas have been tested to remotely diagnose the device in terms of the electromagnetic (EM) burst emitted in the radiofrequency part of the spectrum. EM burst diagnostic has been used either inside or outside the chamber [29]- [32]. Recently, the EM burst measurement has been correlated with the inductive measurement [33] and with the X rays detection using a scintillator-photomultiplier (PMT) system [34]. From these two works, the Vivaldi antenna, originally designed to measure the fast EM emission of partial discharges [35], has shown promising results.
Even when working with fixed conditions for a particular device, such as the charging voltage of the capacitor bank and gas pressure inside the chamber, a variety of signals are obtained from the electrical and EM diagnostics. This diversity of signals poses the challenge of achieving good correlations results between the electrical signals and the photomultiplier X rays measurement. To complement the use of characteristic parameters that electrically describes the discharge for the correlations with other phenomena [24], [27], the use of machine learning algorithms, in particular the deep learning approach [36], has shown to be practical in the field of plasma diagnostics [37], [38]. Recently, it was used in plasma focus to infer the conditions for X rays emission based on only the signal from a Vivaldi antenna [34].
The application of the plasma focus as a pulsed X rays source motivates the present work [12], [13]. A hundreds of joules plasma focus was measured using the following electrical diagnostics: voltage between the electrodes of the discharge chamber measured with a voltage divider, dI /dt of the circuit current measured with a Rogowski coil and inductive loop sensor, and the electromagnetic burst measured with a Vivaldi antenna. Meanwhile, the X rays emission measurement was carried out with a scintillator-photomultiplier. Machine learning algorithms were implemented to establish a relationship between the X rays measurement and the electrical diagnostic signals. Usual machine learning algorithms were implemented [39], such as the k-neighbors, decision trees, random forest, gradient boost and algorithms based on the deep learning approach [36]: perceptron multilayer with dense layers and another with 2D convolutional layers. Two input approaches for the algorithms are presented. First, the signal parameters commonly used for plasma focus characterization were fed into the algorithms, i.e. a manual feature selection approach. The second approach consists in using the entire electrical signal (Rogowski, voltage divider, Vivaldi and inductive loop sensor) and thus let the algorithm to find the signal patterns that allow the relationship with the photomultiplier signal. With this approach any a priori bias about the selection of the characteristic parameters is minimized.

II. METHODOLOGY
In this work, the performance of a hundred of joules plasma focus PF-400J [14] was measured. The parameters of this plasma focus are the following: a capacitor bank with equivalent capacitance of 850 nF, an external inductance of 39 nH, an external resistance of 42 m and a quarter period time of approximately 291 ns. These parameters and others that are related to the electrical characteristics of the PF-400J are shown in Tables 4 and 5 in Annex A. The electrodes of this plasma focus consisted of a steel anode with 13 mm of 79274 VOLUME 8, 2020 effective length, from top of the insulator to the top of the anode, an insulator made of alumina with a length of 23 mm measured from the top of the cathode plate, and no cathode bars were used. The spark-gap connecting the capacitor bank and the anode was filled with nitrogen at a pressure of 0.5 bar. A trigger unit was connected to the spark-gap middle plate electrode to control and automatically switch on the discharge. The experiment conditions for the PF-400J were a charging voltage of the capacitor bank set to 26 kV (287 J of stored electrostatic energy) and the discharge chamber was filled with hydrogen at 9 mbar.
Typical electrical diagnostics of plasma focus discharges were used: a Rogowski coil wrapped around one return connection from the electrodes (inside the chamber) to one capacitor and a compact voltage divider between anode and ground (close to the discharge region). The electromagnetic burst from the discharge was measured with a Vivaldi antenna [33]- [35]. In addition, an inductive loop sensor (ILS) was also used to measure the dI /dt of the circuit current. The objective of this sensor was twofold: to trigger the oscilloscope that recorded the Vivaldi antenna signal, as it will be explained later, and to test its capability to predict the X rays emission. This sensor was first used for the measurement of the partial discharge phenomena [40] and was introduced as an alternative to the Rogowski coil, see the details of the sensor in [41].
The hard X rays spectrum in the PF-400J is characterized by emitting photons with energies ranging from a few keV to a few hundred keV, with an average absorbed dose per shot of 2.4mGy. Detailed information on radiation and applications can be found in the references [13], [20], [42]. The X rays emission measurement was carried out using an assembly of scintillator plastic and photomultiplier tube (SCPMT). The scintillator is a BC-408 (Bicron) plastic scintillator(SC) in direct contact with a Hamamatsu photomultiplier (PMT) model R1828-01. The whole system was housed in a 5mm thick aluminum casing, which limits the system response to X ray photons of energies higher than 20 keV. The photomultiplier detectors measure a photocurrent proportional (linear region) to the light intensity from a plastic scintillator that reacts to X rays photons. Thus, for the ultra-short X rays pulses emitted by the generator, the time dependence of the phototube output signal appears as a single pulse containing the piled up signals of the light photons from the scintillator, not able to distinguish individual pulses. A 1.4 kV voltage bias was set to satisfy that PMT pulse signals were below the threshold of 500 mA for at most 5% maximum deviation from linearity.
The layout of the experimental setup is shown in Fig. 1a and an image of the setup is shown in Fig. 1b. The Vivaldi antenna was placed at 0.25 m from the resistors that allow control over the spark-gap switch. The ILS was placed at 2 mm from one return connection from the chamber to one capacitor. Two SC-PMT were placed side by side at 0.54 m from the anode and with their center aligned with the axis of the anode. A 4 mm Pb sheet was put on front of one SC-PMT. This setup was initially conceived to test if the X rays measurements could be qualitatively classified in terms of energy. Assuming that both SC-PMT received the same number of X rays photons from the discharge process, the blocked SC-PMT produced a lower pulse signal with respect to the unblocked SC-PMT. Thus, besides to the number of photons measured by the unblocked SC-PMT, it was believed that the blocked SC-PMT could provide a sub-classification in terms of the number of high energy photons that passed the Pb 4 mm barrier, which in this case corresponds to a cut-off energy 250 keV. In section III the results of these classification are discussed in more detail.
The signals were recorded with two separated devices. One, a Tektronix TDS 648A oscilloscope (bandwidth of 1 GHz and sampling rate of 5 GSamples/s) was used to record the Rogowski coil, voltage divider and both SC-PMT signals. The other, a NI-PXIe 5185 oscilloscope (bandwidth of 3 GHz, sampling rate of 6.25 GSamples/s and 8 bits of vertical resolution) was used to record the Vivaldi antenna and the inductive loop sensor (ILS) signals. Attenuators were used for each signal to keep the voltage at the allowed peak and root mean square (rms) values of the respective channels in each oscilloscope. Two measurement campaigns at the experiment conditions mentioned above were taken, summing up for a total of 959 discharges adequately recorded for the analysis.
The analysis of the measurement signals, as it is explained in the following sections, was done according to the workflow shown in Fig. 2. The main difference between the two approaches presented in this work is the feature extraction process: in the first approach the selection of signal parameters, typically used to characterize the plasma focus discharges, is done by selecting certain features of the signal; in the second approach, the entire signal is the input for the algorithm, without a previous selection of features.

III. RESULTS
First, the X rays signal processing is presented. The normalized signal standard deviation (R) was chosen as the parameter representative of each X rays detection signal. Histograms of the R from both SC-PMT signals are shown. Then, the approach based on the selection of characteristic parameters of the discharge, using machine learning algorithms to classify them in terms of the R values, is presented. The other approach that uses the entire signal of the sensors, i.e. without a previous selection of parameters, is shown at the end of this section.
The parameters or signals that are processed by the machine learning algorithms need to be in a same value scale. The value range of ±1 is typically used [37], [38]. This is called the normalization process and it is detailed in Annex A. The machine learning algorithms structures and other details of them are shown in Annex B.

A. X RAYS SIGNALS
The signal from both SC-PMT were analysed in terms of the normalized standard deviation value R with the same VOLUME 8, 2020  procedure as in [34], i.e. signal standard deviation S given by equation 1 and using the value S Base to normalize it, equation 2. In equation 1, f i is the sampled signal, f the average value and N the total number of samples. The signal representation using the standard deviation was preferred because it takes into account the deviation from the average value, which in these pulse signals is approximately the no-pulse level. The S Base values were 0.0196 for the unblocked SC-PMT and 0.0019 for the blocked SC-PMT, and they corresponded to the minimum S found in each signals data set, so normalized values were in the range R ≥ 1. The numerical scales of the two SC-PMTs signals were different because the unblocked SC-PMT yielded a lower intensity signal, so it was expected that the lower S minimum value from the blocked SC-PMT produced higher normalization values than the unblocked ones. Fig. 3 shows the histograms of the R values. For the PF-400J, the emission of low intensity values (low R values) was clearly more frequent than the higher emissions that can be obtained. This can be seen in Fig. 3a and, more notoriously, in Fig. 3b for the blocked SC-PMT.
To record the largest PMT pulses that can be measured from the discharge, the oscilloscope channels associated with the PMT signals were maintained at a fixed volt/div setting, so the resolution of very low pulses was insufficient and a very large number of very low emission pulses, compared to the maximum ones, was obtained. This can explain the prominent peaks from the histograms. The methodology to record the pulses can be improved in the future with additional channels with different vertical scale settings to increase the resolution when measuring the low emission pulses.
The R values associated to the X rays measurement were distributed in greater numbers towards low emission values, which is analogous to behaviour of the neutron yield reported by Bures et al. [27]. This distribution of values imposed a challenge for the machine learning algorithms that were implemented because it meant that the data for the training process were inherently biased. The classification of the R values obtained better results and was more flexible to sort out the biased R values behaviour than a regression, i.e. to find a non linear function whose output is a predicted real value [39], although this latter alternative has more physical sense in this context [38]. Given the discussion above, the classification problem of the R values was considered in this work continuing the framework established in [34].   [24], has been typically chosen for correlations with X rays because it has the interpretation of being responsible for the acceleration of electrons from the plasma column into the anode or, at least, have some relationship with other complex phenomena that are responsible of this such as the plasma instabilities [6].
High data dispersion has been found in this type of correlations in other investigations such as Bures et al. [27] and Bargaglia et al. [24]. From Fig. 4, note that the highest pulse signals of the PMT were achieved at values between 10-14 kV rather than the highest voltage divider values in the range of VOLUME 8, 2020  16-20 kV. It can be also mentioned that low R values were obtained in almost the entire value range of these voltages.
In Fig. 4 it is observed high dispersion with no clear trend. Only when considering mean values of grouped data (red points representing mean values) using bins of 2 kV, a trend was observed with the expected high dispersion. A relationship between voltage at pinch and the PMT signal is somewhat hidden in the data dispersion. It was believed prior to the conception of this experiment that, alongside the voltage at time of pinch, other parameters could help in establishing a relationship with the X rays measurement as well, thus the need of machine learning algorithms to find different combinations of parameters for determining a relationship.
The classification problem was addressed establishing four R values categories: A, B, C and D, in increasing order of value, see Table 1. By inspection, it was found that for the unblocked SC-PMT a limit of R = 1.2 could be used to separate very low emission discharges, compared to the highest ones, with almost negligible or no PMT pulse in their signals. The rest of the data was separated in equal groups. By doing this almost equally sized classification groups were achieved for the better of the training process of the machine learning algorithms.
The R values from the blocked SC-PMT were not used for the machine learning algorithms in the subsequent results in this work. The incorporation of categories based on this blocked SC-PMT measurement produced unbalanced classification groups in terms of the other unblocked SC-PMT and thus, were not suitable for the machine learning analysis carried out. In any case, Fig. 5 is also presented to show the relationship that can be observed between the R values from both SC-PMTs. Note that class A and B do not have notorious pulse emission that passed through the 4 mm Pb sheet, although class B discharges had a visible unblocked SC-PMT signal. Classes C and D obtained increasing R values from both SC-PMTs signals.

B. CHARACTERISTIC PLASMA FOCUS PARAMETER SELECTION
Values that can be obtained or calculated from the Rogowski coil and voltage divider signals had been used to establish correlations with diagnostics related to high energy and frequency phenomena. This is the case when a correlation with the photomultiplier signals were attempted. As mentioned before, the voltage divider value, or the associated induced pinch voltage, was previously used in these kind of correlations for either X rays measurements with PMT or neutron yields [4], [24], [43]. It has been determined that the fast z-pinch developed in plasma focus devices depends on other variables as well [6]. To complement the information given by the voltage divider at time of pinch, other signal parameters with physical interpretation were included in this analysis. Fig. 6 shows all the signals recorded from one discharge. Signals parameters of interest are highlighted. Assuming that the pinch detection is simultaneous in both inductive sensors, Rogowski and ILS, the signals from both oscilloscope were adjusted to the same time frame.
The dielectric breakdown of the working gas has been identified to be crucial for the proper formation of the current sheath (CS) responsible for the pinch effect [4], [6] and is still a topic of both experimental and theoretical research [44]. Examples of the electrical measurement of the gas breakdown and the initial phases in plasma focus are found in [45], [46]. In this work, the gas breakdown stage was represented by the voltage divider value at time of the gas breakdown V b . The time of gas breakdown and the value of the voltage divider was determined by considering the time when the abrupt fall in the voltage divider signal was observed and the corresponding rise of the Rogowski coil di/dt > 0 occurred.
Time to pinch had been previously indicated as an important parameter considered for the design of plasma focus devices because proper time is needed for the CS to reach the focus position, at the same time as the the discharge current reaches the maximum value. This is fundamental to ensure that the maximum magnetic energy is stored before its conversion to kinetic energy in the compression and pinch phases [4], [6]. The parameter t bp was used as a measurement taken from the gas breakdown time recorded in the voltage divider until the pinch time observed in the Rogowski coil. Discrepancies of about a few ns can be expected due to the uncertainty in the measurement of the cable length from both sensors. Circuit current parameters have been used for correlations with scintillator-photomultiplier measurements [24] and for describing the scaling laws for the neutron yield of plasma focus [11], [27], [43]. Both current I p and rate of change of currentİ p at time of pinch were included in this analysis.
Vivaldi transients information were also included. Antenna signals parameters correlations are typically used in the form of time or frequency domain parameters. In this work, the signal energy parameter was calculated for both main transients that can be associated with the gas breakdown E b and the pinch effect E p [33]. Moreover, the frequency information was included, in a separate analysis instead of the signal energy parameters, in the form of the Fast Fourier Transform (FFT) calculation from the pinch transient as it was used in [33].
The task of the machine learning algorithms was to search combinations of the parameters mentioned above in terms of discharges examples (training set), to make a prediction (or inference) of the R value class afterwards. Equations 3 and 4 show the two alternatives implemented for the selection of characteristic parameters of the discharge. F corresponds to the non lineal function that allows the mapping into the R value categories. Note that this function F is the model learnt automatically by the machine learning algorithms.
In all the machine learning algorithms implemented, from the total of 959 discharges, 80% of them were used in training the algorithms and the rest 20% in testing their prediction capabilities (validation set). Forty realizations of the training process were carried out. Both the training and validation sets were randomly selected in each realization. Misclassifications due to overfitting might be present, although the overfitting should be minimum since the optional settings of the machine learning codes were chosen accordingly, see the details in the Annex B.
To interpret the categorical classification as a binary problem is of interest since is important to check if, despite a misclassification, the parameters and signal information can distinguish conditions for X rays emission (not class A) from the conditions that do not produce emission (class A). The classification results were evaluated in terms of the following metrics: full identification FI, the class identification accuracy; partial identification PI, ability to discriminate between good and bad conditions for X rays emission; false positive FP, incorrect prediction of good conditions; and false negative FN, incorrect prediction of bad conditions.
To complement the information of the performance metrics, the probability of achieving the full identification by mere chance was included, denoted by G. This probability was calculated with a binomial distribution that takes into account the number of correct full identification predictions k, the total of the validation set (n = 192 discharges) and a probability of 0.25 chance to guess one of the four classes [34], see equation 5.
The binary classification, was evaluated by the following metrics [34], [39], [47]: accuracy, fraction of correct binary classification predictions over the total test cases; precision, the fraction of true positives (correct emission prediction) over the total of announced emission cases; recall, fraction of true positives over all the emission cases; specificity, true negative (correct prediction of no emission) over all the non emission cases, and F 1 score the harmonic average between precision and recall.
For the characteristic parameter selection the most interesting results, see Table 2, were obtained when the Vivaldi information was represented with the FFT of the transient associated with the pinch, see equation 4. The results for the input as specified with the another parameter selection, equation 3, are presented in the Annex V. Of all the metrics employed the G, accuracy and F 1 score are highlighted in cyan color. Also, the overall better results of the perceptron multilayer are highlighted in red. First, note that the G values were below 1% so the chances of the algorithms randomly guessing the classification are low. The accuracy and F 1 metrics of the perceptron multilayer were higher, with respect to the rest of algorithms. VOLUME 8, 2020

C. ENTIRE SIGNAL ANALYSIS APPROACH
For this approach, the algorithms were the same except for the change of the deep learning structure, from a perceptron multilayer with dense layers to a perceptron multilayer with 2D convolutional layers, i.e. a 2D convolutional neural network (CNN), see Annex B for details. The task to identify important values from the signals relied only on the algorithms. The idea was to minimize a priori bias towards particular parts of the signals such as the case of the characteristic parameter selection.
All four signals were used at this stage of the analysis. As example, the results of Vivaldi signal using this approach are shown in Table 3. In Annex V are shown the rest of the results: voltage divider in Table 8, Rogowski coil in Table 9 and ILS in Table 10. Note that in this approach the gradient boost and 2D CNN algorithms achieved the best accuracy and F 1 score results with also a random guessing probability G below 1%. The voltage divider, ILS and Vivaldi achieved overall the best accuracy and F 1 metrics using this approach, i.e. identification of emission cases. In contrast, the Rogowski coil achieved slightly below accuracy and F 1 score, but with higher specificity metric, i.e. identification of no emission cases.

IV. DISCUSSION
Usually the scatter plots are interpreted in terms of grouped data [27], [28]. In the scatter plot shown in Fig. 4 (section III-A), that represents the X rays measurement in terms of the voltage divider value at time of pinch, a voltage range (bins of 2 kV) described a certain range of R values. There is an implicit classification in terms of the voltage, so the approach of addressing the correlations as a classification instead of a regression analysis is consistent with the statistical treatment found in the before mentioned plasma focus studies. Choosing a higher number of classes would be ideal and closer to describe the data in a more continuously manner. For machine learning algorithms a significative number of discharge examples are needed to train them, ideally with equal or similar number of examples of each class. This was shown to be an issue for the R values obtained from the plasma focus since their distribution was notoriously biased towards low emissions (see Fig. 3) in comparison to the maximum values that can be detected, i.e. optimum conditions for a high number of X rays photons to be produced. As it is recommended for machine learning algorithms with unbalanced data, a larger measurement campaign can overcome the issue of low representation of the greatest SC-PMT signals obtained, but it would be an inefficient method because low PMT signals would be still being recorded. Also, it is not known how the X rays yield efficiency behaves as the number of discharges of the device increases, for instance, the deterioration of a plasma focus can be estimated in terms of the Rogowski coil and voltage divider capability to detect the pinch [48], i.e. signal features that are used to infer the pinch change when the number of discharges increases. A number of discharges in the order of a thousand seems reasonably as other statistical studies, like Bures et al. [27], have reported a similar number of discharges for a device with energy in a similar order of magnitude as the PF-400J.
The selection of characteristic parameters from the diagnostic electrical signals allowed the algorithms to learn patterns and with the resulting model, a non linear function, make predictions of the R value class. The results between algorithms could be regarded as similar, so a consistent pattern was identified by them. R value classes were properly identified in some cases with low random guessing probability (G value). In the cases whose class could not be identified at least it was determined whether the emission was achieved or not. False positives and false negatives cases were also obtained.
By analysing Fig. 4 it can be observed that false negatives can be expected from the description based on the voltage divider value at pinch time (one of the characteristic parameters), since it showed a diversity of PMT pulses in a wide range of voltages. It is believed that this dispersion confuses the algorithms and thus the model learnt by them. A high false positive are not expected by looking to the description of Fig. 4 alone, so the information of the other parameters helped in the identification of the pattern, but at a cost of producing false positive predictions. The best metrics results of both parameter selection and entire signal analysis (discussed below), see the highlighted G probability, accuracy and F 1 score in Table 2, were achieved using the following parameters: voltage divider at time of pinch, voltage divider at time of breakdown, current at time of pinch, time derivative of current at time of pinch, time from breakdown to pinch and the FFT of the Vivaldi antenna transient associated with the pinch.
In the approach that uses the entire electrical signals as input for the algorithms, a random guessing probability G higher than 1% was obtained for the algorithms k-neighbors and decision trees, indicating that those algorithms are not suitable for this approach. Considering the rest of the algorithms, the 2D CNN had the best accuracy and F 1 metric results excepting the case when using the Rogowski coil signal. For the next discussion only the 2D CNN results are considered even in the Rogowski coil case whose results were similar to both the random forest and gradient boost algorithms. See the highlighted columns (red color) in Tables 8, 9, 10 and 3.
The prediction of the emission yielded similar accuracy and F 1 metrics for the 2D CNN using the information from the voltage divider, ILS and Vivaldi antenna signals. On the other hand, the 2D CNN using the Rogowski coil as input performed better at the prediction of no emission (specificity). The results of each signal were similar to the selection of parameters in equation 3 (see the results in Table 7), although they were below the other selection of parameters in equation 4, see Table 2.
The 2D CNN with the voltage divider signal as input, was expected to have high performance metrics because this signal is a measure of the voltage rise associated with the accelerated electrons during the pinch phase, that produce X rays upon striking the anode [6]. The 2D CNN using the other signals as input had similar metrics as the 2D CNN using the voltage divider signal, so it can be said that indirect information are carried by the other electric diagnostic signals as well. Typical correlations of electrical signal parameters with higher energy phenomena, X rays [24] or neutrons [27], had been carried out as scatter plot descriptions. In particular, values related to the pinch such as voltage divider at time of pinch or the current value at time of pinch had been employed for that description. Despite the Vivaldi antenna signal not having a feature like the dip or voltage spike, the 2D CNN could find a pattern for the inference of the X rays emission that achieved similar performance metrics than the typical diagnostics. The comparison of the antenna results and the typical diagnostics suggest that not only the mentioned signal features, the dip for instance, can be used to infer the X rays emission. As described in [31], [34], [49], the high frequency oscillations, frequently labeled as electromagnetic noise, carry information of the discharge process. Note that the ILS being not shielded can record a mix of inductive measurement and radiated components from the circuit [33], and also an inference could be carried out. It is highlighted that both ILS and Vivaldi have no direct connection to the device in comparison to the voltage divider and Rogowski coils, so the fact that a remote/non invasive diagnostic can be applied to diagnose a plasma focus represents an opportunity in small devices where the size restriction imposes a challenge to build sensors fast enough to measure the transients.
The accuracy, F 1 and specificity metrics obtained in both approaches reflect the difficulty of predicting the emission based solely in the electrical signals utilized. Although the gradient boost and deep learning algorithms made an inference of the emission with better metrics with respect the other algorithms, the model they learnt incurred in a significant number of false negatives and positives. A mediocre no emission identification rate was obtained, i.e. specificity at best of around 40-60 %. So, there is some information about the process that the diagnostic signals employed could not detect.

V. CONCLUSION
Machine learning algorithms were implemented to infer the emission measurement of X rays from a plasma focus using the information in the electric diagnostic signals: voltage between electrodes measured with a voltage divider, circuit dI /dt measured independently with a Rogowski coil and an inductive loop sensor, and the electromagnetic burst measured with a Vivaldi antenna. The standard deviation of the signal from the X rays detector, a scintillator-photomultiplier, was used to classify different discharges determining whether they have good conditions for the emission of X rays or not. VOLUME 8, 2020 Two approaches for the input of the machine learning algorithms were tested. In the first one a selection of signal features from the electrical diagnostics that have a physical interpretation was carried out. The second one was letting the algorithms find a pattern from the entire signals without a previous selection. No significant differences were obtained in the inference of the X rays emission, when comparing selected parameters with machine learning analyses.
This result becomes very relevant: it shows that the historically selected features from the electrical signals in plasma focus discharges, are describing most of the physical phenomena related to the X rays emission. Had the machine learning analyses of the electrical signals given a better result in the performance metrics, it would indicate that some physical phenomena was hidden inside the complex data.
The best performance metrics of the X rays inference were obtained using the deep learning algorithm and using the following parameters: the voltage divider value at time of gas breakdown and at time of pinch, Rogowski value dI /dt and current at time of pinch, time from breakdown to pinch and the fast Fourier transform of the transient detected with a Vivaldi antenna associated to the pinch. This indicates that the information from correlation descriptions carried out with single parameters, such as voltage divider value at time of pinch, can be complemented with a set of parameters from other diagnostic signals. The inductive loop sensor and Vivaldi antenna as alternative sensors to the typical voltage divider and Rogowski coil, showed that a remote diagnostic can be used to infer the X rays emission with performance metrics as good as the ones obtained with the typical electrical diagnostics. The emitted electromagnetic burst, both near and far field radiated components, emitted by the circuit due to the plasma dynamic inside the discharge chamber, thus carries information that can be complementary to the inference of the X rays emission.
Future research on this subject considers exploring the use of autoencoders in order to find relevant physical information [50] that has been missed by the machine learning algorithms, enabling a better understanding of the physical processes involved in X rays emission from pulsed plasma discharges.

APPENDIXES APPENDIX A SIGNAL NORMALIZATION
The normalization process was carried out to keep different physical quantities in the same range of values. Parameters for the first approach, subsection III-B, were mapped to the range ≈ 1. For the second approach, subsection III-C, the range was ≈ ±1 because the signals consisted of both positive and negative values.
The values from the short circuit characterization of the PF-400J were used for calculating base parameters for the normalization. Other normalization methods can be found in the literature, for example a more statistical approach in [37].
The short circuit measurement was carried out by bridging the anode, at the length of the insulator, with the cathode plate (ground). The values from this measurement are shown in  Table 4. Five consecutive discharges were made at the charging voltage of 26 kV (same as the experiment condition). This measurement was carried out recording the Rogowski coil, voltage divider and inductive loop sensor (ILS) signals with the TDS 648A oscilloscope. It was decided to use a different normalization for the Rogowski and ILS signals, although the differences from this short circuit characterization were negligible. Note that only Rogowski coil parameters were used in the first approach in subsection III-B. The values from the Table 4 are just the short circuit parameters using the Rogowski coil information.
The base for the normalization was chosen in terms of the charging voltage of 26 kV and values that can be calculated from expressions to model the short circuited plasma focus device as a simple RLC series circuit. The base values are indicated in Table 5. Note that only the normalization of quantities related to the Vivaldi antenna signal did not have a base associated to the short circuit characterization. It was difficult to find a general normalization for the antenna signal because its values can change depending on the distance and relative position since the Vivaldi is a directional antenna. For each parameter that was calculated for the Vivaldi antenna, a normalization to keep its values in the range ≈ ±1 was carried out separately. For the description of the single machine PF-400J this method was enough, but for future cross validation tests with other devices a careful revision of this procedure has to be done.
The normalization was as follows, see Table 5: voltage related parameters (V p and V b ) and voltage divider signal by V base ; Rogowski coil parameters and signal byİ base ; circuit current parameter by I base ; time to breakdown t bp by t T /4 ; energy of the transient related to the gas breakdown in the Vivaldi signal by E baseB ; energy of the transient related to the pinch in the Vivaldi signal by E baseP ; the entire Vivaldi signal by Antenna base ; and the entire ILS signal byİ ILS base . The FFT associated with the transient due to pinch that is observed in the Vivaldi antenna was calculated from the normalized Vivaldi signal and had to be re-escalated by the highest FFT calculation found. This re-escalation had to be carried out because otherwise the FFT values were about two orders of magnitude smaller than the other electric parameters and thus less comparable to these quantities.

APPENDIX B MACHINE LEARNING ALGORITHMS
Five machine learning algorithms were used to analyse the data: k-neighbors, decision trees, random forest, gradient boost and deep learning. The latter was implemented as a perceptron multilayer in the first manual feature selection approach III-B, and as a 2D convolutional neural network for    the second approach III-C. To be interpreted as a 2D matrix, the recorded 1D signals were reshaped into a square matrix. A 1D CNN was tested, since 1D signals are the raw data from the sensors, but its results were not as satisfactory as the ones obtained with the 2D CNN. It is worth mentioning that the concatenation of signals was also tested to evaluate if the simultaneous information of the signals improved results, but it did not achieved better results compared to both methods presented in this work, so that approach ended up confusing the algorithms. In particular for the deep learning algorithm, by modifying the current structure of the 2D CNN or by allowing an input of three layers (similar to a RGB image), better performance results could be achieved using the concatenation of signals. However, the implementation of other deep learning structures was outside the aim of this work. All algorithms, except the deep learning ones, were implemented in Python using the scikit-learn package [51]. Optional settings of these algorithms are shown in Table 6.  The deep learning algorithms were implemented in Python using the Keras [52] framework with the Tensorflow backend [53]. The structure of the perceptron multilayer is shown in Fig. 7a and the 2D convolutional neural network in 7b. The convolutional neural network had the same structure as reported by Avaria et al. [34] due to the good results that it achieved. For that reason details concerning the structure development can be found in that work.
The length of the signals fed to the algorithms was 5625 samples, i.e. 900 ns of signal using the PXI oscilloscope (6.25 GSamples/s). To match the number of samples per signal recorded with the TDS 648A oscilloscope (5 GSamples/s), besides the normalization, for the voltage divider and Rogowski coil signals a zero padding was applied.
Thus, for the second approach, the input for the algorithms (deep learning not included) were 1 × 5625 vectors, whereas for the 2D CNN (deep learning) were 75×75 square matrices, i.e. the vector was reshaped.
The computational cost per realization was determined by the time needed to complete the training process. The second approach obtained larger training times in each algorithm run than the first approach because the former one had to analyse the entire signal instead of a smaller set of parameters. For instance, the training times for the deep learning implementations, which had better performance metrics in the second approach than the other algorithms, were about 5.9 and 2.4 times larger than the training times using the first approach according to equation 3 and 4, respectively. In terms of the absolute training time this values was, on average and considering each signal as input, approximately 58 seconds for each realization.

APPENDIX C RESULTS DETAILS
The rest of the machine learning results are shown as follows: Table 7 according to the parameters of equation 3, voltage divider signal in Table 8, Rogowski coil signal in Table 9 and ILS signal in Table 10.