Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python interface”

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

Best practices for documenting a scientific Python project

Documentation is a crucial component of software development that helps users with installation and usage of the software. Documentation also helps onboard new developers to a software project with contributing guidelines and API information. The INTERSECT project is an open federated hardware/software library to facilitate the development of au- tonomous laboratories. A documentation strategy using Sphinx has been utilized to help developers contribute to source code and to help users understand the INTERSECT Python interface. Docstrings as well as reStructuredText files are used by Sphinx to automatically compile HTML and PDF files which can be hosted online as API documentation and user guides. The resulting documentation website is automatically built and deployed using GitLab runners to create Docker containers with NGINX servers. The approach discussed in this paper to automatically deploy documentation for a Python project can improve the user and developer experience for many scientific projects.

Wiggins, Gavin↗

Python-Based Scientific Analysis and Visualization of Precipitation Systems at NASA Marshall Space Flight Center

At NASA Marshall Space Flight Center (MSFC), Python is used several different ways to analyze and visualize precipitating weather systems. A number of different Python‐based software packages have been developed, which are available to the larger scientific community. The approach in all these packages is to utilize pre‐existing Python modules as well as to be object‐oriented and scalable. The first package that will be described and demonstrated is the Python Advanced Microwave Precipitation Radiometer (AMPR) Data Toolkit, or PyAMPR for short. PyAMPR reads geolocated brightness temperature data from any flight of the AMPR airborne instrument over its 25‐year history into a common data structure suitable for user‐defined analyses. It features rapid, simplified (i.e., one line of code) production of quick‐look imagery, including Google Earth overlays, swath plots of individual channels, and strip charts showing multiple channels at once. These plotting routines are also capable of significant customization for detailed, publication‐ready figures. Deconvolution of the polarization‐varying channels to static horizontally and vertically polarized scenes is also available. Examples will be given of PyAMPR's contribution toward real‐time AMPR data display during the Integrated Precipitation and Hydrology Experiment (IPHEx), which took place in the Carolinas during May‐June 2014. The second software package is the Marshall Multi‐Radar/Multi‐Sensor (MRMS) Mosaic Python Toolkit, or MMM‐Py for short. MMM‐Py was designed to read, analyze, and display three‐dimensional national mosaicked reflectivity data produced by the NOAA National Severe Storms Laboratory (NSSL). MMM‐Py can read MRMS mosaics from either their unique binary format or their converted NetCDF format. It can also read and properly interpret the current mosaic design (4 regional tiles) as well as mosaics produced prior to late July 2013 (8 tiles). MMM‐Py can easily stitch multiple tiles together to provide a larger regional or national picture of precipitating weather systems. Composites, horizontal and vertical crosssections, and combinations thereof are easily displayed using as little as one line of code. MMM‐Py can also write to the native MRMS binary format, and sub‐sectioning of tiles (or multiple stitched tiles) is anticipated to be in place by the time of this meeting. Thus, MMM‐Py also can be used to power the creation of custom mosaics for targeted regional studies. Overlays of other data (e.g., lightning observations) are easily accomplished. Demonstrations of MMM‐Py, including the creation of animations, will be shown. Finally, Marshall has done significant work to interface Python‐based analysis routines with the U.S. Department of Energy's Py‐ART software package for radar data ingest, processing, and analysis. One example of this is the Python Turbulence Detection Algorithm (PyTDA), an MSFC‐based implementation of the National Center for Atmospheric Research (NCAR) Turbulence Detection Algorithm (NTDA) for the purposes of convective‐scale analysis, situational awareness, and forensic meteorology. PyTDA exploits Py‐ART's radar data ingest routines and data model to rapidly produce aviation‐relevant turbulence estimates from Doppler radar data. Work toward processing speed optimization and better integration within the Py‐ART framework will be highlighted. Python‐based analysis within the Py‐ART framework is also being done for new research related to intercomparison of ground‐based radar data with satellite estimates of ocean winds, as well as research on the electrification of pyrocumulus clouds.

Lang, Timothy J.↗

AtomAI framework for deep learning analysis of image and spectroscopy data in electron and scanning probe microscopy

Over the past several decades, electron and scanning probe microscopes have become critical components of condensed matter physics, materials science and chemistry research. At the same time, the infrastructure for establishing a connection between microscopy observations and materials behaviour over a broader parameter space is lacking. In this work, we introduce AtomAI, an open-source software package bridging instrument-specific Python libraries, deep learning and simulation tools into a single ecosystem. AtomAI allows direct applications of deep neural networks for atomic and mesoscopic image segmentation converting image and spectroscopy data into class-based local descriptors for downstream tasks such as statistical and graph analysis. For atomically resolved imaging data, the output is types and positions of atomic species, with an option for subsequent refinement. AtomAI further allows the implementation of a broad range of image and spectrum analysis functions, including invariant variational autoencoders for disentangling structural factors of variation and im2spec type of encoder–decoder models for mapping structure–property relationships. Finally, our framework allows seamless connection to the first principles modelling with a Python interface on the inferred atomic positions.

36 MATERIALS SCIENCE↗

Developments in SRW Code and Sirepo Framework Supporting Simulation of Time-Dependent Coherent X-ray Scattering Experiments

Physical optics simulations for beamlines and experiments are essential for the effective use of synchrotron light source facilities such as NSLS-II at BNL. The SRW software package supports such source-to-detector simulations for coherent X-ray scattering and imaging experiments through its Python interface and Sirepo browser-based graphical user interface. This allows one to define custom sample models, assess the feasibility of an experiment, and estimate most appropriate beamline settings before using valuable beamtime. We discuss the recent use of general-purpose GPU resources and coherent mode decomposition algorithms in SRW to accelerate physical optics simulations with partially coherent X-rays. To illustrate these new capabilities, we describe simulations of typical time series of partially coherent scattering images used in X-ray Photon Correlation Spectroscopy (XPCS) experiments; aiming to characterize the nanoscale dynamics of a disordered sample, representing a solution of nanoparticles undergoing Brownian diffusion.

36 MATERIALS SCIENCE↗

NeuroCoreX: An Open-Source FPGA-Based Spiking Neural Network Emulator with On-Chip Learning

Spiking Neural Networks (SNNs) are computational models inspired by the event-driven communication and connectivity patterns of biological neural circuits. They enable high energy efficiency and natural support for diverse architectures ranging from layered networks to small-world and graphstructured topologies. In this work, we introduce NeuroCoreX, an open-source, FPGA-based spiking neural network emulator that provides real-time, on-chip learning and flexible network organization. NeuroCoreX supports both feedforward sensory inputs streamed directly from sensors or PCs via UART and recurrent on-chip connectivity, enabling simultaneous processing and learning from external stimuli and internal network dynamics-capabilities rarely available in existing FPGA SNN platforms. The system implements a Leaky Integrate-and-Fire (LIF) neuron model with current-based synapses and supports pair-based STDP learning on both feedforward and recurrent synapses. A lightweight Python interface enables interactive configuration, live monitoring, weight read-back, and experiment control. Importantly, NeuroCoreX is tightly integrated with the SuperNeuroMAT simulator, allowing SNN models to be transferred seamlessly from software to hardware for hardware-in-the-loop development. By combining real-time plasticity, flexible connectivity, and an open-source VHDL implementation, NeuroCoreX provides an extensible and accessible platform for neuromorphic research, algorithm-hardware co-design, and energy-efficient edge intelligence.

Gautam, Ashish [ORNL]↗

Montepy

Montepy is an object-oriented Python interface for MCNP input files. It excels at reading, editing, creating, and writing MCNP input files. The Monte Carlo N Particle (MCNP) code is a Monte Carlo transport solver for simulating many different types of radiation problems and is developed by Los Alamos National Laboratory. Montepy creates an object-oriented interface for the MCNP input file to allow for efficient automated modifications to large, complex simulations.

Gale, Micah [Idaho National Laboratory (INL), Idah↗

Powersheds

Powersheds is an open scientific software project for simulating river–reservoir cascades. It combines the performance of Rust with a friendly Python interface to model storage, pool elevation, head, releases, spills, routing lags, and power generation at hourly resolution. Designed for coupling with power-system models, simulations are driven by plant-level target power schedules and report realized generation after accounting for hydrologic and operational constraints.

Turner, Sean [Oak Ridge National Laboratory (ORNL)↗

An Open-Source Framework for Rapid Validation of Scientific ASICs

Spacely is an open-source framework for the post-silicon validation of analog, digital, and mixed-signal ASICs (Application-Specific Integrated Circuits) which maximizes the reuse of hardware and software, reducing the time taken to achieve meaningful test results. Spacely specifically addresses the needs of small, flexible ASIC design teams commonly found in academia or research institutions which benefit most from sharing the overhead of test stand creation between many unique ASIC designs. Spacely is a set of software, firmware, and design practices. It targets two primary hardware platforms (NI-PXI and Caribou) as well as offering extensible support for bench instruments. Spacely provides a high-level Python interface to all test hardware for accessibility, while also giving more sophisticated teams the opportunity to integrate custom test firmware. The design principles of Spacely are presented in brief. Current documentation is available at https://github.com/SpacelyProject/spacely-docs.

Quinn, Adam [Fermilab]↗

Advancing Concentrating Solar Thermal Modeling Using System Advisor Model (SAM)

Concentrating solar thermal (CST) technologies play a critical role in enabling dispatchable power and high-temperature industrial heat applications. Accurate and flexible modeling tools are essential for evaluating system performance, guiding technology research and development, and informing investment decisions. The National Laboratory of the Rockies's System Advisor Model (SAM) is a widely used techno-economic simulation platform for CST systems, providing detailed performance and financial modeling capabilities for multiple CST system configurations. SAM integrates physics-based performance models with financial analysis to simulate the behavior of complex energy systems under realistic operating conditions. For CST technologies (including tower, parabolic trough, and linear Fresnel), SAM enables hourly simulations using site-specific weather data that ensure feasible operating conditions and convergence of mass and energy between core system components (i.e., solar field, receiver, thermal energy storage, and power cycle). These capabilities allow researchers and developers to evaluate annual energy production, capacity factors, levelized cost of energy (LCOE), and system dispatch strategies. A key advantage of SAM lies in its flexibility for parametric analysis and large-scale computational studies. Users can vary system design parameters such as heliostat field layout, receiver dimensions, thermal energy storage capacity, power block sizing, and installation cost assumptions to investigate their impact on system performance and financial metrics. When combined with automated scripting through LK, SDKTool, or Python interfaces, SAM enables high-throughput simulation workflows that support sensitivity analysis, technology benchmarking, and optimization studies. These approaches are particularly valuable for next-generation CST concepts, where design spaces are large and system interactions are complex. Another important capability of SAM is its support for dispatch optimization and thermal energy storage modeling, which are central to the value proposition of CST technologies. The ability to simulate integrated storage and flexible power generation allows researchers to explore strategies that maximize grid value, improve capacity utilization, and enhance integration with variable resources such as photovoltaic and wind generation. This poster will present an overview of SAM's thermal system modeling capabilities including concentrating solar. Additionally, we will highlight new feature developments including: 1) implementing Google's OR-Tools optimization platform for faster and more robust dispatch optimization, 2) developing a new power load following controller for modeling behind-the-meter applications, 3) enabling direct modeling of CSP-PV hybrid systems with the inclusion of battery storage, and 4) developing a multi-receiver falling particle Gen3 system model.

14 SOLAR ENERGY↗

An Open-Source Framework for Rapid Validation of Scientific ASICs

Spacely is an open-source framework for the post-silicon validation of analog, digital, and mixed-signal ASICs (Application-Specific Integrated Circuits) which maximizes the reuse of hardware and software, reducing the time taken to achieve meaningful test results. Spacely specifically addresses the needs of small, flexible ASIC design teams commonly found in academia or research institutions which benefit most from sharing the overhead of test stand creation between many unique ASIC designs. Spacely is a set of software, firmware, and design practices. It targets two primary hardware platforms (NI-PXI and Caribou) as well as offering extensible support for bench instruments. Spacely provides a high-level Python interface to all test hardware for accessibility, while also giving more sophisticated teams the opportunity to integrate custom test firmware. The design principles of Spacely are presented, along with a demonstrative example of using Spacely to test a pixel detector readout ASIC.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

Python & Qt, Powerful Tools for Technical Computing

The objective of this presentation is to give a brief overview of Python computer language and Qt for Python which provides an interface to Python for building graphical applications. The Qt language provides a method for rapid programming of Graphical User Interfaces (GUIs) that are highly scalable, robust and platform independent. Both Python and Qt provide a powerful set of tools for Dynamic Analysis which are based on Open-Source software. Many problems and calculations in Structural Dynamics such as Power Spectral Density, Shock Response Spectrum and Vibration Response Spectrum can be easily calculated using these tools. The advantage of using Open-Source software is the ability to create custom graphical user interfaces similar to Matlab without the expense of software licensing and the ability to customize the software to an organization's specific needs. Also, another advantage is the ability to know which algorithms are being used by the GUI, know the numerical limitations and scale to large size data sets. I will end the presentation by demonstrating a Structural Dynamics GUI I created that was designed primarily to interactively analyze Post Flight high speed data provided by the ground station telemetry networks.

Grillo, Vincent↗

Imaging Bragg Edge Analysis TooLs for Engineering Structures (iBeatles)

The Spallation Neutron Source (SNS) at Oak Ridge National Laboratory (ORNL) provides pulsed neutrons with energies varying from epithermal to cold. In preparation for VENUS, the neutron imaging beamline to be located at beam port 10, we have performed a series of experiments focused on wavelength-dependent radiography and computed tomography for a broad range of applications, from materials science to biological tissues.One of the time-of-flight (TOF) techniques that is of interest to the scientific community is the 2-dimensional mapping of phases and average crystalline plane orientation in samples both ex-situ and during applied stresses such as tensile loading and heating. This technique is known as Bragg edgeimaging and relies on the identification of changes of transmission values, fitting of the edge to measure its displacement, and thus identify the shift in lattice parameter due to stresses. One of the challenges of TOF imaging measurements is the amount of data and the inability to observe Bragg edge shifts in real time during an experiment. Thus, we have been focusing on creating a Python-based interface that allows fast data processing and instantaneous mapping and fitting of the Bragg edges, and their evolution through time. Python libraries and Jupyter notebooks have been implemented to facilitate decision making during an experiment. The advantage of the notebooks is the possibility to guide an experiment as they can quickly process and display Bragg edge data. These notebooks can be used independently, or can be combined in a Python Graphical User Interface (GUI) tool called iBeatles. This interface permits visualization and fitting of the Bragg edges, and ultimately back-projects the fitting results onto the radiographs to display a strain map. Assuming data collection has sufficient statistics, the strain mapping analysis can be performed on a pixel-by-pixel basis. This development is a step forward toward a better user experience at the future VENUS beamline in terms of live feedback and productivity. Analysis that used to take days of switching between different applications can now be done in minutes within the

Bilheux, JeanChristophe [Oak Ridge National Labora↗

Simulating Responses of Gravitational-Wave Instrumentation

Synthetic LISA is a computer program for simulating the responses of the instrumentation of the NASA/ESA Laser Interferometer Space Antenna (LISA) mission, the purpose of which is to detect and study gravitational waves. Synthetic LISA generates synthetic time series of the LISA fundamental noises, as filtered through all the time-delay-interferometry (TDI) observables. (TDI is a method of canceling phase noise in temporally varying unequal-arm interferometers.) Synthetic LISA provides a streamlined module to compute the TDI responses to gravitational waves, according to a full model of TDI (including the motion of the LISA array and the temporal and directional dependence of the arm lengths). Synthetic LISA is written in the C++ programming language as a modular package that accommodates the addition of code for specific gravitational wave sources or for new noise models. In addition, time series for waves and noises can be easily loaded from disk storage or electronic memory. The package includes a Python-language interface for easy, interactive steering and scripting. Through Python, Synthetic LISA can read and write data files in Flexible Image Transport System (FITS), which is a commonly used astronomical data format.

Armstrong, John↗

Computational Workbench for Multibody Dynamics

PyCraft is a computer program that provides an interactive, workbenchlike computing environment for developing and testing algorithms for multibody dynamics. Examples of multibody dynamic systems amenable to analysis with the help of PyCraft include land vehicles, spacecraft, robots, and molecular models. PyCraft is based on the Spatial-Operator- Algebra (SOA) formulation for multibody dynamics. The SOA operators enable construction of simple and compact representations of complex multibody dynamical equations. Within the Py-Craft computational workbench, users can, essentially, use the high-level SOA operator notation to represent the variety of dynamical quantities and algorithms and to perform computations interactively. PyCraft provides a Python-language interface to underlying C++ code. Working with SOA concepts, a user can create and manipulate Python-level operator classes in order to implement and evaluate new dynamical quantities and algorithms. During use of PyCraft, virtually all SOA-based algorithms are available for computational experiments.

Edmonds, Karina↗

CrossLink: Geometry API [Slides]

The mesh generation process is very challenging and time consuming when working with complex CAD models. The process of creating and sorting geometric entities into groups appropriate for meshing is labor intensive and prone to error. In addition, the common data exchange formats such as STEP and IGES do not propagate information such as entity names that may be defined in the original model. Finally, entity counts change frequently with parameter variation as a result of tolerance-based geometry operations. Thus, sorting by index does not provide a robust and repeatable means for grouping. xGeom is a geometry library that enables the creation of NURBS curves and surfaces via a python scripting interface. xGeom is ideal for studying relatively simple models and is fully integrated with CrossLink’s mesh generation capabilities. For more complex models, xCAD is a python-based Creo Parametric CAD model driver that enables the model to be generated, queried, parametrically modified, regenerated, and exported without data loss and in a fully repeatable manner.

97 MATHEMATICS AND COMPUTING↗

Equilipy: a python package for calculating phase equilibria

The CALPHAD (CALculation of PHAse Diagram) approach (Nigel Saunders & Miodownik, 1998) provides predictions for thermodynamically stable phases in multicomponent-multiphase materials across a wide range of temperatures. Consequently, the CALPHAD calculations became an essential tool in materials and process design (Luo, 2015). Such design tasks frequently require navigating a high-dimensional space due to multiple components involved in the system. This increasing complexity demands high-throughput CALPHAD calculations, especially in the rapidly evolving field of alloy design. In response to the need, we developed Equilipy an open-source Python package designed for calculating phase equilibria of multicomponent-multiphase systems. Equilipy is specifically tailored for high-throughput CALPHAD calculations, offering parallel computations across multiple processors and nodes with the given NPT input conditions namely elemental compositions (N), pressure (P), and temperature (T). Equilipy utilizes the program structure and Gibbs energy functions from the Fortran-based program, Thermochimica (Piro et al., 2013), with incorporating a new Gibbs energy minimization algorithm. This algorithm, originally developed by Capitani and Brown in 1987 (Capitani & Brown, 1987), has been revised and implemented to enhance the stability and performance of calculations. The Fortran codes are precompiled and interfaced with Python via F2PY, ensuring high computation speed. Benchmark tests shown in Figure 1 demonstrate that Equilipy’s computation speed is comparable to those of established commercial software, TC-Python and PanPython. This result highlights its efficiency and potential applications in various scientific and industrial fields.

97 MATHEMATICS AND COMPUTING↗

Boosting RDataFrame performance with transparent bulk event processing

RDataFrame is ROOT’s high-level interface for Python and C++ data analysis. Since it first became available, RDataFrame adoption has grown steadily and it is now poised to be a major component of analysis software pipelines for LHC Run 3 and beyond. Thanks to its design inspired by declarative programming principles, RDataFrame enables the development of highperformance, highly parallel analyses without requiring expert knowledge of multi-threading and I/O: user logic is expressed in terms of self-contained, small computation kernels tied together by a high-level API. This design completely decouples analysis logic from its actual execution, and opens several interesting avenues for workflow optimization. In particular, in this work we explore the benefits of moving internal data processing from an event-by-event to a bulkby-bulk loop. This refactoring dramatically reduces the framework’s runtime overheads; in collaboration with the I/O layer it improves data access patterns; it exposes information that optimizing compilers might use to auto-vectorize the invocation of user-defined computations; finally, while existing user-facing interfaces remain unaffected, it becomes possible to additionally offer interfaces that explicitly expose bulks of events, useful e.g. for the injection of GPU kernels into the analysis workflow. In order to inform similar future R&D, design challenges will be presented, as well as an investigation of the relevant timememory trade-off backed by novel performance benchmarks.

Guiraud, Enrico↗

HydroEcoLSTM: A Python package with graphical user interface for hydro-ecological modeling with long short-term memory neural network

Machine learning (ML) is emerging as a promising tool for modeling hydro-ecological processes due to the increasing availability of large environmental data. However, the use of ML requires sufficient programming knowledge due to a lack of a graphical user interface (GUI). In this study, we introduced a GUI package, named HydroEcoLSTM, with the long short-term memory network (LSTM) as the core model, that allows non-ML experts to utilize their domain knowledge to construct complex ML models. We demonstrated the functionalities of HydroEcoLSTM with two practical examples, including (1) predictions of streamflow in both gauged and ungauged catchments and (2) predictions of multiple outputs (i.e., streamflow and isotope transport from two catchments). The simulation results obtained in both case experiments are satisfactory. In the first example, the average Nash–Sutcliffe Efficiency (NSE) for streamflow simulation during the testing period is 0.79 while the application of the trained model in two assumed ungauged catchments also achieves the average NSE of 0.68. In the second example, the average NSE for streamflow and instream isotope simulation during the testing period is 0.71. Ultimately, applications of HydroEcoLSTM with real-world examples demonstrate its potential use for practical applications and research without requiring extensive coding skills.

54 ENVIRONMENTAL SCIENCES↗