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 343 records · Page 19

Computational Approaches to Simulation and Optimization of Global Aircraft Trajectories

This study examines three possible approaches to improving the speed in generating wind-optimal routes for air traffic at the national or global level. They are: (a) using the resources of a supercomputer, (b) running the computations on multiple commercially available computers and (c) implementing those same algorithms into NASA’s Future ATM Concepts Evaluation Tool (FACET) and compares those to a standard implementation run on a single CPU. Wind-optimal aircraft trajectories are computed using global air traffic schedules. The run time and wait time on the supercomputer for trajectory optimization using various numbers of CPUs ranging from 80 to 10,240 units are compared with the total computational time for running the same computation on a single desktop computer and on multiple commercially available computers for potential computational enhancement through parallel processing on the computer clusters. This study also re-implements the trajectory optimization algorithm for further reduction of computational time through algorithm modifications and integrates that with FACET to facilitate the use of the new features which calculate time-optimal routes between worldwide airport pairs in a wind field for use with existing FACET applications. The implementations of trajectory optimization algorithms use MATLAB, Python, and Java programming languages. The performance evaluations are done by comparing their computational efficiencies and based on the potential application of optimized trajectories. The paper shows that in the absence of special privileges on a supercomputer, a cluster of commercially available computers provides a good option for computing wind-optimal trajectories for national and global air traffic system studies.

Ng, Hok K.↗

VOLTTRON: An Agent Execution Platform for the Electric Power System

Volttron is an agent execution platform that is engineered for use in the electric power system. Volttron provides resource guarantees for agents and the platform including memory and processor utilization; authentication and authorization services; directory services for agent and resource location; and agent mobility. Unlike most other agent platforms, Volttron does not depend on a single agent authoring language. Instead, we chose to design and implement Volttron as a platform service and framework that is decoupled from the agent execution environment. A prototype implementation of Volttron has been written in Python (using Python v2.7.2) and we have executed agents written in Python and Java and as shell scripts. The intended use of Volttron is in the power distribution system for managing distributed generation, demand-response, and plug-in electric vehicles.

Multi-Agent Systems↗

Python-Based Scientific Analysis and Visualization of Precipitation Systems at NASA Marshall Space Flight Center

At NASA Marshall Space Flight Center (MSFC), Python is used several different ways to analyze and visualize precipitating weather systems. A number of different Python‐based software packages have been developed, which are available to the larger scientific community. The approach in all these packages is to utilize pre‐existing Python modules as well as to be object‐oriented and scalable. The first package that will be described and demonstrated is the Python Advanced Microwave Precipitation Radiometer (AMPR) Data Toolkit, or PyAMPR for short. PyAMPR reads geolocated brightness temperature data from any flight of the AMPR airborne instrument over its 25‐year history into a common data structure suitable for user‐defined analyses. It features rapid, simplified (i.e., one line of code) production of quick‐look imagery, including Google Earth overlays, swath plots of individual channels, and strip charts showing multiple channels at once. These plotting routines are also capable of significant customization for detailed, publication‐ready figures. Deconvolution of the polarization‐varying channels to static horizontally and vertically polarized scenes is also available. Examples will be given of PyAMPR's contribution toward real‐time AMPR data display during the Integrated Precipitation and Hydrology Experiment (IPHEx), which took place in the Carolinas during May‐June 2014. The second software package is the Marshall Multi‐Radar/Multi‐Sensor (MRMS) Mosaic Python Toolkit, or MMM‐Py for short. MMM‐Py was designed to read, analyze, and display three‐dimensional national mosaicked reflectivity data produced by the NOAA National Severe Storms Laboratory (NSSL). MMM‐Py can read MRMS mosaics from either their unique binary format or their converted NetCDF format. It can also read and properly interpret the current mosaic design (4 regional tiles) as well as mosaics produced prior to late July 2013 (8 tiles). MMM‐Py can easily stitch multiple tiles together to provide a larger regional or national picture of precipitating weather systems. Composites, horizontal and vertical crosssections, and combinations thereof are easily displayed using as little as one line of code. MMM‐Py can also write to the native MRMS binary format, and sub‐sectioning of tiles (or multiple stitched tiles) is anticipated to be in place by the time of this meeting. Thus, MMM‐Py also can be used to power the creation of custom mosaics for targeted regional studies. Overlays of other data (e.g., lightning observations) are easily accomplished. Demonstrations of MMM‐Py, including the creation of animations, will be shown. Finally, Marshall has done significant work to interface Python‐based analysis routines with the U.S. Department of Energy's Py‐ART software package for radar data ingest, processing, and analysis. One example of this is the Python Turbulence Detection Algorithm (PyTDA), an MSFC‐based implementation of the National Center for Atmospheric Research (NCAR) Turbulence Detection Algorithm (NTDA) for the purposes of convective‐scale analysis, situational awareness, and forensic meteorology. PyTDA exploits Py‐ART's radar data ingest routines and data model to rapidly produce aviation‐relevant turbulence estimates from Doppler radar data. Work toward processing speed optimization and better integration within the Py‐ART framework will be highlighted. Python‐based analysis within the Py‐ART framework is also being done for new research related to intercomparison of ground‐based radar data with satellite estimates of ocean winds, as well as research on the electrification of pyrocumulus clouds.

Lang, Timothy J.↗

Comparison of steady-state analytical wake models implemented in wind farm analysis software

A common set of mathematical wind turbine wake models are implemented in a few, well-adopted computational tools for wind farm wake modelling. Although the referenced mathematical formulations are common, implementation details may lead to differences in results. This study presents a systematic comparison of the implementation of mathematical wake models in open source, Python-based wind turbine wake modelling software, and a set of the models are directly compared. Despite aligning only the mathematical model parameters and retaining the default computational model parameters, good agreement is found across most of the model implementations, and additional agreement is expected upon further parameters alignment.

17 WIND ENERGY↗

Multi-language Struct Support in Babel

Babel is an open-source language interoperability framework tailored to the needs of high-performance scientific computing. As an integral element of the Common Component Architecture (CCA) it is used in a wide range of research projects. In this paper we describe how we extended Babel to support interoperable tuple data types (structs). Structs are a common idiom in scientific APIs; they are an efficient way to pass tuples of nonuniform data between functions, and are supported natively by most programming languages. Using our extended version of Babel, developers of scientific code can now pass structs as arguments between functions implemented in any of the supported languages. In C, C++ and Fortran 2003, structs can be passed without the overhead of data marshaling or copying, providing language interoperability at minimal cost. Other supported languages are Fortran 77, Fortran 90, Java and Python. We will show how we designed a struct implementation that is interoperable with all of the supported languages and present benchmark data compare the performance of all language bindings, highlighting the differences between languages that offer native struct support and an object-oriented interface with getter/setter methods.

97 MATHEMATICS AND COMPUTING↗

CogSim: Integrate ML-based Library (LAGER) into Multi-Physics Simulation Code

In LAGER, the Mesh and Simulation History Extract (MASHExtract) package has been used for extracting various types of data from Kull runs. The package itself was written in python and completely enmeshed in the Kull codebase, making it impossible to use with other simulations. Having a version that extends to the Ale3d codebase would necessitate a complete re-write of the package, including a conversion to the C++ language. Extending the MASHExtract package to Ale3d requires a level of simulation independence, much of which would come from handling user requests, data management, and exporting. However, there is still a section of code that would need to be able to handle extracting data from the target codebase. Because of the often insurmountable differences between simulation codebases, the MASHExtract package would need a specific layer to be implemented for each codebase that handles this process of collecting and organizing the requested data. Furthermore, different simulation codebases also have different requirements for various enhancements they rely on—user interface, multi processor distribution, gpu acceleration, etc—all of which would also need to be handled by this layer. In regards to Kull and Ale3d specifically, the Kull implementation (KullMASHExtract) will need to be wrapped in Python, and Ale3d (Ale3dMASHExtract) will need to be wrapped in RAJA. Since Kull is primarily wrapped in SWIG, we should also use this library for our own wrapping to maintain consistency. There are also differences between what metrics are available for extraction. In particular, Kull has a wide array of physics metrics that may not be available in Ale3d, and these differences will need to be accounted for when re-writing MASHExtract.

97 MATHEMATICS AND COMPUTING↗

Integration of Silica in G4CMP for Phonon Simulations: Framework and Tools for Material Integration

Superconducting detectors with sub-eV energy resolution have demonstrated success setting limits on Beyond the Standard Model (BSM) physics due to their unique sensitivity to low-energy events. G4CMP, a Geant4-based extension for condensed matter physics, provides a comprehensive toolkit for modeling phonon and charge dynamics in cryogenic materials. This paper introduces a technical formalism to support the superconducting qubit and low-threshold detector community in implementing phonon simulations in custom materials into the G4CMP. As a case study, we present the results of a detailed analysis of silica phonon transport properties relevant for simulating substrate backgrounds in Beryllium Electron capture in Superconducting Tunnel junctions (BeEST)-style experiments using G4CMP. Additionally, Python-based tools were developed to aid users in implementing their own materials and are available on the G4CMP repository.

75 CONDENSED MATTER PHYSICS, SUPERCONDUCTIVITY AND↗

A High Dynamic-Range Photon-Counting Receiver for Deep Space Optical Communication

The Deep Space Optical Communication (DSOC) project will demonstrate free-space optical communication at almost 3 AU, or 3 orders of magnitude further than any previous attempt. DSOC will utilize the 5m Palomar Hale Telescope to receive the downlink signal, which will couple the downlink light onto an optical table and into a superconducting nanowire single photon detector (SNSPD). The output of the SNSPD is digitized by the Ground Laser Receiver Signal Processing Assembly (GSPA) using a high throughput streaming time to digital converter (TDC). The GSPA is a scalable FPGA-based receiver which demodulates and decodes the DSOC downlink signal through novel signal processing algorithms implemented on Xilinx UltraScale+ FPGAs, as well as Python-based software monitor and control routines. Exploiting the unique TDC-based architecture, the GSPA supports over four orders of magnitude of downlink data rates across multiple orders of magnitude of signal and background powers. In this paper we present an overview of the hardware, firmware and software architectures to implement this system, as well as performance analysis for links ranging from near-Earth to 2.8 AU.

Srinivasan, Meera↗

nbodykit: An Open-source, Massively Parallel Toolkit for Large-scale Structure

We present nbodykit, an open-source, massively parallel Python toolkit for analyzing large-scale structure (LSS) data. Using Python bindings of the Message Passing Interface, we provide parallel implementations of many commonly used algorithms in LSS. nbodykit is both an interactive and scalable piece of scientific software, performing well in a supercomputing environment while still taking advantage of the interactive tools provided by the Python ecosystem. Existing functionality includes estimators of the power spectrum, two- and three-point correlation functions, a friends-of-friends grouping algorithm, mock catalog creation via the halo occupation distribution technique, and approximate N-body simulations via the FastPM scheme. The package also provides a set of distributed data containers, insulated from the algorithms themselves, that enables nbodykit to provide a unified treatment of both simulation and observational data sets. nbodykit can be easily deployed in a high-performance computing environment, overcoming some of the traditional difficulties of using Python on supercomputers. We provide performance benchmarks illustrating the scalability of the software. The modular, component-based approach of nbodykit allows researchers to easily build complex applications using its tools. The package is extensively documented at http://nbodykit.readthedocs.io, which also includes an interactive set of example recipes for new users to explore. As open-source software, we hope nbodykit provides a common framework for the community to use and develop in confronting the analysis challenges of future LSS surveys.

79 ASTRONOMY AND ASTROPHYSICS↗

GPAW - massively parallel electronic structure calculations with Python-based software.

Electronic structure calculations are a widely used tool in materials science and large consumer of supercomputing resources. Traditionally, the software packages for these kind of simulations have been implemented in compiled languages, where Fortran in its different versions has been the most popular choice. While dynamic, interpreted languages, such as Python, can increase the effciency of programmer, they cannot compete directly with the raw performance of compiled languages. However, by using an interpreted language together with a compiled language, it is possible to have most of the productivity enhancing features together with a good numerical performance. We have used this approach in implementing an electronic structure simulation software GPAW using the combination of Python and C programming languages. While the chosen approach works well in standard workstations and Unix environments, massively parallel supercomputing systems can present some challenges in porting, debugging and profiling the software. In this paper we describe some details of the implementation and discuss the advantages and challenges of the combined Python/C approach. We show that despite the challenges it is possible to obtain good numerical performance and good parallel scalability with Python based software.

99 GENERAL AND MISCELLANEOUS↗

Application of a Density Law via Python for Aqueous Plutonium Nitrate

A predictive density tool has been developed in Python to reduce bias and uncertainty in nuclear criticality safety calculations for plutonium nitrate systems. The Pitzer Method and an empirical method were implemented into the tool, allowing for plutonium nitrate density calculations. Additionally, the Python tool can generate atom densities for a MCNP6.2 material card using the density from the selected method and directly the densities into a prepared MCNP6 input text file. The material card and density are calculated based on customizable user inputs of plutonium content, nitric acid content, temperature, plutonium isotope weight percentages and impurity concentrations. The Python tool has been validated and verified against the International Handbook of Evaluated Criticality Safety Benchmark Experiments to predict densities within a root mean square error of 1.0% for the Pitzer method and 1.8% for the empirical method. These errors in density were shown to lead to a ±0.5% error in MCNP6.2 calculated k effective for the Pitzer method and a ±1.7% error for the Empirical method. Simultaneous work is also being done at the University of New Mexico and Los Alamos National Laboratory to create a similar tool for plutonium chloride solutions, which aims to provide the accreditation of the chlorine absorption. These capabilities will not only provide more accurate models but also lead the way towards a better understanding of solution systems and potential relaxation in the conservatism of the current aqueous plutonium processing limits.

97 MATHEMATICS AND COMPUTING↗

PyFly: A fast, portable aerodynamics simulator

Here, we present a fast, user-friendly implementation of a potential flow solver based on the unsteady vortex lattice method (UVLM), namely PyFly. UVLM computes the aerodynamic loads applied on lifting surfaces while capturing the unsteady effects such as the added mass forces, the growth of bound circulation, and the wake while assuming that the flow separation location is known a priori. This method is based on discretizing the body surface into a lattice of vortex rings and relies on the Biot–Savart law to construct the velocity field at every point in the simulated domain. We introduce the pointwise approximation approach to simulate the interactions of the far-field vortices to overcome the computational burden associated with the classical implementation of UVLM. The computational framework uses the Python programming language to provide an easy to handle user interface while the computational kernels are written in Fortran. The mixed language approach enables high performance regarding solution time and great flexibility concerning easiness of code adaptation to different system configurations and applications. The computational tool predicts the unsteady aerodynamic behavior of multiple moving bodies (e.g., flapping wings, rotating blades, suspension bridges) subject to incoming air. The aerodynamic simulator can also deal with enclosure effects, multi-body interactions, and B-spline representation of body shapes. Finally, we simulate different aerodynamic problems to illustrate the usefulness and effectiveness of PyFly.

97 MATHEMATICS AND COMPUTING↗

PIV/BOS synthetic image generation in variable density environments for error analysis and experiment design

In this work, we present an image generation methodology based on ray tracing that can be used to render realistic images of Particle Image Velocimetry (PIV) and Background Oriented Schlieren (BOS) experiments in the presence of density/refractive index gradients. This methodology enables the simulation of aero-thermodynamics experiments for experiment design, error, and uncertainty analysis. Images are generated by emanating light rays from the particles or dot pattern, and propagating them through the density gradient field and the optical elements, up to the camera sensor. The rendered images are realistic, and can replicate the features of a given experimental setup, like optical aberrations and perspective effects, which can be deliberately introduced for error analysis. We demonstrate this methodology by simulating a BOS experiment with a known density field obtained from direct numerical simulations (DNS) of homogeneous buoyancy driven turbulence, and comparing the light ray displacements from ray tracing to results from BOS theory. The light ray displacements show good agreement with the reference data. This methodology provides a framework for further development of simulation tools for use in experiment design and development of image analysis tools for PIV and BOS applications. Finally, an implementation of the proposed methodology in a Python-CUDA program is made available as an open source software for researchers.

47 OTHER INSTRUMENTATION↗

wavess 1.2: presenting an HLA-aware within-host virus sequence simulation framework

Motivation Understanding how virus sequences are shaped by selection can inform vaccine design and transmission inference. Modeling within-host evolution to interrogate these questions requires a detailed mechanistic framework that accurately captures sequence diversification. The CD8 + cytotoxic T-lymphocyte (CTL) response plays an important role in immune-mediated selection and can leave strong signatures in virus sequences; however, existing sequence-based within-host virus modeling frameworks do not explicitly include a human leukocyte antigen (HLA)-aware CTL response. Results We extended our previously published within-host sequence evolution simulator, wavess, to include an explicit CTL response, and share a method for identifying HLA-specific CTL epitopes given a founder virus sequence. We also updated the model to permit a variable recombination rate, which allows for modeling non-adjacent genes, segmented genomes, and recombination hotspots. These extensions to wavess allow for more accurate simulation of viruses and virus genes, particularly in regions of the genome where the immune response is dominated by CTLs (rather than antibodies). It also provides the foundation for investigations of how these newly-added biological mechanisms influence within-host evolution. Availability and implementation The core of wavess is written in Python 3, with helper functions written in R. It is available at https://github.com/MolEvolEpid/wavess.

60 APPLIED LIFE SCIENCES↗

Quantum simulations of SO(5) many-fermion systems using qudits

The structure and dynamics of many-body systems are the result of a delicate interplay between underlying interactions. Fermionic pairing, for example, plays a central role in various physical systems, ranging from condensed matter to nuclear systems, where it can lead to collective phenomena such as superconductivity and superfluidity. In atomic nuclei, the interplay between pairing and particle-hole interactions leads to a high degree of complexity and intricate entanglement structures. Despite this apparent complexity, symmetries emerge and manifest themselves in observable regular patterns. These symmetries and their breakings have long been used to determine relevant degrees of freedom and simplify classical descriptions of many-body systems. Here, this work explores the potential utility of quantum computers with arrays of qudits in simulating interacting fermionic systems, when the qudits can naturally map the relevant degrees of freedom determined by an underlying symmetry group. The Agassi model of fermions interacting via particle-hole and pairing interactions is based on an underlying so(5) algebra. Such systems can intuitively be partitioned into pairs of modes with five basis states, which thus naturally map to arrays of d = 5 qudits (qu5its). Classical noiseless simulations of the time evolution of systems with up to twelve qu5its are performed, by implementing quantum circuits that are developed herein, using PYTHON codes invoking Google's CIRQ software. The resource requirements of the qu5it circuits are analyzed and compared with two different mappings to qubit systems: a physics-aware Jordan-Wigner mapping requiring four qubits per mode pair and a state-to-state mapping requiring three qubits per mode pair. While the dimensionality of Hilbert spaces in mappings to qu5it systems are less than those for the corresponding qubit systems, the number of entangling operations, depending on the available hardware, can either be greater or smaller than for the physics-aware Jordan-Wigner mapping. The state-to-state mapping, while having a smaller Hilbert space than Jordan-Wigner mappings, appears to be the least efficient in gate counts. Further, a previously unknown sign problem has been identified from Trotterization errors in time evolving high-energy excitations. There appear to be advantages in employing quantum computers with arrays of qudits to perform simulations of many-body dynamics that exploit the role of underlying symmetries, specifically in lowering the required quantum resources and in reducing anticipated errors that take the simulation out of the physical space. If the necessary entangling gates are not directly supported by the hardware, physics-aware mappings to qubits may, however, be advantageous for other aspects.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Oineus v1.0

A library for multi-threaded computation of persistence diagrams. The algorithm for computing persistence diagrams in a lock-free manner was published in the 'Towards Lock-free Persistent Homology' (D. Morozov, A. Nigmetov, Brief Announcement: SPAA 2020); it scales better than the only other shared-memory parallel implementation of persistent homology computation PHAT. Library includes python bindings to compute persistence diagrams and their vectorizations for lower-star filtrations on grid data. It is intended to be used by scientists working on Topological Data Analysis and its applications in different areas.

Nigmetov, Arnur↗

STXMPy: a New Software Package for Automated Region of Interest Selection and Statistical Analysis of XANES Data

Soft X-ray spectromicroscopy based absorption near-edge structure analysis, is a spectroscopic technique useful for investigating sample composition at a nanoscale of resolution. While the technique holds great promise for analysis of biological samples, current methodologies are challenged by a lack of automatic analysis software e. g. for selection of regions of interest and statistical comparisons of sample variability. We have implemented a set of functions and scripts in Python to provide a semiautomatic treatment of data obtained using scanning transmission X-ray microscopy. The toolkit includes a novel line-by-line absorption conversion and data filtering automatically identifying image components with significant absorption. Results are provided to the user by direct graphical output to the screen and by output images and data files, including the average and standard deviation of the X-ray absorption spectrum. Using isolated mouse melanosomes as a sample biological tissue, application of STXMPy in analysis of biological tissues is illustrated. The STXMPy package allows both interactive and automated batch processing of scanning transmission X-ray microscopic data. It is open source, cross platform, and offers rapid script development using the interpreted Python language.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

pyro: a framework for hydrodynamics explorations and prototyping

pyro is a Python-based simulation framework designed for ease of implementation and exploration of hydrodynamics methods. It is built in a object-oriented fashion, allowing for the reuse of the core components and fast prototyping of new methods.

79 ASTRONOMY AND ASTROPHYSICS↗