Search NASASearch

SEARCH · Search NASA

Results for “Python applications”

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 163 records · Page 9

Probabilistic Forward Modeling of Galaxy Catalogs with Normalizing Flows

Abstract Evaluating the accuracy and calibration of the redshift posteriors produced by photometric redshift (photo- z ) estimators is vital for enabling precision cosmology and extragalactic astrophysics with modern wide-field photometric surveys. Evaluating photo- z posteriors on a per-galaxy basis is difficult, however, as real galaxies have a true redshift but not a true redshift posterior. We introduce PZFlow, a Python package for the probabilistic forward modeling of galaxy catalogs with normalizing flows. For catalogs simulated with PZFlow, there is a natural notion of “true” redshift posteriors that can be used for photo- z validation. We use PZFlow to simulate a photometric galaxy catalog where each galaxy has a redshift, noisy photometry, shape information, and a true redshift posterior. We also demonstrate the use of an ensemble of normalizing flows for photo- z estimation. We discuss how PZFlow will be used to validate the photo- z estimation pipeline of the Dark Energy Science Collaboration, and the wider applicability of PZFlow for statistical modeling of any tabular data.

Astronomy & Astrophysics

CG-Kit: Code Generation Toolkit for performant and maintainable variants of source code applied to Flash-X hydrodynamics simulations

CG-Kit is a new Code Generation tool-Kit that we have developed as a part of the solution for portability and maintainability for multiphysics computing applications. The development of CG-Kit is rooted in the urgent need created by the shifting landscape of high-performance computing platforms and the algorithmic complexities of a particular large-scale multiphysics application: Flash-X. To efficiently use computing resources on a heterogeneous node, an application must have a map of computation to resources and a mechanism to move the data and computation to the resources according to the map. Most existing performance portability solutions are focussed on abstracting the expression of computations so that a unified source code can be specialized to run on different resources. However, such an approach is insufficient for a code like Flash-X, which has a multitude of code components that can be assembled in various permutations and combinations to form different instances of applications. Similar challenges apply to any code that has composability, where a single specified way of apportioning work among devices may not be optimal. Additionally, use cases arise where the optimal control flow of computation may differ for different devices while the underlying numerics remain identical. This combination leads to unique challenges including handling an existing large code base in Fortran and/or C/C++, subdivision of code into a great variety of units supporting a wide range of physics and numerical methods, different parallelization techniques for distributed and shared memory systems and accelerator devices, and heterogeneity of computing platforms requiring coexisting variants of parallel algorithms. All of these challenges demand that scientific software developers apply existing knowledge about domain applications, algorithms, and computing platforms to determine custom abstractions and granularity for code generation. There is a critical lack of tools to tackle those problems. CG-Kit is designed to fill this gap by providing a user with the ability to express their desired control flow and computation-to-resource map in the form a pseudocode-like recipe. It consists of standalone tools that can be combined into highly specific and, we argue, highly effective portability and maintainability toolchains. Here we present the design of our new tools: parametrized source trees, control flow graphs, and recipes. The tools are implemented in Python. They are agnostic to the programming language of the source code targeted for code generation. In conclusion, we demonstrate the capabilities of the toolkit with two examples, first, multithreaded variants of the basic AXPY operation, and second, variants of parallel algorithms within a hydrodynamics solver, called Spark, from Flash-X that operates on block-structured adaptive meshes.

Algorithmic portability

Raptor: A Python Library for Porosity Predictions in Additive Manufacturing

Raptor is an efficient Python library for simulating stochastic lack-of-fusion (sLoF) defects in additive manufacturing (AM) processes. These defects arise from stochastic variations in the melt pool boundary leading to undermelting from insufficient overlap between adjacent melt pools or successive layers (Grasso & Colosimo, 2017; Khairallah et al., 2016). Performance variability of AM parts is a pressing challenge in qualification and certification of AM parts; this is in part due to the poorly understood formation rate and statistics of sLoF defects. Raptor is designed to capture the explicit morphologies of sLoF defects and their statistics to accelerate qualification and certification efforts of AM parts in critical applications.

Subraveti, Vamsi [Vanderbilt University]

Python-EPICS RF Conditioning Automatic Control System at the Spallation Neutron Source

The RF Test Facility (RFTF) at the Spallation Neutron Source (SNS) is used for the conditioning of RF compo-nents such as ceramic vacuum windows and power cou-plers prior to their installation in the H- ion linear accel-erator. This process exposes components to high-power RF fields and thermal cycling to improve performance and remove surface impurities. To automate and optimize this process, a Python-based EPICS control system was developed alongside targeted hardware upgrades. The system enables real-time monitoring and control of RF power levels, temperature, and vacuum pressure. A user-friendly graphical interface was implemented using CS-Studio (Phoebus), allowing operators to adjust parameters and collect data efficiently. The system integrates a High-Power Protection Module (HPM) for interlocks based on vacuum and arc detection, ensuring safe operation. These upgrades have significantly improved the efficiency, accuracy, and safety of RF conditioning at the SNS RFTF. This paper describes the updated RF conditioning sys-tem, highlighting the software and hardware develop-ments and their application in support of the Proton Pow-er Upgrade (PPU) project.

Lee, Sung-Woo [ORNL] (ORCID:000000030915835X)

Power modeling of degraded PV systems: Case studies using a dynamically updated physical model (PV-Pro)

Power modeling, widely applied for health monitoring and power prediction, is crucial for the efficiency and reliability of Photovoltaic (PV) systems. The most common approach for power modeling uses a physical equivalent circuit model, with the core challenge being the estimation of model parameters. Traditional parameter estimation either relies on datasheet information, which does not reflect the system's current health status, especially for degraded PV systems, or requires additional I-V characterization, which is generally unavailable for large-scale PV systems. Thus, we build upon our previously developed tool, PV-Pro (originally proposed for degradation analysis), to enhance its application for power modeling of degraded PV systems. PV-Pro extracts model parameters from production data without requiring I-V characterization. This dynamic model, periodically updated, can closely capture the actual degradation status, enabling precise power modeling. PV-Pro is compared with popular power modeling techniques, including persistence, nominal physical, and various machine learning models. The results indicate that PV-Pro achieves outstanding power modeling performance, with an average nMAE of 1.4 % across four field-degraded PV systems, reducing error by 17.6 % compared to the best alternative technique. Furthermore, PV-Pro demonstrates robustness across different seasons and severities of degradation. The tool is available as a Python package at https://github.com/DuraMAT/pvpro.

14 SOLAR ENERGY

SULI Deliverables Using: Python-B1500 [Slides]

A new electrical setup for testing ECRAM devices is described in this presentation. This presentation details the background of ECRAM devices, how the B1500 is used to program ECRAM devices, and the python GUI that was created for controlling the B1500. ECRAM devices are a form of non-volatile memory. The stored data is the resistance between two of the terminals on the device. Using only the B1500, the ECRAM devices can be programmed and the state read out. This creates a simple, logical testing setup. The overall setup was successful, ECRAM devices could easily be programmed and measured. However, there is still room for improvement. Specifically, in the creation of an automated “Program” feature and a “Data Collection” feature. These features will require additional advances in the understanding of ECRAM devices but will greatly automate and improve the current data collection and application of ECRAM devices.

42 ENGINEERING

Adaptive continuity-preserving simplification of street networks

Street network data is widely used to study human-based activities and urban structure. Often, these data are geared towards transportation applications, which require highly granular, directed graphs that capture the complex relationships of potential traffic patterns. While this level of network detail is critical for certain fine-grained mobility models, it represents a hindrance for studies concerned with the morphology of the street network. For the latter case, street network simplification — the process of converting a highly granular input network into its most simple morphological form — is a necessary, but highly tedious preprocessing step, especially when conducted manually. In this manuscript, we develop and present a novel adaptive algorithm for simplifying street networks that is both fully automated and able to mimic results obtained through a manual simplification routine. The algorithm — available in the neatnet Python package — outperforms current state-of-the-art procedures when comparing those methods to manually, human-simplified data, while preserving network continuity.

Python

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

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

54 ENVIRONMENTAL SCIENCES

Evidential Deep Learning: Enhancing Predictive Uncertainty Estimation for Earth System Science Applications

Abstract Robust quantification of predictive uncertainty is a critical addition needed for machine learning applied to weather and climate problems to improve the understanding of what is driving prediction sensitivity. Ensembles of machine learning models provide predictive uncertainty estimates in a conceptually simple way but require multiple models for training and prediction, increasing computational cost and latency. Parametric deep learning can estimate uncertainty with one model by predicting the parameters of a probability distribution but does not account for epistemic uncertainty. Evidential deep learning, a technique that extends parametric deep learning to higher-order distributions, can account for both aleatoric and epistemic uncertainties with one model. This study compares the uncertainty derived from evidential neural networks to that obtained from ensembles. Through applications of the classification of winter precipitation type and regression of surface-layer fluxes, we show evidential deep learning models attaining predictive accuracy rivaling standard methods while robustly quantifying both sources of uncertainty. We evaluate the uncertainty in terms of how well the predictions are calibrated and how well the uncertainty correlates with prediction error. Analyses of uncertainty in the context of the inputs reveal sensitivities to underlying meteorological processes, facilitating interpretation of the models. The conceptual simplicity, interpretability, and computational efficiency of evidential neural networks make them highly extensible, offering a promising approach for reliable and practical uncertainty quantification in Earth system science modeling. To encourage broader adoption of evidential deep learning, we have developed a new Python package, Machine Integration and Learning for Earth Systems (MILES) group Generalized Uncertainty for Earth System Science (GUESS) (MILES-GUESS) ( https://github.com/ai2es/miles-guess ), that enables users to train and evaluate both evidential and ensemble deep learning. Significance Statement This study demonstrates a new technique, evidential deep learning, for robust and computationally efficient uncertainty quantification in modeling the Earth system. The method integrates probabilistic principles into deep neural networks, enabling the estimation of both aleatoric uncertainty from noisy data and epistemic uncertainty from model limitations using a single model. Our analyses reveal how decomposing these uncertainties provides valuable insights into reliability, accuracy, and model shortcomings. We show that the approach can rival standard methods in classification and regression tasks within atmospheric science while offering practical advantages such as computational efficiency. With further advances, evidential networks have the potential to enhance risk assessment and decision-making across meteorology by improving uncertainty quantification, a longstanding challenge. This work establishes a strong foundation and motivation for the broader adoption of evidential learning, where properly quantifying uncertainties is critical yet lacking.

Schreck, John S.

GridSTIX

SF-25-112 Grid-STIX is a comprehensive extension of the STIX (Structured Threat Information Expression) 2.1 ontology specifically designed for electrical grid cybersecurity applications. This ontology provides a standardized, machine-readable framework for modeling grid assets, operational technology devices, threats, vulnerabilities, supply chain risks, and security relationships in electrical power systems. ## Key Features - **Comprehensive Grid Coverage**: Physical assets, OT devices, grid components, sensors, and energy storage systems - **Zero Trust Architecture**: Policy decision points, enforcement points, trust brokers, and continuous monitoring - **AMI Infrastructure**: Advanced metering networks, head-end systems, mesh gateways, and MDM systems - **Advanced Security Modeling**: Attack patterns, vulnerabilities, mitigations, and supply chain risks - **Critical Grid Relationships**: Power flow, protection, control, and synchronization relationships - **Supply Chain Security**: Supplier modeling, country of origin tracking, and risk assessment - **Protocol Support**: DNP3, Modbus, IEC 61850, IEC 60870-5-104, OPC-UA, and IEEE standards - **Python Code Generation**: Automated STIX-compliant Python class generation from ontologies - **Interactive Visualization**: Enhanced HTML network graphs with grid-specific categorization - **STIX 2.1 Compliance**: Full compatibility with STIX threat intelligence ecosystem

Blakely, Benjamin [Argonne National Laboratory (AN

MolSym : A Python package for handling symmetry in molecular quantum chemistry

A consideration of the point group symmetry of molecules is often advantageous from a computational efficiency standpoint and sometimes necessary for the correct treatment of chemical physics problems. Many modern electronic structure software packages include a treatment of symmetry, but these are sometimes incomplete or unusable outside of that program’s environment. Therefore, we have developed the MolSym package for handling molecular symmetry and its associated functionalities to provide a platform for including symmetry in the implementation and development of other methods. Features include point group detection, molecule symmetrization, arbitrary generation of symmetry element sets and character tables, and symmetry adapted linear combinations of real spherical harmonic basis functions, Cartesian displacement coordinates, and internal coordinates. We present some of the advantages of using molecular symmetry as achieved by MolSym, particularly with respect to Hartree–Fock theory, and the reduction of finite difference displacements in gradient/Hessian computations. Furthermore, this package is designed to be easily integrated into other software development efforts and may be extended to further symmetry applications.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

Smokescreen: A Python package for data vector blinding and encryption in cosmological analyses

Smokescreen is an open-source Python library for data-vector concealment (blinding) in cosmological analyses. Data-vector blinding works by applying cosmology-dependent shifts to the observed data vector, moving it away from the true cosmological signal without affecting its statistical properties, so that analysts cannot infer the true result until the analysis is frozen and the blinding is lifted. The package computes these shifts using Firecrown likelihoods applied to data vectors stored in the SACC format, ensuring that the theoretical model used for blinding is identical to that used for inference whilst remaining agnostic to the specific observable being blinded. To prevent accidental unblinding, the original SACC file, containing the true cosmology, is encrypted. Although developed for the Vera C. Rubin Observatory Legacy Survey of Space and Time (LSST), Smokescreen is applicable to any experiment using Firecrown likelihoods and the SACC data format.

Loureiro, Arthur [Stockholm U., OKC; Imperial Coll

Phenomena-based graph representations and applications to chemical process simulation

Rapid and robust simulation of chemical processes is critical to conduct process design, optimization, techno-economic analysis, and sustainability analysis. Yet, efficiently solving simulation models remains a challenge due to the highly coupled and nonlinear nature of the underlying algebraic equations that capture the physical phenomena taking place in the process (e.g., material and energy conservation, phase equilibrium, reactions). In this work, we show that graph-theoretic representations of the physical phenomena within unit operations can help navigate and decompose equations to systematically identify alternative approaches for fast and robust numerical solutions. Specifically, we present a graph-theoretic abstraction that captures the connectivity between the model variables/equations and use this abstraction to group variables/equations into fundamental phenomena. We show that phenomena-based decomposition of the underlying equations can help decouple nonlinearities and enforce material/energy conservation at the process level to accelerate convergence. The proposed decomposition approach differs from the more traditional sequential modular simulation approach, in which equations are grouped and decomposed by unit operations. We implemented the phenomena-based decomposition in BioSTEAM—an open-source process simulation platform in Python—and demonstrated that this approach can converge a variety of separation process models. Compared to sequential modular simulation, the phenomena-based approach can converge idealized systems faster, but it can be slower for (or even fail to converge) highly coupled and nonideal process systems.

Convergence

BM3DORNL

BM3DORNL is a high-performance, open-source library for removing streak and ring artifacts from computed-tomography (CT) data, developed for neutron imaging at Oak Ridge National Laboratory's Spallation Neutron Source (VENUS beamline) and applicable to X-ray CT as well. Ring artifacts — concentric rings in reconstructed slices caused by detector pixel-to-pixel response non-uniformities — appear as vertical streaks in the sinogram and degrade both image quality and quantitative analysis. BM3DORNL operates in the sinogram domain using an adaptation of the BM3D (block-matching and 3D collaborative filtering) algorithm (Dabov et al., 2007). It provides a dedicated streak-removal mode, a true multi-scale BM3D variant (after Mäkinen et al., 2021) that suppresses wide streaks single-scale methods miss, and an alternative Fourier–SVD method (~2.6× faster) combining FFT-based energy detection with rank-1 SVD. The computationally intensive core is implemented in Rust with parallel (Rayon) block matching, integral-image pre-screening, and optimized transforms, and is exposed through a simple Python API (with an optional GUI) so it integrates directly into existing tomography reconstruction pipelines. It processes both 2D sinograms and 3D sinogram stacks, is pip-installable for Linux and macOS, and is documented at https://bm3dornl.readthedocs.io.

Zhang, Chen [Oak Ridge National Laboratory (ORNL),

QFw: A Quantum Framework for Large-scale HPC Ecosystems

This work extends Quantum Framework (QFw) by integrating it with Northwest Quantum Simulator (NWQ-Sim) and by introducing a lightweight python library that allows multiple frontends (e.g., Qiskit) to interact with QFw. This extension enables QFw to flexibly decouple frontends from backends (e.g., NWQ-Sim). We demonstrate this capability by executing a Greenberger-Horne-Zeilinger (GHZ) circuit using Qiskit and Pennylane with NWQ-Sim and Tensor-Network Quantum Virtual-Machine (TN-QVM). QFw enables easy scaling to multiple nodes. We showcase this with scaling tests using GHZ with up to 32 qubits for different number of nodes on the Frontier supercomputer. And, to demonstrate the use of QFw for real world problems, we solve a metamaterial optimization problem, using a Quantum Approximate Optimization Algorithm (QAOA). We observe that QFw over NWQ-Sim marginally improves Qiskit-aer’s accuracy in reaching the lowest energy state. These additions to QFw prepare it to run hybrid applications in a hybrid resource environment since it treats actual quantum hardware and simulators alike.

Chundury, Srikar

Revisiting the Anisotropic Complex Refractive Indices of Sodium Nitrate for Interpretation of the Reflectance Spectrum of Pressed Pellets

Reflectance spectroscopy is notoriously confounding in that the measured spectral response is highly dependent upon the morphology of the sample. Fortunately, all such perturbations are neatly encoded by the complex refractive index of the sample. Herein, we seek to quantitatively model the measured infrared reflectance spectrum of a specularly flat pressed pellet sample of the birefringent compound, sodium nitrate. Single crystals of sodium nitrate were synthesized via a slow evaporation process and spectroscopically analyzed using polarization-dependent infrared single-angle reflectance spectroscopy. The anisotropic complex refractive index was measured from 7500 to 300 cm-1 (1.33 to 33.33 µm). The deduced anisotropic optical constants were found to be consistent with those previously reported. Once measured and validated, the optical constants were applied to model the pressed pellet reflectance spectrum. It was evident that an average of the anisotropic refractive indices was insufficient to account for the measured pellet reflectance. In order to account for contributions of all possible microcrystalline orientations within the pellet, the Python package PYELLI was used to calculate a basis set of orientation-dependent reflection spectra spanning the distinct ? and ? Euler rotations of the uniaxial crystal. When the population of orientations was allowed to vary freely in a spectral fit analysis, the fit-deduced orientations were tightly clustered along f = 45º, hinting at residual anisotropy in the pressed pellet sample. Conversely, an equally valid spectral fit (with marginally worse fit metric) was obtained when the population was constrained to an isotropic distribution of orientations. Subsequent non-zero cross-polarization reflectance measurements likewise suggested anisotropy in the pellet. However, both grazing incidence wide-angle x-ray scattering and scanning electron microscopy measurements revealed that the microcrystal orientations at the surface of the pressed pellet sample were isotropically distributed (and that the average crystallite size was larger than ?/10). Application of the measured complex refractive indices for modeling the reflectance spectrum of the pressed pellet, and rectification of these seemingly contradictory observations will be discussed.

Wilhelm, Michael J.

CROCUS Low Cost All-in-One Weather Station AMB-004 Data Argonne National Laboratory Prairie Site

The Ambient Weather WS-2902D (AMB) is a low cost weather station that has become very useful for filling data gaps in harder to deploy locations. These low cost weather stations collect 13 second data, which is averaged to a five minute data output available to users through an Application Programming Interface (API) key. The data files contain measurements for precipitation, temperature, wind chill/heat index, relative humidity, dew point, UV index, solar radiation, wind speed, wind direction, wind gust, and with an external particulate matter 2.5 (PM 2.5) sensor. Having all of these measurements in one condense system allows for fast deploying and dense network capabilities. Three of the AMB weather stations were deployed at the Argonne Testbed for Multiscale Observational Science (ATMOS), a 20-acre prairie site at Argonne National Laboratory in Lemont, Illinois. The instruments are denoted by their three digit identifier (CMS-AMB-xxx) format. The data is presented as daily NetCDF (.nc) files, each containing approximately 24 hours of observations. Files follow the naming convention of: the project (CROCUS), location (atmos), instrument name (CMS-AMB-004), data level (raw, a1), and date (year, month, day). The NetCDF format can be accessed using common scientific software such as Python using xarray, netCDF4 or ACT-DOE.

EARTH SCIENCE > ATMOSPHERE > AEROSOLS > PARTICULAT