Package: pyEGAF
This project is a Python package enabling interaction, manipulation, and analysis of thermal-neutron capture gamma-ray data from the Evaluated Gamma-ray Activation File (EGAF) library[FIR2007],[REV2004].  The EGAF library is a database of\(\gamma\)-ray energies and their corresponding partial\(\gamma\)-ray cross sections from thermal-neutron capture measurements carried out with a guided neutron beam at the Budapest Research Reactor for 245 isotopes encompassing measurements of natural elemental samples for targets fromZ= 1-83, 90, and 92, except for Tc (Z= 43) and Pm (Z= 61).  The database comprises a total of 8172 primary\(\gamma\)rays and 29605 secondary\(\gamma\)rays (a total of 37777\(\gamma\)rays) associated with 12564 levels.  The (n,\(\gamma\)) targets and corresponding residual compound nuclides relevant to the EGAF project are summarized in the schematic of the nuclear chart shown in the figure below.ThepyEGAFpackage provides users with a convenient means of access and visualization of the thermal neutron-capture data in EGAF including decay-scheme information and associated nuclear structure properties for all compound nuclides contained therein.  In addition, the package also provides a capability to search by\(\gamma\)-ray energy for forensics applications.Building and installationThe project can be built and installed conveniently using thepipcommand in a Unix terminal:$pipinstallpyEGAFAlthernatively, because this project is also maintained onGitHub, it can be installed by cloning the repository and executing the installation script provided as described in theREADME.mddocumentation:https://github.com/AaronMHurst/python_egafA suite of Python modules comprising 224 unit tests is also bundled with the software.  Instructions for running the test script are also provided onGitHub.Running pyEGAFFollowing installation, thepyEGAFscripts can be ran from any location by importing the package and making an instance of theEGAFclass:$pythonimportpyEGAFasegafe=egaf.EGAF()Most methods also require passing the EGAFJSONsource data set as a list-object argument which first needs to be created:edata=e.load_egaf()The utility of thepyEGAFmethods illustrating examples concerning access, manipulation, analysis, and visualization of the EGAF data is demonstrated in theJupyter Notebooksprovided onGitHub.  These notebooks also have amatplotlibPython-package dependency and utilize inline-plotting methods and builtinJupyter Notebookmagic commands.DocstringsAllpyEGAFclasses and functions have supporting docstrings.  Please refer to the individual dosctrings for more information on any particular function including how to use it.  The dosctrings for each method generally have the following structure:A short explanation of the function.A list and description of arguments that need to be passed to the function.The return value of the function.An example(s) invoking use of the function.EGAF source data setsAlthough thepyEGAFmethods already provide greatly enhanced user access to the EGAF data, the original data sets are also bundled with this software package for convenience and to allow users to curate data in a bespoke manner should they prefer.  The data sets are provided in the following three formats:Evaluated Nuclear Structure Data File (ENSDF);Reference Input Parameter Library (RIPL);JavaScript Object Notation (JSON).Each of these formats are described briefly below.ENSDF formatThe original EGAF data sets were prepared in accordance with the mixed-record 80-character column format of the Evaluated Nuclear Structure Data File (ENSDF)[TUL2001].  These ENSDF-formatted files are maintained online by the International Atomic Energy Agency[EGAIAEA].  The relevant fields of theNormalization,Level, andGammarecords that are commonly adopted in the EGAF data sets are explained in the ENSDF manual[TUL2001].  In addition,Commentrecords are also frequently encountered in EGAF data sets.  The ENSDF-formatted EGAF data sets can be accessed usingpyEGAFmethods by passing the EGAF data set list object and theresidual compound nucleusproduced in an (n,\(\gamma\)) reaction, for example,28Si(n,\(\gamma\))29Si:ensdf=e.get_ensdf(edata,"Si29")File printing is suppressed by default.  To print the file to yourpwdpass the boolean argumentTrueto the same function:ensdf=e.get_ensdf(edata,"Si29",True)This will create the fileEGAF_ENSDF_28SI_NG_29SI.ensin the current working directory.RIPL formatBecause many nuclear reaction codes source decay-scheme information in a particular Reference Input Parameter Library (RIPL)[CAP2008]format, representative RIPL-translated data sets have also been generated for each corresponding EGAF data set and are bundled with the software.  The RIPL-formatted EGAF data sets can also be accessed from the interpreter, for example,28Si(n,\(\gamma\))29Si:ripl=e.get_ripl(edata,"Si29")# Or,ripl=e.get_ripl(edata,"Si29",True)# To print the file in the pwdPassingTrueto the callable will print-to-file the RIPL-formatted decay scheme information asEGAF_RIPL_Si28_NG_Si29.datin the current working directory.  The proton- and neutron-separation energies in the RIPL headers are taken from the 2020 Atomic Mass Evaluation[WAN2020].JSON formatAll original EGAF data sets have been translated into a representative JavaScript Object Notation (JSON) format using an intuitive syntax to describe the quantities sourced from the primary and continuation records [TUL2001] of the ENSDF-formatted data sets.  The JSON-formatted data sets are also bundled with the software package and can again be accessed through the interpreter, for example,28Si(n,\(\gamma\))29Si:jfile=e.get_json(edata,"Si29")# Or,jfile=e.get_json(edata,"Si29",True)# To print the file in the pwdPassingTrueto the callable will print-to-file the corresponding JSON data structure asEGAF_JSON_Si28_NG_Si29.jsonin the current working directory.The JSON data structures support the following data types:stringnumberbooleannullobject(JSON object)arrayThe JSON-formatted EGAF schema is explained in detail in theREADME.mdonGitHub.References[FIR2007]R.B.Firestoneet al.,“Database of Prompt Gamma Rays from Slow Thermal Neutron Capture for Elemental Analysis”, IAEA STI/PUB/1263, 251 (2007);https://www-nds.iaea.org/pgaa/egaf.html[REV2004]Z.Revay, R.B. Firestone, T. Belgya, G.L. Molnar,“Handbook of Prompt Gamma Activation Analysis”, edited by G.L. Molnar (Kluwer Academic Dordrecht, 2004), Chap. Prompt Gamma-Ray Spectrum Catalog, p. 173.[TUL2001](1,2)J.K.Tuli,“Evaluated Nuclear Structure Data File”, BNL-NCS-51655-01/02-Rev (2001).[EGAIAEA]Evaluated Gamma-ray Activation File (EGAF);https://www-nds.iaea.org/pgaa/egaf.html[CAP2008]R.Capoteet al.,“RIPL - Reference Input Parameter Library for Calculation of Nuclear Reactions and Nuclear Data Evaluations”, Nucl. Data Sheets110, 3107 (2009).[WAN2020]M.Wang, W.J. Huang, F.G. Kondev, G. Audi, S. Naimi,“The AME2020 atomic mass evaluation”, Chin. Phys. C45, 030003 (2021).