Search NASASearch

SEARCH · Search NASA

Results for “Python Programming”

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 217 records · Page 12

PyFaults: A Python Toolkit for Stacking Fault Screening

PyFaults is an open-source Python library designed to model stacking fault disorder in crystalline materials and qualitatively assess the characteristic selective broadening effects in powder X-ray diffraction (PXRD). Here, the main capabilities of PyFaults are presented, including unit cell and supercell model construction, PXRD pattern calculation, assessment against experimental PXRD, and methods for rapid screening of candidate models within a set of possible stacking vectors and fault occurrence probabilities. This program aims to serve as a computationally inexpensive tool for identifying and screening potential stacking fault models in materials with planar disorder. Three diverse case studies, involving GaN, Li2MnO3 and Li3YCl6, are presented to illustrate the program functionality across a range of structure types and stacking fault modalities.

MATHEMATICS AND COMPUTING

pyDiSCaMB : enabling the use of multipolar scattering factors in Phenix

Multipolar scattering models, such as the transferable aspherical atom model, account for atomic chemical interactions and provide a more accurate representation of experimental data. However, the simpler independent atom model (IAM), which assumes non-interacting atoms, is the only model available in the most widely used macromolecular refinement programs. This is primarily because IAM offers a hard-to-beat combination of computational efficiency and modelling power at typical macromolecular resolutions. By contrast, more accurate multipolar modelling has historically been limited due to its computational cost and the absence of an interface between software capable of calculating structure factors and gradients based on multipolar models and software designed for macromolecular refinement. This work introduces pyDiSCaMB , a Python software package designed to integrate between the computational crystallography toolbox ( cctbx ) and the quantum crystallography library DiSCaMB ( Densities in Structural Chemistry and Molecular Biology ), thus enabling multipolar scattering models in Phenix 's toolkit. The implementation, features and capabilities of pyDiSCaMB are presented, the runtimes for the calculation of structure factor and target gradients with respect to atomic parameters are explored, and Fourier images of electrostatic potential, electron density and deformation maps are computed as illustrative examples. The pyDiSCaMB library will make multipolar modelling widely available to the structural biology community, potentially transforming refinement and model-building for both crystallography and cryogenic electron microscopy (cryoEM).

MATTS data bank

Hls4ml Synthesis Testing

HLS4ml (high level synthesis for machine learning) Is a Python package used to translate commonly used open-source machine learning models into HLS. This is useful in machine learning applications on FPGAs. Machine learning algorithms are only as fast as the hardware that they are used on, and some applications require high speed without sacrificing accuracy. In these situations, an FPGA is a good choice since it is faster than a CPU or a GPU, but programming an FPGA is difficult. This is where HLS4ml can be used to simplify the process, as a well-known learning model can be converted to HLS and more easily deployed onto an FPGA. There are many use cases for a machine learning algorithm running on an FPGA. For example, detectors in a particle accelerator cannot keep every event that they detect, and so a computer must decide which events to keep and which to discard. Using an FPGA with a machine learning algorithm would be a good way to keep as many events as possible.

Swanson, Caiden

Polarbrdf: A General Purpose Python Package for Visualization Quantitative Analysis of Multi-Angular Remote Sensing Measurements

The Bidirectional Reflectance Distribution Function (BRDF) is a fundamental concept for characterizing the reflectance property of a surface, and helps in the analysis of remote sensing data from satellite, airborne and surface platforms. Multi-angular remote sensing measurements are required for the development and evaluation of BRDF models for improved characterization of surface properties. However, multi-angular data and the associated BRDF models are typically multidimensional involving multi-angular and multi-wavelength information. Effective visualization of such complex multidimensional measurements for different wavelength combinations is presently somewhat lacking in the literature, and could serve as a potentially useful research and teaching tool in aiding both interpretation and analysis of BRDF measurements. This article describes a newly developed software package in Python (PolarBRDF) to help visualize and analyze multi-angular data in polar and False Color Composite (FCC) forms. PolarBRDF also includes functionalities for computing important multi-angular reflectance/albedo parameters including spectral albedo, principal plane reflectance and spectral reflectance slope. Application of PolarBRDF is demonstrated using various case studies obtained from airborne multi-angular remote sensing measurements using NASA's Cloud Absorption Radiometer (CAR). Our visualization program also provides functionalities for untangling complex surface/atmosphere features embedded in pixel-based remote sensing measurements, such as the FCC imagery generation of BRDF measurements of grasslands in the presence of wild fire smoke and clouds. Furthermore, PolarBRDF also provides quantitative information of the angular distribution of scattered surface/atmosphere radiation, in the form of relevant BRDF variables such as sunglint, hotspot and scattering statistics.

CAR

hls4ml

hls4ml (high level synthesis for machine learning) Is a Python package used to translate commonly used open-source machine learning models into HLS. This is useful in machine learning applications on FPGAs. Machine learning algorithms are only as fast as the hardware that they are used on, and some applications require high speed without sacrificing accuracy. In these situations, an FPGA is a good choice since it is faster than a CPU or a GPU, but programming an FPGA is difficult. This is where hls4ml can be used to simplify the process, as a well-known learning model can be converted to HLS and more easily deployed onto an FPGA. There are many use cases for a machine learning algorithm running on an FPGA. For example, detectors in a particle accelerator cannot keep every event that they detect, and so a computer must decide which events to keep and which to discard. Using an FPGA with a machine learning algorithm would be a good way to keep as many events as possible.

Swanson, Caiden

Static Controls Performance Tool for Lunar Landers

This document presents a static analysis tool used to evaluate the controllability of Lunar landers. This was created as part of the NASA Lunar Cargo Transportation and Landing by Soft Touchdown (Lunar CATALYST) program. This tool is capable of accepting typical design information such as location and direction of thrusters, maximum thruster forces, gravity vectors, and center of mass locations. The tool evaluates how far the center of gravity can move from its starting position while still maintaining control. This type of analysis is intended to support results produced by time domain simulations. The code created for this project was implemented in Python, and it was designed to be integrated into systems level optimization tools to yield first-cut results on optimal thruster placement.

Aretskin-Hariton, Eliot D.

solposx: A Python package for determining solar position and atmospheric refraction

solposx is a Python package of reference algorithms for calculating the sun’s position and atmospheric refraction. The package includes 11 solar position algorithms and 6 refraction models from the past 50 years. All functions follow a standardized design pattern, making it easy to compare different algorithms. The provided algorithm implementations have been thoroughly vetted, making the package a valuable research tool and a reliable reference for implementing solar position algorithms in other programming languages or applications.

Jensen, Adam R. [Technical University of Denmark,

Splashdown Visualization of Spent Stages

The state of the art for many Earth-to-orbit trajectory analysis toolsets used at NASA is somewhat dated in terms of the languages they are written in and their user interfaces. Many of these programs are written in languages like Fortran or C that are no longer considered modern in the technology industry, and are command-line based without any means of interpreting the data outputs. This presentation is meant to demonstrate a specific use case for a newly developed web app that visualizes the output data for one of these tools. Specifically, one key usage is to investigate and validate launches for notional multi-stage vehicle concepts to various non-standard high-inclination orbits. Some NASA requirements dictate that trajectories be designed such that no surviving debris lands closer than 200 nautical miles (nm) from foreign landmasses or 27 nm from the continental United States, therefore validating re-entry locations of spent stages is an integral part of the launch planning process. In addition, at programmatic levels it can prove insightful and clarifying for the decision-making process to enhance the technical results of numerical simulations with visualizations. The intent with this tool is to provide the mission analyst and program level management with an intuitive and clear grasp of key information on possible mission scenarios either departing from or arriving at Earth, and in the future, the moon or Mars as well. The software tool was developed with an agile development approach and utilizes the latest frameworks and technologies. The front end uses the React JavaScript library for making a state of the art frontend and a backend based on the Django Python framework for handling data using Python’s powerful and free scientific libraries. In addition, the CesiumJS open-source library is key for visualizing these end-to-end trajectories on a high-resolution Earth model. The presentation will demonstrate the current capability and tested use cases.

Jack Agolli

Assessing Energy Infrastructure Devices for Vulnerabilities

Industrial control systems prove to be vital to the health and security of the nation in our critical infrastructure. Critical infrastructure includes the most foundational systems to support modern civilization which includes water and wastewater systems, communications, and the electricity we use to name a few sectors. However, these devices' overall composition remains largely unknown and are untested from a cyber security perspective. As part of the Cyber Testing for Resilient Industrial Control Systems (CyTRICS) program, I analyzed one such energy infrastructure device to better understand how it functions, what hardware and software components are present within it, and assess it for security vulnerabilities. To achieve this, I reverse engineered binary files using Ghidra to understand system functionality and learned more about how to collaborate with other researchers on a shared Ghidra project. I learned more about how web sockets function and how to interact with them through Python to test if they are secure or not. This work led me to assess possible vulnerabilities in this device and provide a better understanding of its composition and function, which are essential to INL's mission of securing our nation's energy infrastructure.

99 - GENERAL AND MISCELLANEOUS

stor4build

The EnergyPlus simulation engine supports modeling and simulation of thermal energy storage (TES) systems in several ways, including using the Python-EMS feature, which extends the operation of the engine with custom code written in Python. Creation of models using this feature can be tedious and error prone, with the connection of the model components to the Python code a particularly troublesome area. The stor4build Python package simplifies this process by modifying an input model to add a selected TES technology (implemented with the Python-EMS feature) and runs the simulation. The package leverages the OpenStudio middleware software development kit to automate this process as much as possible, eliminating potential errors and simplifying usage of EnergyPlus. The package provides objects, functions, and OpenStudio measures that implement the necessary operations to automate the creation of EnergyPlus models that integrate TES technologies with building systems. In addition, two user interfaces are provided: a command line interface and a web application programming interface. The automated process implemented by the package greatly simplifies the modeling and simulation process, allowing for parametric studies to be executed much more efficiently and effectively. The OpenStudio-based workflow is also very flexible and will allow for future additions of new technologies.

DeGraw, JasonWilliam [Oak Ridge National Laborator

Open-source Techniques for Automated Landslide Inventory Generation for Rapid Response

Manual mapping is the most used method for generating landslide inventories. For rapid response scenario this method becomes tedious and time consuming. The Landslide team at NASA Goddard Space Flight Center has been developing open-source landslide mapping systems for rapid generation of landslide inventories. We have developed a Python-based landslide mapping framework known as the Semi-Automatic Landslide Detection (SALaD) system that uses Object-based Image Analysis and machine learning. For production of event-based inventories, SALaD was modified to include a change detection module (SALaD-CD). Utilizing high-resolution imagery form from Planet and Maxar, we have generated multiple rapid response landslide inventories that have been used by emergency responders on the ground, the NASA Disasters program, and academia. Currently, we are exploiting deep learning frameworks for landslide mapping. We are interested to learn about efficient way to harmonize multi-sensor data for creating a long-term record of landslides, training strategies and ongoing deep learning-based efforts for natural hazard characterization within NASA and UMD.

Pukar Amatya

Updating the Space Communications and Navigation (SCaN) Link Tool Executable Software to Version 5

NASA’s Space Communications and Navigation (SCaN) program is responsible for providing space communication channels in low Earth orbit, geosynchronous orbit, and deep space for a variety of space missions. The SCaN Link Tool is a standalone, executable, and personal computer (PC)-based software operated via a user interface, which provides NASA civil servants and contractors, as well as the public by way of the tool’s inclusion in the NASA Software Catalog, with in-depth satellite communications link analysis capability. Version 4 of the tool was built using PythonTM (Python Software Foundation) with the help of libraries such as NumPy and SciPy for numerical calculations, Matplotlib for graphical visualizations, and PyQt5 for the graphical user interface. It utilizes radiofrequency (RF) and optical communications link analysis calculations to give users the ability to input known link parameters and calculate select link performance outputs. With the development of the next-generation architecture for space satellite communications in the coming decade, NASA will benefit by having more in-depth communications link analysis tools at its disposal. The tool’s update from version 4 to version 5 aims to provide higher output value accuracy, the ability to solve for a more diverse set of output variables, as well as analog and digital repeater capabilities. Options included in the tool’s functionality, such as the ability to save configuration parameter values, graphs, and results, as well as the provision of default parameter values, increase the tool’s versatility. Users will have access to in-depth, accurate communications link analysis as more advanced satellite constellations are designed and deployed by NASA and the growing commercial aerospace community.

Green, Jack L.

MTUQ: a framework for estimating moment tensors, point forces, and their uncertainties

SUMMARY We introduce MTUQ, an open-source Python package for seismic source estimation and uncertainty quantification, emphasizing flexibility and operational scalability. MTUQ provides MPI-parallelized grid search and global optimization capabilities, compatibility with 1-D and 3-D Green’s function database formats, customizable data processing, C-accelerated waveform and first-motion polarity misfit functions, and utilities for plotting seismic waveforms and visualizing misfit and likelihood surfaces. Applicability to a range of full- and constrained-moment tensor, point force, and centroid inversion problems is possible via a documented application programming interface, accompanied by example scripts and integration tests. We demonstrate the software using three different types of seismic events: (1) a 2009 intraslab earthquake near Anchorage, Alaska; (2) an episode of the 2021 Barry Arm landslide in Alaska; and (3) the 2017 Democratic People’s Republic of Korea underground nuclear test. With these events, we illustrate the well-known complementary character of body waves, surface waves, and polarities for constraining source parameters. We also convey the distinct misfit patterns that arise from each individual data type, the importance of uncertainty quantification for detecting multimodal or otherwise poorly constrained solutions, and the software’s flexible, modular design.

58 GEOSCIENCES

Python Based Plume Dynamics Estimation Tool (PyPDET) Rapid Plume Strike Analysis for RPOD Maneuvers in Deep Space Operations

I worked as a NASA Intern during the Summer 2023 term in the DS-00 division under the supervision of my mentor, Dr. Jonathan Pitt. Our goal was to build on our previous work from 2022 to develop a plume strike estimation tool using a prescribed physics methodology and model plume impingement effects while considering the dynamics of a rendezvous, operations, proximity, and docking (RPOD) maneuver. This tool supports previously configured CFD-DSMC calculations by allowing for rapid analysis of initial designs using a low-fidelity source flow model. Engineers can then use the high-fidelity CFD-DSMC tool to consolidate results as they work towards finalizing a design. This year’s project was focused on developing a software application that other engineers would be using in their analysis. Thus, the user’s experience was considered in the development of this application. Proper documentation, testability, and modularity of the codebase was our priority. For example, the project included auto documentation procedures to start building towards a User Manual, while also including dedicated demonstration cases for more explicit communication of functionality. Also, this project included a framework for testing the source code for future developments. Additionally, care was taken to develop the code using an Object-Oriented Programming approach. Thus, allowing for a modular extensibility of functionality in anticipation of future developments. The core work of this project was developing an algorithm that would transform the visiting vehicle and associated thruster data according to the kinematics described in the jet firing history. It would then calculate the estimated plume strikes on two of the target vehicles and write data accordingly into a VTK file. Summer work is to conclude by developing and presenting a PowerPoint slide deck at the intern exit briefing on August 11 th , 2023. Once the model for simple plume strike calculations is developed and tested there are several avenues to explore to continue development of this tool. These are also discussed in this report.

Plume Impingement

FLARE: field line analysis and reconstruction for 3D boundary plasma modeling

The FLARE code is a magnetic mesh generator that is integrated within a suite of tools for the analysis of the magnetic geometry in toroidal fusion devices. A magnetic mesh is constructed from field line segments and permits fast reconstruction of field lines in 3D boundary plasma codes such as EMC3-EIRENE. Both intrinsically non-axisymmetric configurations (stellarators) and those with symmetry breaking perturbations of an axisymmetric equilibrium (tokamaks) are supported. The code itself is written in Modern Fortran with MPI support for parallel computing, and it incorporates object-oriented programming for the definition of the magnetic field and the material surface geometry. Extended derived types for a number of different magnetohydrodynamic equilibrium and plasma response models are implemented. The core element of FLARE is a field line tracer with adaptive step-size control, and this is integrated into tools for the construction of Poincaré maps and invariant manifolds of X-points. A collection of high-level procedures that generate output files for visualization is build on top of that. The analysis modules are build with Python frontends that facilitate customization of tasks and/or scripting of parameter scans.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY

DICOMs, Missiles, and Metadata: The U.S. Nuclear Weapons Program Leverages a Medical Standard

Digital Imagine and Communications in Medicine (DICOM) images, although most commonly used in medical settings, have been widely adopted by the United States Department of Energy (DOE) for capturing images of the internal components in a nuclear weapon. DICOMs, a lesser-known file format that combine nested metadata structures with complex image data-including multiple planes, frames, and high resolution-require the creation of access copies to support usability within the DOE. Used primarily for ensuring the safety, security, and reliability of the U.S. nuclear stockpile, the Los Alamos National Laboratory (LANL)’s DICOM images and corresponding image metadata must be accessible to scientists and researchers via our institutional centralized databases. This paper describes the author's creation of a Python script that converts DICOM images into accessible, archive-friendly TIFF files while preserving key image data and metadata.

96 KNOWLEDGE MANAGEMENT AND PRESERVATION

A Python Tool for Reconstructing MCNP6 Particle Histories from an HDF5 PTRAC File [Slides]

A Python tool for converting the MCNP6 HDF5 PTRAC file to a list of Python trees is presented. The particle trees store MCNP6 simulated events for each history using parent-child relationships, which ensures that branching processes are accurately reproduced. A variety of post-processing scripts are presented and used in conjunction with the Python particle trees to make special tallies that are currently not available in the MCNP6 software and visualize the particle tracks.

97 MATHEMATICS AND COMPUTING

A Web Service and Android Application for the Distribution of Rainfall Estimates and Earth Observation Data

The full potential of Satellite Rainfall Estimates (SRE) can only be realized if timely access to the datasets is possible. Existing data distribution web portals are often focused on global products and offer limited customization options, especially for the purpose of routine regional monitoring. Furthermore, most online systems are designed to meet the needs of desktop users, limiting the compatibility with mobile devices. In response to the growing demand for SRE and to address the current limitations of available web portals a project was devised to create a set of freely available applications and services, available at a common portal that can: (1) simplify cross-platform access to Tropical Rainfall Measuring Mission Online Visualization and Analysis System (TOVAS) data (including from Android mobile devices), (2) provide customized and continuous monitoring of SRE in response to user demands and (3) combine data from different online data distribution services, including rainfall estimates, river gauge measurements or imagery from Earth Observation missions at a single portal, known as the Tropical Rainfall Measuring Mission (TRMM) Explorer. The TRMM Explorer project suite includes a Python-based web service and Android applications capable of providing SRE and ancillary data in different intuitive formats with the focus on regional and continuous analysis. The outputs include dynamic plots, tables and data files that can also be used to feed downstream applications and services. A case study in Southern Angola is used to describe the potential of the TRMM Explorer for SRE distribution and analysis in the context of ungauged watersheds. The development of a collection of data distribution instances helped to validate the concept and identify the limitations of the program, in a real context and based on user feedback. The TRMM Explorer can successfully supplement existing web portals distributing SRE and provide a cost-efficient resource to small and medium-sized organizations with specific SRE monitoring needs, namely in developing and transition countries.

precipitation