Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python API”

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 19 records

Python package for machine-readable access to PDG data (PDG Python API) v0.1

This Python package implements a high-level interface to access the data published by the Particle Data Group (PDG) in the Review of Particle Physics (the "Review"). The Particle Data Group is an international collaboration led by the PDG group at LBNL. The PDG summarizes the established knowledge in the field of particle physics in a single publication, the Review of Particle Physics. The Review is published and updated online (see https://pdg.lbl.gov) each year, and published in a scientific journal every other year. It is currently licensed under a CC BY-NC 4.0 license. In 2021 PDG was designated by the Office of Science as a SC PuRe Data Resource. The Review is one of the most highly cited publications in the field of particle physics. The PDG Python API is part of PDG's efforts to make all data provided in the Review available in machine-readable format. This data includes the PDG world averages (or best limits) on particle masses, widths or lifetimes, branching fractions, magnetic moments, form factors, coupling constant ratios, and searches, as well as particle quantum numbers. It also includes detailed information on how PDG arrived at its averages, such as e.g. tables of published measurements with comments and footnotes, information on the consistency of published measurements, and detailed fit information.

Beringer, Juerg↗

rcsb-api : Python Toolkit for Streamlining Access to RCSB Protein Data Bank APIs

The Protein Data Bank (PDB) was founded in 1971 as the first open-access digital data resource in biology to serve as the single global archive for three-dimensional (3D) macromolecular structure data. Current PDB holdings exceed 230,000 experimentally determined structures of proteins, nucleic acids, viruses, and macromolecular machines. The RCSB Protein Data Bank RCSB.org research-focused web portal facilitates search, analyses, and visualization of every PDB structure along with more than one million Computed Structure Models from AlphaFold DB and the ModelArchive. It is powered by a set of publicly available Application Programming Interfaces (APIs) that both support RCSB.org users and provide programmatic access to PDB data. Given the breadth and levels of granularity encompassed in this rich data collection, efficiently accessing the information programmatically may be challenging for new users. RCSB PDB has developed a Python software package, rcsb-api , that facilitates easy and efficient use of RCSB PDB APIs within a Python environment. This software tool is designed to streamline access to the extensive corpus of data housed within the PDB, enabling researchers to search, retrieve, and analyze 3D biostructure data seamlessly. Its use will accelerate research in structural biology, molecular biology and biochemistry, drug discovery, and bioinformatics by providing more efficient tools for data integration and analysis. The new toolkit is available on GitHub (github.com/rcsb/py-rcsb-api) and published to the public Python package repository (PyPI) to foster wider usage and support basic and applied research in fundamental biology, biomedicine, and the energy sciences.

FAIR principles↗

WET Water Resources: A Google Earth Engine Python API Tool to Automate Wetland Extent Mapping Using Radar Satellite Sensors for Wetland Management and Monitoring

Wetland ecosystems are annually or seasonally wet transition zones between land and water. They provide a range of ecosystem services such as water filtration, flood mitigation, and carbon sequestration, as well as hosting biodiversity hotspots. Although they fulfill fundamental physical and natural processes, wetland extent and health are threatened by anthropogenic influences related to urbanization, population increase, pollution, and climate change. Recognizing the need to quantitatively monitor changes in these recently threatened ecosystems in a timely and cost-effective way, we developed a Google Earth Engine (GEE) Python API tool for automated wetland extent mapping using optical and radar satellite sensors that can be applied globally. The tool will significantly improve wetland change analysis and monitoring as the optical and SAR data proves high resolution (5-10 m) imagery, and SAR data is unaffected by cloud cover and light availability (day vs. night), which are common limitations for other remotely sensed sensors. The tool utilizes Copernicus Sentinel-1 C-band and NISAR L-band synthetic aperture radar (SAR) imagery. During image preprocessing, we applied a MODIS snow mask product to mask global snow coverage, which would affect land classification sensitivity. Calibration and validation were conducted through a historical change and sensitivity analysis of the Sudd watershed located in central Sudan. The tool was the first of its kind, as it enables NISAR data processing through an open-source GEE repository, further expanding and improving the utility of NASA Earth observations and contributing to NASA Open Science initiatives. We anticipate the tool will be used by researchers and practitioners interested in wetland monitoring and management..

Lori Berberian↗

WET Water Resources: A Google Earth Engine Python API Tool to Automate Wetland Extent Mapping Using Radar Satellite Sensors for Wetland Management and Monitoring

Wetland ecosystems are annually or seasonally wet transition zones between land and water. They provide a range of ecosystem services such as water filtration, flood mitigation, and carbon sequestration, as well as hosting biodiversity hotspots. Although they fulfill fundamental physical and natural processes, wetland extent and health are threatened by anthropogenic influences related to urbanization, population increase, pollution, and climate change. Recognizing the need to quantitatively monitor changes in these recently threatened ecosystems in a timely and cost-effective way, we developed a Google Earth Engine (GEE) Python API tool for automated wetland extent mapping using optical and radar satellite sensors that can be applied globally. The tool will significantly improve wetland change analysis and monitoring as SAR data provides high resolution (5-10 m) imagery, unaffected by cloud cover and light availability (day vs. night), common limitations for other remotely sensed sensors. The tool utilizes Copernicus Sentinel-1 C-band and NISAR L-band (once operational and available on the GEE repository) synthetic aperture radar (SAR) imagery. During image preprocessing, we applied a Terra Moderate Resolution Imaging Spectroradiometer (MODIS) snow product to determine regional snow coverage, which affects land classification sensitivity. Calibration and validation were conducted through a historical change and sensitivity analysis of the Sudd wetland located in central Sudan. The tool was the first of its kind, as it enables NISAR data processing through an open-source GEE repository, further expanding and improving the utility of NASA Earth observations and contributing to NASA Open Science initiatives. We anticipate the tool will be used by researchers and practitioners interested in wetland monitoring and management.

Inundation↗

Demonstrating SolarPILOT’s Python API Through Heliostat Optimal Aimpoint Strategy Use Case

SolarPILOT is a software package that generates solar field layouts and characterizes the optical performance of concentrating solar power (CSP) tower systems. SolarPILOT was developed by the National Renewable Energy Laboratory (NREL) as a stand-alone desktop application but has also been incorporated into NREL’s1 System Advisor Model (SAM) in a simplified format. Prior means for user interaction with SolarPILOT have included the application’s graphical interface, the SAM routines with limited configurability, and through a built-in scripting language called “LK.” This paper presents a new, full-featured, Python-based application programmable interface (API) for SolarPILOT, which we hereafter refer to as CoPylot. CoPylot provides access to all SolarPILOT’s capabilities to generate and characterize power tower CSP systems seamlessly through Python. Supported capabilities include (i) creating and destroying a model instance with message reporting tools; (ii) accessing and setting any SolarPILOT variable including custom land boundaries for field layouts; (iii) programmatically managing receiver and heliostat objects with varied attributes for systems with multiple receiver or heliostat types; (iv) generating, assigning, and modifying solar field layouts including the ability to set individual heliostat locations, aimpoints, soiling rates, and reflectivity levels; (v) simulating solar field performance; (vi) returning detailed results describing performance of individual heliostats, the aggregate field, and receiver flux distribution; and, (vii) exporting Python-based model instances to multiple file formats. CoPylot enables Python users to perform detailed CSP tower analysis utilizing either the Hermite expansion technique (analytical) or the SolTrace ray-tracing engine. In addition to CoPylot’s functionality, Python users have access to the over 100,000 open-source libraries to develop, analyze, optimize, and visualize power tower CSP research. This enables CSP researchers to perform analysis that was previously not possible through SolarPILOT’s existing interfaces. This paper discusses the capabilities of CoPylot and presents a use case wherein we demonstrate optimal solar field aiming strategies.

41 EE - Solar Energy Technologies Office (EE-4S)↗

Going under the hood of MontePy: A python API for MCNP input files [Slides]

MontePy is an open-source python software library for reading, editing, and writing MCNP input files. This presentation was given to a university research group interested in it. MontePy provides an object-oriented interface for working with these MCNP input files. It uses a lexer and parser system in order to create a concrete syntax tree representing the input from the input file.

97 MATHEMATICS AND COMPUTING↗

DSI Python API Demo May 2023 [Slides]

Data Science Infrastructure (DSI) is developing searchable databases and workflows for simulation and experimental data derived from ASC clients. Short term goal: Make data easily accessible through metadata indexing and querying while respecting data permissions. Longer term goal: Use this data for data science activities.

97 MATHEMATICS AND COMPUTING↗

InVEST Urban Development: Incorporating Earth Observation Data into the Integrated Valuation of Ecosystem Services and Tradeoffs (InVEST) Urban Flood Risk Mitigation Model Python API

Urban flooding poses as one of the biggest issues for cities today, as its impacts are amplified by both climate change and urbanization. The Natural Capital Project’s Integrated Valuation of Ecosystem Services and Tradeoffs (InVEST) Urban Flood Risk Mitigation (UFRM) model, which benefits from its simplicity and robustness, is commonly used in NASA DEVELOP projects for disaster mitigation, urban planning, and environmental justice issues. While InVEST UFRM model was able to produce the surface water runoff and retention map sufficient for the scopes of past projects, the model accuracy and spatial variability need improvement. Since the current InVEST UFRM model employs constant rainfall depth for all pixels in the area of interest (AOI), the model suffers from inaccurately estimating rainfall depth, runoff volume, and flood depth. Therefore, we adapted the model so that satellite-based precipitation raster datasets (i.e., Integrated Multi-satellitE Retrievals for Global Precipitation Measurement [GPM IMERG]) can be used instead of a single constant value. We simulated the flood events on August 21st and August 22nd, 2017 in Wyandotte County, Kansas using both our modified and the original InVEST UFRM model and then compared the results after incorporating the rainfall raster into the model. Areas with developed land on the land use map predicted moderate to high flood volume in the original volume regardless of the actual amount of precipitation. The modified model considered the rainfall depth’s spatial variation achieving less overestimation of flood runoff and volume at low-to-moderate rainfall area.

Son Do↗

InVEST Urban Development: Incorporating Earth Observation Data into the Integrated Valuation of Ecosystem Services and Tradeoffs (InVEST) Urban Flood Risk Mitigation Model Python API

Urban flooding poses as one of the biggest issues for cities today as its impacts are amplified by both climate change and urbanization. The Natural Capital Project’s Integrated Valuation of Ecosystem Services and Tradeoffs (InVEST) Urban Flood Risk Mitigation (UFRM) model, which benefits from its simplicity and robustness, is commonly used in NASA DEVELOP projects for disaster mitigation, urban planning, and environmental justice issues. While the InVEST UFRM model was able to produce the surface water runoff and retention map sufficient for the scopes of past projects, the model’s accuracy and spatial variability need improvement. Since the current InVEST UFRM model employs constant rainfall depth for all pixels in the area of interest (AOI), the model suffers from inaccurately estimating rainfall depth, runoff volume, and flood depth. Therefore, we adapted the model so that satellite-based precipitation raster datasets (i.e., Integrated Multi-satellitE Retrievals for Global Precipitation Measurement [GPM IMERG]) can be used instead of a single constant value. We simulated the flood events on August 21st and August 22nd, 2017, in Wyandotte County, Kansas using both our modified and the original InVEST UFRM model and then compared the results after incorporating rainfall raster into the model. Areas with developed land on the land use map predicted moderate to high flood volume in the original volume regardless of the actual amount of precipitation. The modified model considered the rainfall depth’s spatial variation achieving less overestimation of flood runoff and volume at low-to-moderate rainfall area.

Urban flooding↗

pnnl/NWHypergraph

NWHypergraph is a C++ hypergraph processing framework for shared-memory architecture. NWHypergraph provides efficient algorithms to construct s-line graphs, a lower-order approximation of a given hypergraph, and computes different graph metrics of a s-line graph such as s-connected components, s-betweenness centrality, s-closeness centrality, etc. It also provides Python APIs for s-line graph computation. The Python APIs are provided using Pybind11

Lumsdaine, Andrew↗

Crosslink V.0.11.x User Manual

CrossLink is a novel two-dimensional and three-dimensional geometry and mesh generation software package developed by the Simulation Tools team at Los Alamos National Laboratory. This software represents the third generation of topology-based mesh generation technology developed by the Department of Defense and the Department of Energy with a special focus on complex multi-material hydrodynamic applications, mesh scalability, and high-order element mesh generation. The topology-based meshing approach offered by CrossLink enables users to quickly and easily mesh complex geometries in a repeatable and robust manner. CrossLink’s topology-based meshing approach is well-suited for parametric design studies, parametric design optimization, damage scenario assessment, and iterative design modification (i.e. feature addition and/or removal). CrossLink’s python API allows workflow scripting of the geometry creation and mesh generation process for traceability, repeatability, data provenance, and version control. CrossLink consists of three main components: a graphical user interface (GUI), a geometry creation and mesh generation engine, and a python API that provides a workflow scripting interface to the geometry and meshing functions.

97 MATHEMATICS AND COMPUTING↗

A Method for Projecting Cloud Shadows Onto a Central Receiver Field to Predict Receiver Damage

This work demonstrates methods of mapping high-spatial-resolution direct normal irradiance (DNI) data from satellites, Total Sky Imagers (TSIs), and analogous data sources onto a heliostat field for characterizing the spatial and temporal variation of the incident flux on a central receiver tower during cloud transient events. The mapping methods are incorporated into an optical software module that interfaces with CoPylot–SolarPILOT’s python API– to provide computationally efficient optical simulation of the heliostat field and the solar power tower. Eventually, this optical model will be incorporated into optimization models whereby a plant operator can understand the effects of cloud transient events on overall power production and receiver lifetime due to creep-fatigue damage and therefore make better informed decisions about receiver shutdown events. By more accurately modelling the effects of cloud events on receiver flux maps, this work may determine the magnitude and frequency of thermal cycling on receiver tubes and panels using actual or realistic cloud shapes instead of averaged DNI values–which may undercount the total cycle number. This work may also prevent unnecessary plant shutdowns due to overly precautionary control strategies and characterize the relative impact of various cloud types on receiver life. We plan to eventually integrate this methodology into the System Advisor Model (SAM) to improve performance model accuracy during periods of cloudiness. In this paper, we demonstrate generating DNI maps and mapping them to a solar field in CoPylot using 10 m resolution data from publicly available Sentinel-2 satellite data over the Crescent Dunes plant.

Mullin, Matthew↗

An Autonomous MCP Bridge to Rucio: Enhancing Data Management Accessibility for High Energy Physics

The Rucio Data Management System [1] is an important tool used by High Energy Physics experiments, including those at Fermi National Accelerator Laboratory, to store and manage exabyte-scale scientific datasets. Despite its central role in coordinating data across globally distributed storage sites, Rucio's command line interface (CLI) presents a steep learning curve, and makes it difficult for scientists to navigate through. To solve this issue, a containerized Model Context Protocol (MCP) [2] server was built that connects Large Language Models directly to Rucio, allowing AI agents to handle data tasks by using simple, natural language rather than memorized terminal commands. The core engineering focus of this project was moving the server away from slow terminal commands that require text parsing and replacing them with a native Python Client API toolset and a planned REST API framework. Moving to the Python API handles data operations directly in memory, which helps clear up formatting errors, provides the AI with clean, structured JSON data and speeds up tool execution. To prove that the system actually works, a benchmarking pipeline was also built with various questions to test the AI across four different model configurations. The questions included finding data scopes, tracking down specific datasets, and checking replication rules. Through benchmarking, early runs showed that with raw terminal text, the model would get confused and stuck, whereas switching to the Python API to feed the AI clean, structured data yielded massive improvement. By creating an intelligent and autonomous bridge to a storage network, this project shows how AI can be implemented in scientific data management, which ultimately helps scientists at Fermilab spend less time sorting through data and more time focusing on their experiments and analysis.

Akella, Kashyap [William Rainey Harper Coll.]↗

DeepDiagnostics: A Software Package for Streamlined Posterior Evaluation

Automated prediction techniques like simulation-based inference (SBI) are important tasks for science experiments that produce large amounts of complex, raw data. However, their development remains in its early stages because the uncertainties of these techniques lack sufficient trustworthiness and interpretability. Packages for SBI provide a growing set of diagnostics; however, the software requirements are substantial, as they are tied to the inference technology itself, and the APIs lack adaptability. We introduce the DeepDiagnostics package for diagnosing posteriors from analytic likelihood-based methods and SBI methods, such as neural posterior estimation. DeepDiagnostics produces a comprehensive set of high-quality visualizations and metrics in a highly accessible, easy-to-use, and flexible package. We address all of these goals by providing a command-line inference tool and a Python API that is controlled through a configuration file. The package includes common diagnostics, such as parity plots, corner (covariance) plots, simulation-based calibration (SBC) diagnostics (including posterior coverage and rank histograms), Lemos et al. s PQMass and TARP, Masserano et al. s WALDO, Linhart et al. s LC2ST, as well as credible region diagnostics developed by our group.

Voetberg, Maggie [Fermilab]↗

Unified Language Frontend for Physic-Informed AI/ML

Artificial intelligence and machine learning (AI/ML) are becoming important tools for scientific modeling and simulation as in several other fields such as image analysis and natural language processing. ML techniques can leverage the computing power available in modern systems and reduce the human effort needed to configure experiments, interpret and visualize results, draw conclusions from huge quantities of raw data, and build surrogates for physics based models. Domain scientists in fields like fluid dynamics, microelectronics and chemistry can automate many of their most difficult and repetitive tasks or improve the design times by use of the faster ML-surrogates. However, modern ML and traditional scientific highperformance computing (HPC) tend to use completely different software ecosystems. While ML frameworks like PyTorch and TensorFlow provide Python APIs, most HPC applications and libraries are written in C++. Direct interoperability between the two languages is possible but is tedious and error-prone. In this work, we show that a compiler-based approach can bridge the gap between ML frameworks and scientific software with less developer effort and better efficiency. We use the MLIR (multi-level intermediate representation) ecosystem to compile a pre-trained convolutional neural network (CNN) in PyTorch to freestanding C++ source code in the Kokkos programming model. Kokkos is a programming model widely used in HPC to write portable, shared-memory parallel code that can natively target a variety of CPU and GPU architectures. Our compiler-generated source code can be directly integrated into any Kokkosbased application with no dependencies on Python or cross-language interfaces.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

PvaPy streaming framework for real-time data processing

User facility upgrades, new measurement techniques, advances in data analysis algorithms as well as advances in detector capabilities result in an increasing amount of data collected at X-ray beamlines. Some of these data must be analyzed and reconstructed on demand to help execute experiments dynamically and modify them in real time. In turn, this requires a computing framework for real-time processing capable of moving data quickly from the detector to local or remote computing resources, processing data, and returning results to users. In this paper, we discuss the streaming framework built on top of PvaPy, a Python API for the EPICS pvAccess protocol. We describe the framework architecture and capabilities, and discuss scientific use cases and applications that benefit from streaming workflows implemented on top of this framework. We also illustrate the framework's performance in terms of achievable data-processing rates for various detector image sizes.

EPICS pvAccess↗