Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “NumPy”

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 37 records · Page 2

becquerel (bq) v0.7.0

Becquerel is a Python package for analyzing nuclear spectroscopic measurements. The core functionalities are reading and writing different spectrum file types, fitting spectral features, rebinning spectrum counts to different bin edges, performing detector calibrations and interpreting measurement results. It also includes tools for visualizing radiation spectra and fits of different spectral features, as well as convenient access to tabulated nuclear data both from remote servers and local caches. It relies heavily on the standard scientific Python stack of numpy, scipy, matplotlib, pandas, and numba. It is intended to be general-purpose enough that it can be useful to anyone from an undergraduate taking a laboratory course to the advanced researcher.

Bandstra, Mark [Lawrence Berkeley National Laborat↗

buhito

buhito is a Python library for graph analysis and machine learning. Graphs can represent networks with objects as nodes and their relationships as edges. buhito focuses on graphlet methods that study graphs through enumerating their component subgraphs to enable interpretable and fast models of complex systems. The package provides tools for different algorithmic designs for computing, analyzing, and applying graphlets to research problems such as machine learning, data compression, and anomaly detection in graph-structured data. A central feature is performing decomposition data analysis on graphs for machine learning models. Implemented in Python and built upon open-source scientific libraries such as NetworkX, NumPy, and SciPy, buhito provides high-performance methods for researchers exploring the mathematical and computational foundations of graphlet analysis applicable to systems of different sizes.

Pimonova, Yulia↗

Pyctos

Pyctos is a concolic testing framework for standard, dynamically-typed Python. Pyctos is able to generate exhaustive test inputs reaching 100% coverage for a subset of pure Python in the absence of type annotations, even where modern fuzzers would fail. Pyctos's underlying reasoning engine is the CVC5 SMT solver, though Z3 is also supported. Pyctos also supports a growing subset of the standard library and some third-party libraries, such as NumPy.

Washbourne, ErickN [Lawrence Livermore National La↗

Dataset of Simulated Intracardiac Transmembrane Voltage Recordings and ECG Signals

The dataset consists of pairs of computationally simulated intracardiac transmembrane voltage recordings and ECG signals. In total, 16140 organ-level simulations were conducted to create this dataset, using a range of cardiac geometries and physiological parameters. Simulations were performed at LLNL's Lassen supercomputer, concurrently utilizing 4 GPUs and 40 CPU cores. Each simulation produced pairs of 500ms-by-10 ECG signals and 500ms-by-75 transmembrane voltage signals. For convenience, the signals are concatenated and saved as matrices. Each of these matrices is then stored as a numpy array. See the documentation for further details.

Landajuela, Mikel↗

Influence of Lake Ice Biases in Reanalysis Data on Downscaled Climate Simulations over the Great Lakes Region

This data package contains observation-based and model-simulated datasets (all provided in NetCDF format) for evaluating how wintertime lake-ice representation affects regional weather and climate over the Laurentian Great Lakes (freshwater lake ecosystem) during the high–ice-cover winter of 2009. The observational component includes: (1) Stage IV gridded precipitation at 4 km, hourly resolution for January–February 2009 over the Great Lakes region (radar–gauge multisensor precipitation analyses); (2) Great Lakes Surface Environmental Analysis (GLSEA) satellite-derived lake-ice coverage at 1.3 km, daily resolution for the 2009 winter months, providing ice coverage over Lakes Superior, Michigan, Huron, Erie, and Ontario; and (3) in situ measurements at the Standard Rock site on Lake Superior from the Great Lakes Evaporation Network (GLEN) at hourly resolution, including near-surface atmospheric variables and sensible and latent heat fluxes (air–lake exchange) at a fixed point location. The modeling component provides corresponding fields from two simulations, both archived at 4 km, hourly resolution: a standalone Weather Research Forecasting model (WRF) run driven by the European Centre for Medium-Range Weather Forecasts (ECMWF) Reanalysis 5 (ERA5), and a two-way coupled model using WRF and the Finite Volume Community Ocean Model (WRF-FVCOM, a 3-D hydrodynamic lake model). These outputs include variables relevant to air–lake interaction and lake-effect processes (e.g., near-surface temperature, humidity, wind, precipitation, and surface turbulent fluxes), enabling direct comparison with the observational datasets. Users can analyze and visualize these NetCDF files with common tools such as Python (e.g., xarray, netCDF4, numpy, pandas), NCO/CDO, Panoply, or ncview; NetCDF variables can also be converted to other formats (e.g., CSV, GeoTIFF) using these utilities.

EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC TEMPERATU↗

IDAES-PSE 2.6.0 Release

The Institute for the Design of Advanced Energy Systems (IDAES) Integrated Platform is a versatile computational environment offering extensive process systems engineering (PSE) capabilities for optimizing the design and operation of complex, interacting technologies and systems. IDAES enables users to efficiently search vast, complex design spaces to discover the lowest cost solutions while supporting the full process modeling lifecycle, from conceptual design to dynamic optimization and control. The extensible, open platform empowers users to create models of novel processes and rapidly develop custom analyses, workflows, and end-user applications. IDAES-PSE 2.6.0 Release Highlights Upcoming Changes IDAES will be switching to the new Pyomo solver interface in the next release. Whilst this will hopefully be a smooth transition for most users, there are a few important changes to be aware of. The new solver interface uses a different version of the IPOPT writer (“ipopt_v2”) and thus any custom configuration options you might have set for IPOPT will not carry over and will need to be reset. By default, the new Pyomo linear presolver will be activated with ipopt_v2. Whilst are working to identify any bugs in the presolver, it is possible that some edge cases will remain. IDAES will begin deploying a new set of scaling tools and APIs over the next few releases that make use of the new solver writers. The old scaling tools and APIs will remain for backward compatibility but will begin to be deprecated. New Models, Tools and Features New Intersphinx extension automatically linking Jupyter notebook examples to project documentation New end-to-end diagnostics example demonstrated on a real problem New complementarity formulation for VLE with cubic equations of state, backward compatibility for old formulation New solver interface with presolve (ipopt_v2) in support of upcoming changes to the initialization and APIs methods, with default set to ipopt to maintain backwards compatibility; this will deprecate once all examples have been updated New forecaster and parameterized bidder methods within grid integration library Updated surrogates API and examples to support Keras 3, with backwards compatibility for older formats such as TensorFlow SavedModel (TFSM) Updated costing base dictionary to include the 2023 cost year index value Updated ProcessBlock to include information on the constructing block class Updated Flowsheet Visualizer to allow visualize() method to return value and functions Bug Fixes Fixed bug in the Modular Property Framework that would cause errors when trying to use phase-based material balances with phase equilibria. Fixed bug in Modular Properties Framework that caused errors when initializing models with non-vapor-liquid phase equilibria. Fixed typos flagged by June update to crate-ci/typos and removed DMF-related exceptions Minor corrections of units of measurement handling in power plant waste/transport costing expressions, control volume material holdup expressions, and BTX property package parameters Fixed throwing >7500 numpy deprecation warnings by replacing scalar value assignment with element extraction and item iteration calls Testing and Robustness Migrated slow tests (>10s) to integration, impacting test coverage but also yielding a nearly 30% decrease in local test runtime Pinned pint to avoid issues with older supported Python versions Pinned codecov versions to avoid tokenless upload behavior with latest version Bumped extensions to version 3.4.2 to allow pointing to non-standard install location Deprecations and Removals Python 3.8 is no longer supported. The supported Python versions are 3.9 through 3.12 The Data Management Framework (DMF) is no longer supported. Importing idaes.core.dmf will cause a deprecation warning to be displayed until the next release The SOFC Keras surrogates have been removed. The current version of the SOFC surrogate model in the examples repository is a PySMO Kriging model.

AS↗

CCSI Toolset 3.18 Release

CCSI Toolset 3.18 Release Highlights FOQUS was updated to allow installation for users using MacOS on Apple silicon. FOQUS Cloud support was added for user plugins. The Optimality-Based Design of Experiments tutorials were updated to reflect the latest changes in the user interface flow. The plot discrete sliders were fixed for CDF and 3D plots within Uncertainty Quantification, which were not working due to a matplotlib depreciation. The installation was updated to set the default location for the PSUADE executable if found in the environment. Updates were made to allow compatibility with NumPy 1.25. Additional documentation changes were made to fix typographical errors and fix a broken link to optional software.

AS↗

ML-based Micro-CT SOFC Microstructure Models (from Kent 2026 Microstructural Augmentation paper)

Overview -------------------------- This repository contains datasets from the manuscript **"Enhanced Generalizability to Deep-Learning Quantification of 3D Microstructural Characteristics through Microstructurally Aware Augmentation of Scarce Data"** (*William F. Kent, Rochan Bajpai, Rachel C. Kurchin, William K. Epting, Harry W. Abernathy, Paul A. Salvador. Submitted 2026*). The methods are also described in the dissertation **Data Intensive Analysis of Solid Oxide Cell Microstructures** (*Doctoral dissertation, Carnegie Mellon University, 2025*). The datasets here are trained convolutional neural network (CNN) models for predicting key microstructural properties of solid oxide cell (SOC) electrodes from low-res, 2-channel 3D images, as well as some helpful code. The parameters for input images are provided in the paper. Sample data is provided in the file `Combined_anode_aug_dual_1k_examples` - that particular data was used to train `anode_all_aug.pth` and will work most accurately with that model. Please familiarize yourself with all caveats on accuracy and applicability, as detailed in the associated paper. Usage -------------------------- The basic usage is as follows, assuming `model_fn` is the path to the .pth file, and `X` is 2-channel input image(s) of the proper dimensions (either one image of shape `[2,12,24,24]`, or a batch of N input images of shape `[N,2,12,24,24]`): from CNN_inferencer import load_model_for_inference model = load_model_for_inference(model_fn) y_predicted = model(X) The model object automatically handles input scaling and output de-scaling based on the way the models were trained - in other words, pass in a 2-channel micro-CT image, and it will output microstructural property values in real units. ## Other model object attributes Note that model has useful attributes other than its forward pass model(X). * `model.output_descaler` - returns the output descaler object. Model does the de-scaling when generating inferences, but you may want to re-use this de-scaler on other values to e.g. compare predictions to ground truth from already-scaled training data. * `model.prop_names` - Gives the property names of the predicted y values, in order. Only exists if there's an output scaler as part of the model object, which there will be in the models provided here. ## Usage with sample data Here is a short script to use with the included sample data. from CNN_inferencer import display_predictions, load_model_for_inference, calculate_mape, parity_plot import h5py import numpy as np model_fn = 'anode_all_aug.pth' data_fn = 'Combined_anode_aug_dual_1k_examples.h5' N_samples = 200 figure_outdir = '.' model = load_model_for_inference(model_fn) with h5py.File(data_fn,'r') as f: XX = f['X'] #These are the 2-channel 3D images yy = f['y'] #These are the ground-truth microstructural properties, but they have been scaled for training - need to de-scale below N = XX.shape[0] #How many images total in the input data file #Run inferences on N_samples random samples from XX. #Run in a batch, much more efficient than one at a time. ii = np.random.choice(N,N_samples,replace=False) ii.sort() y_pred = model(XX[ii]) #Get the original/true (but normalized/scaled) values from the training dataset... #Because they were normalized, they are not in real units yet. So let's also de-scale them using model.output_scaler. y_true = model.output_scaler.transform(yy[ii]) #Let's display actual values for just 5 random ones for i in np.random.choice(N_samples,5,replace=False): display_predictions(y_true[i], y_pred[i], model.prop_names) #Make parity plots for each property (ground truth vs predicted values) #Also label each plot with the mean abs. percent error (MAPE) of the predicted values for i,key in enumerate(model.prop_names): mape = calculate_mape(y_true[:,i], y_pred[:,i]) parity_plot(y_true[:,i], y_pred[:,i], figure_outdir, key, extra_title=f' ({mape:.2f}% MAPE)')

3D microstructure↗

Scientific Computational Imaging Code (SCICO)

Scientific Computational Imaging Code (SCICO) is a Python package for solving the inverse problems that arise in scientific imaging applications. Its primary focus is providing methods for solving ill-posed inverse problems by using an appropriate prior model of the reconstruction space. SCICO includes a growing suite of operators, cost functionals, regularizers, and optimization routines that may be combined to solve a wide range of problems, and is designed so that it is easy to add new building blocks. SCICO is built on top of JAX rather than NumPy, enabling GPU/TPU acceleration, just-in-time compilation, and automatic gradient functionality, which is used to automatically compute the adjoints of linear operators. An example of how to solve a multi-channel tomography problem with SCICO is shown in Figure 1. The SCICO source code is available from GitHub, and pre-built packages are available from PyPI. It has extensive online documentation, including API documentation and usage examples, which can be run online at Google Colab and binder.

97 MATHEMATICS AND COMPUTING↗

The Generalized Green’s function Cluster Expansion: A Python package for simulating polarons

We present an efficient implementation of the Generalized Green’s function Cluster Expansion (GGCE), which is a new method for computing the ground-state properties and dynamics of polarons (single electrons coupled to lattice vibrations) in model electron-phonon systems. The GGCE works at arbitrary temperature and is well suited for a variety of electron-phonon couplings, including, but not limited to, site and bond Holstein and Peierls (Su-SchriefferHeeger) couplings, and couplings to multiple phonon modes with different energy scales and coupling strengths. Quick calculations can be performed efficiently on a laptop using solvers from NumPy and SciPy, or in parallel at scale using the PETSc sparse linear solver engine.

36 MATERIALS SCIENCE↗

The Polar System Analysis Package (Ver. 1 Specifications)

The Polar System Analysis Package (POLeSTAr) is a modern data fusion tool being designed to benchmark,evaluate and compare the polar physics and biogeochemistry of Earth System Models (ESMs). It is being written in Python to make use of libraries including Xarray, Matplotlib, SciPy, NumPy and PyTorch within algorithms developed specifically for polar system modeling. Initial POLeSTAr algorithms will be adapted from the MATLAB Ridgepack package that was designed to analyze the Model for Prediction Across Scales (MPAS) sea ice component of the Energy Exascale Earth System Model (E3SM) and sea ice model CICE within the Community Earth System Model (CESM).

97 MATHEMATICS AND COMPUTING↗

Guide to runquic.py Python Script

The runquic.py Python script uses Python 3.8 or newer and requires several Python packages to be installed including: NumPy, SciPy, Pandas, Geopandas, and Shapely. The script assumes that the batch QUIC of project folders with all of the input files (except for any input files interpolated from WRF output files) have already be saved to the drive and are ready to be run. If the project is set to use WRF model output, it will be interpolated at runtime.

97 MATHEMATICS AND COMPUTING↗

Fast Semi-automated Filtration Method for Non-targeted LC-QTOF Data of Aged Nitroplasticizer Samples

A full dataset of aged nitroplasticizer (NP) is composed of more than 2000 unique mass-to-charges (m/z) when combining the non-targeted data obtained from both positive and negative electrospray ionization modes in time-of-flight mass spectrometry. Therefore, manual processing of these data often takes days, weeks, or even months to scrutinize for mechanistic insights. To effectively extract meaningful signals that represent vital degradation intermediates in the early NP degradation mechanism, a semi-automated postprocessing workflow for data filtering, tailored to the aging experiment of NP, has been developed. The automated portion of this workflow is written in a Python code (using pandas, numpy, and matplotlib libraries), which removes more than 65% of potential false signals within seconds via four threshold-based adjustable filters: signal sensitivity, coefficient of variation, number of measurements, and retention time variability. As for the manual portion, a pattern-based inspection method is employed to reduce another 23% or more false positives, which greatly simplifies data visualization and results in less than 3% of potential candidate m/z needing in-depth data interpretation. As a positive control, known compounds are verified. Using this semi-automated data reduction method, the amount of time required is reduced to a matter of hours for data filtering in the non-targeted datasets of aged NP, which saves more time and effort for compound identification.

36 MATERIALS SCIENCE↗

Feature Extraction: Improving Remote Sensor Classification of Non-Proliferation

This research focuses on developing algorithms for nuclear non-proliferation detection using remote sensor modeling. To improve the performance of classification models, we implemented a data pipeline with feature extraction. This pipeline takes raw data and transforms it into smaller data points called features that still describe the model. Improving this classification works towards the departments of energy’s missions of ensuring American’s security and prosperity by creating technology that addresses nuclear challenges. To conduct this analysis, we used the Python programming language and some key packages, including tsfresh and TSFEL. Originally tsfresh was selected because it has the most statistical features out of all the packages. Later TSFEL was incorporated due to the additional features it can extract from data, such as temporal and spectral. However, feature extraction becomes challenging in the presence of missing values. In this case, two additional Python packages were added to our workflow, NumPy and pandas, allowing for the feature extraction process to handle unknown values. Our data pipeline was tested on data collected from a simulation that describes the process state of a physical example. The results show the pipeline’s capability to consume and extract a total 17 features from tabular data. Future work includes producing classifications using decision tree-based models such as XGBoost and improving data collection by analyzing feature importance.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

Improving Runtime Performance of Tensor Computations using Rust From Python

In this work, we investigate improving the runtime performance of key computational kernels in the Python Tensor Toolbox (pyttb), a package for analyzing tensor data across a wide variety of applications. Recent runtime performance improvements have been demonstrated using Rust, a compiled language, from Python via extension modules leveraging the Python C API—e.g., web applications, data parsing, data validation, etc. Using this same approach, we study the runtime performance of key tensor kernels of increasing complexity, from simple kernels involving sums of products over data accessed through single and nested loops to more advanced tensor multiplication kernels that are key in low-rank tensor decomposition and tensor regression algorithms. In numerical experiments involving synthetically generated tensor data of various sizes and these tensor kernels, we demonstrate consistent improvements in runtime performance when using Rust from Python over 1) using Python alone, 2) using Python and the Numba just-in-time Python compiler (for loop-based kernels), and 3) using the NumPy Python package for scientific computing (for pyttb kernels).

97 MATHEMATICS AND COMPUTING↗

Comparing the Performance of Julia on CPUs versus GPUs and Julia-MPI versus Fortran-MPI: a case study with MPAS-Ocean (Version 7.1)

Abstract. Some programming languages are easy to develop at the cost of slow execution, while others are fast at runtime but much more difficult to write. Julia is a programming language that aims to be the best of both worlds – a development and production language at the same time. To test Julia's utility in scientific high-performance computing (HPC), we built an unstructured-mesh shallow water model in Julia and compared it against an established Fortran-MPI ocean model, the Model for Prediction Across Scales–Ocean (MPAS-Ocean), as well as a Python shallow water code. Three versions of the Julia shallow water code were created: for single-core CPU, graphics processing unit (GPU), and Message Passing Interface (MPI) CPU clusters. Comparing identical simulations revealed that our first version of the Julia model was 13 times faster than Python using NumPy, where both used an unthreaded single-core CPU. Further Julia optimizations, including static typing and removing implicit memory allocations, provided an additional 10–20× speed-up of the single-core CPU Julia model. The GPU-accelerated Julia code was almost identical in terms of performance to the MPI parallelized code on 64 processes, an unexpected result for such different architectures. Parallelized Julia-MPI performance was identical to Fortran-MPI MPAS-Ocean for low processor counts and ranges from 2× faster to 2× slower for higher processor counts. Our experience is that Julia development is fast and convenient for prototyping but that Julia requires further investment and expertise to be competitive with compiled codes. We provide advice on Julia code optimization for HPC systems.

54 ENVIRONMENTAL SCIENCES↗

Dataset for "Climatic and socioeconomic drivers of water use and their spatio-temporal patterns for small and mid-sized cities in the Contiguous United States"

This dataset contains all code for calibrating and analyzing machine learning models for "Climatic and socioeconomic drivers of water use and their spatio-temporal patterns for small and mid-sized cities in the Contiguous United States". Please unzip the folders and follow the instructions from 'README.txt'. Required python modulessklearn=1.2.2numpy=1.23.3xgboost=2.0.2joblib=1.2.0 Required R libraryshapFlex:devtools::install_github("nredell/shapFlex")library(shapFlex)

Dave, Hari [Civil and Environmental Engineering De↗