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 19 records

mosartwmpy: A Python implementation of the MOSART-WM coupled hydrologic routing and water management model

mosartwmpy is a Python implementation of the Model for Scale Adaptive River Transport with Water Management (MOSART-WM). This new version retains the functionality of the legacy model (written in FORTRAN) while providing new features to enhance user experience and extensibility. MOSART is a large-scale river-routing model used to study riverine dynamics of water, energy, and biogeochemistry cycles across local, regional, and global scales (Li et al., 2013). The WM component introduced by Voisin et al. (2013) represents river regulation through reservoir storage and release operations, diversions from reservoir releases, and allocation to sectoral water demands. Each reservoir release is independently calibrated using long-term mean monthly inflow into the reservoir, long-term mean monthly demand associated with this reservoir, and reservoir goals (flood control, irrigation, recreation, etc.). Generic monthly pre-release rules and storage targets are set up for individual reservoirs; however, those releases are updated annually for inter-annual variability (dry or wet year) and daily for environmental constraints such as flow minimum release and minimum/maximum storage levels. The WM model allows an evaluation of the impact of water management over multiple river basins at once (global, continental scales) and with consistent representation of human operations over the full domain.

97 MATHEMATICS AND COMPUTING↗

XPCA -Python Implementation

Principal component analysis (PCA) is arguably the most popular tool in multivariate exploratory data analysis. We consider the question of how to handle heterogeneous variables that include continuous, binary, and ordinal. In the probabilistic interpretation of low-rank PCA, the data has a normal multivariate distribution and, therefore, normal marginal distributions for each column. If some marginals are continuous but not normal, the semiparametric copula-based principal component analysis (COCA) method is an alternative to PCA that combines a Gaussian copula with nonparametric marginals. If some marginals are discrete or semi-continuous, we present a new extended PCA (XPCA) method that also uses a Gaussian copula and nonparametric marginals and accounts for discrete variables in the likelihood calculation by integrating over appropriate intervals. Like PCA, the factors produced by XPCA can be used to find latent structure in data, build predictive models, and perform dimensionality reduction. We implement the new model, XPCA, and its ancestors PCA and COCA in both R and Python. This software provides implementations of XPCA, COCA, and probabilistic PCA in both R and Python. XPCA is written in arXiv report https://arxiv.org/abs/1808.07510. SAND2019-10591 M Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Kincher-Winoto, Kina↗

CiteSoft_Py

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

Savara, Aditya↗

Python GST Implementation (PyGSTi) v. 0.9

PyGSTi is a Python package for modeling and characterizing noise (errors) in small quantum information processors. In addition to being a basic framework for describing quantum circuits and noise models, it implements mainstream quantum characterization, verification, and validation (QCVV) protocols such as Gate Set Tomography (GST), Randomized Benchmarking (RB), Robust Phase Estimation, and Idle Tomography. It also implements prototype protocols used for timeseries analysis and crosstalk detection, all of which have the goal of better understanding the noise found in existing as-built experimental devices. The central protocol of pyGSTi (from where it derives its name) is Gate Set Tomography. GST is a theory and protocol for simultaneously estimating the state preparation, gate operations, and measurement effects of a physical system of one or many quantum bits (qubits). These estimates are based entirely on the statistics of experimental measurements, and their interpretation and analysis can provide a detailed understanding of the types of errors/imperfections in the physical system. In this way, GST provides not only a means of certifying the “goodness” of qubits but also a means of debugging (i.e. improving) them. The other protocols follow this similar pattern in that they use statistical inference and analysis of experimental data to estimate one or more properties of the noise in a device.

Nielsen, Erik↗

Statistical Mechanics on Lattices (smol) v0.0.1

smol is a Python implementation of the Cluster Expansion Method and extensions of this methodology; which is used to fit applied lattice models from first principle calculations for subsequent use in Monte Carlo simulations for computing thermodynamic and statistical properties of atomic configuration. smol has a several notable advantages over other similar software packages. The first being its Python implementation which makes it easy to use even for users with little software and coding skills. Despite being implemented in Python, essential Monte Carlo routines are implemented in Cython such that performance is not compromised and is competitive even to similar software implemented in C/C++. Furthermore, the package has specific functionality for handling complex ionic materials (such as cathodes and electrolytes) that is not readily available in other packages. Lastly, the software has a flexible and modular design with the intention of making it fast and efficient to develop and extend the methodology.

Barroso-Luque, Luis↗

Python GST Implementation v. 0.9 beta

PyGSTi is an implementation of Gate Set Tomography in the python programming language. Gate Set Tomography (GST) is a theory and protocol for simultaneously estimating the state preparation, gate operations, and measurement effects of a physical system of one or many quantum bits (qubits). These estimates are based entirely on the statistics of experimental measurements, and their interpretation and analysis can provide a detailed understanding of the types of errors/imperfections in the physical system. In this way, GST provides not only a means of certifying the "goodness" of qubits but also a means of debugging (i.e. improving) them.

Nielsen, Erik↗

Python GST Implementation v. 0.9 beta

PyGSTi is an implementation of Gate Set Tomography in the python programming language. Gate Set Tomography (GST) is a theory and protocol for simultaneously estimating the state preparation, gate operations, and measurement effects of a physical system of one or many quantum bits (qubits). These estimates are based entirely on the statistics of experimental measurements, and their interpretation and analysis can provide a detailed understanding of the types of errors/imperfections in the physical system. In this way, GST provides not only a means of certifying the "goodness" of qubits but also a means of debugging (i.e. improving) them.

Nielsen, Erik↗

pvplr-python: Python package implementation of PVplr for Performance Loss Rate (PLR) analysis

Due to software fragmentation, PV system modeling teams can be limited to language specific packages, preventing cross-sectional analysis of different modeling techniques and workflows. To this end, PVplr, a popular PV performance modeling R software package, has been ported to the Python programming language. To verify and test the robustness of the port, NSRDB data has been used to simulated PV installations at native resolution (~2 million Sites), with a variety of degradation rates, degradation patterns, and modules. Performance Ratios were calculated using the ported functions from pvplr-python and compared against Rdtools YoY values. Due to the complicated nature of degradation, a new metric has been proposed to quantify the performance loss of a system. The cumulative production loss, is the total amount of energy lost due to the degrading performance of the system. Cumulative production loss alleviates the problems with fitting linear functions to non-linear degradation. Cumulative Production loss was shown to better estimate the total lost revenue for non-linear degradation patterns. $XbX + UTC$ was found to most accurately predict the total lost revenue in simulated systems.

Kumar, Suraj↗

pyEGAF: Modernization of the EGAF database

One of the most comprehensive resources for thermal neutron-capture data is the Evaluated Gamma-ray Activation File (EGAF), containing data from prompt gamma activation analysis measurements carried out at the Budapest Research Reactor for 245 isotopes. Although these valuable datasets have been freely available for many years, the outdated and cryptic adopted format makes it difficult to utilize the data and it is not generally suitable for modern computational technologies. Furthermore, to help overcome these challenges, we have converted the datasets into an open standard JSON format. Additionally, we have developed a Python implementation of an open-source software package, pyEGAF, designed to interact with the JSON data structures for general purpose access, manipulation, and rapid assessment of the capture-gamma data in EGAF.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Efficient Scalable Contact Network Generation from Population Data

Modeling the contacts among a population is critical to understanding the dynamics of a disease outbreak. Contact networks, where nodes are individuals and edges are contacts among them, are used to represent these complex individual-level interactions. In this work, we are given the daily activity schedules of an urban population that represent the activity location and time of individuals in a population during a single twenty four hour period over multiple days. Using collocation to determine contact between individuals, our goal is to extract hourly contact networks from large-scale activity data. We improve upon the existing adjacency matrix-based method by implementing our custom sparse matrix multiplication algorithm. Starting with a Python implementation, we achieve a 1600x speed up in the computation with a fast custom designed sparse matrix multiplier algorithm implemented in the C++ language. This work is central to future parallel designs of the problem.

97 MATHEMATICS AND COMPUTING↗

Implementation of a Grid Connected Battery-Inverter Fleet Model

Batteries are designed to store electrical energy. The increasing variation in time value of energy has driven the use of batteries as controllable distributed energy resources (DER). This is enabled though low-cost power electronic inverters that are able to precisely control charge and discharge. This paper describes the software implementation of an open-source battery inverter fleet models in python. The Sandia BatterylnverterFleet class model can be used by scientists, researchers, and engineers to perform simulations of one or more fleets of similar battery-inverter systems connected to the grid. The program tracks the state- of-charge of the simulated batteries and ensures that they stay within their limits while responding to separately generated service requests to charge or discharge. This can be used to analyze control and coordination, placement and sizing, and many other problems associated with the integration of batteries on the power grid. The development of these models along with their python implementation was funded by the Grid Modernization Laboratory Consortium (GMLC) project 1.4.2. Definitions, Standards and Test Procedures for Grid Services from Devices.

24 POWER TRANSMISSION AND DISTRIBUTION↗

PALS Python v0.1.0

This is a Python implementation for the Particle Accelerator Lattice Standard (PALS). To define the PALS schema, Pydantic is used to map to Python objects, perform automatic validation, and serialize/deserialize data classes to/from many modern file formats. Various modern file formats (e.g., YAML, JSON, TOML, XML, etc.) are supported, which makes the implementation of the schema-following files in any modern programming language easy (e.g., Python, Julia, C++, LUA, Javascript, etc.). Here, we do Python.

Huebl, Axel [Lawrence Berkeley National Laboratory↗

PyFLOSIC: Python-based Fermi–Löwdin orbital self-interaction correction

We present pyflosic, an open-source, general-purpose python implementation of the Fermi–Löwdin orbital self-interaction correction (FLO-SIC), which is based on the python simulation of chemistry framework (pyscf) electronic structure and quantum chemistry code. Thanks to pyscf, pyflosic can be used with any kind of Gaussian-type basis set, various kinds of radial and angular quadrature grids, and all exchange-correlation functionals within the local density approximation, generalized-gradient approximation (GGA), and meta-GGA provided in the libxc and xcfun libraries. A central aspect of FLO-SIC is the Fermi-orbital descriptors, which are used to estimate the self-interaction correction. Importantly, they can be initialized automatically within pyflosic; they can also be optimized within pyflosic with an interface to the atomic simulation environment, a python library that provides a variety of powerful gradient-based algorithms for geometry optimization. Although pyflosic has already facilitated applications of FLO-SIC to chemical studies, it offers an excellent starting point for further developments in FLO-SIC approaches, thanks to its use of a high-level programming language and pronounced modularity.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗