Search NASA⌕ Search

SEARCH · Search NASA

Results for “python wrapper”

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

Application of Machine Learning Techniques to an Agent-Based Model of Pantoea

Agent-based modeling (ABM) is a powerful simulation technique which describes a complex dynamic system based on its interacting constituent entities. While the flexibility of ABM enables broad application, the complexity of real-world models demands intensive computing resources and computational time; however, a metamodel may be constructed to gain insight at less computational expense. Here, we developed a model in NetLogo to describe the growth of a microbial population consisting of Pantoea . We applied 13 parameters that defined the model and actively changed seven of the parameters to modulate the evolution of the population curve in response to these changes. We efficiently performed more than 3,000 simulations using a Python wrapper, NL4Py . Upon evaluation of the correlation between the active parameters and outputs by random forest regression, we found that the parameters which define the depth of medium and glucose concentration affect the population curves significantly. Subsequently, we constructed a metamodel, a dense neural network, to predict the simulation outputs from the active parameters and found that it achieves high prediction accuracy, reaching an R 2 coefficient of determination value up to 0.92. Our approach of using a combination of ABM with random forest regression and neural network reduces the number of required ABM simulations. The simplified and refined metamodels may provide insights into the complex dynamic system before their transition to more sophisticated models that run on high-performance computing systems. The ultimate goal is to build a bridge between simulation and experiment, allowing model validation by comparing the simulated data to experimental data in microbiology.

59 BASIC BIOLOGICAL SCIENCES↗

Simulation of wind and solar energy generation over California with E3SM SCREAM regionally refined models at 3.25 km and 800 m resolutions

This study presents wind and solar power generation estimates derived from the US Department of Energy’s Simple Cloud-Resolving E3SM Atmosphere Model (SCREAM) Regionally Refined Models (RRM) over California at 3.25 km and 800 m horizontal resolutions, using the Python wrapper for the System Advisor Model (PySAM). The resulting wind and solar generation estimates are compared to monthly capacity factors reported to the Energy Information Administration (EIA), High-Resolution Rapid Refresh (HRRR, 3 km resolution) forecast model, and E3SM North American regionally refined model (NARRM, 25 km resolution). We systematically assess the impacts of generation modeling assumptions, meteorological models, and horizontal resolution. Results show that resolution plays a dominant role for wind energy: increasing from 25 to 3.25 km brings qualitative and quantitative improvements, most notably by resolving the phase error in the seasonal cycle found in coarser simulations. However, further refinement to 800 m offers minimal gains. SCREAM performs better than HRRR for solar power generation in single- and dual-axis tracking systems, likely due to more accurate surface radiation. The sensitivity of PySAM to system configuration, particularly for axis-tracking modeling in photovoltaics, is also highlighted. Overall, SCREAM-RRM shows strong potential for high-resolution energy assessments, with future progress depending on more in situ observations and clearer quantification of uncertainties in generation modeling.

Geosciences↗

MOOSE-Python Binder

This code is a wrapper for Python code so that it can be accessed by MOOSE and the two can pass variables back and forth. Since this code was developed by ORNL, it must be independently approved before being added to the MOOSE repository.

Cheniour, Amani↗

LAVA 1.0: A general-purpose python toolkit for calculation of material properties with LAMMPS and VASP

Here, we introduce LAVA, a general-purpose python toolkit to provide user-friendly and high throughput calculations for material properties using both LAMMPS and VASP. It contains a set of classes as well as pre-processing and post-processing functions to prepare, execute and extract information from LAMMPS/VASP simulations. An overview of the program structure is provided. The current version contains modules to calculate elastic and mechanical properties such as lattice constant, cohesive energy, cold curve, elastic constants, bulk and shear modulus, volume conserving/non-conserving deformation path, vacancy/interstitial formation energy, surface energy, stacking fault energy, melting point, radial distribution function, and thermal expansion. These functionalities are demonstrated for different interatomic potentials and DFT calculations in Al.

36 MATERIALS SCIENCE↗

BatAnalysis - A Comprehensive Python Pipeline for Swift BAT Survey Analysis

The Swift Burst Alert Telescope (BAT) is a coded-aperture gamma-ray instrument with a large field of view that primarily operates in survey mode when it is not triggering on transient events. The survey data consist of 80- channel detector plane histograms that accumulate photon counts over periods of at least 5 minutes. These histograms are processed on the ground and are used to produce the survey data set between 14 and 195 keV. Survey data comprise >90% of all BAT data by volume and allow for the tracking of long-term light curves and spectral properties of cataloged and uncataloged hard X-ray sources. Until now, the survey data set has not been used to its full potential due to the complexity associated with its analysis and the lack of easily usable pipelines. Here, we introduce the BatAnalysis Python package, a wrapper for HEASoftpy, which provides a modern, opensource pipeline to process and analyze BAT survey data. BatAnalysis allows members of the community to use BAT survey data in more advanced analyses of astrophysical sources, including pulsars, pulsar wind nebula, active galactic nuclei, and other known/unknown transient events that may be detected in the hard X-ray band. We outline the steps taken by the Python code and exemplify its usefulness and accuracy by analyzing survey data of the Crab Nebula, NGC 2992, and a previously uncataloged MAXI transient. The BatAnalysis package allows for ~18 yr of BAT survey data to be used in a systematic way to study a large variety of astrophysical sources.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

BatAnalysis - A Comprehensive Python Pipeline for Swift BAT Survey Analysis

The Swift Burst Alert Telescope (BAT) is a coded-aperture gamma-ray instrument with a large field of view that primarily operates in survey mode when it is not triggering on transient events. The survey data consist of 80-channel detector plane histograms that accumulate photon counts over periods of at least 5 minutes. These histograms are processed on the ground and are used to produce the survey data set between 14 and 195 keV. Survey data comprise >90% of all BAT data by volume and allow for the tracking of long-term light curves and spectral properties of cataloged and uncataloged hard X-ray sources. Until now, the survey data set has not been used to its full potential due to the complexity associated with its analysis and the lack of easily usable pipelines. Here, we introduce the BatAnalysis Python package, a wrapper for HEASoftpy, which provides a modern, open-source pipeline to process and analyze BAT survey data. BatAnalysis allows members of the community to use BAT survey data in more advanced analyses of astrophysical sources, including pulsars, pulsar wind nebula, active galactic nuclei, and other known/unknown transient events that may be detected in the hard X-ray band. We outline the steps taken by the Python code and exemplify its usefulness and accuracy by analyzing survey data of the Crab Nebula, NGC 2992, and a previously uncataloged MAXI transient. The BatAnalysis package allows for ~18 yr of BAT survey data to be used in a systematic way to study a large variety of astrophysical sources.

79 ASTRONOMY AND ASTROPHYSICS↗

Decomposition Algorithms for Scalable Quantum Annealing

The presented python code provides wrapper functions for two decomposition algorithms: One algorithm to decompose Maximum Clique problems and one to decompose Minimum Vertex Cover problems. The functions take as input a networkx graph object, and decompose either problem on the input graph recursively into subproblems such that the optimal solution can be constructed from the optimal solutions of both subproblems. The recursion ends as soon as the subproblems reach a pre-specified size limit by the user, and they can be solved using any method provided in advance by the user as external function. This includes exact solvers or an adiabatic quantum annealer.

Pelofske, Elijah↗

OCHRE™ Gymnasium (ochre_gym) [SWR-23-47]

OCHRE™ Gymnasium is a Python framework for conducting reinforcement learning research on residential building energy management problems. It is a lightweight wrapper around OCHRE, a Python-based thermal-electric residential building simulator developed in-house at NREL. OCHRE Gymnasium adheres to the standard OpenAI Gym API for a reinforcement learning environment. Detailed Sphinx documentation will be auto-generated and accompany this codebase. This documentation will detail the API, provide examples of how to use the code, etc.

Emami, Patrick↗

CiteSoft_Py

There is a need to provide a way for dev-users (Scientists, Engineers, and other Software Developers) to get credit (citations) when they contribute to an important software package - particularly a large package that is already established. Various solutions (including cross package) solutions do exist, but a simple standard format that can work between multiple packages and multiple languages in a modular way is not widely available. CiteSoft_py is a python implementation of CiteSoft. CiteSoft is a plain text standard consisting of a format and a protocol that exports the citations for the end-users for whichever softwares they have used. CiteSoft has been designed so that software dev-users can rely upon it regardless of coding language or platform, and even for cases where multiple codes are working in a coupled manner. The CiteSoft_py implementation includes python decorators to make wrappers for facile use. The purpose is that when dev-users (scientists, engineers and professional programmers) contribute to a collaborative software project, that the appropriate citations (e.g., journal article, conference proceeding) are provided to the end-user. The end-user does not need to know how to use a command line interface, API, etc.

Savara, Aditya↗

QUiNN

SAND2023-05484O Quantification of Uncertainties in Neural Networks (QUiNN) is a python library centered around various probabilistic wrappers over PyTorch modules in order to provide uncertainty estimation in neural network (NN) predictions. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Sargsyan, Khachik↗

The MCNPTools Package: Installation and Use

MCNPTools is a C++ software library bound to Python (2 & 3) via the Simplified Wrapper and Interface Generator (SWIG version 3.0.7). The report lists the minimum build requirements and the compiler options that are currently tested and supported.

97 MATHEMATICS AND COMPUTING↗

rabpro: global watershed boundaries, river elevation profiles, and catchment statistics

River and Basin Profiler (rabpro) is a Python package to delineate watersheds, extract river flowlines and elevation profiles, and compute watershed statistics for any location on the Earth’s surface. As fundamental hydrologically-relevant units of surface area, watersheds are areas of land that drain via aboveground pathways to the same location, or outlet. Delineations of watershed boundaries are typically performed on digital elevation models (DEMs) that represent surface elevations as gridded rasters. Depending on the resolution of the DEM and the size of the watershed, delineation may be very computationally expensive. With this in mind, we designed rabpro to provide user-friendly workflows to manage the complexity and computational expense of watershed calculations given an arbitrary coordinate pair. In addition to basic watershed delineation, rabpro will extract the elevation profile for a watershed’s mainchannel flowline. This enables the computation of river slope, which is a critical parameter in many hydrologic and geomorphologic models. Finally, rabpro provides a user-friendly wrapper around Google Earth Engine’s (GEE) Python API to enable cloud-computing of zonal watershed statistics and/or time-varying forcing data from hundreds of available datasets. Altogether, rabpro provides the ability to automate or semi-automate complex watershed analysis workflows across broad spatial extents.

54 ENVIRONMENTAL SCIENCES↗

Wrapper for the optimization of cross-section generation in OpenMC

The "Wrapper for the optimization of cross-section generation in OpenMC" is Python-based software that runs the open-source Monte Carlo code OpenMC (https://docs.openmc.org/en/stable/ ) to generate cross-sections for any reactor geometry. The wrapper then optimizes those cross sections. The optimization aims to choose an energy group structure and a scattering representation that maximize accuracy with respect to continuous-energy results while avoiding significant computational expense. It then outputs these cross-sections in an ISOXML format readable by the Idaho National Lab code suite MOOSE (Olin William Calvin, Mark D DeHart, “Architecture for the Performance of Nuclear Fuel Depletion Calculations”, Idaho National Laboratory report, November 2019). The expected use-cases of this software include: -finding the best group structure and scattering representation for a specific reactor -testing the appropriateness of energy group structures for different reactor types -comparing energy group structures and scattering representations to each other -generating cross sections for use in deterministic codes, including ones found in the MOOSE suite The example reactor geometry included in this release is a generic reactor design, not based on any reactor in existence or in development. It was fabricated for the sole purpose of being a “testbed-geometry” upon which to develop this tool. Since the tool is designed to be generic, the nature of the test geometry is not very important, however, it is valuable to include as an example for users who are unfamiliar with developing reactor geometries for OpenMC.

Kreher, Miriam↗

PythonFOAM: In-situ data analyses with OpenFOAM and Python

Here, we outline the development of a general-purpose Python-based data analysis tool for OpenFOAM. Our implementation relies on the construction of OpenFOAM applications that have bindings to data analysis libraries in Python. Double precision data in OpenFOAM is cast to a NumPy array using the NumPy C-API and Python modules may then be used for arbitrary data analysis and manipulation on flow-field information. We highlight how the proposed wrapper may be used for an in-situ online singular value decomposition (SVD) implemented in Python and accessed from the OpenFOAM solver PimpleFOAM. Here, 'in-situ' refers to a programming paradigm that allows for a concurrent computation of the data analysis on the same computational resources utilized for the partial differential equation solver. In addition, to demonstrate parallel deployments, we deploy a distributed SVD, which collects snapshot data across the ranks of a distributed simulation to compute the global left singular vectors. Crucially, both OpenFOAM and Python share the same message passing interface (MPI) communicator for this deployment which allows Python objects and functions to exchange NumPy arrays across ranks. Subsequently, we provide scaling assessments of this distributed SVD on multiple nodes of Intel Broadwell and KNL architectures for canonical test cases such as the large eddy simulations of a backward facing step and a channel flow at friction Reynolds number of 395. Finally, we demonstrate the deployment of a deep neural network for compressing the flow-field information using an autoencoder to demonstrate an ability to use state-of-the-art machine learning tools in the Python ecosystem.

97 MATHEMATICS AND COMPUTING↗

SetEnvironment

SAND2025-11727O SetEnvironment software is a utility library module that uses ConfigParserEnhanced, also a library module, to read specifically formatted .ini files for setting the user's environment. It creates a consistent environment with an expected set of variables and module loads, which is important for testing. Environment variable operations include set, append, prepend, unset, remove, and others and uses the Python os.environ methods. The module operations are performed with a wrapper. Systems using the Lmod package can generate a module function, which can also perform module operations specified in the text file. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

McLendon III, William↗

IMG Annotation Pipeline (IMGAP) v5.1.13

The IMG Annotation Pipeline is a collection of Bash and Python scripts to control a workflow for structural and functional annotation of prokaryotic genomes, metagenomes, and metatranscriptomes. The bash scripts in general control the overall workflow and are wrappers around 3rd party executables (not included in repo) that predict features or functions. Whereas the Python scripts do post-processing of raw output in terms of filtering or format transformation and in some cases contain some logic for picking the correct predictions or resolving overlaps. The pipeline is tailored to produce results required by IMG (https://img.jgi.doe.gov/) and is executed on every dataset submitted to IMG via https://img.jgi.doe.gov/submit. These consist of internal genomes, metagenomes and metatranscriptomes sequenced and assembled at the JGI, as well as datasets submitted by external users (non-lab/JGI affiliates).

Huntemann, Marcel↗

dbprocessing

dbprocessing is a python framework for automating data processing pipelines. The dbprocessing package uses a configuration file to define the input, intermediate, and output data products for a particular data type as well as the processes that connect those data products. In addition, dbprocessing uses python scripts called inspectors to determine if a particular file matches a configured data product. If a particular data product is found, it is ingested into the dbprocessing database (sqlite3 or postgres) which then triggers all of the chained processes to the final data product. While the framework is written in python, it can run software in any language but may require a “wrapper” to translate the dbprocessing command line arguments to the form expected by the software.

Walker, Andrew↗