Search NASA⌕ Search

SEARCH · Search NASA

Results for “python code”

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 163 records · Page 9

Machine Learning-Enabled Quantitative Analysis of Optically Obscure Scratches on Nickel-Plated Additively Manufactured (AM) Samples

Additively manufactured metal components often have rough and uneven surfaces, necessitating post-processing and surface polishing. Hardness is a critical characteristic that affects overall component properties, including wear. This study employed K-means unsupervised machine learning to explore the relationship between the relative surface hardness and scratch width of electroless nickel plating on additively manufactured composite components. The Taguchi design of experiment (TDOE) L9 orthogonal array facilitated experimentation with various factors and levels. Initially, a digital light microscope was used for 3D surface mapping and scratch width quantification. However, the microscope struggled with the reflections from the shiny Ni-plating and scatter from small scratches. To overcome this, a scanning electron microscope (SEM) generated grayscale images and 3D height maps of the scratched Ni-plating, thus enabling the precise characterization of scratch widths. Optical identification of the scratch regions and quantification were accomplished using Python code with a K-means machine-learning clustering algorithm. The TDOE yielded distinct Ni-plating hardness levels for the nine samples, while an increased scratch force showed a non-linear impact on scratch widths. The enhanced surface quality resulting from Ni coatings will have significant implications in various industrial applications, and it will play a pivotal role in future metal and alloy surface engineering.

36 MATERIALS SCIENCE↗

A Fortran–Python interface for integrating machine learning parameterization into earth system models

Abstract. Parameterizations in earth system models (ESMs) are subject to biases and uncertainties arising from subjective empirical assumptions and incomplete understanding of the underlying physical processes. Recently, the growing representational capability of machine learning (ML) in solving complex problems has spawned immense interests in climate science applications. Specifically, ML-based parameterizations have been developed to represent convection, radiation, and microphysics processes in ESMs by learning from observations or high-resolution simulations, which have the potential to improve the accuracies and alleviate the uncertainties. Previous works have developed some surrogate models for these processes using ML. These surrogate models need to be coupled with the dynamical core of ESMs to investigate the effectiveness and their performance in a coupled system. In this study, we present a novel Fortran–Python interface designed to seamlessly integrate ML parameterizations into ESMs. This interface showcases high versatility by supporting popular ML frameworks like PyTorch, TensorFlow, and scikit-learn. We demonstrate the interface's modularity and reusability through two cases: an ML trigger function for convection parameterization and an ML wildfire model. We conduct a comprehensive evaluation of memory usage and computational overhead resulting from the integration of Python codes into the Fortran ESMs. By leveraging this flexible interface, ML parameterizations can be effectively developed, tested, and integrated into ESMs.

54 ENVIRONMENTAL SCIENCES↗

A Fortran-Python Interface for Integrating Machine Learning Parameterization into Earth System Models

Parameterizations in Earth System Models (ESMs) are subject to biases and uncertainties arising from subjective empirical assumptions and incomplete understanding of the underlying physical processes. Recently, the growing representational capability of machine learning (ML) in solving complex problems has spawned immense interests in climate science applications. Specifically, ML-based parameterizations have been developed to represent convection, radiation and microphysics processes in ESMs by learning from observations or high-resolution simulations, which have the potential to improve the accuracies and alleviate the uncertainties. Previous works have developed some surrogate models for these processes using ML. These surrogate models need to be coupled with the dynamical core of ESMs to investigate the effectiveness and their performance in a coupled system. In this study, we present a novel Fortran-Python interface designed to seamlessly integrate ML parameterizations into ESMs. This interface showcases high versatility by supporting popular ML frameworks like PyTorch, TensorFlow, and Scikit-learn. We demonstrate the interface's modularity and reusability through two cases: a ML trigger function for convection parameterization and a ML wildfire model. We conduct a comprehensive evaluation of memory usage and computational overhead resulting from the integration of Python codes into the Fortran ESMs. By leveraging this flexible interface, ML parameterizations can be effectively developed, tested, and integrated into ESMs.

54 ENVIRONMENTAL SCIENCES↗

Quantitative Uncertainty Analysis for Diffraction

Current software uses a least squares statistical method. For each model parameter, current software yields a point estimate and estimated standard error for each point estimate. In contrast, we have employed a Bayesian approach with sampling algorithm to provide a full posterior probability density function on each model parameter. This yields a different type of solution (probabilistic) with better fidelity. The Quantitative Uncertainty Analysis for Diffraction (QUAD) package returns a matrix of affect model parameters as a function of iteration through the MCMC analysis. QUAD is a Python code that allows for analysis of X-ray and neutron diffraction data to infer the structure of materials with quantifiable certainty. The code uses Bayesian statistics and Markov chain sampling algorithms to create posterior probability distributions on all material structure parameters that are modeled by a researcher. The statistical packages use the open source GSASII project as a library to calculate model diffraction patterns.

Fancher, ChristopherM↗

Datasets for "Excessive rainfall leads to maize yield loss of a comparable magnitude to extreme drought in the United States"

Updated on 2021/07/01 Add python codes for data processing of the NASS yield data, PRISM climate data, RMA insurance data, agmip yield simulation data, and related geospatial analysis-------------------This repository is for the datasets and codes for “Excessive rainfall leads to maize yield loss of a comparable magnitude to extreme drought in the United States” (Li et al. 2019 GCB). The datasets include maize yield, climate data, maize yield loss from crop insurance data in the US, etc. The datasets can reproduce the results of the paper and they can also be reused to explore other topics. Please cite Li et al (2019) or acknowledge this dataset (DOI: 10.6084/m9.figshare.7581473) when using it.

Agricultural spatial analysis and modelling↗

The Profile Envision and Splice Tool (PRESTO): Developing an Atmospheric Wind Analysis Tool for Space Launch Vehicles Using Python

Tropospheric winds are an important driver of the design and operation of space launch vehicles. Multiple types of weather balloons and Doppler Radar Wind Profiler (DRWP) systems exist at NASA's Kennedy Space Center (KSC), co-located on the United States Air Force's (USAF) Eastern Range (ER) at the Cape Canaveral Air Force Station (CCAFS), that are capable of measuring atmospheric winds. Meteorological data gathered by these instruments are being used in the design of NASA's Space Launch System (SLS) and other space launch vehicles, and will be used during the day-of-launch (DOL) of SLS to aid in loads and trajectory analyses. For the purpose of SLS day-of-launch needs, the balloons have the altitude coverage needed, but take over an hour to reach the maximum altitude and can drift far from the vehicle's path. The DRWPs have the spatial and temporal resolutions needed, but do not provide complete altitude coverage. Therefore, the Natural Environments Branch (EV44) at Marshall Space Flight Center (MSFC) developed the Profile Envision and Splice Tool (PRESTO) to combine balloon profiles and profiles from multiple DRWPs, filter the spliced profile to a common wavelength, and allow the operator to generate output files as well as to visualize the inputs and the spliced profile for SLS DOL operations. PRESTO was developed in Python taking advantage of NumPy and SciPy for the splicing procedure, matplotlib for the visualization, and Tkinter for the execution of the graphical user interface (GUI). This paper describes in detail the Python coding implementation for the splicing, filtering, and visualization methodology used in PRESTO.

Orcutt, John M.↗

CHIANTI-An Atomic Database for Emission Lines. XV. Version 9, Improvements for the X-Ray Satellite Lines

CHIANTI contains a large quantity of atomic data for the analysis of astrophysical spectra. Programs are available in IDL and Python to perform calculation of the expected emergent spectrum from these sources. The database includes atomic energy levels, wavelengths, radiative transition probabilities, rate coefficients for collisional excitation, ionization, and recombination, as well as data to calculate free–free, free–bound, and two-photon continuum emission. In Version 9, we improve the modeling of the satellite lines at X-ray wavelengths by explicitly including autoionization and dielectronic recombination processes in the calculation of level populations for select members of the lithium isoelectronic sequence and Fe XVIII–XXIII. In addition, existing data sets are updated, new ions are added, and new total recombination rates for several Fe ions are included. All data and IDL programs are freely available at http://www.chiantidatabase.org or through SolarSoft, and the Python code ChiantiPy is also freely available at https://github.com/chianti-atomic/ChiantiPy.

X-rays (general)↗

Cross-Cutting Computational Modeling Project: Exploration Medical Station Analysis

Astronauts will be away from Earth-based medical care for long periods during future exploration missions. Thus, it will be necessary for the astronauts to perform various medical tasks to monitor and maintain their health in the microgravity environment of space. Performance of these tasks will be constrained due to the limited volume available to perform the task, the absence of gravity and the limited resources and capabilities available in the medical work area. It is therefore necessary to evaluate exploration medical workstation designs for how well the designs will support crew performance of medical tasks. This evaluation featured two trained medical caregivers (99th percentile male, 26th percentile female) performing emergent care procedures (alone and in tandem) on a medical manikin. The procedures came from the The procedures came from the International Space Station Medical Checklist, and they are designed for spaceflight. The objectives of the evaluation included determining the operational volume required to perform the tasks, examining the effect of constraining the operational volume with partitions, determining candidate locations for foot restraints and equipment placements and determining the effect of single vs. dual caregiver on the operational volume.A marker-based motion capture system collected the motion data, which enabled computation of operational volumes and foot placement maps using custom Python code. Additional data collected included heart rate, time to perform the procedures, and feedback from the caregivers in the form of the NASA Task Load Index (TLX), the US Government System Usability Survey, and an open-ended questionnaire.

Christopher A Gallo↗

Monte Carlo simulations of neutrino and charged lepton propagation in the Earth with nuPyProp

An accurate modeling of neutrino flux attenuation and the distribution of leptons they produce in transit through the Earth is an essential component to determine neutrino flux sensitivities of underground, sub-orbital and space-based detectors. Through neutrino oscillations over cosmic distances, astrophysical neutrino sources are expected to produce nearly equal fluxes of electron, muon and tau neutrinos. Of particular interest are tau neutrinos that interact in the Earth at modest slant depths to produce leptons. Some leptons emerge from the Earth and decay in the atmosphere to produce extensive air showers. Future balloon-borne and satellite-based opticalCherenkov neutrino telescopes will be sensitive to upward air showers from tau neutrino induced lepton decays. We present nuPyProp, a python code that is part of the nuSpaceSim package. nuPyProp generates look-up tables for exit probabilities and energy distributions for (see paper for proper equation) propagation in the Earth. This flexible code runs with either stochastic or continuous electromagnetic energy losses for the lepton transit through the Earth. Current neutrino cross section models and energy loss models are included along with templates for user input of other models. Results from nuPyProp are compared with other recent simulation packages for neutrino and charged lepton propagation. Sources of modeling uncertainties are described and quantified.

Yosui Akaike↗

MLtool: Universal Supervised Machine Learning Tool to Model Tabulated Data

Machine Learning (ML) is a subfield of Artificial Intelligence that gives computers the ability to learn from past data without being explicitly programmed. The predictive capabilities of ML models have already been used to facilitate several scientific breakthroughs. However, the practical application of ML is often limited due to the gaps in technical knowledge of its users. The common issue faced by many scientific researchers is the inability to choose the appropriate ML pipelines that are needed to treat real-world data, which is often sparse and noisy. To solve this problem, we have developed an automated Machine Learning tool (MLtool) that includes a set of ML algorithms and approaches to aid scientific researchers. The current version of MLtool is implemented as an object-oriented Python code that is easily extensible. It includes 44 different regression algorithms used to model data. MLtool helps users select the best model for their data, based on the scoring metrics used. Besides regression algorithms, MLtool also includes a suite of pre- and post-processing techniques such as missing value imputation, categorical variable encoding, input feature normalization, uncertainty quantification, exploratory data analysis (EDA), etc. MLtool was tested on several publicly available multi-dimensional data sets and was found capable of making accurate predictions.

Machine learning↗

MLtool++ package for machine learning and its applications to materials data

We are developing Mltool++ package of software programs for machine learning (ML). Given the MLtool Python code, we create a faster C++ code with the potential for parallelization. We have extracted materials data from the literature. One dataset contains melting temperatures of stoichiometric 1:1 metallic compounds XZ, composed by elements X={Al, Ti, V, Cr, Zr, Nb, Mo, Hf, Ta, W} and Z={Co, Ni, Cu, Rh, Pd, Ag, Ir, Pt, Au}, and another contains solid-solid symmetry-breaking phase transition temperatures. We studied dependences of temperatures on composition, found several correlations, and parametrized them by analytical functions. Mltool++ package is generic and applicable to any tabulated numeric data.

Pierce M. Pettit↗

Open Source Application of Fusing Aerosol Products from GEO and LEO Satellites

Retrieving aerosol optical depths (AODs) from sun-synchronous polar orbiting (aka low earth orbit, LEO) satellites, such as MODISs, and VIIRSs, OMI, TROPOMI, etc, has become well-established as a tool for extracting information on particulate matter (PM) and related processes in the atmosphere. However, with recently launched geostationary satellites (GEO), such as GOES-16/17/18, and Himawari-8/9, and Meteosat Third Generation (MTG) they provide a much higher temporal resolution (order of 10 minutes), typically an image once or more per hour during daylight compared to LEO once per day. By combining these observations, we may be able to characterize the diurnal cycle of global AOD at the local, regional and global scale. While the science community is still exploring the new data from GEO observations, we have been thinking about how to properly combine/merge/fuse those data considering differences in their spatial and temporal resolutions. However, this poses a “Big Data” challenge. The big data challenge is not just about data storage, but also about data discoverability, and accessibility, and even more, about data migration/mirroring in the cloud-computing environment. This paper is merely showing some of the efforts and approaches we have attempted in fusing six satellites’ Level 2 aerosol data (three are from GEO (GOES-16/17 and Himawari-8), and the other three are from LEO (TERRA/MODIS, AQUA/MODIS, SNPP-VIIRS) from Dark Target (DT) aerosol retrieval algorithm. Having the on-demand capability of fusing remote sensing products onto the desired temporal and spatial domain enables researchers and application practitioners to better manipulate and work with satellite and sensor data. It is our hopeWe hope that by making such an open-source package, and the accompanying functionality, the scientific community will be granted easier access to aerosol data processing resources. The MEaSUREs Program (Making Earth System Data Records for Use in Research Environments) expands our understanding of the Earth's current system through atmospheric and surface measurements. In an effort to aid the scientific research component and improve open source methods, this project developed Python code for fusing six satellite Level 2 aerosol data (three are from geostationary satellites (GEO), and the other three are from low earth orbital satellites (LEO)) from Dark Target Aerosol Retrieval Algorithm.

Jennifer Wei↗

Monte Carlo Tree Search for Integrated Planning, Learning, and Execution in Nondeterministic Python

We present a novel use of Monte Carlo Tree Search (MCTS),adapted to explore a search space produced by the choice points embedded in Python code. The choice points are non-deterministic assignment statements and subroutine calls. We present MCTS extensions required for doing tree search in this context which includes control constructs like hierarchical decomposition (subroutine calls), iterative while loops and conditional statements. We demonstrate how the system works in a simulated rideshare scenario in an urban setting, and present preliminary experiments as a proof of concept.

Automatic planning↗

Expansion of Check-Cases for 6DOF Simulation

This is the Appendix containing a description of the solution for Case 1 in the assessment, “Expansion of Check-Cases for 6DOF Simulation”. For cases of spherical gravity, it is possible to provide a two-body solution without recourse to numerical integration and thus it is accurate to machine precision. Python code for a Keplerian Propagator (propagate.py) which produced a reference trajectory for Case 1 is provided in this appendix. There is also code for generating test cases which was used as an independent verification of the propagator. This is a high-level description of the algorithm employed. The documentation of each function includes implementation details, including equations for each task.

Modeling↗

Combining Multiple Pairwise Structure-based Alignments

CombAlign is a new Python code that generates a gapped, one-to-many, multiple structure-based sequence alignment(MSSA) given a set of pairwise structure-based alignments. In order to better define regions of similarity among related protein structures, it is useful to detect the residue-residue correspondences among a set of pairwise structure alignments. Few codes exist for constructing a one-to-many, multiple sequence alignment derived from a set of structure alignments, and we perceived a need for creating a new tool for combing pairwise structure alignments that would allow for insertion of gaps in the reference structure.

Source record↗

Compare Gene Calls

Compare Gene Calls (CGC) is a Python code used for combining and comparing gene calls from any number of gene callers. A gene caller is a computer program that predicts the extends of open reading frames within genomes of biological organisms.

Ecale Zhou, Carol L.↗

Deep learning for lipid droplet recognition in quantitative phase images

This library of Python code is used for performing semantic segmentation of images using 6 different machine learning methods. Five of the methods are implemented entirely within the scikit-learn framework. The Convolutional Neural Network (CNN) method requires Keras with a TensorFlow backend and generally uses a different set of scripts in order to perform the complete training and evaluation.

Sheneman, Lucas↗