Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python codes”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 469 records · Page 26

Data Arrays for Microearthquake (MEQ) Monitoring using Deep Learning for the Newberry EGS Sites

The 'Machine Learning Approaches to Predicting Induced Seismicity and Imaging Geothermal Reservoir Properties' project looks to apply machine learning (ML) methods to Microearthquake (MEQ) data for imaging geothermal reservoir properties and forecasting seismic events, in order to advance geothermal exploration and safe geothermal energy production. As part of the project, this submission provides data arrays for 149 microearthquakes between the year 2012 and 2013 at the Newberry EGS Site for use with the Deep Learning Algorithm that has been developed. The data provided includes raw waveform data, location data, normalized waveform data, and processed waveform data. Penn State Geothermal Team has shared the following files from the project: - 149 microearthquakes (MEQs) between 2012 and 2013 at Newberry EGS sites, 'Normalized Waveform Inputs.npz' are normalized waveforms. - labels of 149 MEQs: Processed Waveform Inputs.npz - location labels of 149 MEQs: Location Data.npz Note: .npz is the python file format by NumPy that provides storage of array data.

15 GEOTHERMAL ENERGY↗

WFSUITE: A PYTHON SOFTWARE SUITE FOR X-RAY WAVEFRONT SENDING AND AT-WAVELENGTH METROLOGY

SF-26-025 WFSuite is a graphical and command-line toolkit for coded-mask-based X-ray wavefront sensing and phase reconstruction at synchrotron beamlines. It integrates analysis tools for both relative and absolute speckle-based measurements. In the relative metrology module, WFSuite implements Wavelet-transform-based X-ray Speckle Tracking (WXST) and Wavelet-transform-based Speckle Vector Tracking (WSVT) methods to retrieve differential phase and wavefront distortions by comparing speckle patterns recorded with and without the test sample. In the absolute phase module, WFSuite uses coded-mask speckle patterns and replaces the measured reference with a numerically simulated one, enablingsingle-shot wavefront reconstruction using either WXST or a neural-network-based method (SPINNet).

Rebuffi, Luca [Argonne National Laboratory (ANL), ↗

A machine learning approach to galaxy properties: joint redshift–stellar mass probability distributions with Random Forest

We demonstrate that highly accurate joint redshift–stellar mass probability distribution functions (PDFs) can be obtained using the Random Forest (RF) machine learning (ML) algorithm, even with few photometric bands available. As an example, we use the Dark Energy Survey (DES), combined with the COSMOS2015 catalogue for redshifts and stellar masses. We build two ML models: one containing deep photometry in the griz bands, and the second reflecting the photometric scatter present in the main DES survey, with carefully constructed representative training data in each case. We validate our joint PDFs for 10 699 test galaxies by utilizing the copula probability integral transform and the Kendall distribution function, and their univariate counterparts to validate the marginals. Benchmarked against a basic set-up of the template-fitting code bagpipes, our ML-based method outperforms template fitting on all of our predefined performance metrics. In addition to accuracy, the RF is extremely fast, able to compute joint PDFs for a million galaxies in just under 6 min with consumer computer hardware. Such speed enables PDFs to be derived in real time within analysis codes, solving potential storage issues. As part of this work we have developed galpro 1, a highly intuitive and efficient python package to rapidly generate multivariate PDFs on-the-fly. galpro is documented and available for researchers to use in their cosmology and galaxy evolution studies.

79 ASTRONOMY AND ASTROPHYSICS↗

Automated Energy-Dispersive X-ray Spectroscopy Analysis for Multi-Modal Few-Shot Learning

Scanning transmission electron microscopy (STEM) is a powerful tool that allows for the atomic-scale analysis of a materials’ structure, chemistry, and defect domains (Akers et al. 2021). The current generation of microscopes generate vast amounts of data, surpassing the limits of effective manual analysis traditionally performed by domain experts (Spurgeon et al. 2021). While recent strides in machine learning have significantly enhanced the processing of large and intricate datasets acquired through electron microscopy, the prevalent use of proprietary software packages for initial data collection poses a challenge. In many cases, these software packages act as a ‘black box’, constraining user functionality and hindering the output of data in a format that is conducive to seamless integration into machine learning models. This work addresses these challenges by adapting HyperSpy, an open-source Python library, for the analysis and quantification of raw energy dispersive spectroscopy (EDS) data acquired through STEM. The modified HyperSpy code successfully facilitates user-defined segmentation of the data, enabling the integration of atomic %, weight %, and raw EDS spectra for each segmented region into an existing few-shot machine learning model. While initial results reveal discrepancies in quantified atomic and weight percentages when compared to proprietary software, ongoing efforts aim to rectify this issue by refining the fit of the HyperSpy model to the EDS spectra. Overall, this research underscores the potential of open-source tools like HyperSpy to enhance the accessibility of analytical tools, fostering a transparent and user-friendly environment for seamlessly incorporating electron microscopy data into machine learning models.

36 MATERIALS SCIENCE↗

ncompare: A Python Package for Comparing netCDF Structures

Earth science researchers and data engineers have a common problem: they often need to compare data files to see what is different between them. A lot of time is spent developing code to test differences. When it comes to comparing multidimensional data file formats like netCDFs (Network Common Data Form), this is particularly challenging and time-consuming, since there is frequently a need to evaluate the differences between dimension sizes, variable structures, and variable attributes, especially for regression testing. Since netCDFs are widely used in Earth science — with climate models, oceanographic or atmospheric reanalyses, and observational data — improved means of evaluating netCDF files can help enable a wide range of applications. We have developed a reusable open source approach through `ncompare`, which is a Python package for comparing netCDF structures [[https://github.com/nasa/ncompare]]. The `ncompare` tool compares the structure of two Network Common Data Form (NetCDF) files at the command line. It facilitates rapid comparisons by generating a formatted display of the matching and non-matching groups, variables, and associated metadata between two NetCDF datasets. The user has the option to colorize the terminal output for ease of viewing, and `ncompare` can optionally save comparison reports in text, comma-separated value (CSV), and/or Microsoft Excel formats. Despite the availability of tools (such as ncmpidiff or nccmp) that compare the values of variables, there was not previously a readily available, Python-based tool for rapid visual comparisons of group and variable structures, attributes, and chunking. `ncompare` was developed at NASA’s Atmospheric Science Data Center (ASDC) and is a collaboration with NASA Openscapes [[https://nasa-openscapes.github.io]] mentors across 11 of NASA’s data centers. Openscapes’ overarching vision is to support scientific researchers using NASA Earthdata as they migrate their workflows to the cloud. Relevant links: - https://github.com/nasa/ncompare - https://github.com/pyOpenSci/software-submission/issues/146 - https://nasa-openscapes.github.io

Daniel Kaufman↗

LeWRON: Agentic Analysis of Electroweak Phase Transitions

The electroweak phase transition (EWPT) is a central topic in particle physics and cosmology, connecting collider phenomenology, baryogenesis, and gravitational-wave observatories. Its analysis requires a technically demanding, convention-sensitive, and model-dependent pipeline, from constructing the finite-temperature effective potential to tracking thermal histories, computing bubble nucleation rates, and predicting gravitational-wave spectra. We present LeWRON (Learning ElectroWeak phase tRansitiON), an agentic framework that orchestrates this pipeline starting from an input Lagrangian. LeWRON combines audited toolbox construction with an Explorer module that uses the generated model-specific code for further analysis, including scans and plots. Intermediate analytic outputs are checked by auditor agents and stored as structured artifacts, enabling reproducible human inspection and downstream use through both a command-line interface and a public Python API. The framework supports a reproduction mode, which infers conventions from the literature and reproduces published results, and a discovery mode, which guides users through structured checkpoints for new models. We demonstrate LeWRON across representative beyond-the-Standard-Model scenarios and release the code on GitHub.

Wang, Isaac R. [Fermilab] (ORCID:000000030789218X)↗

CMLM (Co-Optimized Machine-Learned Manifolds) [SWR-23-41]

Co-optimized Machine-Learned Manifolds (CMLM) is a data-driven approach for developing reduced-order manifold models for high-dimensional chemically reacting systems. It involves a specially designed neural network, the training of which simultaneously optimizes linear combinations of species that define the manifold, nonlinear mapping to outputs of interest such as reaction rates, and (optionally) subfilter closure for large eddy simulation. This software package provides an implementation of the CMLM approach in Python using the PyTorch machine learning library. A few example cases are included, showing how the tool can be applied to different types of data from 0D and 1D reacting simulations performed using Cantera. The neural networks can be saved in a format that is readable by the Pele suite of combustion solvers for use in reacting computational fluid dynamics simulations. This software repository contains several python scripts to perform various tasks associated with the Co-optimized Machine Learned Manifolds (CMLM) model, which is described in Perry, Henry de Frahan, and Yellapantula, CNF, 2022 (https://doi.org/10.1016/j.combustflame.2022.112286). This includes not only the code that defines the CMLM model, but also scripts to generate suitable training data, scripts to pre-process the data, scripts to train the CMLM model, and scripts to plot the output, as well as various other helper files. The scripts depend on several commonly used python libraries for data analysis and chemical reaction computations. The trained models that result from this tool are designed to work with the an interface being implemented in the Pele suite of reacting flow solvers (https://github.com/AMReX-Combustion).

Perry, Bruce↗

Model data for Flood Frequency Analysis using Stochastic Storm Transposition and an Integrated Surface-Subsurface Hydrological Model

This archived provides scripts and input files used for the implementation of a novel approach to conduct process-based Flood Frequency Analysis using a Stochastic Storm Transposition (SST) and an Integrated Surface-Subsurface Hydrological Model (ISSHM). As a proof-of-concept, this study uses the ISSHM, Advanced Terrestrial Simulator (Amanzi-ATS) model, and the SST model, RainyDay, to conduct flood frequency analysis by simulating the flood response to 5,000 annual synthetic storm events in a ~2000 km2 Southeast Texas watershed.The Watershed Workflow package is implemented in Python3. The Jupyter notebooks can be executed through multiple open-source tools, for example, Anaconda Jupyter Lab, VS Studio Code, etc. Other data files include TXT, CSV, DAT, SBATCH, SHP, TIF, NetCDF, and HDF5 files, which can be read through Python scripts. The input files for the ATS model and RainyDay model have .XML and .SST extensions, respectively, and can be edited in any commonly used text editors.This archive contains:* Scripts and data files essential for generating the ATS model input. It uses the Watershed Workflow package to produce both mesh and ATS input files. * Jupyter notebooks designated for the ATS model evaluation, covering both long-term simulations and 40 rainfall-runoff events.* Input files required to simulate SST storm events using RainyDay.

54 ENVIRONMENTAL SCIENCES↗

ULYSSES: Universal LeptogeneSiS Equation Solver

ULYSSES is a python package that calculates the baryon asymmetry produced from leptogenesis in the context of a type-I seesaw mechanism. The code solves the semi-classical Boltzmann equations for points in the model parameter space as specified by the user. We provide a selection of predefined Boltzmann equations as well as a plugin mechanism for externally provided models of leptogenesis. Furthermore, the ULYSSES code provides tools for multi-dimensional parameter space exploration. The emphasis of the code is on user flexibility and rapid evaluation. It is publicly available at https://github.com/earlyuniverse/ulysses

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

mzapy : An Open-Source Python Library Enabling Efficient Extraction and Processing of Ion Mobility Spectrometry-Mass Spectrometry Data in the MZA File Format

We have recently reported MZA, a new and simple mass spectrometry data structure based on the broadly supported HDF5 format and created to facilitate software development. While this format is inherently supportive of application development, the availability of a core library with standard mass spectrometry utilities greatly facilitates fast software development. Here, we present a Python library, mzapy, for efficient extraction and processing of mass spectrometry data in the MZA format. In addition to raw data extraction, mzapy contains supporting utilities enabling tasks including calibration, signal processing, peak finding, and generating plots. Being implemented in pure Python with minimal and largely standardized dependencies makes mzapy uniquely suited to application development in the multi-omics domain. The free and open source mzapy is built with extensibility in mind, and future development will support cloud computing and artificial intelligence/machine learning applications. The software source code is freely available at https://github.com/PNNL-m-q/mzapy.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Laboratory Instrument Software Controlled Spread Spectrum Time Domain Reflectometry for Electrical Cable Testing

This research discusses development of a software-controlled laboratory instrument based spread spectrum time domain reflectometry system (SSTDR). This constitutes one task within PNNL’s Light Water Sustainability Program (LWRS) whose mission includes advancing nondestructive examination (NDE) techniques for off-line and on-line in-situ cable condition monitoring. In 2022, PNNL evaluated SSTDR for detection and characterization of a number of cable anomalies (Glass et al. 2022). The review included comparison of SSTDR to Frequency Domain Reflectometry (FDR) techniques which have enjoyed encouraging feedback and are starting to be used in nuclear power plants for periodic cable condition monitoring of cable systems as part of the plant’s overall cable aging management program. The FDR test introduces a broad-band chirp onto the cable at the cable end then listens for any reflection from a change of impedance along the cable caused by a damaged conductor or insulation, splices, contact with moisture, or other cable anomalies. The signal is captured in the frequency domain then transformed back to the time domain using an inverse Fourier transform (IFT). Based on the velocity of propagation, the impedance response signal is plotted against distance along the cable. Peak locations along the X-axis indicate the distance along the cable where a portion of the signal has been reflected back to the instrument as a result of a cable anomaly. The FDR test is considered the gold standard of reflectometry however it does require the cable to be de-energized to perform the test. The LIVEWIRE commercial SSTDR produces a similar plot to the FDR however all processing is in the time domain. A pseudo-random noise code (PN code) is input onto the cable conductor and the instrument listens for any reflected response from cable anomalies. The SSTDR processes the signal as an autocorrelation comparing the input PN code to any reflected signal detected. The autocorrelation analysis for thermal aging, water and water ingress detection, ground fault and phase-to-phase fault detection at various locations along the cable and with the cable attached and detached from a motor load, and on both energized and un-energized conditions were performed. These results were contrasted to Frequency Domain Reflectometry (FDR) measurements of the un-energized cable. Results were encouraging but indicated more work was warranted – particularly with the SSTDR, it seemed that the insulation damage would likely be better evaluated with multiple bandwidth cable tests particularly including larger bandwidths than were possible with the current commercial instrument. The commercial instrument’s bandwidth was set at 6, 12, 24, and 48MHz but note that SSTDR and FDR definitions of bandwidth trend similarly but are not the same. The FDR response could be more broadly adjusted, and the bandwidth of 100 to 500 MHz produced the best responses. FDR responses to anomalies were clearer than SSTDR responses and indications were that a broader bandwidth SSTDR may lead to improved SSTDR detection capability. This project used a laboratory instrument based SSTDR (primarily using an Arbitrary Waveform Generator (AWG) and a digital oscilloscope plus Python in-house software) that allowed software adjustment of the SSTDR bandwidth, window functions applied to the exciting Pseudo-random Noise (PN) code plus and other aspects of the SSTDR signal processing. Hereafter, this will be referred to as the PNNL SSTDR. Evaluating specific performance of the PNNL SSTDR is left to a separate report. This report documents hardware and software development to produce the SSTDR cable test system.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

GriddingMachine, a database and software for Earth system modeling at global and regional scales

Land and Earth system modeling is moving towards more explicit biophysical representations, requiring increasing variety of datasets for initialization and benchmarking. However, researchers often have difficulties in identifying and integrating non-standardized datasets from various sources. We aim towards a standardized database and one-stop distribution method of global datasets. Here, we present the GriddingMachine as (1) a database of global-scale datasets commonly used to parameterize or benchmark the models, from plant traits to vegetation indices and geophysical information and (2) a cross-platform open source software to download and request a subset of datasets with only a few lines of code. The GriddingMachine datasets can be accessed either manually through traditional HTTP, or automatically using modern programming languages including Julia, Matlab, Octave, Python, and R. The GriddingMachine collections can be used for any land and Earth modeling framework and ecological research at the regional and global scales, and the number of datasets will continue to grow to meet the increasing needs of research communities.

58 GEOSCIENCES↗

User Guide to the Advanced Dimensional Depletion for Engineering of Reactors (ADDER) Software (V.1.0)

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) software is being developed in the Research and Test Reactor (RTR) Program at Argonne National Laboratory to meet the reactor design and analysis needs of the Conversion Program. ADDER is a flexible tool that (1) provides a depletion capability through coupling external neutronics codes with a built-in CRAM solver or external depletion code and (2) provides a user-friendly interface to perform fuel management and criticality search operations. The ADDER software is a Python 3 application written using modern software development practices subject to a compliant implementation of NQA-1 and applicable Department of Energy software quality assurance standards. This report is the user guide for the initial software release as ADDER v1.0.0. The motivation for a software to have flexible capabilities that ADDER possesses is the need to support a wide variety of geometries that are commonly required in analysis of research and test reactors. These reactors can have complex fuel, experiment, or control material shuffling patterns that persist over several years with many fuel management and partial refueling intervals. The scale of fuel management analysis can require tracking of an inventory that is multiple times the core loading. Many reactors, both power and non-power reactors of various types, will find the features of ADDER useful to facilitate key tasks that a fuel or core design engineer must perform with the convenience of concise input and validated functionality.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

User Guide to the Advanced Dimensional Depletion for Engineering of Reactors (ADDER) Software (V.1.01)

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) software is being developed in the Research and Test Reactor (RTR) Program at Argonne National Laboratory to meet the reactor design and analysis needs of the Conversion Program. ADDER is a flexible tool that (1) provides a depletion capability through coupling external neutronics codes with a built-in CRAM solver or external depletion code and (2) provides a user-friendly interface to perform fuel management and criticality search operations. The ADDER software is a Python 3 application written using modern software development practices subject to a compliant implementation of NQA-1 and applicable Department of Energy software quality assurance standards. This report is the user guide for the software release referred to as ADDER v1.0.1. The motivation for a software to have flexible capabilities that ADDER possesses is the need to support a wide variety of geometries that are commonly required in analysis of research and test reactors. These reactors can have complex fuel, experiment, or control material shuffling patterns that persist over several years with many fuel management and partial refueling intervals. The scale of fuel management analysis can require tracking of an inventory that is multiple times the core loading. Many reactors, both power and non-power reactors of various types, will find the features of ADDER useful to facilitate key tasks that a fuel or core design engineer must perform with the convenience of concise input and validated functionality.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) Software for Depletion and Fuel Management

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) software is being developed in the Research and Test Reactor (RTR) Program at Argonne National Laboratory to meet the reactor design and analysis needs of the Conversion Program. ADDER is a flexible tool that (1) provides a depletion capability through coupling external neutronics codes with a built-in CRAM solver or external depletion code and (2) provides a user-friendly interface to perform fuel management and criticality search operations. The ADDER software is a Python 3 application written using modern software development practices subject to a compliant implementation of NQA-1 and applicable Department of Energy software quality assurance standards. This report is the user guide for the software release referred to as ADDER v1.1.0. The motivation for a software to have flexible capabilities that ADDER possesses is the need to support a wide variety of geometries that are commonly required in analysis of research and test reactors. These reactors can have complex fuel, experiment, or control material shuffling patterns that persist over several years with many fuel management and partial refueling intervals. The scale of fuel management analysis can require tracking of an inventory that is multiple times the core loading. Many reactors, both power and non-power reactors of various types, will find the features of ADDER useful to facilitate key tasks that a fuel or core design engineer must perform with the convenience of concise input and validated functionality.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) Software for Depletion and Fuel Management

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) software is being developed in the Research and Test Reactor (RTR) Program at Argonne National Laboratory to meet the reactor design and analysis needs of the Conversion Program. ADDER is a flexible tool that (1) provides a depletion capability through coupling external neutronics codes with a built-in CRAM solver or external depletion code and (2) provides a user-friendly interface to perform fuel management and criticality search operations. The ADDER software is a Python 3 application written using modern software development practices subject to a compliant implementation of NQA-1 and applicable Department of Energy software quality assurance standards. This report is the user guide for the software release referred to as ADDER v1.1.0. The motivation for a software to have flexible capabilities that ADDER possesses is the need to support a wide variety of geometries that are commonly required in analysis of research and test reactors. These reactors can have complex fuel, experiment, or control material shuffling patterns that persist over several years with many fuel management and partial refueling intervals. The scale of fuel management analysis can require tracking of an inventory that is multiple times the core loading. Many reactors, both power and non-power reactors of various types, will find the features of ADDER useful to facilitate key tasks that a fuel or core design engineer must perform with the convenience of concise input and validated functionality.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Understanding Solar Energetic Particles With STEREO HET

The project evaluates solar energetic particles (SEPs) in the Heliosphere utilizing in situ data from the STEREO mission. More specifically, raw data from the High Energy Telescope (HET) corresponding to the abundances and energy spectra of electrons, protons, He, and heavier nuclei was extracted. C codes were modified and written to analyze Pulse heights and fluxes in a readable format. Plots of the data were formulated in Python. Low fluxes of heavier elements prompted a revaluation of the onboard binning process. New selection criteria will be generated to orient the particle energy loss in the detectors with the expected locations of the energy tracks corresponding to each element.

Energetic Particles↗

VESIcal: An Open-source Thermodynamic Model Engine for Mixed Volatile (H2O-CO2) Solubility in Silicate Melts

Modeling the solubility of volatiles in silicate melts is fundamental to the interpretation of volcanic systems and has implications for magma dynamics, eruption style, and material transport between the mantle, crust, and atmosphere. Recent advancements in computational capabilities and access to computing tools has outpaced the functionality and extensibility of previously available modeling platforms. Here we present VESIcal (Volatile Equilibria and Saturation Index calculator), the first comprehensive modeling tool for H2O, CO2, and mixed (H2O-CO2) solubility in silicate melts that: a) allows users access to seven popular models, with easy inter-comparison between models; b) provides universal functionality for all models (e.g., functions for calculating saturation pressures, degassing paths, etc.); c) can process large datasets (1,000’s of samples) automatically; d) can output computed data into an Excel spreadsheet or CSV file for post-modeling analysis; e) integrates plotting capabilities directly within the tool; and f) provides all of this within the framework of a python library, making the tool extensible by the user and allowing any of the model functions to be incorporated into any other code capable of calling python.Here we will provide a demonstration of VESIcal and its capabilities with applications to various volcanic processes affected by volatiles. VESIcal represents the first tool capable of directly comparing multiple solubility models and equations of state. We find that commonly used models predict surprisingly different volatile solubilities, particularly for pure CO2 or mixed CO2-H2O fluids. Even for melt compositions that are well represented in the calibration datasets of multiple models (e.g., MORBs), calculated solubilities for pure CO2 and pure H2O can deviate from one another by factors of >2 leading to 2x deviations in calculated saturation pressures (e.g., 5 to 10 kbar). The solubility of CO2 predicted by different rhyolitic models also differs substantially, overwhelming other sources of uncertainty such as analytical errors on measurements of volatile contents or uncertainties in crustal density profiles. This highlights the importance of model choice when drawing geological conclusions based on volatiles in magmas.

Kayla Iacovino↗