The k0-INRIM software version 2.0: presentation and an analysis vademecum

The k0-INRIM software was developed at INRIM to perform k0-standardization Neutron Activation Analysis and evaluate combined uncertainty through application of the spreadsheet method. However, the presence of some limitation made its use, as a tool for routine NAA, impractical. With the aim to participate to the 2021 IAEA k0-NAA software intercomparison to evaluate the effect on mass fraction results due to software used, the k0-INRIM was sizably updated in order to meet the agreed functionality requirements to take part to the exercise. In this work, the version 2.0 of the software is presented and a point-by-point example analysis is displayed. The software version here described is available for download together with the corresponding updated user’s manual.


Introduction
Since its first establishment, the k 0 -standardization Neutron Activation Analysis (k 0 -NAA) technique [1,2] experienced a surge in popularity aided by the spread of computer programs developed to manage its computational cumbersomeness. Acknowledging that, the International Atomic Energy Agency (IAEA) proposed an intercomparison among commercial and homemade k 0 -software to evaluate the effect on resulting mass fractions due to the different implementations [3]. Participants of the intercomparison exercise agreed to set minimum functionality requirements to define a k 0 -NAA software which involved, among others, the use of the official k 0 database [4], the automatic evaluation of efficiency curves at various counting positions and flux parameters (at least as defined by the Hogdahl convention).
The k0-INRIM software was developed at the Istituto Nazionale di Ricerca Metrologica (INRIM) with the aim to guide k 0 -NAA users to easily produce uncertainty budgets [5] compliant to the Guide to the expression of Uncertainty in Measurement (GUM) [6] and obtained by propagation of variances and covariances of measurement model parameters through sensitivity coefficients. However, the first version of the software lacked some functionality that might have been important to users willing to adopt this software for routine analysis in their laboratories. In order to improve the applicability on routine analysis and meet the requirements to participate to the intercomparison exercise, multiple updates were performed. The most impactful involved a renovation of the efficiency curve fitting process allowing the possibility to manage multiple counting positions, the automatic evaluation of some correction parameter and a revamp of the graphical user interface.
In this work the 2.0 version of the k0-INRIM software is presented by briefly commenting the adopted measurement model and showing a point-by-point example analysis workflow. Additionally, auxiliary files present in the supporting information (the hands-on analysis guide excel file including instructions and input values, and a folder with elaborated spectra files) allows the user to perform an exemplary analysis following the workflow reported in the vademecum.

Measurement model
The k0-INRIM 2.0 measurement model returns mass fraction values (and uncertainties) of analytes, w a , by application of the following equation: where subscripts sm, std, a and m refer to the sample, standard, analyte and monitor, respectively, and • m is the weighted mass of materials adopted as sample and standard; • 1 − is the moisture correction with the material moisture mass fractions; is the decay constant; • COI is the true-coincidence correction factor; • t c ∕t l is the dead time correction factor with t c and t l the real and live counting times, respectively; • e (1−tl∕tc) is the excess counting loss correction factor with the excess counting loss constant; • 1 − e − t i is the saturation correction factor with t i the irradiation time; • 1 − e − t c is the decay during counting correction factor; • e ( a − m )tdm+ a Δt d is the monitor to analyte decay correction ratio with t d m and Δt d the decay time of standard and decay time difference between sample and standard, respectively; • 1 + Δl a is the neutron flux gradient correction with and Δl a the linear flux variation per unit distance and the distance between centers of mass of sample and standard, respectively; • k 0 Au is the k 0 factor; • G th is the thermal self-shielding correction factor; • G e is the epithermal self-shielding correction factor; • f is the thermal to epithermal flux ratio; • Q 0 is the resonance integral to thermal cross section ratio; • E r is the effective resonance energy; • is the epithermal neutron shape factor; • k = k ΔE k Δd k pos k geo k sa is the monitor to analyte efficiency ratio with k ΔE the efficiency ratio at reference counting position, k Δd the reference to nominal counting position correction, k pos the standard to sample positioning correction ratio, k geo the standard to sample geometry correction ratio and k sa the standard to sample γ-self-absorption correction ratio [7,8]; (1) • w m is the mass fraction of the monitor target element; • m blank w a blank is the blank correction with m blank and w a blank the mass of container and the mass fraction of the analyte in the container, respectively.
Details about the input parameters of the measurement model can be found elsewhere [5,7]. The combined uncertainty of w a is calculated through the propagation of variances in case of correlated input quantities: where, x represents any of the measurement model parameters reported in (Eq. 1), w a x i and w a x j are the sensitivity coefficients related to x i and x j , respectively, and u x i , x j is the covariance between x i and x j . Sensitivity coefficients are numerically evaluated by calculating the change in the output, w a , due to a variation of x in the order of magnitude of its own standard uncertainty, u(x) [6].
The main improvements with respect to the previous version concern the updated modelization of efficiency evaluation with the introduction of the possibility to manage different counting positions for analyte and monitor samples, the capability to handle extended samples with cylindrical geometry and the introduction of γ-ray self-absorption correction; on top of that, also other corrections are implemented such as those accounting for neutron flux gradient and sample moisture.
With the present version, the software manages any characterization (detectors, irradiation facilities) starting from the experimental data and evaluates most corrections with little to no user interaction; the only exceptions consist in the (thermal and epithermal) self-shielding corrections and threshold interference reactions correction for which no specific functions are implemented in the code and users need to manually evaluate them.

Analysis vademecum
The following paragraphs are intended to be a guided walkthrough with the aim of exploring the typical analysis workflow of the software; the reader is invited to use the training resources found in the supporting information to download the k0-INRIM, install it and perform an interactive experiment with real input data. In addition, the user manual can be consulted as a source of detailed information. An example of all the relevant actions to be taken while performing an analysis with k0-INRIM is reported to guide potential user through the updated workflow accessible from the main window which is composed by nine regions named utility, characterization, analysis name, irradiation, background, standard, sample, limits and results (Fig. 1). Here and hereafter, names in italic recall locations of the software interface (labels identifying specific regions in the main window or titles of sub-windows).

Settings
The first action to be performed involves managing the general settings of the software. The editable options are found accessing the settings sub-window in the utility region within the main window; from here the behavior of the program is accordingly modified. In particular, the option labeled as "ΔE/keV" tightens or enlarges the tolerance of the peak identification algorithm allowing a more stringent or loose peak recognition and should be selected according to the FWHM and energy stability of the detector in use. Reference to the k 0 -database in use can be changed from here allowing to always rely on the most up to date literature data; the software reads the official k 0 -databases released by the k 0 -International Scientific Committee (k0-ISC) in.xls format [4] thus, when a new database is available, it is only required to download it from k0-ISC webpage and save it in the k0data subfolder (within the data folder) to make it selectable from the settings. Other options worth mentioning are the ones that allow filtering peaks based on the statistical uncertainty of their net area independently for (i) detector and irradiation facility characterization, (ii) monitor and (iii) analyte sample measurements; a similar filter based on uncertainty can be applied to the fitting parameters of the reference efficiency curve from the corresponding option; finally, it is possible to set default uncertainties for certain input parameters like counting and decay times.

Detector characterization
The detector characterization is a pivotal part of the k 0 -standardization NAA. The k0-INRIM software performs the characterization by means of a fully experimental procedure requiring a set of calibrated γ-sources whose activities are traceable to SI and knowledge of the adopted counting positions at sub-mm level to get best results.
The set of γ-sources might be composed by certified and home-made radionuclides, and should contain as much truecoincidence free γ-emitters as possible. Before starting the experimental detector characterization, a "virtual source certificate" needs to be created by accessing the database manager sub-window (and access the gamma source database section via the corresponding button) within the utility region. The virtual source certificate is a file including information for any of the γ-emitters adopted in the detector characterization, even if they come from physically different sources; the stored information are: γ-energy of the emission, activity, half-life, γ-yield and whether the emission has to be considered coincidence-free by the software.
The experimental part of the detector characterization involves the acquisition of all γ-sources at the farthest counting position from the detector end-cap (named reference position) and acquisition in every other counting position of γ-emissions that are marked as coincidence-free in the virtual source certificate. Additionally, acquisition of a background spectrum is required for a complete detector characterization.
The basic experimental setup required to perform the characterization consists in the identification of four counting positions and adoption of a source set with seven γ-emissions (of which at least six are coincidence-free); increasing the number of counting positions, the energyspan and datapoints for γ-emissions and decreasing statistical uncertainty on net area peaks will result in increasingly better fits.
All data from the experimental procedure are introduced in the new detector characterization sub-window, found in the characterization region, for evaluation (Fig. 2). For each adopted counting position, the distance from detector end-cap has to be introduced and acquired spectra have to be recalled; a selection of the γ-emissions to consider is performed when selecting the virtual source certificate and a background spectrum is needed while calculating peak-to-total curves in the corresponding PT evaluation sub-window for COI correction purposes.
When all relevant information is provided, the software evaluates fits for the efficiency curve at reference position, any other counting position to reference efficiency ratios, point-of-action distance [7,9] within the detector fits and peak-to-total curves; multiple fits are evaluated (except for the efficiency curve at reference) depending on the corresponding counting position. All the parameters and Fig. 2 The window for detector characterization covariance matrices of fits are saved in a detector characterization file to be later recalled during analysis.

Preparation of samples
Monitor and analyte samples should be prepared in a cylindrical shape; to this aim, either a tablet powder, a foil, a coiled wire or a pipetted solution into a filter paper can be adopted. The sample height value is the only parameter that needs to be measured since the radius is not relevant for following calculations. Moisture content for samples, if any, has to be evaluated.
If the elemental composition of materials adopted to produce samples is known, material files should be created from the database manager sub-window (and by accessing the material database button) within the utility region. With this information the software can retrieve the mass fraction value for the monitor element in the monitor sample (mandatory to perform the elaboration) and is able to evaluate the corrections accounting for self-absorption of the γ-emissions. Moreover, this represent a useful bit of information in case a Certified Reference Material (CRM) is used as an analyte sample for validation purposes.

Neutron activation
The activation process should be performed with the samples co-irradiated in a facility characterized in terms of neutron flux. The optimal samples' scheme during irradiation prescribes that each analyte sample should be sandwiched between two monitor samples and the corresponding pile has to be as compact as possible to minimize the effect of a possible vertical gradient of the neutron flux (Fig. 3).
The couple of k 0 -monitor samples is adopted to evaluate the correction due to neutron flux gradient based on a linear equation under the assumption that f and α remain constant in the portion of the neutron facility used for irradiation. Alternatively, k 0 -monitor samples can be replaced with triple flux monitors in order to evaluate also f and α flux parameters online.
Regardless which way the neutron flux parameters are evaluated (online or offline), the calculations are performed in the flux evaluation sub-window while neutron gradient is calculated in the flux gradient evaluation sub-window. Both these modules are accessible from the characterization region.
The flux parameters determination is performed by means of triple bare monitor method [10] with Au and Zr as default monitor elements. Information concerning irradiation time and date, irradiation channel and position, monitors' mass and self-shielding corrections have to be introduced in the corresponding entry fields together with the acquired spectra. A slider allows to select the γ-counting position, among the characterized ones, in which Au and Zr monitors have been acquired. A selection of the suitable spectrum is required whether multiple spectra containing the same emission are recalled. A successful elaboration returns values of flux parameters that can be stored in an internal database for future use.
Neutron gradient determination is performed by introduction, in the entry fields of the corresponding sub-window (Fig. 4), of information concerning the irradiation date, irradiation channel and position, mass and self-shielding corrections of sandwiched monitors and acquired spectra. Similar to the flux evaluation sub-window, a slider allows to select the adopted γ-counting position where monitor's spectra have been acquired and an additional information has to be provided concerning the vertical distance between the two monitors of interest in the irradiation facility. A successful elaboration returns the β value that can be stored in an internal database for future use and a graphic to visualize the slope of the neutron trend over distance.

γ-spectra acquisition and processing
The γ-spectra acquisition at any stage has to be performed by placing calibrated γ-sources, and analyte and monitor samples at defined distance from detector end-cap; the distances where calibrated γ-sources are placed for detector characterization are here defined "nominal counting position" while distances where analyte and monitor samples are placed for analysis are defined "actual counting positions". Differences between actual and nominal positions have to be measured since this information is required to correct for sample positioning and geometry.
The recorded γ-spectra need to be processed with an external software to calculate net peak area values and statistical uncertainties. To this end, both GammaVision or HyperLab [11] softwares provide suitable outputs that are accepted by the k0-INRIM for further elaboration. The k0-INRIM retrieves spectrum information from a combination of two files: a peaklist, containing data concerning elaborated peaks, and the spectrum profile, containing the histogram and spectrum acquisition dates and times. The accepted files for peaklist are GammaVision reports analyte samples monitor samples

Data elaboration
When detector and irradiation facility characterizations are performed and experimental data of the current analysis are gathered (e.g. γ-spectra of analyte and monitor samples), the elaboration is set by entering the required input parameters and performing a series of actions within the k0-INRIM main window following the workflow from top to bottom. The suitable detector characterization is recalled, through the drop-down menu in the characterization region, among the list of previously saved ones. The selection also activates the counting position sliders found in the following standard and sample regions allowing to select nominal counting positions.
In the analysis name region, the user can insert a string taken as an ID to identify the analysis. This string will be proposed as the default filename while saving any output related to the current analysis.
Information concerning the neutron activation of monitor and analyte samples is introduced in the irradiation subwindow accessed within the irradiation region. Characteristic features of the facility (flux parameters and gradient) can be recalled through the list of previously saved facility characterizations; finally, irradiation time and end date are required in the corresponding entry fields. Upon confirmation, inserted data are included in the current analysis and also saved on disc in order to be recalled for future use, if needed.
A background spectrum can be optionally recalled from the background region together with information concerning the blank container used to wrap the analysis sample in the irradiation facility and not removed during γ-acquisition. To gather information about background spectrum, the peaklist file should be selected and the software automatically searches for the corresponding spectrum profile with same name in the same folder. The blank information can be introduced in the sub-window called define material where the composition and mass of the blank container are recalled.
A single monitor sample, to which any analyte sample should refer, is allowed in the analysis; information about spectrum, peak identification, material definition and counting position are managed in the standard region. In particular, the spectrum is recalled from the open standard button Fig. 4 The window for neutron flux gradient evaluation which retrieves peaklist and spectrum profile data; physical properties such as mass, moisture content, density and height can be set from the define material sub-window together with additional information like self-shielding corrections; the elemental composition is assigned by selection from a list of previously created material files. From the standard peaklist sub-window (Fig. 5), manual identification of the γ-emissions causing peaks is performed and, among them, the one chosen as the k 0 monitor is selected. The distance from the detector end-cap of the adopted counting position for monitor sample is identified by the horizontal slider and an entry field labeled Δd / mm. The slider switches among the characterized counting positions and the entry allows to introduce the difference between the actual position where the monitor sample is acquired and the adopted nominal counting position.
For what concerns analyte samples, the procedure to recall data is similar to that previously explained for the monitor sample but multiple spectra can be recalled and managed in the sample region. In addition, all identified γ-emissions within the peaklist are considered for the analysis and all corresponding mass fraction results are expected to be returned in the outputs.
In order to make sure the software returns at least a detection limits if the investigated target element is not found, the user can perform a selection from the detection limit subwindow accessed within the limits region. This sub-window displays a periodic table styled interface allowing to select any element, found in the currently adopted k 0 -database, for which evaluation of detection limits will be returned.
While all previously required actions are performed, the elaboration to get the analysis results is accessed from the button in the results region. A successful analysis shows a report sub-window which summarizes the main data of the experimental setup while indicating the number of identified peaks for each spectrum; finally, three ways to visualize the results are offered: (i) production of excel output, (ii) overview of quantified elements on a per-spectrum basis and (iii) validation of results; they are accessible from the three corresponding buttons at the bottom of the sub-window.
The (i) excel output saves all the evaluated uncertainties budgets of the analysis into a Microsoft Excel file. The output file is composed by a first worksheet representing a summary of all the obtained results (Fig. 6) followed by fully editable stand-alone uncertainty budget worksheets (one for any identified emission) implementing the measurement model (Eq. 1) and formula for uncertainty propagation based on the spreadsheet method [12,13]. The uncertainty budget itself displays information for each input parameter such as symbol, unit of measurement, value, standard absolute and relative uncertainty, sensitivity coefficient and relative contribution to combined variance; the mass fraction result is also reported with absolute and relative uncertainty. The (ii) analysis overview is a visualization of the quantified target elements without creating any output file. It opens a sub-window highlighting all the target elements quantified in a selected spectrum within a periodic table styled grid (Fig. 7); users can select different spectra by a drop-down menu. The highlighted elements can be accessed to display a list of all emissions used to obtain the corresponding mass fraction values for the selected target element; each line of the list can be, in turn, accessed to display a pie graph depicting the five most important contributors to the combined uncertainty of the corresponding mass fraction.
The (iii) validation of results is active only in case the elemental composition of an analyte sample is known through assignment of a material file to the corresponding spectrum performed in the define material sub-window. It opens a sub-window including a list of all emitters for which a value of the deviation from the expected result, z score , is calculated for each detected γ-emission: where w meas is the measured mass fraction and w ref is the mass fraction assigned through the material file, with u 2 their corresponding variances; values obtained from different spectra can be simultaneously displayed. The sub-window also allows two ways of visualizing the data: a general overview of all z score values through a bar chart (Fig. 8) or an element by element series of graphics depicting measured mass fraction values superimposed to a band identifying the range of the reference value at 95% confidence level.
It is suggested to use information from the last two reports to check the meaningfulness of the results in order to spot visible errors, generally occurring due to peak misidentification, before creating the excel output file; alternatively, a savefile can be produced from the main window to store all the information of the analysis in order to be recalled at any time.

Conclusion
The most up to date release of k0-INRIM software is here presented to the k 0 -NAA audience by describing the analysis workflow. Several features improving flexibility and suitability for routine analysis have been introduced while keeping the code open source freely downloadable. Potential users might also find useful resources in the supporting information whether they are willing to experience a guided handson analysis performed on real input data.   The successful participation of the k0-INRIM to the 2021 IAEA intercomparison exercise is an added value to the software features. As a figure of merit, z score obtained with 11 trace elements of a certified reference material were all within ± 1.5 (0.49 reduced χ r 2 -score) [3]. The outcome validates the 2.0 version, which is now suitable for testing and calibration laboratories holding accreditation according to the ISO/IEC 17025 standard to be deemed technically competent.

Supporting information
In the supporting information potential users can find the links to download the software and user manual together with all the necessary input data to perform a test analysis in order to get a first-hand experience about the software use and the analysis workflow.