Search NASA⌕ Search

SEARCH · Search NASA

Results for “Python implementation”

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 235 records · Page 13

Structural complexity of snapshots of two-dimensional Fermi-Hubbard systems

The development of quantum gas microscopy for two-dimensional optical lattices has provided an unparalleled tool to study the Fermi-Hubbard model (FHM) with ultracold atoms. Spin-resolved projective measurements, or snapshots, have played a significant role in quantifying correlation functions, theory verification, and thus the uncovering of underlying physical phenomena such as antiferromagnetism at commensurate filling on bipartite lattices and other charge and spin correlations, as well as dynamical properties at various densities. Here we employ a recent concept, the multiscale structural complexity, and show that when computed for the snapshots (of single spin species, local moments, or total density) it can provide a theory-free property, immediately accessible to experiments. Specifically, after benchmarking results for Ising and $XY$ models, we study the structural complexity of snapshots of the repulsive FHM in the two-dimensional square lattice as a function of doping and temperature. We generate projective measurements using determinant quantum Monte Carlo and compare their complexities against those from the experiment. We demonstrate that these complexities are linked to relevant physical observables such as the entropy and double occupancy. Their behaviors capture the development of correlations and relevant length scales in the system. Furthermore, we provide an open-source code in python which can be implemented into data analysis routines in experimental settings for the square lattice.

75 CONDENSED MATTER PHYSICS, SUPERCONDUCTIVITY AND↗

MO-F-CAMPUS-J-02: Automatic Recognition of Patient Treatment Site in Portal Images Using Machine Learning

Purpose: To investigate the method to automatically recognize the treatment site in the X-Ray portal images. It could be useful to detect potential treatment errors, and to provide guidance to sequential tasks, e.g. automatically verify the patient daily setup. Methods: The portal images were exported from MOSAIQ as DICOM files, and were 1) processed with a threshold based intensity transformation algorithm to enhance contrast, and 2) where then down-sampled (from 1024×768 to 128×96) by using bi-cubic interpolation algorithm. An appearance-based vector space model (VSM) was used to rearrange the images into vectors. A principal component analysis (PCA) method was used to reduce the vector dimensions. A multi-class support vector machine (SVM), with radial basis function kernel, was used to build the treatment site recognition models. These models were then used to recognize the treatment sites in the portal image. Portal images of 120 patients were included in the study. The images were selected to cover six treatment sites: brain, head and neck, breast, lung, abdomen and pelvis. Each site had images of the twenty patients. Cross-validation experiments were performed to evaluate the performance. Results: MATLAB image processing Toolbox and scikit-learn (a machine learning library in python) were used to implement the proposed method. The average accuracies using the AP and RT images separately were 95% and 94% respectively. The average accuracy using AP and RT images together was 98%. Computation time was ∼0.16 seconds per patient with AP or RT image, ∼0.33 seconds per patient with both of AP and RT images. Conclusion: The proposed method of treatment site recognition is efficient and accurate. It is not sensitive to the differences of image intensity, size and positions of patients in the portal images. It could be useful for the patient safety assurance. The work was partially supported by a research grant from Varian Medical System.

60 APPLIED LIFE SCIENCES↗

Differentiable Quantum Programming with Unbounded Loops

The emergence of variational quantum applications has led to the development of automatic differentiation techniques in quantum computing. Existing work has formulated differentiable quantum programming with bounded loops, providing a framework for scalable gradient calculation by quantum means for training quantum variational applications. However, promising parameterized quantum applications, e.g., quantum walk and unitary implementation, cannot be trained in the existing framework due to the natural involvement of unbounded loops. To fill in the gap, we provide the first differentiable quantum programming framework with unbounded loops, including a newly designed differentiation rule, code transformation, and their correctness proof. Technically, we introduce a randomized estimator for derivatives to deal with the infinite sum in the differentiation of unbounded loops, whose applicability in classical and probabilistic programming is also discussed. We implement our framework with Python and Q# and demonstrate a reasonable sample efficiency. Through extensive case studies, we showcase an exciting application of our framework in automatically identifying close-to-optimal parameters for several parameterized quantum applications.

Computer Science↗

pnnl/doa

This is a set of Python scripts designed to implement a method of determining the domain of applicability for a trained machine model for molecular property prediction. Additionally, the scripts implement analysis methods to evaluate and explore the results of the method. These scripts are designed to support the submission of a manuscript describing the methods for publication.

Panapitiya, Gihan↗

BLAST-Lite (Battery Lifetime Analysis and Simulation Tool - Lite) [SWR-22-69] Related to: BLAST aka: BLAST-Py

Battery Lifetime Analysis and Simulation Toolsuite (BLAST) provides a library of battery lifetime and degradation models for various commercial lithium-ion batteries from recent years. Degradation models are identified from publicly available lab-based aging data using NREL's battery life model identification toolkit. The battery life models predicted the expected lifetime of batteries used in mobile or stationary applications as functions of their temperature and use (state-of-charge, depth-of-discharge, and charge/discharge rates). Model implementation is in both Python and MATLAB programming languages. The MATLAB code also provides example applications (stationary storage and EV), climate data, and simple thermal management options. For more information on battery health diagnostics, prediction, and optimization, see NREL's Battery Lifespan webpage.

Smith, Kandler↗

Determining the significance of associations between two series of discrete events: bootstrap methods

We review and develop techniques to determine associations between series of discrete events. The bootstrap, a nonparametric statistical method, allows the determination of the significance of associations with minimal assumptions about the underlying processes. We find the key requirement for this method: one of the series must be widely spaced in time to guarantee the theoretical applicability of the bootstrap. If this condition is met, the calculated significance passes a reasonableness test. We conclude with some potential future extensions and caveats on the applicability of these methods. The techniques presented have been implemented in a Python-based software toolkit.

97 MATHEMATICS AND COMPUTING↗

High Performance Network Monitoring [Slides]

Network Monitoring requires a substantial use of data and error analysis to overcome issues with clusters. Zenoss and Splunk help to monitor system log messages that are reporting issues about the clusters to monitoring services. Infiniband infrastructure on a number of clusters upgraded to ibmon2. ibmon2 requires different filters to report errors to system administrators. Focus for this summer is to: (1) Implement ibmon2 filters on monitoring boxes to report system errors to system administrators using Zenoss and Splunk; (2) Modify and improve scripts for monitoring and administrative usage; (3) Learn more about networks including services and maintenance for high performance computing systems; and (4) Gain a life experience working with professionals under real world situations. Filters were created to account for clusters running ibmon2 v1.0.0-1 10 Filters currently implemented for ibmon2 using Python. Filters look for threshold of port counters. Over certain counts, filters report errors to on-call system administrators and modifies grid to show local host with issue.

97 MATHEMATICS AND COMPUTING↗

Spatio-temporal Estimates of Disease Transmission Parameters for COVID-19 with a Fully-Coupled, County-Level Model of the United States

Sandia National Laboratories has developed a capability to estimate parameters of epidemiological models from case reporting data to support responses to the COVID-19 pandemic. A differentiating feature of this work is the ability to simultaneously estimate county-specific disease transmission parameters in a nation-wide model that considers mobility between counties. The approach is focused on estimating parameters in a stochastic SEIR model that considers mobility between model patches (i.e., counties) as well as additional infectious compartments. The inference engine developed by Sandia includes (1) reconstruction and (2) transmission parameter inference. Reconstruction involves estimating current population counts within each of the compartments in a modified SEIR model from reported case data. Reconstruction produces input for the inference formulations, and it provides initial conditions that can be used in other modeling and planning efforts. Inference involves the solution of a large-scale optimization problem to estimate the time profiles for the transmission parameters in each county. These provide quantification of changes in the transmission parameter over time (e.g., due to impact of intervention strategies). This capability has been implemented in a Python-based software package, epi_inference, that makes extensive use of Pyomo [5] and IPOPT [10] to formulate and solve the inference formulations.

42 ENGINEERING↗

Graph Mining Meets the Semantic Web

The Resource Description Framework (RDF) and SPARQL Protocol and RDF Query Language (SPARQL) were introduced about a decade ago to enable flexible schema-free data interchange on the Semantic Web. Today, data scientists use the framework as a scalable graph representation for integrating, querying, exploring and analyzing data sets hosted at different sources. With increasing adoption, the need for graph mining capabilities for the Semantic Web has emerged. We address that need through implementation of three popular iterative Graph Mining algorithms (Triangle count, Connected component analysis, and PageRank). We implement these algorithms as SPARQL queries, wrapped within Python scripts. We evaluate the performance of our implementation on 6 real world data sets and show graph mining algorithms (that have a linear-algebra formulation) can indeed be unleashed on data represented as RDF graphs using the SPARQL query interface.

Lee, Sangkeun↗

Laslo

The Laslo code solves the one dimensional mass, momentum, and energy conservation equations in Lagrangian form. The intended purpose of this code is to simplify the implementation of material models and the determination of optimal material parameters. Users can implement material models in Python (an open source interpreted language) without the need to recompile the code. Optimal material parameters are determined by providing the desired output and bounds on the parameter set.

Robbins, Joshua↗

Data-parallel Python for High Energy Physics Analyses

In this paper, we explore features available in Python which are useful for data reduction tasks in High Energy Physics (HEP). Highlevel abstractions in Python are convenient for implementing data reduction tasks. However, in order for such abstractions to be practical, the efficiency of their performance must also be high. Because the data sets we process are typically large, we care about both I/O performance and in-memory processing speed. In particular, we evaluate the use of data-parallel programming, using MPI and numpy, to process a large experimental data set (42 TiB) stored in an HDF5 file. We measure the speed of processing of the data, distinguishing between the time spent reading data and the time spent processing the data in memory, and demonstrate the scalability of both, using up to 1200 KNL nodes (76800 cores) on Cori at NERSC

Paterno, Marc↗

Integration Development and Testing of Rear Transition Monitor for Beam Current Monitoring System

Addressing baseline effects in accelerator environments is crucial for accurate data acquisition and analysis, since baseline effects can obscure signal clarity and impact the reliability of beam current monitoring systems. There are many potential contributors to baseline noise, such as variations in beam dynamics, electromagnetic interference from nearby equipment, or RF interference. Previous applications of noise reduction systems don t sufficiently filter sources of asynchronous noise, so a new algorithm was implemented. A simulation dataset was created to replicate beam conditions and a Red Pitaya FPGA was used to collect data through the streaming application. A Python script was developed to implement noise reduction algorithms and efforts were made to integrate real-time data streaming with the Redis platform and Acnet Front End infrastructure.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

MPC4CLR (Model-Predictive-Control-for-Critical-Load-Restoration-in-Power-Distribution-Systems) [SWR-22-24]

Model predictive control (MPC) is a system or process control technique for making decisions under uncertainty via rolling look-ahead optimizations at each control step where only the current step decisions are applied, and the rest are discarded. In this work, we developed an MPC for a critical load restoration (CLR) in power distribution systems to recover system service (electricity delivery) following an extreme event-triggered substation outage. The method considers the problem of controlling distributed energy resources (DERs) of the distribution system with the objective of achieving maximum load pick up while satisfying distribution network flow and voltage constraints. A linearized optimal power flow (OPF) model is employed to represent the physics of the network. The problem formulation is augmented with a ramping (up) reserve product for the DERs to ensure improved and upward monotonic load restoration as time evolves. Simulation analysis and performance tests are performed using a modified IEEE 13-bus test feeder integrated with wind, solar, microturbine, and energy storage battery. The software is developed using various software packages in Julia and Python. The MPC model is implemented using the JuMP optimization language in Julia while the data analytics including renewable generation and load demand forecasts, running the MPC simulation and visualizations is performed in Python.

Eseye, Abinet Tesfaye↗

pvlib python: a python package for modeling solar energy systems

pvlib python is a community-supported open source tool that provides a set of functions and classes for simulating the performance of photovoltaic energy systems. pvlib python aims to provide reference implementations of models relevant to solar energy, including for example algorithms for solar position, clear sky irradiance, irradiance transposition, DC power, and DC-to-AC power conversion. pvlib python is an important component of a growing ecosystem of open source tools for solar energy (William F. Holmgren, Hansen, Stein, & Mikofski, 2018).

14 SOLAR ENERGY↗

PyCOOL — A Cosmological Object-Oriented Lattice code written in Python

There are a number of different phenomena in the early universe that have to be studied numerically with lattice simulations. This paper presents a graphics processing unit (GPU) accelerated Python program called PyCOOL that solves the evolution of scalar fields in a lattice with very precise symplectic integrators. The program has been written with the intention to hit a sweet spot of speed, accuracy and user friendliness. This has been achieved by using the Python language with the PyCUDA interface to make a program that is easy to adapt to different scalar field models. In this paper we derive the symplectic dynamics that govern the evolution of the system and then present the implementation of the program in Python and PyCUDA. The functionality of the program is tested in a chaotic inflation preheating model, a single field oscillon case and in a supersymmetric curvaton model which leads to Q-ball production. We have also compared the performance of a consumer graphics card to a professional Tesla compute card in these simulations. We find that the program is not only accurate but also very fast. To further increase the usefulness of the program we have equipped it with numerous post-processing functions that provide useful information about the cosmological model. These include various spectra and statistics of the fields. The program can be additionally used to calculate the generated curvature perturbation. The program is publicly available under GNU General Public License at https://github.com/jtksai/PyCOOL. Some additional information can be found from http://www.physics.utu.fi/tiedostot/theory/particlecosmology/pycool/.

79 ASTRONOMY AND ASTROPHYSICS↗

cppTPSA/pyTPSA: a C++/Python package for truncated power series algebra

The truncated power series algebra (TPSA), also referred to as differential algebra (DA), is a well-established and widely used method in particle accelerator physics and astronomy. The most straightforward usage of TPSA/DA is to calculate the Taylor expansion of a given function at a specific point up to order ?. In recent years, as the application of TPSA/TA has been extended to other fields, a reusable implementation of TPSA/DA as a modern C++ library or other high level programming language like Python has become desirable. The cppTPSA package implements TPSA/DA in C++11 and provides developers a convenient library with which to build advanced TPSA/DA-based methods. A Python 3 library, pyTPSA, has also been developed based on the C++ lib.

97 MATHEMATICS AND COMPUTING↗

Thermodynamic modeling with uncertainty quantification using the modified quasichemical model in quadruplet approximation: Implementation into PyCalphad and ESPEI

The modified quasichemical model in the quadruplet approximation (MQMQA) considers the first- and the second-nearest-neighbor coordination and interactions, particularly useful in describing short-range ordering (SRO) in complex liquids such as molten salts, slag in metal processing, and electrolytic solutions. Here, the present work implements the MQMQA into the Python based open-source software PyCalphad for thermodynamic calculations. This endeavor facilitates the development of MQMQA-based thermodynamic database with uncertainty quantification (UQ) and propagation (UP) using the open-source software ESPEI. A new database structure based on Extensible Markup Language (XML) is proposed for ESPEI evaluation of MQMQA model parameters. Using the KF-NiF 2 , KCl-NaCl-MgCl 2 , and CaCl 2 -CaF 2 -LiCl-LiF salt systems as examples, we demonstrate the successful implementation of MQMQA in PyCalphad through thermodynamic calculations of Gibbs energy, equilibrium quadruplet fractions, and phase diagram, as well as database development with UQ and UP using ESPEI. Furthermore, as an application of the present implementation, both the LiF–TbF 3 and LiF-HoF 3 systems have been modeled by MQMQA for the first time, which are in good agreement with experiments. The present implementation hence offers an open-source capability for performing CALPHAD modeling for complex liquids with SRO using MQMQA plus a new XML database structure.

36 MATERIALS SCIENCE↗