Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python codes”

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 37 records · Page 2

The InSAR Scientific Computing Environment

We have developed a flexible and extensible Interferometric SAR (InSAR) Scientific Computing Environment (ISCE) for geodetic image processing. ISCE was designed from the ground up as a geophysics community tool for generating stacks of interferograms that lend themselves to various forms of time-series analysis, with attention paid to accuracy, extensibility, and modularity. The framework is python-based, with code elements rigorously componentized by separating input/output operations from the processing engines. This allows greater flexibility and extensibility in the data models, and creates algorithmic code that is less susceptible to unnecessary modification when new data types and sensors are available. In addition, the components support provenance and checkpointing to facilitate reprocessing and algorithm exploration. The algorithms, based on legacy processing codes, have been adapted to assume a common reference track approach for all images acquired from nearby orbits, simplifying and systematizing the geometry for time-series analysis. The framework is designed to easily allow user contributions, and is distributed for free use by researchers. ISCE can process data from the ALOS, ERS, EnviSAT, Cosmo-SkyMed, RadarSAT-1, RadarSAT-2, and TerraSAR-X platforms, starting from Level-0 or Level 1 as provided from the data source, and going as far as Level 3 geocoded deformation products. With its flexible design, it can be extended with raw/meta data parsers to enable it to work with radar data from other platforms

geodetic imaging↗

An Automated Detection Methodology for Dry Well-Mixed Layers

The intense surface heating over arid land surfaces produces dry well-mixed layers (WML) via dry convection. These layers are characterized by nearly constant potential temperature and low, nearly constant water vapor mixing ratio. To further the study of dry WMLs, we created a detection methodology and supporting software to automate the identification and characterization of dry WMLs from multiple data sources including rawinsondes, remote sensing platforms, and model products. The software is a modular code written in Python, an open source language. Radiosondes from a network of synoptic stations in North Africa were used to develop and test the WML detection process. The detection involves an iterative decision tree that ingests a vertical profile from an input data file, performs a quality check for sufficient data density, and then searches upward through the column for successive points where the simultaneous changes in water vapor mixing ratio and potential temperature are less than the specified maxima. If points in the vertical profile meet the dry WML identification criteria, statistics are generated detailing the characteristics of each layer in the profile. At the end of the vertical profile analysis, there is an option to plot analyzed profiles in a variety of file formats. Initial results show that the detection methodology can be successfully applied across a wide variety of input data and North African environments and for all seasons. It is sensitive enough to identify dry WMLs from other types of isentropic phenomena such as subsidence layers and distinguish the current day’s dry WML from previous days.

Stephen D. Nicholls↗

Trajectory Simulation Using Multi Model Monte Carlo with Python (MXMCPy)

EDL (Entry, Descent and Landing) is the process from a vehicle approaching a surface to landing on it, such as a Mars rover approaching the planet before landing. POST2 (Program to Optimize Simulated Trajectories 2) is Langley’s primary EDL simulation tool and is used NASA-wide for simulations. POST2 can generate highly accurate results by running a precise, but time consuming, Monte Carlo (MC) simulation hundreds or thousands of times. Though POST2 can produce highly accurate results, it can take unrealistic time spans to generate these results, which has created a need to speed up the simulations. The new NASA software MXMCPy offers various ways to speed up the simulations while getting just as precise results. Instead of running high-precision POST2 simulations many times for traditional MC, MXMCPy can run fewer high-precision POST2 simulations and many less precise POST2 simulations and merge the results. MXMCPy contains 30+ different methods which will each suggest different allocations between model precision levels, which result in results of varying precision based on the POST2 simulation. I created Python and Bash code to automate the 5 steps of MXMCPy’s application to POST2. I also tested the precision of traditional Monte Carlo simulations to MXMCPy aided simulations and found that MXMCPy can achieve substantially more precise solutions at the same computer runtime. I learned Test Driven Development (TDD), a software programming workflow which involves writing computer-automated tests before writing the code which is being tested. These tests are ran every time the code is changed and they can find glitches in the code much quicker than a human can. This programming workflow saved me a lot of time because the automated tests could tell me exactly where the code had stopped working. I plan on using this software development method for future academic and professional software projects. I have greatly enjoyed my work at NASA, so I have been applying to NASA internships and Pathways positions. In addition, I plan on applying what I have learned about Test Driven Development to my computer science courses next semester

James Warner↗

Starshade Rendezvous: Exoplanet Sensitivity and Observing Strategy

Launching a starshade to rendezvous with the Nancy Grace Roman Space Telescope (Roman) would provide the first opportunity to directly image the habitable zones (HZs) of nearby sunlike stars in the coming decade. A report on the science and feasibility of such a mission was recently submitted to NASA as a probe study concept. The driving objective of the concept is to determine whether Earth-like exoplanets exist in the HZs of the nearest sunlike stars and have biosignature gases in their atmospheres. With the sensitivity provided by this telescope, it is possible to measure the brightness of zodiacal dust disks around the nearest sunlike stars and establish how their population compares with our own. In addition, known gas-giant exoplanets can be targeted to measure their atmospheric metallicity and thereby determine if the correlation with planet mass follows the trend observed in the Solar System and hinted at by exoplanet transit spectroscopy data. We provide the details of the calculations used to estimate the sensitivity of Roman with a starshade and describe the publicly available Python-based source code used to make these calculations. Given the fixed capability of Roman and the constrained observing windows inherent for the starshade, we calculate the sensitivity of the combined observatory to detect these three types of targets, and we present an overall observing strategy that enables us to achieve these objectives.

Andrew Frederic Romero-wolf↗

Stata Hybrids: Updates and Ideas

At last year's Stata conference I presented two projects for using Python with Stata: a plugin that embeds the Python programming language within Stata and code for using Stata data sets in Python. In this talk I will describe some small improvements being made to these projects, and I will present other ideas for combining tools with Stata. Some of these ideas use Python, some use JavaScript and a web browser.

Fieldler, James↗

Conducted Susceptibility Data Adaptation Tool

The purpose of this research project is to help NASA scientists increase effectivity in testing by reducing the amount of time required for data conversion from initial measurements to the analysis stage. This project resulted in a data conversion tool developed in python using the openpyxl library. When lab personnel perform the Conducted Susceptibility 101 (CS101) and Conducted Susceptibility 02 (CS02) tests in the Semi-anechoic Electromagnetic Compatibility Test Facility at NASA Langley Research Center, the driving code produces a text file under the .DAT extension.The data must be manually converted the .DAT file into an Excel file line by line for data analysis.The Conducted Susceptibility Data Adaptation Tool (CSDAT) uses python code to convert the .DAT files to spreadsheets automatically which saves lab personnel time which they could use for faster analysis as well as prevents possible human error such as leaving out a line of data in the manual conversion process.

Gabriel Johnson↗

VESIcal Part I: An open-source thermodynamic model engine for mixed volatile (H2O-CO2) solubility in silicate melts

Thermodynamics has been fundamental to the interpretation of geologic data and modeling of geologic systems for decades. However, more recent advancements in computational capabilities and a marked increase in researchers’ accessibility to computing tools has outpaced the functionality and extensibility of currently available modeling tools. Here we present VESIcal (Volatile Equilibria and Saturation Identification calculator): the first comprehensive modeling tool for H 2 O, CO 2 , and mixed (H 2 O-CO 2 ) solubility in silicate melts that: a) allows users access to seven commonly used models, plus easy inter-comparison between models; b) provides universal functionality for all models (e.g., functions for calculating saturation pressures, degassing paths, etc.); c) can process large datasets (1,000’s of samples) automatically; d) can output computed data into an excel spreadsheet for simple post-modeling analysis; e) integrates advanced plotting capabilities directly within the tool; and f) provides all of these within the framework of a python library, making the tool extensible by the user and allowing any of the model functions to be incorporated into any other code capable of calling python. The tool is presented within this manuscript, which is a Jupyter notebook containing worked examples accessible to python users with a range of skill levels. The basic functions of VESIcal can also be access via a web app (https://vesical.anvil.app). The VESIcal python library is open-source and available for download at https://github.com/kaylai/VESIcal.

K. Iacovino↗

Development of Physics-Based Transition Models for Unstructured-Mesh CFD Codes Using Deep Learning Models

Predicting transition locations over a vehicle surface is of fundamental importance for many engineering applications. With the transition information, the Reynolds-averaged Navier-Stokes (RANS) computations can turn on the turbulence model at the right locations so that drag, lift and other aerodynamic quantities can be accurately predicted. In contrast to the popularity of RANS-based transition modeling in which transition onset is governed by the turbulence equations, physics-based transition models that account for instability waves within the boundary layer, thus more compliant to flow physics, only gained more attention in recent years. This paper describes the development of a new physics-based transition model based on either the linear stability theory (LST) or parabolized stability equations (PSE). The model is designed to communicate with a structured or unstructured-mesh RANS solver back and forth in order to more accurately compute transition fronts over a three-dimensional body. In the developed model, the Python suite of interface codes in conjunction with the LASTRAC software can be executed autonomously to produce transition onset locations for a given laminar or RANS-computed transitional state. In addition, as a proof of concept, the tool set consists of a deep learning neural network model that has been designed and trained to predict instability wave evolutions inside the boundary layer for various instability wave mechanisms across a selected speed range. A machine-learned intelligent profile interpolation model has also been devised to enable reliable instability-wave spectra predictions with just a few points in the mean flow profiles.

Transition Modeling↗

Computational Workbench for Multibody Dynamics

PyCraft is a computer program that provides an interactive, workbenchlike computing environment for developing and testing algorithms for multibody dynamics. Examples of multibody dynamic systems amenable to analysis with the help of PyCraft include land vehicles, spacecraft, robots, and molecular models. PyCraft is based on the Spatial-Operator- Algebra (SOA) formulation for multibody dynamics. The SOA operators enable construction of simple and compact representations of complex multibody dynamical equations. Within the Py-Craft computational workbench, users can, essentially, use the high-level SOA operator notation to represent the variety of dynamical quantities and algorithms and to perform computations interactively. PyCraft provides a Python-language interface to underlying C++ code. Working with SOA concepts, a user can create and manipulate Python-level operator classes in order to implement and evaluate new dynamical quantities and algorithms. During use of PyCraft, virtually all SOA-based algorithms are available for computational experiments.

Edmonds, Karina↗

Variable-Depth Liner Evaluation Using Two NASA Flow Ducts

Four liners are investigated experimentally via tests in the NASA Langley Grazing Flow Impedance Tube. These include an axially-segmented liner and three liners that use reordering of the chambers. Chamber reordering is shown to have a strong effect on the axial sound pressure level profiles, but a limited effect on the overall attenuation. It is also shown that bent chambers can be used to reduce the liner depth with minimal effects on the attenuation. A numerical study is also conducted to explore the effects of a planar and three higher-order mode sources based on the NASA Langley Curved Duct Test Rig geometry. A four-segment liner is designed using the NASA Langley CDL code with a Python-based optimizer. Five additional liner designs, four with rearrangements of the first liner segments and one with a redistribution of the individual chambers, are evaluated for each of the four sources. The liner configuration affects the sound pressure level profile much more than the attenuation spectra for the planar and first two higher-order mode sources, but has a much larger effect on the SPL profiles and attenuation spectra for the last higher-order mode source. Overall, axially variable-depth liners offer the potential to provide improved fan noise reduction, regardless of whether the axially variable depths are achieved via a distributed array of chambers (depths vary from chamber to chamber) or a group of zones (groups of chambers for which the depth is constant).

Jones, M. G.↗

A Modified Algorithm and Open-Source Computational Package for the Determination of Infrared Optical Constants Relevant to Astrophysics

Infrared (IR) telescopes, such as Spitzer and SOFIA, have revealed a rich variety of chemical species trapped in interstellar ices. The most fundamental parameters to be derived from observed IR spectra are the identity and abundance of each component. Several compounds have been conclusively or tentatively identified, but the band strengths and optical constants needed to derive accurate abundances for many of these are poorly constrained. We have developed a modified approach to the extraction of the real and imaginary parts of the refractive index (optical constants) of a thin film from a single transmission spectrum measured in the IR spectral range. Our algorithm is similar to those implemented by previous authors, with some major changes that yield results for strong absorptions where previous approaches fail: (1) an adaptive k-correction step size, (2) the use of a root-finding algorithm to obtain a more accurate k-correction at each iteration, and (3) a k-correction step that prevents non-physical results such as negative n-values that prevent convergence in the calculation algorithm. The algorithm is presented and described, with examples to show agreement with some existing results and improvements upon others. New optical-constants calculations for CH3OH, CO2, N2O, and CH4 are presented, and potential implications for the modeling of interstellar and planetary ice data from space telescopes are discussed. With the objective of being open-source and transparent, the full source code in the free Python programming language is made available along with the compiled version and the laboratory data used to produce the results shown.

Perry A. Gerakines↗

The InSAR Scientific Computing Environment 3.0: A Flexible Framework for NISAR Operational and User-Led Science Processing

The InSAR Scientific Computing Environment (ISCE) was first developed under the NASA Advanced Information Systems Technology as a flexible, extensible object-oriented framework for Interferometric Synthetic Aperture Radar (InSAR) processing. The ISCE framework uses Python 3 at the workflow level, controlling modules of compiled code for functional processing, and managing inputs, outputs, and other flow control services. The currently released version, called ISCE 2.1, is distributed to the research community through the Western North America InSAR Consortium under a research license. The ISCE team is working on the next generation of the code in order to prepare for the NASAISRO SAR (NISAR) mission operational processing. Innovations in this code include augmentation or conversion of the custom Python framework elements in ISCE with the Pyre framework, new workflows for interferometric and polarimetric stack processing, a more intuitive and graphically based user interface, and flow control for hybrid computing environments including CPU/GPU clusters, logging and error tracking facilities, and new more efficient computational modules that exploit graphical processor units (GPUs) when available. The ISCE 3.0 framework is designed to work in an operational environment as well as on a single user’s laptop or compute cluster, with services to discover capabilities and scale computations accordingly.

Buckley, Sean M.↗

Kamodo – An Adaptable Tool to Obtain and Compare Observations and Modeling Results

What is Kamodo? -Official NASA open-source project written in Python. -Building upon the functionalization of datasets. -It is a CCMC developed and maintained software tool for access, interpolation, and visualization of space weather models and data. -It allows model developers to represent simulation results as mathematical functions which may be manipulated directly by end users. -It handles unit conversion transparency and supports interactive science discovery through jupyter notebooks with minimal coding. -All Kamodo tools are accessible through Python, and all source code is publicly available on the Kamodo NASA GitHub repositories. -Kamodo does not generate model outputs. Users need to acquire the desired model outputs before they can be functionalized by Kamodo.

Kamodo↗

Julia Programming Language Benchmark Using a Flight Simulation

Julia is a relatively new computer language that aims to reduce the challenge for mathmodelers to develop fast computer tools and simulations. It potentially combines the ease-of-coding feature of scripting languages (like Python) with the performance of compiled languages (like C++). A key question for Julia application to the simulation domain is, “Can Julia, with its obvious coding simplicity, provide runtime speeds comparable to conventional compiled languages for flight simulation?” A unique combination of existing elements can be employed to address the previous question: Extensively documented object-oriented simulation architecture, Industry standard rocket flight simulation, Separate versions (C++, Java, and Python) already benchmarked.

Sells, Ray↗

State-Chart Autocoder

A computer program translates Unified Modeling Language (UML) representations of state charts into source code in the C, C++, and Python computing languages. ( State charts signifies graphical descriptions of states and state transitions of a spacecraft or other complex system.) The UML representations constituting the input to this program are generated by using a UML-compliant graphical design program to draw the state charts. The generated source code is consistent with the "quantum programming" approach, which is so named because it involves discrete states and state transitions that have features in common with states and state transitions in quantum mechanics. Quantum programming enables efficient implementation of state charts, suitable for real-time embedded flight software. In addition to source code, the autocoder program generates a graphical-user-interface (GUI) program that, in turn, generates a display of state transitions in response to events triggered by the user. The GUI program is wrapped around, and can be used to exercise the state-chart behavior of, the generated source code. Once the expected state-chart behavior is confirmed, the generated source code can be augmented with a software interface to the rest of the software with which the source code is required to interact.

Clark, Kenneth↗

A Practical Guide to Writing a Radiative Transfer Code

Using our decades-long experience in radiative transfer (RT) code development for Earth science, we endeavor to reduce the knowledge gap of bringing RT from theory to code quickly. Despite numerous classic and recent literature, it is still hard to develop anRT code from scratch within a few weeks. It is equally hard to understand, not to mention modify, an existing “monster” RT code, for which the developer is either located remotely or has retired. Following the format of “Numerical Recipes” by Press et al., we collocate in this paper small pieces of necessary theory with corresponding small pieces of RT code. These are arranged in an order that is natural for code development, which is often opposite of the natural order for laying out the theoretical basis. We focus on the transfer of unpolarized monochromatic solar radiation in a plane-parallel atmosphere over a reflecting surface. Both the surface and the atmosphere are homogeneous (uniform) at all directions. The multiple scattering is numerically solved using the deterministic method of Gauss-Seidel iterations. Except for the presented Python-Numba open-source RT code gsit, the paper does not report any new scientific results, but rather serves as an academic demonstration. If development time is an issue or the reader is familiar with basic concepts of RT theory, we recommend proceeding directly to Sec.3 “RT code development.

multiple light scattering↗

Infrared Free Space Communication - The Autonomous Testing of Free Space Infrared Communication

Fiber optics has been a winning player in the game of high-speed communication and data transfer in cable connections. Yet, in free space RF has been the repeated choice of communication medium of the space industry. Investigating the benefits of free space optical communication over radio frequency is worthwhile. An increase in science data rate return capabilities could occur if optical communication is implemented. Optical communication systems also provide efficiencies in power, mass, and volume over RF systems1. Optical communication systems have been demonstrated from a satellite in orbit with the moon to earth, and resulted in the highest data rates ever seen through space (622Mbps)2. Because of these benefits, optical communication is far superior to RF. The HiDRA (High Data Rate Architecture) project is researching Passive Misalignment Mitigation of Dynamic Free Apace Optical Communication Links. The goal of this effort is to enable gigabit per second transmission of data in short range dynamic links (less than 100 meters). In practice this would enhance data rates between sites on the International Space Station with minimal size, weight, and power requirements. This paper will focus on an autonomous code and a hardware setup that will be used to fulfill the next step in the research being conducted. The free space optical communications pointing downfalls will be investigated. This was achieved by creating 5 python programs and a top-level code to automate this test.

Heldman, Christopher↗

Automated ISS Flight Utilities

During my internship at NASA Johnson Space Center, I worked in the Space Radiation Analysis Group (SRAG), where I was tasked with a number of projects focused on the automation of tasks and activities related to the operation of the International Space Station (ISS). As I worked on a number of projects, I have written short sections below to give a description for each, followed by more general remarks on the internship experience. My first project is titled "General Exposure Representation EVADOSE", also known as "GEnEVADOSE". This project involved the design and development of a C++/ ROOT framework focused on radiation exposure for extravehicular activity (EVA) planning for the ISS. The utility helps mission managers plan EVAs by displaying information on the cumulative radiation doses that crew will receive during an EVA as a function of the egress time and duration of the activity. SRAG uses a utility called EVADOSE, employing a model of the space radiation environment in low Earth orbit to predict these doses, as while outside the ISS the astronauts will have less shielding from charged particles such as electrons and protons. However, EVADOSE output is cumbersome to work with, and prior to GEnEVADOSE, querying data and producing graphs of ISS trajectories and cumulative doses versus egress time required manual work in Microsoft Excel. GEnEVADOSE automates all this work, reading in EVADOSE output file(s) along with a plaintext file input by the user providing input parameters. GEnEVADOSE will output a text file containing all the necessary dosimetry for each proposed EVA egress time, for each specified EVADOSE file. It also plots cumulative dose versus egress time and the ISS trajectory, and displays all of this information in an auto-generated presentation made in LaTeX. New features have also been added, such as best-case scenarios (egress times corresponding to the least dose), interpolated curves for trajectories, and the ability to query any time in the EVADES output. As mentioned above, GEnEVADOSE makes extensive use of ROOT version 6, the data analysis framework developed at the European Organization for Nuclear Research (CERN), and the code is written to the C++11 standard (as are the other projects). My second project is the Automated Mission Reference Exposure Utility (AMREU).Unlike GEnEVADOSE, AMREU is a combination of three frameworks written in both Python and C++, also making use of ROOT (and PyROOT). Run as a combination of daily and weekly cron jobs, these macros query the SRAG database system to determine the active ISS missions, and query minute-by-minute radiation dose information from ISS-TEPC (Tissue Equivalent Proportional Counter), one of the radiation detectors onboard the ISS. Using this information, AMREU creates a corrected data set of daily radiation doses, addressing situations where TEPC may be offline or locked up by correcting doses for days with less than 95% live time (the total amount time the instrument acquires data) by averaging the past 7 days. As not all errors may be automatically detectable, AMREU also allows for manual corrections, checking an updated plaintext file each time it runs. With the corrected data, AMREU generates cumulative dose plots for each mission, and uses a Python script to generate a flight note file (.docx format) containing these plots, as well as information sections to be filled in and modified by the space weather environment officers with information specific to the week. AMREU is set up to run without requiring any user input, and it automatically archives old flight notes and information files for missions that are no longer active. My other projects involve cleaning up a large data set from the Charged Particle Directional Spectrometer (CPDS), joining together many different data sets in order to clean up information in SRAG SQL databases, and developing other automated utilities for displaying information on active solar regions, that may be used by the space weather environment officers to monitor solar activity. I consulted my mentor Dr. Ryan Rios and Dr. Kerry Lee for project requirements and added features, and ROOT developer Edmond Offermann for advice on using the ROOT library. I also received advice and feedback from Dr. Janet Barzilla of SRAG, who tested my code. Besides these inputs, I worked independently, writing all of the code by myself. The code for all these projects is documented throughout, and I have attempted to write it in a modular format. Assuming that ROOT is updated accordingly, these codes are also Y2038-compliant (and Y10K-compliant). This allows the code to be easily referenced, modified and possibly repurposed for non-ISS missions in the future, should the necessary inputs exist. These projects have taught me a lot about coding and software design - I have become a much more skilled C++ programmer and ROOT user, and I also learned to code in Python and PyROOT (and its advantages and disadvantages compared to C++/ ROOT). Furthermore, I have learned about space radiation and radiation modeling, topics that greatly interest me as I pursue a degree in physics. Working alongside experimental physicists like Dr. Rios, I have developed a greater understanding and appreciation for experimental science, something I have always leaned towards but to which I lacked significant exposure. My work in SRAG has also given me the invaluable opportunity to witness the work environment for physicists at NASA, and what a career in academia may look like at a government laboratory such as NASA Johnson Space Center. As I continue my studies and look forward to graduate school and a future career, this experience at NASA has given me a meaningful and enjoyable opportunity to put my skills to use and see what my future career path might hold.

Offermann, Jan Tuzlic↗