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 397 records · Page 22

NNFDivergence

The code implements f divergence regularization for neural networks in the Python-based Pytorch framework. The methods are the main focus but the repository will also contain examples that operate on purely synthetic "toy" data or on openly available, public data from NASA.

Klein, Natalie [@lanl]↗

Enabling AI in synthetic biology through Construction File specification

The Construction File (CF) specification establishes a standardized interface for molecular biology operations, laying a foundation for automation and enhanced efficiency in experiment design. It is implemented across three distinct software projects: PyDNA_CF_Simulator, a Python project featuring a ChatGPT plugin for interactive parsing and simulating experiments; ConstructionFileSimulator, a field-tested Java project that showcases 'Experiment' objects expressed as flat files; and C6-Tools, a JavaScript project integrated with Google Sheets via Apps Script, providing a user-friendly interface for authoring and simulation of CF. The CF specification not only standardizes and modularizes molecular biology operations but also promotes collaboration, automation, and reuse, significantly reducing potential errors. The potential integration of CF with artificial intelligence, particularly GPT-4, suggests innovative automation strategies for synthetic biology. While challenges such as token limits, data storage, and biosecurity remain, proposed solutions promise a way forward in harnessing AI for experiment design. This shift from human-driven design to AI-assisted workflows, steered by high-level objectives, charts a potential future path in synthetic biology, envisioning an environment where complexities are managed more effectively.

59 BASIC BIOLOGICAL SCIENCES↗

Characterization of Crystallographic Structures Using Bragg-Edge Neutron Imaging at the Spallation Neutron Source

Over the past decade, wavelength-dependent neutron radiography, also known as Bragg-edge imaging, has been employed as a non-destructive bulk characterization method due to its sensitivity to coherent elastic neutron scattering that is associated with crystalline structures. Several analysis approaches have been developed to quantitatively determine crystalline orientation, lattice strain, and phase distribution. In this study, we report a systematic investigation of the crystal structures of metallic materials (such as selected textureless powder samples and additively manufactured (AM) Inconel 718 samples), using Bragg-edge imaging at the Oak Ridge National Laboratory (ORNL) Spallation Neutron Source (SNS). Firstly, we have implemented a phenomenological Gaussian-based fitting in a Python-based computer called iBeatles. Secondly, we have developed a model-based approach to analyze Bragg-edge transmission spectra, which allows quantitative determination of the crystallographic attributes. Moreover, neutron diffraction measurements were carried out to validate the Bragg-edge analytical methods. These results demonstrate that the microstructural complexity (in this case, texture) plays a key role in determining the crystallographic parameters (lattice constant or interplanar spacing), which implies that the Bragg-edge image analysis methods must be carefully selected based on the material structures.

47 OTHER INSTRUMENTATION↗

Q-Law for Rapid Assessment of Low Thrust Cislunar Trajectories Via Automatic Differentiation

Q-Law is a Lyapunov-based control law used to determine optimal controls for a low thrust trajectory. One major issue with its use is the difficult derivatives re-quired for calculating optimal controls at a given time. In this paper, an implementation of Q-Law with automatic differentiation via a Python package called JAX is applied. With automatic differentiation, the difficult derivatives for Q-Law’s optimal controls are calculated with ease, and derivatives of final states with respect to Q-Law’s weights are found enabling gradient-based optimization of Q-Law for the first time. Different search and optimization methods for finding optimal weights are then compared using the LEO to GEO problem, and it was found that gradient-free methods like design of experiments and genetic algorithm produced the best results, but they took the longest time to get a solution, while the gradient-based method found a locally optimal result in a much faster time. Overall, the run time for a single propagation is manageable and well-suited for a mission designer to use as an initial guess generator for trajectory optimization, or for simple orbit transfer analysis.

Nathan Steffen↗

High-Performance Multi-Mode Ptychography Reconstruction on Distributed GPUs

Abstract—Ptychography is an emerging imaging technique that is able to provide wavelength-limited spatial resolution from spec-imen with extended lateral dimensions. As a scanning microscopy method, a typical two-dimensional image requires a number of data frames. As a diffraction-based imaging technique, the real-space image has to be recovered through iterative reconstruction algorithms. Due to these two inherent aspects, a ptychographic reconstruction is generally a computation-intensive and time-consuming process, which limits the throughput of this method. We report an accelerated version of the multi-mode difference map algorithm for ptychography reconstruction using multiple distributed GPUs. This approach leverages available scientific computing packages in Python, including mpi4py and PyCUDA, with the core computation functions implemented in CUDA C. We find that interestingly even with MPI collective communications, the weak scaling in the number of GPU nodes can still remain nearly constant. Most importantly, for realistic diffraction measurements, we observe a speedup ranging from a factor of 10 to 103 depending on the data size, which reduces the reconstruction time remarkably from hours to typically about 1 minute and is thus critical for real-time data processing and visualization.

97 MATHEMATICS AND COMPUTING↗

Single-Center Experience Implementing the LOINC-RSNA Radiology Playbook for Adult Abdomen/Pelvis CT and MR Procedures Using a Semi-Automated Method

The LOINC-RSNA Radiology Playbook represents the future direction of standardization for radiology procedure names. We developed a software solution (“RadMatch”) utilizing Python 2.7 and FuzzyWuzzy, an open-source fuzzy string matching algorithm created by SeatGeek, to implement the LOINC-RSNA Radiology Playbook for adult abdomen and pelvis CT and MR procedures performed at our institution. Execution of this semi-automated method resulted in the assignment of appropriate LOINC numbers to 86% of local CT procedures. For local MR procedures, appropriate LOINC numbers were assigned to 75% of these procedures whereas 12.5% of local MR procedures could only be partially mapped. For the standardized local procedures, only 63% of CT and 71% of MR procedures had corresponding RadLex Playbook identifier (RPID) codes in the LOINC-RSNA Radiology Playbook, which limited the utility of RPID codes. RadMatch is a semi-automated open-source software tool that can assist radiology departments seeking to standardize their radiology procedures via implementation of the LOINC-RSNA Radiology Playbook.

62 RADIOLOGY AND NUCLEAR MEDICINE↗

Keplerian Analysis for Versatile Evaluation of Arbitrary Trajectories

Designing interplanetary missions is an iterative process, with a tight coupling between mission analysis and vehicle design. The ability to simultaneously process both analyses early on can provide significant benefits in both the concept formulation and in overall mission feasibility. To implement such a simultaneous analysis process, there is a need to model interplanetary trajectories rapidly while maintaining an acceptable level of fidelity. Many simple patched conics tools make too many assumptions to satisfactorily address all relevant constraints and objectives, while full-fidelity trajectory design tools often require more time and expertise than is available in early conceptual studies. Hence, some form of middle-ground modeling tool would provide value. This paper introduces the development of such a tool using Python. This tool, Keplerian Analysis for Versatile Evaluation of Arbitrary Trajectories (KAVEAT), implements a patched conics method that enforces continuity of state (time, mass, position, velocity) through all transitions between various spheres of influence on the trajectory. The trajectory is constructed in an object-oriented manner, dynamically assembling unique maneuvers such as departure burns, heliocentric transfers (ballistic or with electric propulsion), and planetary flybys (powered or unpowered). Each maneuver has its own specific set of basic inputs needed to define it. The tool then takes these defined maneuvers, strings them together creating all the interdependencies required, and solves for the ideal trajectory using a gradient-based optimizer.

Katherine T McBrayer↗

Developing Concepts of Operations Using Multi-Step Tool Techniques With Large Language Models

The National Aeronautics and Space Administration (NASA) Air Mobility Pathfinders (AMP) project is developing and evaluating concepts of operations (ConOps) for safe, secure, and scalable Urban Air Mobility (UAM) operations. The AMP project’s Operational Concepts, Architecture, and Requirements Integration (OCARI) Team is using a Model Based System Engineering (MBSE) approach for integration, interoperability, and traceability of Advanced Air Mobility (AAM) ecosystems centered around urban air taxi services. The team’s goal is to define structures and behaviors needed for system feasibility, readiness, and interoperability, establish a UAM knowledge base, and trace and validate assumptions and requirements relevant to AAM. NASA Langley Research Center (LaRC) is spearheading an innovative digital engineering approach to integrate, communicate, and facilitate the research of multi-modal transportation systems. The Knowledge-based Digital Platform (KbDP) is a concept being developed that ties the workflows of Project Managers (PM), Principal Investigators (PI), and System Engineers together across organizational boundaries. It does so through the management of an information database defined by mathematical, data science, and system engineering principles. Machine Learning (ML) algorithms play a key role in this concept by extracting meaningful knowledge from relational and graph databases, document repositories, and system artifacts, which the human user leverages to greatly improve the efficiency and effectiveness of their research. Recent advancements in the field of Large Language Models (LLMs), specifically models trained for tool use, such as Command-R , now allow for the reliable implementation of single-step and multi-step tool-centric systems. These techniques provide the LLM with a set of tools, in our case Python functions, that can be called on to answer a much wider range of questions compared to LLMs implemented using a traditional single-source or Retrieval Augmented Generation (RAG) approach. Through this method, the LLM can pull information from multiple data sources, such as relational or graph databases, document repositories, application programming interfaces (APIs), and SysML artifacts depending on the user’s question. The LLM can also output the information in a variety of different formats, using output generation tools, such as CSV, UML, or SysML artifacts. Additionally, tools can be assigned roles and can work together to provide answers to queries in an “agent” like approach, similar to that implemented by Microsoft’s AutoGen framework where different agents can converse with each other to accomplish tasks. Previously, our team developed a chatbot system with “agent like” functionality in the form of different “modes” the user could select from a user interface (UI), this architecture can be seen on the left in figure 1. Three different modes were implemented, the first mode allowed the LLM to utilize the structures and algorithms within a graph database to trace UAM requirements. The second mode gave the LLM access to a vector search capable of providing relevant information from thousands of document pages related to UAM ConOps and requirements. The third mode served as a general assistant where users could enter open-ended questions and custom prompts to utilize the LLM for different use-cases. This system improved the process surrounding generating and analyzing information related to UAM requirements, however, the implementation provided a clunky user experience. Users were required to know what mode to select within the UI in advance before entering their question to the selected tool. Moreover, the different tools were isolated from each other, they lacked bidirectional links that would allow for tools to collaborate to generate better responses. Our team is working on a new architecture, seen on the right in the below figure, with the goal to address many of the UX shortcomings of our original system while improving the accuracy and depth of responses from the LLM. This new system will automatically select the appropriate tool to use based off the user’s question. Each tool will be capable of calling on any of the other tools available to the LLM, resulting in a collaborative pipeline where tools can pass data between other tools until enough data is received to generate an answer to the user’s question. Using a locally deployed, open-source, LLM, the NASA OCARI team, in collaboration with Collins Aerospace, will implement a prototype application that will bridge knowledge across multiple sources to assist System Engineers (SEs) with requirements discovery and tracing, research question and use case identification, and assumption validation. Such a system will also allow SEs to more easily, and intuitively, explore the AAM ecosystem, ultimately improving the efficiency and effectiveness of the SE's research and decision-making processes surrounding ConOps development and validation. In this session, our team will provide a video demonstration of our new prototype architecture in action. We will also present an overview of our prototype system architecture and talk about its advantages over traditional LLM deployments along with how those advantages can provide additional value to the field of System Engineering.

systems engineering↗

Towards Vendor and Operating System Independence of USB-based portable multi-channel analyzers

The nuclear measurements group is called on to develop portable, user friendly systems that performs at, or near, laboratory standards. These systems typically consist of a detector and a USB-based multi-channel analyzer. An ORTEC digi-Base is an example of a USB-based portable multi-channel analyzer with 14-pin photomultiplier tube base for gamma-ray spectroscopy applications with NaI(Tl) and other scintillation detectors. Operating system independence - we want to be able to develop applications that are 'future-proof' and can run on the best hardware for the job: desktop, laptop, tablet, phone, or embedded device. To do that we need our software to be operating system independent. Hardware vendor independence - to use the most appropriate equipment for the job, while still maintaining our rapid method development, we would like our software that uses this equipment to be independent of the specific vendor or model of the hardware. To do that we need a common interface to each vendor's equipment (high voltage, gain, start, stop, clear, etc.) In prior work, we were able to use an existing library to communicate with an ORTEC digi-base via Linux and Android. However the application developed did not have a user friendly front-end. Part of this work was to develop a simple user interface to control the settings of the hardware from Android. While OS independence is the final goal, another goal is standardized software for user-application development. For current purposes those standard systems are Windows 7, Windows 10, and Python 3. Our next step was to develop a common software interface between a front-end user interface and back-end hardware communication software. This was done using Python's Ctypes library. Ctypes is a foreign function library for Python. It provides C compatible data types, and allows calling functions in DLLs or shared libraries. It can be used to wrap these libraries in pure Python. Ctypes exports the cdll, and Windows windll and oledll objects, for loading dynamic link libraries. You load libraries by accessing them as attributes of these objects. cdll loads libraries which export functions using the standard cdecl calling convention. The first steps of developing the common software interface have been done. Once the software interface has been developed the next goal will be to develop hardware specific back-end software that way rapid user facing software can be developed using equipment that is 'on-hand' and once finished prototyping, the 'best' hardware can be chosen for the specific implementation.

12 MANAGEMENT OF RADIOACTIVE AND NON-RADIOACTIVE W↗

The Particle Accelerator Simulation Code PyORBIT

The particle accelerator simulation code PyORBIT is presented. The structure, implementation, history, parallel and simulation capabilities, and future development of the code are discussed. The PyORBIT code is a new implementation and extension of algorithms of the original ORBIT code that was developed for the Spallation Neutron Source accelerator at the Oak Ridge National Laboratory. The PyORBIT code has a two level structure. The upper level uses the Python programming language to control the flow of intensive calculations performed by the lower level code implemented in the C++ language. The parallel capabilities are based on MPI communications. The PyORBIT is an open source code accessible to the public through the Google Open Source Projects Hosting service.

Accelerator Simulation↗

Towards a Standard Process Management Infrastructure for Workflows Using Python

Orchestrating the execution of ensembles of processes lies at the core of scientific workflow engines on large scale parallel platforms. This is usually handled using platform-specific command line tools, with limited process management control and potential strain on system resources. The PMIx standard provides a uniform interface to system resources. The low level C implementation of PMIx has hampered its use in workflow engines, leading to the development of Python binding that has yet to gain traction. In this paper, we present our work to harden the PMIx Python client, demonstrating its usability using a prototype Python driver to orchestrate the execution of an ensemble of processes. We present experimental results using the prototype on the Summit supercomputer at Oak Ridge National Laboratory. This work lays the foundation for wider adoption of PMIx for workflow engines, and encourages wider support of more PMIx functionality in vendor provided system software stacks.

Elwasif, Wael↗

Dynamic Provisioning and Execution of HPC Workflows Using Python

High-performance computing (HPC) workflows over the last several decades have proven to assist in the understanding of scientific phenomena and the production of better products, more quickly, and at reduced cost. However, HPC workflows are difficult to implement and use for a variety of reasons. In this paper, we describe the development of the Python-based cumulus, which addresses many of these barriers. cumulus is a platform for the dynamic provisioning and execution of HPC workflows. cumulus provides the infrastructure needed to build applications that leverage traditional or Cloud-based HPC resources in their workflows. Lastly, we demonstrate the use of cumulus in both web and desktop simulation applications, as well as in an Apache Spark-based analysis application.

97 MATHEMATICS AND COMPUTING↗

A generalized wind turbine cross section as a reduced-order model to gain insights in blade aeroelastic challenges

In this work, we present an approach to study the aeroelastic stability of a wind turbine by focusing on the dynamics of a blade cross section. We present a methodology to obtain a reduced-order model of the blade dynamics in the form of generalized cross-sectional quantities that approximates the aerodynamic and structural properties of the full blade. The motivation for the work is to gain a physical understanding of the influence of aerodynamic models such as dynamic wake and dynamic stall on the frequency and damping of the structure using a reduced-order model with low computational cost. The model may be coupled to two-dimensional computational fluid dynamics softwares or engineering unsteady airfoil aerodynamics models accounting for dynamic wake and dynamic stall. In the latter case, we can obtain monolithic state-space forms of the aeroelastic system of equations, which simplifies the determination of the modal parameters and therefore the study of stability. The work investigates wind turbines in operation or at standstill, where vortex-induced vibrations and stall-induced vibrations, respectively, might be an issue. The implementation is made available as part of the open-source Python package WELIB and as part of the open-source unsteady aerodynamic driver of OpenFAST.

17 WIND ENERGY↗

DSPS: Differentiable stellar population synthesis

ABSTRACT Models of stellar population synthesis (SPS) are the fundamental tool that relates the physical properties of a galaxy to its spectral energy distribution (SED). In this paper, we present DSPS: a python package for SPS. All of the functionality in DSPS is implemented natively in the JAX library for automatic differentiation, and so our predictions for galaxy photometry are fully differentiable, and directly inherit the performance benefits of JAX, including portability onto GPUs. DSPS also implements several novel features, such as i) a flexible empirical model for stellar metallicity that incorporates correlations with stellar age, ii) support for the Diffstar model that provides a physically-motivated connection between the star formation history of a galaxy (SFH) and the mass assembly of its underlying dark matter halo. We detail a set of theoretical techniques for using autodiff to calculate gradients of predictions for galaxy SEDs with respect to SPS parameters that control a range of physical effects, including SFH, stellar metallicity, nebular emission, and dust attenuation. When forward modelling the colours of a synthetic galaxy population, we find that DSPS can provide a factor of 5 speed-up over standard SPS codes on a CPU, and a factor of 300-400 on a modern GPU. When coupled with gradient-based techniques for optimization and inference, DSPS makes it practical to conduct expansive likelihood analyses of simulation-based models of the galaxy–halo connection that fully forward model galaxy spectra and photometry.

79 ASTRONOMY AND ASTROPHYSICS↗

Quantitative approaches for multiscale structural analysis with atomic resolution electron microscopy

Atomic-resolution imaging with scanning transmission electron microscopy is a powerful tool for characterizing the nanoscale structure of materials, in particular features such as defects, local strains, and symmetry-breaking distortions. In addition to advanced instrumentation, the effectiveness of the technique depends on computational image analysis to extract meaningful features from complex datasets recorded in experiments, which can be complicated by the presence of noise and artifacts, small or overlapping features, and the need to scale analysis over large representative areas. Here, we present image analysis approaches which synergize real and reciprocal space information to efficiently and reliably obtain meaningful structural information with picometer scale precision across hundreds of nanometers of material from atomic-resolution electron microscope images. Damping superstructure peaks in reciprocal space allows symmetry-breaking structural distortions to be disentangled from other sources of inhomogeneity and measured with high precision. Real-space fitting of the wavelike signals resulting from Fourier filtering enables absolute quantification of lattice parameter variations and strain, as well as the uncertainty associated with these measurements. Implementations of these algorithms are made available as an open source python package.

36 MATERIALS SCIENCE↗

A Walking Method for Non-Decomposition Intersection and Union of Arbitrary Polygons and Polyhedrons

We present a method for computing the intersection and union of non- convex polyhedrons without decomposition in O(n log n) time, where n is the total number of faces of both polyhedrons. We include an accompanying Python package which addresses many of the practical issues associated with implementation and serves as a proof of concept. The key to the method is that by considering the edges of the original ob- jects and the intersections between faces as walking routes, we can e ciently nd the boundary of the intersection of arbitrary objects using directional walks, thus handling the concave case in a natural manner. The method also easily extends to plane slicing and non-convex polyhedron unions, and both the polyhedron and its constituent faces may be non-convex.

97 MATHEMATICS AND COMPUTING↗

An Algorithm to Generate Synthetic 3D Microstructures from 2D Exemplars

The inverse problem of constructing 3D microstructures from 2D data is an area of active research within the materials science community. This paper presents the implementation of a robust, computationally efficient algorithm, Hierarchical Algorithm for the Reconstruction of Exemplars (HARE), written in Python to reconstruct 3D features in a given microstructure from up to three orthogonal 2D exemplars using nearest neighbor matching to reproduce feature qualities, such as shape, size, and distribution. HARE’s feature sampling implements histogram reweighting to avoid both over- and undersampling. A neighborhood voting scheme allows each pixel to provisionally affect its neighbors according to its weight. Finally, the algorithm is presently configured for two-phase materials and is being extended to accommodate multiple phases. HARE is a convenient and robust base from which to generate statistically representative synthetic microstructures for use in multi-scale modeling or machine learning applications to support advanced manufacturing and materials discovery.

36 MATERIALS SCIENCE↗

SUSPECT: MINLP special structure detector for Pyomo

We present SUSPECT, an open source toolkit that symbolically analyzes mixed-integer nonlinear optimization problems formulated using the Python algebraic modeling library Pyomo. We present the data structures and algorithms used to implement SUSPECT. SUSPECT works on a directed acyclic graph representation of the optimization problem to perform: bounds tightening, bound propagation, monotonicity detection, and convexity detection. We show how the tree-walking rules in SUSPECT balance the need for lightweight computation with effective special structure detection. SUSPECT can be used as a standalone tool or as a Python library to be integrated in other tools or solvers. Here, we highlight the easy extensibility of SUSPECT with several recent convexity detection tricks from the literature. We also report experimental results on the MINLPLib 2 dataset.

97 MATHEMATICS AND COMPUTING↗