Excel2Genie: A Microsoft Excel application to improve the flexibility of the Genie-2000 Spectroscopic software

Excel2Genie: A Microsoft Excel application to improve the flexibility of the Genie-2000 Spectroscopic software

Applied Radiation and Isotopes 94 (2014) 77–81 Contents lists available at ScienceDirect Applied Radiation and Isotopes journal homepage: www.elsevi...

1MB Sizes 0 Downloads 69 Views

Applied Radiation and Isotopes 94 (2014) 77–81

Contents lists available at ScienceDirect

Applied Radiation and Isotopes journal homepage: www.elsevier.com/locate/apradiso

Technical note

Excel2Genie: A Microsoft Excel application to improve the flexibility of the Genie-2000 Spectroscopic software Attila Forgács a,n, László Balkay b, Lajos Trón b, Péter Raics c a

Scanomed Ltd, H-4032 Debrecen, Nagyerdei krt. 98, Hungary Department of Nuclear Medicine, Medical and Health Science Center, University of Debrecen, H-4032 Debrecen, Nagyerdei krt. 98, Hungary c Institute of Experimental Physics, Faculty of Science and Technology, University of Debrecen, H-4026 Debrecen, Bem tér 18/a, Hungary b

H I G H L I G H T S

   

User-friendly Microsoft Excel interface to the Genie-2000 Spectroscopic software. Data acquisitions with changing parameters and sophisticated data analysis. Three worksheets: data acquisition, data analysis and mathematical operations on spectra. The source code is freely available.

art ic l e i nf o

a b s t r a c t

Article history: Received 25 March 2014 Received in revised form 17 June 2014 Accepted 9 July 2014 Available online 25 July 2014

Excel2Genie, a simple and user-friendly Microsoft Excel interface, has been developed to the Genie-2000 Spectroscopic Software of Canberra Industries. This Excel application can directly control Canberra Multichannel Analyzer (MCA), process the acquired data and visualize them. Combination of Genie-2000 with Excel2Genie results in remarkably increased flexibility and a possibility to carry out repetitive data acquisitions even with changing parameters and more sophisticated analysis. The developed software package comprises three worksheets: display parameters and results of data acquisition, data analysis and mathematical operations carried out on the measured gamma spectra. At the same time it also allows control of these processes. Excel2Genie is freely available to assist gamma spectrum measurements and data evaluation by the interested Canberra users. With access to the Visual Basic Application (VBA) source code of this application users are enabled to modify the developed interface according to their intentions. & 2014 Elsevier Ltd. All rights reserved.

Keywords: Genie-2000 Microsoft Excel Microsoft COM Nuclear spectroscopy Repetitive data evaluation

1. Introduction The Genie-2000 developed by the Canberra Industries is one of the most frequently used software tool in gamma spectroscopy. It is an integrated environment to manage the data acquisition of wide range types of nuclear detectors and to provide an interface for interactive data analysis. It supports over 250 detector inputs, handles the parallel operation of distributed detectors via network connection by remote access, and executes advanced data analysis without breaking simultaneously running acquisitions. The analysis software package of Genie 2000 performs complete analysis of full gamma spectra obtained from arbitrary types of gamma detectors. It includes advanced algorithms for researchers like automatic efficiency correction, nuclide identification, and automatic gain adjustment. n

Corresponding author. Tel.: þ 36304256616. E-mail addresses: [email protected], [email protected] (A. Forgács). http://dx.doi.org/10.1016/j.apradiso.2014.07.005 0969-8043/& 2014 Elsevier Ltd. All rights reserved.

The simplest way to carry out analysis by Genie-2000 is the userdefined step-by-step analysis procedures named in sequence. It facilitates data acquisition, data analysis steps including sophisticated peak processing and nuclide identification algorithms as well as reporting of results. Created specific sequences can be saved as part of a binary file having n.ASF extension and allowing an easy repetition of frequently used acquisition and/or data evaluation tasks. However, this type of analysis is limited to linear sequences of instructions; it does not allow analysis involving iterations (loops) and conditional (if, else) structures. Thus, the default kind of sequences does not enable users to perform automated repeated data acquisition or data evaluation on a set of data files. Consequently, the labor-sensitive one by one operation cannot be avoided. Although advanced technical computing languages like Matlab would be the most powerful and elegant tool to circumvent this difficulty the solution suggested by us offers a simple and flexible data acquisition, data evaluation and spreadsheet utility. Data files of Genie-2000 having n.CNF extension comprise information of unique different types. In addition to measured

78

A. Forgács et al. / Applied Radiation and Isotopes 94 (2014) 77–81

data, they contain among others setting information (calibration, acquisition time, number of channels, ROIs, etc.), sample and equipment description, and results of analysis. Inserting new calculated results into n.CNF files changes their size and structure; therefore, commercial spreadsheet applications are not able to import data directly from these files. Genie-2000 supports generating reports on calculated results and measurement parameters. Aiming report construction, users can prepare template files (with n.TPL extension) created by the REXX scripting language. REXX programming requires practice; therefore it does not offer an easy-to-use method for most of the general users. For the report format, Genie-2000 offers two possibilities, either a n.PDF file or it appears as a printed sheet. Neither of these facilitates the simple export of measured or calculated data for additional processing using commercial spreadsheet applications although it is an almost general requirement of the experimenters. Microsoft Excel and similar spreadsheet programs are common platforms for data evaluation and presentation in a variety of disciplines and education. User-designed Excel templates can be easily constructed for simple data processing. Macros for more complex and widely consumable spreadsheets can be constructed using VBA. Jackmanand Biegalski (2007) and Landsberger et al. (2005) published Excel solutions for automated reading of Genie2000 TPL report files into Excel worksheets. Repetitive analysis methods of data of non-gamma spectroscopy origin were also communicated (Bertrand and Weyer, 2005; Obenauer-Kutner et al., 2005; Ogata et al., 2009; Weis et al., 2006) underlining the power and potential of Excel macros. The Component Object Model (COM) programming assures a more flexible and efficient link between the Microsoft Excel and Genie-2000. If COM is applicable it allows dynamic communication between different software. It is an ideal tool to construct new programs utilizing existing program components. Microsoft Office products and Genie-2000 Spectroscopy software fulfill the COM standard requirements resulting in possible communication with each other. In this study we describe Excel2Genie developed in our laboratory. It is a COM programming-based Excel application which allows the user to exploit all functions and methods of Genie-2000. These functions defined in the related “n.dll” files of “C:\GENIE2K\EXEFILES” directory control all the detectors and data evaluations. The presented application administrates three types of worksheets: Data Acquisition-, Data Analysis- and Spectrum Algebra worksheets. All of them contain parameters defining the exact form of the activities involved, results and functional buttons controlling the related processes. The COM programming applied in our investigations can be used only by Microsoft Windows operation systems. As far as we know the Genie 2000 software also runs only on Microsoft environment.

2. Program structure Running Excel2Genie does not require running Genie-2000 but it is assumed that the latter is installed in the computer. Functions of Genie-2000 are directly available for Excel2Genie and used as own subroutines incorporated into the VBA script. Alteration or extension of Excel2Genie is relatively easy and straightforward by using the available objects and methods of Genie-2000 function library as described in Programming Library User's Manual (Canberra, Programming Library 2009). Excel2Genie can handle Genie-2000 and all the analysis sequence files (ASF), report template files (TPL) and the default data files (CNF) previously created by Genie-2000. There is no need to run both programs simultaneously; running them in parallel may cause complications as detectors and files handled by any of the two programs are unavailable for the other one.

Fig. 1. Schematic program structure of data acquisition by Excel2Genie.

Fig. 2. Schematic program structure of the data analysis.

Excel2Genie comprises three parts: Data Acquisition-, Data Analysis-, and Spectrum Algebra worksheets. The block diagram displayed in Fig. 1. details the program structure controlling the data acquisition process. The wide arrow connecting the blocks of Excel2Genie and Genie-2000 library refers to the fact that the interaction between these entities is ensured by COM programming. The part of the library most often used by data acquisition is the “DeviceAccess” object part of the WBA code. A declared “Device Access” object within the WBA code (e.g. Det1) can start data acquisition upon the command “Det1.AcquireStart”. With a proper VBA script including loops, a set of CNF files can be generated in accordance with a special measuring sequence determined by the loop parameter(s). Loop parameters are input data (like acquisition time, energy window, loop number, etc.) and have their own cells in the worksheet, from which the script can get its numerical values. “CanberraDataAccessLib” is another object of the Genie-2000 program library which handles CNF file reading and modifying as well as creating new CNF files which store the modified CNF data files. The completion of the data evaluation and processing is controlled by the predefined ASF files created by “CanberraSequenceAnalyzerLib” object (Fig. 2). Methods of these processes may contain, among others, background correction and sophisticated peak fitting algorithms. Canberra Genie-2000 analysis sequence file warrants high quality data processing like peak locating, peak area calculation and background correction. Calculated results are stored in the Data Evaluation worksheet and saved into the original CNF file. Finally “CanberraReporterLib” object allows the user the option to read and generate reports.

3. Running Excel2Genie 3.1. Acquisition worksheet To demonstrate some features of the Excel2Genie we selected a radioactive decay measurement. The high precision determination of the lifetime of the radioactive nuclide requires repeated gamma energy measurements over a relatively long time. During the

A. Forgács et al. / Applied Radiation and Isotopes 94 (2014) 77–81

acquisition the current activity or energy spectrum may be very informative; thus we allowed the actual activity or energy spectrum (being measured within the ith cycle) to be displayed. A special worksheet is dedicated to directly control data acquisition representing results of successive measurement cycles and produce preliminary results prior to the final data processing. The numbers continuously fill a table on the same excel sheet, in contrast with Genie 2000, which provides a printout option only. Fig. 3 is an example screenshot of Data Acquisition worksheet belonging to a representative measurement. Red characters indicate obligatory input data to define the acquisition: true acquisition time/cycle, detector designation, number of measurement cycles, refreshment time interval (time between successive refreshments of the measured spectrum during the current cycle), quick-ROI (the low and high channel numbers defining a selected part of the spectrum, also indicated by red lines in the graph too). Having started the measurement the plot of the measured spectra and the numerical values of some calculated parameters (blue characters) are periodically refreshed according to the set refreshment time. Parameters (like total count, quick-ROI intensity, dead time fraction, etc.) calculated after each completed measurement cycle are displayed at the bottom of the worksheet in green color. Energy spectra measured during the individual cycles are saved separately in the selected directory as n.CNF files with different names. Files are designated by increasing numbers (similarly to Canberra factory default) in the current version but it can be easily changed depending upon the intention of the users. The channel numbers specifying quick-ROI are saved in the n.CNF files but they are stored as part of the Data Acquisition worksheet. Detectors controlled in our test experiments by the Excel2Genie were Canberra HpGe γ-detectors, Canberra NaI(Tl) scintillation γ-detector, Canberra PIPS α-detector, EI Detection & Imaging

79

Systems, and CdZnTe (CZT) semiconductor γ-detector. Detectors were connected either to the Canberra InSpector2000 data processing unit or to a more complex system including Digital Signal Processor Model 2060, Fast Spectroscopy Amplifier 2024 and HV Power Supply 3106D. 3.2. Data Analysis worksheet Data Analysis worksheet facilitates carrying out more sophisticated data processing compare to Genie 2000, or with the Data Acquisition worksheet previously mentioned. Current version of Excel2Genie can manage 35 ROIs at the most but this can be easily modified using the VBA code. Our interface allows the calculation of a set of parameters (like peak-integral, background intensity, intensity error, etc.) for each of the selected energy range. These data can also be used in additional calculations since they are directly displayed on the sheet. Fig. 4 is a screenshot of the Data Analysis worksheet of Excel2Genie belonging to the same measurement shown in Fig. 3. A defined data analysis requires the definition of the kind of calculation by selecting the appropriate analysis sequence from the previously created (by Genie-2000) ones. Input data of the spectrum analysis has to be chosen from the appropriate .CNF files. During the processing the worksheet displays the actual spectrum and the calculated results for each file being analyzed. Data processing occurs according to the sequence stored in an n.ASF file. Separate calculations are carried out using data belonging to selected part of the energy spectrum. Details of these spectral regions are stored in the ROI file. For report generation a n.TPL file is also needed (Fig. 1). All these files have to be previously created using the Genie-2000 “Gamma Acquisition & Analysis” software. The n.CNF file may contain all the necessary

Fig. 3. A representative screen shot of data acquisition worksheet. (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

80

A. Forgács et al. / Applied Radiation and Isotopes 94 (2014) 77–81

Fig. 4. A representative screen shot of Data Analysis worksheet.

information about the selected ROI(s); in these cases there is no need to have ROI file(s). However, if the n.ASF file refers to a separate ROI file necessarily then it is needed as well. 3.3. Spectrum Algebra worksheet CNF Spectrum Algebra worksheet may contain instructions and manipulations to be completed on the earlier stored CNF files. Summation of spectra is the only option contained by the current version but arbitrary algebraic operations can be added as tasks to be carried out. Commands stored in the Spectrum Algebra worksheet can be completed by clicking on the “DO CNF Algebra” button followed by identification of the n.CNF files to process. The final spectrum (the summed spectra in the present version) is stored in a new n.CNF file named by the user in a pop-up window and can be analyzed either by the Excel2Genie outlined previously or the Genie-2000 program.

4. Discussion Commercial measuring instruments are delivered with software controlling data acquisition and performing analysis. These highly reliable products are ordinarily compiled programs with non-available source code as they just support completion of well defined specific measurements and data evaluation. Thus, they may not offer an easy way to alter the measurement and data acquisition workflow. At the same time manufacturers may allow certain type of access to the compiled software library. In such

cases programs like Excel2Genie application are of remarkable help for many users. Our developed application increases the flexibility of the Genie2000 Spectroscopy software. It supports data processing and controlling data acquisition and enables carrying out spectrum algebraic operations. Excel2Genie includes three worksheets according to the mentioned functions. Interested users can freely download (http://www.minipetct.com/excel2genie) the developed software and accomplish modifications of wide scale according to their demand. We have successfully used Excel2Genie in carrying out long term stability measurements. It proved to be instrumental also in performing automated data processing in long time multipeak and multi-half-life measurements.

Acknowledgments This work was partially supported by the following projects: ENIAC grant of “Central Nervous System Imaging” (Project number: 120209). The authors are grateful for the technical support of Dr. Csaba Buda (sales representative of Canberra, Budapest) and furthermore, we thank Diana Balkay and Zsolt Veress for their help in the wording of the manuscript.

References Bertrand, A., Weyer, H.J., 2005. The Digital User Office (DUO). Nucl. Instrum. Methods A 546, 591–603.

A. Forgács et al. / Applied Radiation and Isotopes 94 (2014) 77–81

Canberra, Programming Library Manual User’s Manual of Model S560 GenieTM 2000 Canberra Industries, Inc., 2009. Jackman, K.R., Biegalski, S.R., 2007. Monte Carlo generated spectra for QA/QC of automated NAA routine. J. Radioanal. Nucl. Chem. 271, 207–211. Landsberger, S., Jackman, K., Welch, L., 2005. Neutron activation analysis using Excel files and Canberra Genie-2000. J. Radioanal. Nucl. Chem. 264, 235–237. Obenauer-Kutner, L.J., Halperin, R., Ihnat, P.M., Tully, C.P., Bordens, R.W., Grace, M.J., 2005. Use of an automated image processing program to quantify recombinant adenovirus particles. Microsc. Microanal. 11, 37–41.

81

Ogata, Y., Sakurai, N., Aoki, K., Suzuki, H., Okazaki, K., Saito, K., Shibata, D., 2009. KAGIANA: an excel-based tool for retrieving summary information on arabidopsis genes. Plant Cell Physiol. 50, 173–177. Weis, D.D., Engen, J.R., Kass, I.J., 2006. Semi-automated data processing of hydrogen exchange mass spectra using HX-express. J. Am. Soc. Mass Spectrom. 17, 1700–1703.