Search NASASearch

SEARCH · Search NASA

Results for “Python”

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 55 records · Page 3

Visualizing UPSP Data with Python

The Unsteady Pressure-Sensitive Paint (uPSP) projects uses Pressure-Sensitive paint applied over aerospace models during wind tunnel testing to collect pressure data with high spatial and temporal resolution in order to inform unsteady aerodynamics studies. For each of the 800+ experimental runs, four cameras generate up to 50 GB of video data, which must then be processed, analyzed, and visualized on the NASA Advanced Supercomputing system (NAS) to assess the result. One of the final data analysis products is the dynamic modal decomposition (DMD) results, which decomposes the pressure reading signals by their frequency component. The goal of this project is to visualize the DMD results over a 3D rendering of the model, using efficient and parallelized python routines. The software uses the pytecplot library, a high-level API that connects python scripting to a Tecplot 360 engine. Tecplot is an industry standard high-performance visualization tool that can handle large datasets and workflow. Various animation, rendering, and image-combination techniques were investigated to generate the final videos using OpenCV on the NAS. The final result is a software tool that takes in data products from the uPSP processing chain and generates high resolution visualization videos in parallel for every data file, allowing researchers to view their results efficiently and at an unprecedentedly detailed level.

Emma Dolores McMillian

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 consists of eighty-channel detector plane histograms that accumulate photon counts over time periods of at least 5 minutes. These histograms are processed on the ground and are used to produce the survey dataset between 14 and 195 keV. Survey data comprises >90% of all BAT data by volume and allows for the tracking of long term light curves and spectral properties of cataloged and uncataloged hard X-ray sources. Until now, the survey dataset 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 from the Crab Pulsar, NGC 2992, and a previously uncataloged MAXI Transient. The BatAnalysis package allows for ∼ 18 years of BAT survey to be used in a systematic way to study a large variety of astrophysical sources.

Tyler Parsotan

ncompare: A Python Package for Comparing netCDF Structures

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

Daniel Kaufman

DancePartner: Python Package to Mine Multiomics Relationship Networks from Literature and Databases

A goal of multi-omics experiments is to understand how mechanistic molecular biology is altered between conditions, typically a control group and experimental groups. Oftentimes this involves studying changes in biomolecule relationships (e.g. interactions, metabolic relationships) of several types of biomolecules (e.g. proteins, lipids, metabolites). Though several databases contain relationships between biomolecules, understudied species may have little to no relationship information in databases and thus must be mined from literature. There are several challenges to literature mining, including automated full-text extraction, duplicate biomolecule term collapsing, and implementing complex machine learning tools. To make relationship extraction more accessible to the community, a python package called DancePartner was developed to allow for the extraction of relationships from literature and databases, with functions to map biomolecule synonyms to standardized identifiers and visualize and characterize the resulting multi-omics network. Here, in this study, an example dataset involving Caenorhabditis elegans is presented, where relationships are mined from 1443 publications using DancePartner. These relationships are combined with relationships from KEGG, WikiPathways, UniProt, and LipidMaps, and visualized.

BERT

Performance and Operational Characteristics of a Python Turbine-propeller Engine at Simulated Altitude Conditions / Carl L. Meyer and Lavern A. Johnson

The performance and operational characteristics of a Python turbine propeller engine have been investigated over a range of engine operating conditions at simulated altitudes from 5000 to 40,000 feet in the NACA Lewis altitude wind tunnel . For the performance phase of the investigation, a single cowl-inlet ram pressure ratio was maintained and independent control of engine speed and fuel flow was used to obtain a range of power at each engine speed. Engine performance data obtained at a given altitude could not be used to predict performance accurately at other altitudes by use of the standard air pressure and temperature generalizing factors. Specific fuel consumption based on shaft horsepower decreased as the shaft horsepower increased at a given engine speed. At a given altitude condition and turbine -inlet total temperature, there was an optimum engine speed at which maximum shaft horsepower was obtained. At a given engine speed and turbine-inlet total temperature, a greater portion of the total available energy was converted to propulsive power as the altitude increased. Windmilling starts were made at altitudes up to 40,000 feet; the minimum true airspeed required for successful windmilling starts increased as the altitude was raised. In general, the engine control prevented large overshoots or undershoots of engine speed during starts, accelerations, and decelerations.

Engines - Armstrong-Siddely Python Turbo-Propeller

PCLAM: a Python Module for Computing Surface Lineloads and Moments

Lineloads serve a unique and important role in aerodynamic database development as well as configuration design and analysis. A new software suite was constructed which can compute lineloads rapidly enough that the calculations can run in tandem with high-fidelity fluid flow solvers. This enables the calculation of iteration- or time-dependent lineloads, which have thus far been too computationally costly to create for complicated systems like launch vehicles. The suite is organized into a standalone Python module named PCLAM (PCLAM Computes Lineloads And Moments) which can be imported into other software with minimal restructuring by the user or developer. The computed lineloads are integrated with a $C^0$ numerical quality and exhibit the expected sensitivity to underlying grid resolution. Even at low grid and lineload resolutions, the computed lineloads were found to be in strong agreement with several analytical test cases.

sectional loads

MLtool Python Code

Machine Learning (ML) is a subfield of Artificial Intelligence that gives computers the ability to learn from past data without being explicitly programmed. The predictive capabilities of ML models have already been used to facilitate several scientific breakthroughs. However, the practical application of ML is often limited due to the gaps in technical knowledge of its users. The common issue faced by many scientific researchers is the inability to choose the appropriate ML pipelines that are needed to treat real-world data, which is often sparse and noisy. To solve this problem, we have developed an automated Machine Learning tool (MLtool) that includes a set of ML algorithms and approaches to aid scientific researchers. The current version of MLtool is implemented as an object-oriented Python code that is easily extensible. It includes 44 different regression algorithms used to model data. MLtool helps users select the best model for their data, based on the scoring metrics used. Besides regression algorithms, MLtool also includes a suite of pre- and post-processing techniques such as missing value imputation, categorical variable encoding, input feature normalization, uncertainty quantification, exploratory data analysis (EDA), etc. MLtool was tested on several publicly available multi-dimensional data sets and was found capable of making accurate predictions.

Machine Learning

BatteryPro: A Python Toolkit for Battery Data Analysis and Machine Learning Predictions

Analyzing battery test data for research & development can be time-consuming since battery tests often run on the order of months to years, generating large volumes of data. BatteryPro is a comprehensive Python package and software designed to facilitate advanced analysis and performance predictions for battery test data. Developed for battery researchers, it supports data types from widely used battery testing instruments, including MACCOR and Biologic cycling systems. The software provides a variety of tools for extracting and plotting key battery parameters such as time, voltage, capacity, current, and pressure. In addition to its extensive data analysis capabilities, BatteryPro features a dedicated machine learning module that employs a Bayesian Gaussian Mixture Model (GMM) to predict battery performance and degradation. Users can generate synthetic capacity fade data, calculate fade metrics, and leverage predictive models to forecast long-term battery behavior. The software's graphical user interface (GUI) enhances usability, allowing researchers to upload, merge, and analyze multiple data files with full customizability. The GUI also supports machine learning predictions, enabling users to fit models and make predictions based on selected data and parameters. BatteryPro is built using QtDesigner, scikit-learn, matplotlib, and pandas, ensuring a high level of customization, flexibility, and accuracy in battery data analysis. This tool aims to empower researchers with the ability to perform detailed battery analysis and make informed predictions, ultimately advancing the field of battery research.

25 - ENERGY STORAGE

Enhancing EnergyPlus capabilities to model dynamic building envelopes using python plugin

Nearly half of the energy consumption in the United States is related to buildings, resulting in an urgent need to develop innovative technologies to improve building energy efficiency. Dynamic building envelopes, comprising switchable insulation and thermal energy storage materials, have been proposed recently as a promising solution to reduce buildings' heating and cooling loads by thermally coupling the indoor environment with the ambient environment when beneficial while decoupling them when outdoor conditions are not favorable. Although various related technologies are still underway, the whole-building energy modeling tools, like EnergyPlus, do not have the capability to simulate the transient and dynamic nature of dynamic envelope materials and components to accurately predict their impact on building energy use. The objective of this study is to formulate a method in EnergyPlus simulation engine to model multilayer envelopes, comprising dynamic building materials with variable thermophysical properties, and discuss the changes made to the program using a Python plugin. Furthermore, the thermal performance of the dynamic envelopes using the proposed method is compared and verified with the results from a well-established commercial code, COMSOL Multiphysics. A parametric assessment is also conducted to evaluate the energy efficiency benefits of dynamic envelopes in a single-family residential building, demonstrating total annual energy savings up to 11.6 %, when a dynamic envelope operates alone, and up to 18.2 % when it is combined with a thin layer of phase change material as a thermal storage medium. Finally, a United States wide energy efficiency assessment is presented to showcase the geographical spread of the energy savings. The method designed and implemented in this study provides the researchers with the ability to implement their dynamic insulation methods in EnergyPlus and evaluate the whole building energy impact.

25 ENERGY STORAGE

Grain2mesh: A Python and cubit mesh generator from unprocessed mesoscale images

Predicting bulk behavior from microscale features constitutes a key objective in multiscale modeling research, often involving numerical models composed of finite elements that capture the diversity of constituent phases, shapes, and orientations within the material. The Grain2mesh toolbox allows the user to input unprocessed mesoscopic images for automatic segmentation, pre-processing, quality control, and numerical mesh generation. The numerical mesh generation incorporates Cubit routines to generate robust multi-phase mesh structure for use in computational mechanics solvers. The python classes developed contain detailed documentation and examples to support standard usage and case-specific alternative options.

58 GEOSCIENCES

Teaching Nonradiative Transitions with MATLAB and Python

Nonradiative transitions are changes in energy states of atoms, ions, or molecules that do not involve the emission or absorption of photons. Despite their importance in understanding luminescent properties and photochemical reaction mechanisms, nonradiative transitions are rarely given more than a qualitative overview in undergraduate and even graduate physical chemistry curricula. To supplement the coverage of nonradiative transition topics, we provide here a set of active learning exercises to help students develop an intuitive understanding of the factors that determine the rate of nonradiative transitions. Here, we start by outlining the theoretical background through the formulations of the Franck–Condon factor and its relation to the rate of nonradiative transition. We then introduce three teaching modules, with associated MATLAB and Python codes, to explore how (1) the excited state nuclear displacement, (2) the electronic energy gap between excited and ground state and (3) the excited/ground state vibrational mode frequencies affect the magnitude of the Franck–Condon factor and thereby the rate of nonradiative transitions. The wave function overlap plots that accompany all teaching modules provide direct visualization of the effect of input parameters on the magnitude of Franck–Condon overlap integral.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

KBKit: A Python Toolkit for Kirkwood–Buff Theory from Molecular Dynamics

Thermodynamic properties of liquid mixtures govern processes that range from drug delivery to energy storage, yet extracting these properties from molecular simulations remains challenging. Kirkwood–Buff (KB) theory offers a rigorous route by linking microscopic pair distribution functions to macroscopic free energies, but practical use of the theory has been hindered by two obstacles: (i) the long simulations needed to obtain well-converged Kirkwood-Buff integrals (KBIs) and (ii) the specialized corrections required to translate finite-size data to the thermodynamic limit. $\texttt{KBKit}$ is an open-source Python package that removes these barriers. It automatically computes KBIs and derived thermodynamic quantities from GROMACS input files, applies state-of-the-art finite-size corrections, and provides built-in diagnostic tools to quantify statistical uncertainty. Written with modern software-engineering practices—continuous integration, extensive unit testing, and thorough documentation—$\texttt{KBKit}$ is both reliable and easy to extend. By condensing complex KBI analysis into a few intuitive commands, $\texttt{KBKit}$ enables researchers to incorporate KB theory into routine simulation workflows and accelerate the discovery of solution-phase thermodynamics.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

PyLRO: A Python calculator for analyzing long-range structural order

We present PyLRO, an open-source Python calculator designed to detect, quantify, and display long-range order in periodic structures. The program’s design methodology, workflow, and approach to order quantification are described and demonstrated using a simple toy model. Additionally, we apply PyLRO to a series of metastable AlPO 4 structural intermediates from a prior high-pressure study, demonstrating how to compute and visualize structural order in all directions on a Miller sphere. We further highlight the program’s capabilities through a high-throughput analysis of structural patterns in the pressure-induced amorphization of AlPO 4 , revealing atomistic insights into specific energy regions of massive amorphous structures. These results suggest that PyLRO can be a valuable tool for investigating crystal–amorphous transition in materials research.

36 MATERIALS SCIENCE

Application of an Empirical Density Law via Python for Aqueous Plutonium Chloride Systems for MCNP6

Criticality safety models for aqueous plutonium chloride systems often contain a significant bias due to assumptions in material compositions. These systems are currently modeled as a fictitious metal-water mixture because little is known about the true solution density. Furthermore, no predictive density tools or capabilities for modeling aqueous plutonium chloride systems are approved for use at Los Alamos National Laboratory. Recent density measurements of this ternary system (PuCl 3 -HCl-H 2 O) have allowed for the development of a more realistic density law, which is applied in this work via an empirical method based in Python. This tool, entitled PuCS (Plutonium Chloride Solution tool) may be used to determine solution density and composition based on the plutonium content, acid content, and temperature for MCNP6 inputs. PuCS has been found to predict density within 2% of experimental data. In conclusion, MCNP6 calculations have found that crediting minimal amounts of free acid (0.5 M) may correspond to a ~12% decrease in peak reactivity in comparison to current modeling methods.

42 ENGINEERING

A Python Tool for Aqueous Plutonium Nitrate Density Law Input Preprocessing in MCNP6

Here, this work develops a predictive density tool in Python, named Plutonium Nitrate Solutions (PuNS), to reduce bias and uncertainty in nuclear criticality safety calculations for plutonium nitrate systems. The Pitzer method and an empirical method were implemented into the PuNS tool to generate atom densities for use in MCNP6 material cards. These material cards are directly prepared into an MCNP6 input text file and are calculated based on customizable user inputs of plutonium content, nitric acid content, temperature, and plutonium isotope weight percentages. The PuNS tool is validated and verified against the International Criticality Safety Benchmark Evaluation Project Handbook experiments and is observed to predict densities within a root mean square error of 0.89% for the Pitzer method and 1.82% for the empirical method. These errors in density lead to up to 1569 pcm difference in MCNP6 calculated k eff for the Pitzer method and up to a 1751 pcm difference for the empirical method when compared to experimental benchmarks. Simultaneous work is also being performed at Los Alamos National Laboratory and the University of New Mexico to create a similar tool for plutonium chloride solutions, named Plutonium Chloride Solution, which aims to provide the accreditation of the chlorine absorption. These capabilities will not only provide more accurate models but also facilitate an improved understanding of solution systems and a potential relaxation in the conservatism of current aqueous plutonium processing criticality safety limits.

38 RADIATION CHEMISTRY, RADIOCHEMISTRY, AND NUCLEA

Eliater: a Python package for estimating outcomes of perturbations in biomolecular networks

We introduce Eliater, a Python package for estimating the effect of perturbation of an upstream molecule on a downstream molecule in a biomolecular network. The estimation takes as input a biomolecular network, observational biomolecular data, and a perturbation of interest, and outputs an estimated quantitative effect of the perturbation. We showcase the functionalities of Eliater in a case study of Escherichia coli transcriptional regulatory network.

59 BASIC BIOLOGICAL SCIENCES