Search NASASearch

SEARCH · Search NASA

Results for “Python Programming”

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

Development and validation of a software for simulating γ-γ coincidence emission and detection probabilities

Gamma-gamma coincidence spectrometers have the potential to significantly enhance detection sensitivity for ultra-trace radionuclide measurements. The implementation of these spectrometers, however, is limited by the complexity of acquisition hardware, data processing and quantification. This work reports development of a novel radionuclide quantification software for γ-γ coincidence measurements. For any radionuclide, the software parses the Evaluated Nuclear Structure Data File (ENSDF) database, recursively simulating all possible γ-γ coincidence signatures and their respective emission and detection probabilities. Implemented using Python programming language, the software employs several strategies to boost overall computational performance. Since coincidence-based spectrometers are of notable interest in monitoring compliance for the Comprehensive Nuclear-Test-Ban Treaty (CTBT), the software’s execution was tested for 84 CTBT-relevant radionuclides. To date, the software has been experimentally validated for 15 radionuclides using the Advanced Radionuclide Gamma spectrOmeter (ARGO) at Pacific Northwest National Laboratory, USA (PNNL). Notably, the software can be operated in convergence mode, whereby coincidence detection efficiency’s convergence behavior can help avoid unreliable radionuclide activity estimates. With growing number of coincidence spectrometers worldwide, this paper aims to assist the radiation metrology community in developing similar software for their system.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND

Robust Automatic EXAFS First-Shell Fits

Extended X-ray absorption fine structure (EXAFS) is a widely used technique for atomic structure determination. Fourier transformation connects EXAFS in k space and R space. However, determining the appropriate k-range for the transformation can be challenging, but critical for the first-shell fit. In this study, we present an automatic method to determine the k-range using the Larch package and a Python program. The first step is to estimate spectral noise across a series of k-ranges with a fixed minimum value and identify the optimal maximum value in the k-range (k max ). The k max is determined by an empirical noise threshold that marks the point where the noise level in the Fourier transformed spectrum changes dramatically. Using the obtained k max value, the first shell is modeled to determine the minimum k value (k min ) by optimizing the background function through alignment of the spectrum with theory. The optimal k min corresponds to the point of the minimum R-factor, which quantifies the difference between the experimental and fitted spectrum. Our method was tested on various typical datasets and yielded suitable k-ranges for Fourier transformation and accurate first-shell fits. This approach helps avoid unreliable, irreproducible data analysis, especially for noisy data from diluted samples, and enables robust automatic first-shell EXAFS fitting.

EXAFS analysis

Python Measurement-Informed Modelling Method (PythonMIMM) v1.02

This Python program implements the calculations for electrical energy efficiency and electrical losses in the paper "Energy and power quality measurement for electrical distribution in AC and DC microgrid buildings" (https://www.sciencedirect.com/science/article/abs/pii/S0306261921015658). The inputs are metered voltage, current, or power data of meters located throughout the DC system. In the absence of metered data, the user must input some other information about the building such as the types of power converters or wire lengths. The program will build a loss model of the DC system based on metered data and electrical information. It will also generate an equivalent AC system and determine the losses and efficiency.

Gerber, Daniel [Lawrence Berkeley National Laborat

PYDICE

A new Python program has been created that calculates similarity metrics (E, ck), available as a web server. Users can post one or more Sensitivity Data Files (SDFs) to either calculate similarity metrics (returned as a JSON response packet) or to be converted into a different SDF format (returned as a zip file).

Holcomb, Andrew [Oak Ridge National Laboratory (OR

pyTCR: A tropical cyclone rainfall model for python

pyTCR is a climatology software package developed in the Python programming language. It integrates the capabilities of several legacy physical models and increases computational efficiency to allow rapid estimation of tropical cyclone (TC) rainfall consistent with the large-scale environment. Specifically, pyTCR implements a horizontally distributed and vertically integrated model [Zhu et al., 2013] for simulating rainfall driven by TCs. Along storm tracks, rainfall is estimated by computing the cross-boundary-layer, upward water vapor transport caused by different mechanisms including frictional convergence, vortex stretching, large-scale baroclinic effect (i.e., wind shear), topographic forcing, and radiative cooling [Lu et al., 2018]. The package provides essential functionalities for modeling and interpreting spatio-temporal TC rainfall data. pyTCR requires a limited number of model input parameters, making it a convenient and useful tool for analyzing rainfall mechanisms driven by TCs. To sample rare (most intense) rainfall events that are often of great societal interest, pyTCR adapts and leverages outputs from a statistical-dynamical TC downscaling model [Lin et al., 2023] capable of rapidly generating a large number of synthetic TCs given a certain climate. As a result, pyTCR significantly reduces computational effort and improves the efficiency in capturing extreme TC rainfall events at the tail of the distributions from limited datasets. Furthermore, the TC downscaling model is forced entirely by large-scale environmental conditions from reanalysis data or coupled General Circulation Models (GCMs), simplifying the projection of TC-induced rainfall and wind speed under future climate using pyTCR. Finally, pyTCR can be coupled with hydrological and wind models to assess risks associated with independent and compound events (e.g., storm surges and freshwater flooding).

54 ENVIRONMENTAL SCIENCES

PyDislocDyn: A Python code for calculating dislocation drag and other crystal properties

PyDislocDyn is a suite of python programs designed to perform various calculations for dislocation dynamics in the continuum limit. In particular, one of its main purposes is to calculate dislocation drag from phonon wind. Additional features include the averaging of elastic constants for polycrystals, the calculation of the dislocation field including its limiting velocities, and the calculation of dislocation self-energy and line tension.

36 MATERIALS SCIENCE

Los Alamos National Laboratory R&D Intern

This report details the responsibilities, outcomes, and project details of a summer R&D internship at Los Alamos National Laboratory (LANL). LANL is a multidisciplinary laboratory that focuses on current cutting-edge research in many fields such as national security, engineering, materials science, computational modeling, and advanced manufacturing. The goal of the internship project was to work with lab engineers and resources to develop an energy absorbing structure for high-velocity impact applications. The successful development of this technology and methodology would not only positively impact future project funding but also contribute to the laboratory's commitment to solve national security challenges through simultaneous excellence. Such devices would also support efforts surrounding the research and development of energy absorbing structures and would provide new vital information backed by experimentation. Different computational and modeling methods were used to design these structures, in addition to qualitative background information provided by past literature. The resultant designs were successfully tested, and the test results were successfully quantified. From these results, new computational methods were developed through python programming and modeling to predict ideal materialistic properties for these structures given a sufficiently defined application.

36 MATERIALS SCIENCE

AutoSAC-Automated Sample Activation Calculation on VULCAN

AutoSAC is an automated python program to conduct sample activation calculation immediately after neutron scattering experiment on VULCAN. AutoSAC takes account of sample dimensions, compositions, forms, sample environments, neutron beam configurations, neutron scattering history, and proton charged resolved beam power etc., and uses a simplified method to rapidly estimate the radioactivity at end of beam or after. It generates a draft report per sample and repository of radioactivity per measurement and provides feedback of current radioactivity and decay time back to a neutron proposal Slack channel to inform users immediately on sample handling. It also utilizes either the sample note field in EPICS or sample composition or thickness correction and takes slack prompt or command to conduct post-beam SAC by demand. The program can be shared to be used in other beamlines at spallation neutron source with modified instrument configurations including instrument specific characteristic beam fluxes.

An, Ke [Oak Ridge National Laboratory (ORNL), Oak

ANS Winter 2024 Summary: MCCAFE: The Monte Carlo Constructor for ATR Fuel Elements

The Irradiation Experiment Neutronics Analysis Department at Idaho National Laboratory (INL) has implemented a new analysis workflow for experiments in the Advanced Test Reactor (ATR). One key piece of this workflow is the Monte Carlo Constructor for ATR Fuel Elements, or MCCAFE. For each ATR operating cycle, the Reactor and Nuclear Safety Engineering (RNSE) Department first solves the core in eigenvalue mode and depletes the driver fuel materials. In a separate calculation, neutronics analysts model and deplete the materials of one or more irradiation experiments, usually in a series of fixed-source Monte Carlo N-Particle (MCNP) models of the ATR for neutron transport calculations. It was desirable to use the results of the former calculations to inform the models of the latter. MCCAFE is a Python program developed using American Society of Mechanical Engineers Nuclear Quality Assurance-1 procedures at INL. Its purpose is to take the calculated results from the RNSE depletion solutions and the measured or projected operating parameters from the Nuclear Data Management and Analysis System (NDMAS) to generate fixed-source models of the ATR core at given points in time across one or more cycles.

99 - GENERAL AND MISCELLANEOUS

Analysis of Bis(trifluoromethylsulfonyl)imide Interactions with Metal Cations Through a Chemical Informatics Approach

Nominally weakly coordinating anions are useful for modulating the solubility and chemical properties of metal complexes, but identification and analysis of the systematics of the interactions of anions with cationic metal complexes has not received the attention it deserves. Here, a chemical informatics approach is demonstrated for identifying and quantitatively analyzing the ways that the bis(trifluoromethylsulfonyl)imide anion (TFSI) can interact with metal-containing species. An open access computer program (PyCIFTer) was developed to facilitate large-scale structural analysis of TFSI-containing species by utilization of experimental atomic coordinate data from single-crystal X-ray diffraction (XRD) studies obtained from the Cambridge Structural Database (CSD). PyCIFTer establishes a three-dimensional vector space from the raw atomic coordinates, generating acyclic, undirected graphs that are used to rapidly analyze the structural properties (bond lengths and angles) of TFSI in individual structures in sequential/batch fashion. The structures are sorted by PyCIFTer into groups based on pre-set and chemically sensible criteria, affording a comprehensive and systematic view of TFSI structural chemistry. This approach avoids tedious one-at-a-time interrogation of structures, a prospect unreasonable in this case, and many others of contemporary chemical relevance; there were over 1500 structures in the CSD containing TFSI as of November 2024. The results demonstrate that TFSI only rarely binds to cations in the solid state, favoring the formation of species in which TFSI is found in cations’ outer coordination spheres. The prospect of applying PyCIFTer to other moieties is also discussed. PyCIFTer is also schematically compared to the commercial CSD Python application programming interface (API). Taken together, this work demonstrates the usefulness of modular workflows for sequential/batch analysis of structural data from XRD, an approach that appears poised to accelerate the translation of legacy structural results into new chemical insights and hypotheses.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

End-to-End Workflow for Machine-Learning-Based Qubit Readout With QICK and hls4ml

In this article, we present an end-to-end workflow for superconducting qubit readout that embeds codesigned neural networks into the quantum instrumentation control kit (QICK). Capitalizing on the custom firmware and software of the QICK platform, which is built on Xilinx radiofrequency system-on-chip field-programmable gate arrays (FPGAs), we aim to leverage machine learning (ML) to address critical challenges in qubit readout accuracy and scalability. The workflow utilizes the hls4ml package and employs quantization-aware training to translate ML models into hardware-efficient FPGA implementations via user-friendly Python application programming interfaces. We experimentally demonstrate the design, optimization, and integration of an ML algorithm for single transmon qubit readout, achieving 96% single-shot fidelity with a latency of 32.25 ns and less than 16% FPGA lookup table resource utilization. Our results offer the community an accessible workflow to advance ML-driven readout and adaptive control in quantum information processing applications.

42 ENGINEERING

Supervisory Control and Data Acquisition for Electrochemical Separation Experimentation

The Python-based program is a laboratory automation tool designed to control and monitor electrochemical systems. The tool was developed for capacitive deionization (CDI) experiments, but it can be used for any system that requires controlled voltage or current segments and multi-parameter monitoring. The program integrates hardware components to run user-defined experimental parameters, providing operational control of a programmable power supply, peristaltic pump, and data acquisition devices. Currently, the program is structured with a workflow that includes an initialization (or pre-run) phase, a main loop, and a post-experiment stabilization (or post-run) phase. The initialization phase prepares and stabilizes the cell, ensuring that the electrodes and solution reach a baseline state before the experiment begins. The main loop consists of multiple voltage segments that repeat, controlling the experiment while recording key parameters such as time, voltage, current, pH, and conductivity. Finally, the post-experiment stabilization phase allows the system to stabilize after the experiment, returning the cell and solution to equilibrium conditions before ending the sequence. The program is designed with four variations, each tailored to different experimental needs. All variations include both the initialization and post-experiment stabilization stages, which run for a set amount of time, voltage, current, and flow rate before and after the main experiment block. The main loop runs for a set number of cycles, as defined by the user input, and each cycle is composed of 2 or 4 segments. The 4 program variations are described as follows: Program 1: The main program includes 2 segments. Each segment is defined to have a set duration, flow rate, voltage, and current. This program measures conductivity, flow rate, voltage, and current. Program 2: The main program expands Program 1 to include 4 segments. Each segment has a specified duration, flow rate, voltage, and current. Like Program 1, it measures conductivity, flow rate, voltage, and current. Program 3: The main program consists of 2 segments, each defined by time, flow rate, voltage, and current. In addition to conductivity, flow rate, voltage, and current, Program 3 collects pH and temperature data through a 4-channel data acquisition device. Program 4: This program independently controls two channels of a multi-channel power supply simultaneously. While conductivity can only be measured for one cell at a time, the dual-channel control makes it possible to operate two cells simultaneously under different voltage/current conditions. The main program includes 2 segments.For each program, all measurements are automatically logged and integrated into a single Excel output file. Data are displayed in numerical format and plotted, both in real time, to track system performance. A key feature of the program is its ability to synchronize all outputs so that every measurement shares a single timestamp, ensuring accurate alignment of voltage, current, pH, conductivity, and pH data.By combining hardware control, real-time monitoring, and unified data collection, this program significantly reduces manual workload and minimizes errors, making it a reliable platform for researchers, engineers, and laboratory technicians conducting CDI experiments, among other electrochemical tests.

Valentino, Lauren [Argonne National Laboratory (AN

Daily evapotranspiration changes during heatwaves at 32 NEON sites, 2019-2021

This dataset provides partitioned evapotranspiration (ET, the combined loss of water from soil and plant surfaces) anomalies during heatwave events—soil evaporation (E) and transpiration (T)—for 268 heatwave events across 32 National Ecological Observatory Network (NEON) flux sites in the contiguous United States from 2019–2021. Using an ensemble of four high-frequency turbulence methods (Flux-variance Similarity, Conditional Eddy Covariance [CEC], CEC with Water-Use Efficiency, and Conditional Eddy Accumulation; see Zahn and Bou-Zeid 2024), half-hourly transpiration-to-evapotranspiration (T/ET) ratios were derived from 20 hertz (Hz, cycles per second) eddy covariance measurements of carbon dioxide (CO₂) and water vapor (H₂O) concentrations. The dataset spans six vegetation types including evergreen and deciduous forests, grasslands, cultivated crops, shrublands, and emergent herbaceous wetlands. Data Package Contents: The dataset includes a single CSV (comma-separated values) file containing daily anomalies (deviations from baseline conditions) for transpiration (Delta_T), evaporation (Delta_E), total evapotranspiration (Delta_ET), and T/ET ratio (Delta_T_ET) during each day of identified heatwave events. The file also includes site codes, dates, heatwave event identifiers, and day-of-heatwave indicators. The CSV file can be opened with spreadsheet software (Microsoft Excel, Google Sheets) or programming environments (Python, R, MATLAB). This resource enables researchers to investigate ecosystem-specific responses to thermal extremes, validate land surface model partitioning of ET fluxes, and examine feedbacks between water cycling and surface energy balance during heatwaves. The dataset is particularly valuable for studies linking vegetation hydraulic strategies to climate resilience, as it captures the divergent responses of shallow-rooted versus deep-rooted ecosystems. Potential applications include improving drought early warning systems, informing irrigation management strategies, and advancing our mechanistic understanding of land-atmosphere interactions under extreme heat conditions.

Day of Heatwave

Implementing a Laser Stabilization System for Trapping Ca+ Ions: an Internship Reflection

At Lawrence Livermore National Laboratory, I contributed to a project developing 3D printed micro ion traps for quantum computing. I designed, implemented, and assessed a laser stabilization system that locked lasers to the frequencies required for calibrating our High Finesse WS8-10 wavelength meter and for laser cooling and trapping of Ca+ ions. I also programmed a Python interface for hardware communication, data collection, and statistical analysis. Additionally, I optimized and aligned laser beam paths, and I implemented a closed digital feedback loop using Proportional, Integral, and Derivative (PID) control parameters. I analyzed both the long-term and short-term behavior of our locked lasers and adjusted PID parameters to enhance performance. Furthermore, I used COMSOL to simulate the capacitance of a linear Paul trap design and predict our trap’s performance. The procedures I developed for the interface, analysis, and simulations will continue to support the ion trapping experiment after my appointment. I strengthened my skills in data analysis, Python coding, and optical alignment for laser systems. My confidence as a researcher grew, particularly in communicating my research. This experience taught me the importance of careful planning and consideration in research and solidified my desire to continue exploring novel quantum technology as an undergraduate

42 ENGINEERING

Projected Urban Morphology of the Los Angeles Area by the Year 2100

This dataset provides projections of urban building morphologies for the Los Angeles urban area at 30-meter spatial resolution. It contains 192 raster files that detail two primary building attributes: building footprint fractions (ranging from 0 to 1) and average building heights (ranging from 0 to 75 meters). The projections account for a wide range of future pathways, covering two Shared Socioeconomic Pathway (SSP) scenarios (SSP3 and SSP5), two population scenarios, two developed land intensification scenarios, and four distinct levels of intensification. The dataset was created using dual Generative Adversarial Networks (GANs) trained on 2015 land cover and building properties from the National Land Cover Database (NLCD) and Model America datasets. Supporting information on the dataset has been described in the LAUrbanAreaMorphologyProjections2100_README.txt file.

Pandey, Bhartendu

Machine Learning-Based Anomaly Detection for PMT Data Quality Monitoring in the SBN and DUNE

Maintaining high-quality detector data is essential for achieving the scientific objectives of the Short-Baseline Neutrino (SBN) Program at Fermilab. Current data quality monitoring (DQM) procedures rely primarily on threshold-based metrics and manual inspection of detector monitoring plots, making the detection of subtle or gradually developing anomalies both time-consuming and dependent on expert interpretation. This project developed and evaluated a machine-learning workflow for automatically identifying anomalous photomultiplier tube (PMT) channels in the Short-Baseline Near Detector (SBND) using optical-hit amplitude data. A Python-based analysis program was developed to process ROOT files, extract statistical features describing individual PMT amplitude distributions, and generate feature vectors for anomaly detection. These features were used to train an Isolation Forest model using data representing normal detector operation. The trained model was subsequently applied to independent detector runs to identify channels exhibiting statistically unusual behavior relative to the learned reference response. To support expert interpretation, the workflow generated complementary diagnostic products, including anomaly score distributions, normalized amplitude comparisons, decision-tree visualizations, and principal component analysis (PCA) projections. This project demonstrated the feasibility of integrating unsupervised machine learning into detector data-quality monitoring and developed a complete workflow for automated PMT performance assessment to aid expert-driven review. Beyond its technical contributions, the VFP appointment fostered a research collaboration between Aurora University and Fermilab and provided direct workforce development benefits by training the visiting faculty member in detector-scale machine-learning methods that are now being incorporated into undergraduate coursework and research. The methodology developed here provides a foundation for future applications to ProtoDUNE and other liquid argon time projection chamber (LArTPC) detectors, contributing to ongoing efforts to improve detector reliability, reduce manual monitoring requirements, and enable scalable data quality monitoring for future large-scale neutrino experiments, including the Deep Underground Neutrino Experiment (DUNE).

Colón Santana, Juan A. [Unlisted, US, IL]

Methods for evaluation and treatment of data shift

This is a code repository for a set of tools for detecting and mitigating data shifts in machine learning. The goal of the tools is to provide capabilities for determining when new data sets differ from training data sets and for adapting existing models to new data or correcting data shifts (via domain adaptation). The components will be written in Python, a high-level programming language that takes advantage of the Python ecosystem of high-quality open-source packages for machine learning and signal processing.

Parikh, Nidhi