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 145 records · Page 8

Strategic Petroleum Reserve Cavern Leaching Monitoring CY24

This report provides an analysis of the effects of raw water leaching at the U.S. SPR using the Sandia Solution Mining Code (SANSMIC). A new version of the code has been established in the past year (implemented in Python and C++ code) and was used for this annual report. Additionally, the setup, running, and post-processing of leaching modeling has now been streamlined into a single Python notebook environment for each cavern run.

58 GEOSCIENCES↗

PyDA: A Hands-On Introduction to Dynamical Data Assimilation with Python

Dynamic data assimilation offers a suite of algorithms that merge measurement data with numerical simulations to predict accurate state trajectories. Meteorological centers rely heavily on data assimilation to achieve trustworthy weather forecast. With the advance in measurement systems, as well as the reduction in sensor prices, data assimilation (DA) techniques are applicable to various fields, other than meteorology. However, beginners usually face hardships digesting the core ideas from the available sophisticated resources requiring a steep learning curve. In this tutorial, we lay out the mathematical principles behind DA with easy-to-follow Python module implementations so that this group of newcomers can quickly feel the essence of DA algorithms. We explore a series of common variational, and sequential techniques, and highlight major differences and potential extensions. We demonstrate the presented approaches using an array of fluid flow applications with varying levels of complexity.

97 MATHEMATICS AND COMPUTING↗

DATeS: a highly extensible data assimilation testing suite v1.0

A flexible and highly extensible data assimilation testing suite, named DATeS, is described in this paper. DATeS aims to offer a unified testing environment that allows researchers to compare different data assimilation methodologies and understand their performance in various settings. The core of DATeS is implemented in Python and takes advantage of its object-oriented capabilities. The main components of the package (the numerical models, the data assimilation algorithms, the linear algebra solvers, and the time discretization routines) are independent of each other, which offers great flexibility to configure data assimilation applications. DATeS can interface easily with large third-party numerical models written in Fortran or in C,and with a plethora of external solvers.

97 MATHEMATICS AND COMPUTING↗

PyForecastTools

This package provides a basic toolkit for model validation and forecast verification, implemented in Python. The code is designed to aid model validation tasks for users of the standard scientific python stack. Functions and classes are provided to calculate a broad range of metrics for continuous and categorical predictions.

Morley, Steven↗

FOCUS: an alignment-free model to identify organisms in metagenomes using non-negative least squares

One of the major goals in metagenomics is to identify the organisms present in a microbial community from unannotated shotgun sequencing reads. Taxonomic profiling has valuable applications in biological and medical research, including disease diagnostics. Most currently available approaches do not scale well with increasing data volumes, which is important because both the number and lengths of the reads provided by sequencing platforms keep increasing. Here we introduce FOCUS, an agile composition based approach using non-negative least squares (NNLS) to report the organisms present in metagenomic samples and profile their abundances. FOCUS was tested with simulated and real metagenomes, and the results show that our approach accurately predicts the organisms present in microbial communities. FOCUS was implemented in Python. The source code and web-sever are freely available at http://edwards.sdsu.edu/FOCUS.

59 BASIC BIOLOGICAL SCIENCES↗

Compare Gene Profiles

Compare Gene Profiles (CGP) performs pairwise gene content comparisons among a relatively large set of related bacterial genomes. CGP performs pairwise BLAST among gene calls from a set of input genome and associated annotation files, and combines the results to generate lists of common genes, unique genes, homologs, and genes from each genome that differ substantially in length from corresponding genes in the other genomes. CGP is implemented in Python and runs in a Linux environment in serial or parallel mode.

Source record↗

FASTERp: A Feature Array Search Tool for Estimating Resemblance of Protein Sequences

Metagenome sequencing efforts have provided a large pool of billions of genes for identifying enzymes with desirable biochemical traits. However, homology search with billions of genes in a rapidly growing database has become increasingly computationally impractical. Here we present our pilot efforts to develop a novel alignment-free algorithm for homology search. Specifically, we represent individual proteins as feature vectors that denote the presence or absence of short kmers in the protein sequence. Similarity between feature vectors is then computed using the Tanimoto score, a distance metric that can be rapidly computed on bit string representations of feature vectors. Preliminary results indicate good correlation with optimal alignment algorithms (Spearman r of 0.87, ~;;1,000,000 proteins from Pfam), as well as with heuristic algorithms such as BLAST (Spearman r of 0.86, ~;;1,000,000 proteins). Furthermore, a prototype of FASTERp implemented in Python runs approximately four times faster than BLAST on a small scale dataset (~;;1000 proteins). We are optimizing and scaling to improve FASTERp to enable rapid homology searches against billion-protein databases, thereby enabling more comprehensive gene annotation efforts.

59 BASIC BIOLOGICAL SCIENCES↗

Transactive Energy Simulation Platform

TESP combines existing domain simulators in the electric power grid, with new transactive agents, growth models and evaluation scripts. The existing domain simulators include GridLAB-D for the distribution grid and single-family residential buildings, MATPOWER for transmission and bulk generation, and EnergyPlus for large buildings. More are planned for subsequent versions of TESP. The new elements are: TEAgents - simulate market participants and transactive systems for market clearing. Some of this functionality was extracted from GridLAB-D and implemented in Python for customization by PNNL and others; Growth Model - a means for simulating system changes over a multiyear period, including both normal load growth and specific investment decisions. Customizable in Python code; and Evaluation Script - a means of evaluating different transactive systems through customizable post-processing in Python code. TESP provides a method for other researchers and vendors to design transactive systems, and test them in a virtual environment. It allows customization of the key components by modifying Python code.

Source record↗

A HIGH-LEVEL PYTHON INTERFACE TO THE FERMILAB ACNET CONTROL SYSTEM

This paper discusses the implementation of a python- based high-level interface to the Fermilab acnet control system. The interface has been successfully employed during the commissioning of the Fermilab Accelerator Science & Technology (FAST) facility. Specifically, we present examples of applications at FAST which include the interfacing of the elegant program to assist lattice matching, an automated emittance measurement via the quadrupole-scan method and tranverse transport matrix measurement of a superconducting RF cavity.

43 PARTICLE ACCELERATORS↗

Challenges and Solutions for Real-Time Phasor Modeling of Large-scale Distribution Network with High PV Penetration

The conversion process of a practical large-scale feeder data from a quasi-static time series (OpenDSS) model into a real-time phasor model (ePHASORSIM in Opal-RT) is discussed in the paper. The process is implemented using an open source Python software. Previous reported implementations for the conversion process lead to several errors when applied to a larger-scale system such as the one considered here. Hence in this work, we describe the common issues in this conversion and propose a customized solution to enhance the efficiency of the conversion and reduce the complexity in the process. A quantitative validation of the enhanced conversion process is presented in this work using an actual high PV penetration feeder model that consists of 2230 buses, and using actual load and PV profile data. After a detailed analysis, this customized conversion software will be made available as an open source tool and is expected to be helpful for researchers who want to pursue a similar conversion. Solutions to various observed issues such as identifying the lines due to islanded network, representation of full impedance model of transformer/lines as sequential models, complexity in the representation of single phase buses/lines as three phase buses/lines to make it compatible with the simulator platform are discussed. Comparison of power flow and time series simulation results obtained from both OpenDSS and ePHASORsim models show very low errors, validating the accuracy of the proposed conversion process.

14 SOLAR ENERGY↗

A symbolic framework to obtain mid-fidelity models of flexible multibody systems with application to horizontal-axis wind turbines

Abstract. The article presents a symbolic framework (also called computer algebra program) that is used to obtain, in symbolic mathematical form, the linear and nonlinear equations of motion of a mid-fidelity multibody system including rigid and flexible bodies. Our approach is based on Kane's method and a nonlinear shape function representation for flexible bodies. The shape function approach does not represent the state of the art for flexible multibody dynamics but is an effective trade-off to obtain mid-fidelity models with few degrees of freedom, taking advantage of the separation of space and time. The method yields compact symbolic equations of motion with implicit account of the constraints. The general and automatic framework facilitates the creation and manipulation of models with various levels of complexity by adding or removing degrees of freedom. The symbolic treatment allows for analytical gradients and linearized equations of motion. The linear and nonlinear equations can be exported to Python code or dedicated software. There are multiple applications, such as time domain simulation, stability analyses, frequency domain analyses, advanced controller design, state observers, and digital twins. In this article, we describe the method we used to systematically generate the equations of motion of multibody systems and present the implementation of the framework using the Python package SymPy. We apply the framework to generate illustrative land-based and offshore wind turbine models. We compare our results with OpenFAST simulations and discuss the advantages and limitations of the method. The Python implementation is provided as an open-source project.

Branlard, Emmanuel (ORCID:0000000277506128)↗

A Methodology and Implementation of Automated Emissions Harmonization for Use in Integrated Assessment Models

Emissions harmonization refers to the process used to match greenhouse gas (GHG) and air pollutant results from Integrated Assessment Models (IAMs) against a common source of historical emissions. To date, harmonization has been performed separately by individual modeling teams. For the hand-over of emission data for the Shared Socio-economic Pathways (SSPs) to climate model groups, a new automated approach based on commonly agreed upon algorithms was developed. This work describes the novel methodology for determining such harmonization methods and an open-source Python software library implementing the methodology. Results are shown for two example scenarios (with and without climate policy cases) using the MESSAGE-GLOBIOM IAM that satisfactorily harmonize over 96% of the total emissions trajectories while having a negligible eect on key long-term climate indicators. This new capability enhances the comparability across dierent models, increases transparency and robustness of results, and allows other teams to easily participate in intercomparison exercises by using the same, openly available harmonization mechanism.

intergrated assessment, climate change, Harmonizat↗

eqtools: Modular, extensible, open-source, cross-machine Python tools for working with magnetic equilibria

As plasma physics research for fusion energy transitions to an increasing emphasis on cross-machine collaboration and numerical simulation, it becomes increasingly important that portable tools be developed to enable data from diverse sources to be analyzed in a consistent manner. This paper presents eqtools, a modular, extensible, open-source toolkit implemented in the Python programming language for handling magnetic equilibria and associated data from tokamaks. eqtools provides a single interface for working with magnetic equilibrium data, both for handling derived quantities and mapping between coordinate systems, extensible to function with data from different experiments, data formats, and magnetic reconstruction codes, replacing the diverse, non-portable solutions currently in use. Moreover, while the open-source Python programming language offers a number of advantages as a scripting language for research purposes, the lack of basic tokamak-specific functionality has impeded the adoption of the language for regular use. Implementing equilibrium-mapping tools in Python removes a substantial barrier to new development in and porting legacy code into Python. In this paper, we introduce the design of the eqtools package and detail the workflow for usage and expansion to additional devices. Additionally, the implementation of a novel three-dimensional spline solution (in two spatial dimensions and in time) is also detailed. Finally, verification and benchmarking for accuracy and speed against existing tools are detailed. Wider deployment of these tools will enable efficient sharing of data and software between institutions and machines as well as self-consistent analysis of the shared data.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Metaheuristic Optimization Tool

The metaheuristic optimization tool (MOT) is a generic python module for solving a real value, multiobjective, multidimensional optimization problem. Users design their optimization problem by defining search variables, simulations, evaluation metric functions, and constraints. Search variables and constraints are straightforwardly added via python object methods, while simulations and metric functions used for search variable set evaluation must be implemented as a python class. Final optimum result(s) are provided in a tabular text file, as well as search history if needed.

97 MATHEMATICS AND COMPUTING↗

HAMR - Heterogeneous Accelerator Memory Resource (HAMR) v1.0

HAMR is a library defining an accelerator technology agnostic memory model that bridges between accelerator technologies (CUDA, HIP, ROCm, OpenMP, Sycl, OpenCL, Kokos, etc) and traditional CPUs in heterogeneous computing environments. HAMR is light weight and implemented in modern C++. HAMR can be used to manage memory with in a single code or as a data model for coupling codes in a technologically agnostic way. HAMR provides a Python module for coupling C++ and Python codes which implements zero-copy data transfers to and from Python using the Numpy array interface and Numba CUDA array interface protocols.

Loring, Burlen↗

Target–decoy false discovery rate estimation using Crema

Assigning statistical confidence estimates to discoveries produced by a tandem mass spectrometry proteomics experiment is critical to enabling principled interpretation of the results and assessing the cost/benefit ratio of experimental follow-up. The most common technique for computing such estimates is to use target-decoy competition (TDC), in which observed spectra are searched against a database of real (target) peptides and a database of shuffled or reversed (decoy) peptides. TDC procedures for estimating the false discovery rate (FDR) at a given score threshold have been developed for application at the level of spectra, peptides, or proteins. Although these techniques are relatively straightforward to implement, it is common in the literature to skip over the implementation details or even to make mistakes in how the TDC procedures are applied in practice. Here we present Crema, an open-source Python tool that implements several TDC methods of spectrum-, peptide- and protein-level FDR estimation. Crema is compatible with a variety of existing database search tools and provides a straightforward way to obtain robust FDR estimates.

59 BASIC BIOLOGICAL SCIENCES↗

Coffea -- Columnar Object Framework For Effective Analysis

The coffea framework provides a new approach to High-Energy Physics analysis, via columnar operations, that improves time-to-insight, scalability, portability, and reproducibility of analysis. It is implemented with the Python programming language, the scientific python package ecosystem, and commodity big data technologies. To achieve this suite of improvements across many use cases, coffea takes a factorized approach, separating the analysis implementation and data delivery scheme. All analysis operations are implemented using the NumPy or awkward-array packages which are wrapped to yield user code whose purpose is quickly intuited. Various data delivery schemes are wrapped into a common front-end which accepts user inputs and code, and returns user defined outputs. We will discuss our experience in implementing analysis of CMS data using the coffea framework along with a discussion of the user experience and future directions.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

Effective Mass Theory in Python (EMTpY) v. 1.0

EMTpY is an implementation of effective mass theory in python. It is designed to simulate semiconductor qubits within a non-perturbative, multi-valley effective mass theory framework using robust Gaussian basis sets.

Gamble, John↗