Search NASA⌕ Search

SEARCH · Search NASA

Results for “Python”

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 361 records · Page 20

SHADOW4: the popular ray tracing revived for evolving synchrotron sources in fourth-generation storage rings

We present SHADOW4, a new version of the popular ray tracing code. The SHADOW kernel has been completely rewritten in Python applying modern concepts of software engineering. A new user interface is available in the OASYS ecosystem. The new tool has been designed and implemented preparing the future needs both in computing (cloud computing, AI integration) and in the transit to fourth generation sources and beyond.

Sanchez del Rio, Manuel↗

Tools for unbinned unfolding

Machine learning has enabled differential cross section measurements that are not discretized. Going beyond the traditional histogram-based paradigm, these unbinned unfolding methods are rapidly being integrated into experimental workflows. Here, in order to enable widespread adaptation and standardization, we develop methods, benchmarks, and software for unbinned unfolding. For methodology, we demonstrate the utility of boosted decision trees for unfolding with a relatively small number of high-level features. This complements state-of-the-art deep learning models capable of unfolding the full phase space. To benchmark unbinned unfolding methods, we develop an extension of existing dataset to include acceptance effects, a necessary challenge for real measurements. Additionally, we directly compare binned and unbinned methods using discretized inputs for the latter in order to control for the binning itself. Lastly, we have assembled two software packages for the OmniFold unbinned unfolding method that should serve as the starting point for any future analyses using this technique. One package is based on the widely-used RooUnfold framework and the other is a standalone package available through the Python Package Index (PyPI).

47 OTHER INSTRUMENTATION↗

Neural posterior unfolding

Differential cross section measurements are the currency of scientific exchange in particle and nuclear physics. A key challenge for these analyses is the correction for detector distortions, known as deconvolution or unfolding. Binned unfolding of cross section measurements traditionally rely on the regularized inversion of the response matrix that represents the detector response, mapping pre-detector (`particle level') observables to post-detector (`detector level') observables. In this paper we introduce Neural Posterior Unfolding, a modern, Bayesian approach that leverages normalizing flows for unfolding. By using normalizing flows for neural posterior estimation, NPU offers several key advantages including implicit regularization through the neural network architecture, fast amortized inference that eliminates the need for repeated retraining, and direct access to the full uncertainty in the unfolded result. In addition to introducing NPU, we implement a classical Bayesian unfolding method called Fully Bayesian Unfolding (FBU) in modern Python so it can also be studied. These tools are validated on simple Gaussian examples and then tested on simulated jet substructure examples from the Large Hadron Collider (LHC). We find that the Bayesian methods are effective and worth additional development to be analysis ready for cross section measurements at the LHC and beyond.

Analysis and statistical methods↗

Heat load measurements for the PIP-II pHB650 cryomodule

Phase-3 testing of the pHB650 cryomodule at the PIP-II Injector Test Facility was conducted to evaluate the effectiveness of heat load mitigations performed after earlier phases of testing and to continue pinpointing any sources of unexpectedly high heat loads.. The programme measured HTTS, LTTS, and 2 K isothermal/non-isothermal loads under "standard", "linac", and "simulated dynamic" operating modes, recording data both inside the cryomodule and across the bayonet can circuits. Thermal-acoustic oscillations were eliminated by replacing the original G10 cooldown-valve stem with a stainless-steel stem fitted with wipers. A newly developed Python script automated acquisition of ACNET data, performed real-time heat-load calculations, and generated plots and tables that were posted to the electronic logbook within minutes, vastly reducing manual effort and accelerating feedback between SRF and cryogenics teams. Analysis showed that JT heat-exchanger effectiveness and temperature stratification in the two-phase and relief piping strongly influence the observed loads and helped isolate sources of excess heat. The campaign demonstrates that rigorous pre-test planning, real-time diagnostics, and automated reporting can improve both accuracy and efficiency, providing a template for future PIP-II cryomodule tests and for implementing targeted heat-load mitigations.

Porwisiak, D. [Fermilab; Wroclaw Tech. U.] (ORCID:↗

Computation of the expectation value of the spin operator S^ 2 for the spin-flip Bethe–Salpeter equation

Spin-flip (SF) methods applied to excited-state approaches like the Bethe–Salpeter equation allow access to the excitation energies of open-shell systems, such as molecules and defects in solids. The eigenstates of these solutions, however, are generally not eigenstates of the spin operator S^ 2 . Even for simple cases where the excitation vector is expected to be, for example, a triplet state, the value of S^ 2 may be found to differ from 2.00; this difference is called 'spin contamination'. The expectation values S^ 2 must be computed for each excitation vector, to assist with the characterization of the particular excitation and to determine the amount of spin contamination of the state. Here, our aim is to provide for the first time in the SF methods literature a comprehensive resource on the derivation of the formulas for S^ 2 as well as its computational implementation. After a brief discussion of the theory of the SF Bethe–Salpeter equation (BSE) and some examples further illustrating the need for calculating S^ 2 , we present the derivation for the general equation for computing S^ 2 with the eigenvectors from an SF-BSE calculation, how it is implemented in a Python script, and timing information on how this calculation scales with the size of the SF-BSE Hamiltonian.

75 CONDENSED MATTER PHYSICS, SUPERCONDUCTIVITY AND↗

Machine learning materials properties with accurate predictions, uncertainty estimates, domain guidance, and persistent online accessibility

One compelling vision of the future of materials discovery and design involves the use of machine learning (ML) models to predict materials properties and then rapidly find materials tailored for specific applications. However, realizing this vision requires both providing detailed uncertainty quantification (model prediction errors and domain of applicability) and making models readily usable. At present, it is common practice in the community to assess ML model performance only in terms of prediction accuracy (e.g. mean absolute error), while neglecting detailed uncertainty quantification and robust model accessibility and usability. Here, we demonstrate a practical method for realizing both uncertainty and accessibility features with a large set of models. We develop random forest ML models for 33 materials properties spanning an array of data sources (computational and experimental) and property types (electrical, mechanical, thermodynamic, etc). All models have calibrated ensemble error bars to quantify prediction uncertainty and domain of applicability guidance enabled by kernel-density-estimate-based feature distance measures. All data and models are publicly hosted on the Garden-AI infrastructure, which provides an easy-to-use, persistent interface for model dissemination that permits models to be invoked with only a few lines of Python code. We demonstrate the power of this approach by using our models to conduct a fully ML-based materials discovery exercise to search for new stable, highly active perovskite oxide catalyst materials.

domain of applicability↗

Hypermut 3: identifying specific mutational patterns in a defined nucleotide context that allows multistate characters

Abstract Motivation The detection of APOBEC3F- and APOBEC3G-induced mutations in virus sequences is useful for identifying hypermutated sequences. These sequences are not representative of viral evolution and can therefore alter the results of downstream sequence analyses if included. We previously published the software Hypermut, which detects hypermutation events in sequences relative to a reference. Two versions of this method are available as a webtool. Neither of these methods consider multistate characters or gaps in the sequence alignment. Results Here, we present an updated, user-friendly web and command-line version of Hypermut with functionality to handle multistate characters and gaps in the sequence alignment. This tool allows for straightforward integration of hypermutation detection into sequence analysis pipelines. As with the previous tool, while the main purpose is to identify G to A hypermutation events, any mutational pattern and context can be specified. Availability and implementation Hypermut 3 is written in Python 3. It is available as a command-line tool at https://github.com/MolEvolEpid/hypermut3 and as a webtool at https://www.hiv.lanl.gov/content/sequence/HYPERMUT/hypermutv3.html.

59 BASIC BIOLOGICAL SCIENCES↗

Poplar: a phylogenomics pipeline

Motivation Generating phylogenomic trees from the genomic data is essential in understanding biological systems. Each step of this complex process has received extensive attention and has been significantly streamlined over the years. Given the public availability of data, obtaining genomes for a wide selection of species is straightforward. However, analyzing that data to generate a phylogenomic tree is a multistep process with legitimate scientific and technical challenges, often requiring a significant input from a domain-area scientist. Results We present Poplar, a new, streamlined computational pipeline, to address the computational logistical issues that arise when constructing the phylogenomic trees. It provides a framework that runs state-of-the-art software for essential steps in the phylogenomic pipeline, beginning from a genome with or without an annotation, and resulting in a species tree. Running Poplar requires no external databases. In the execution, it enables parallelism for execution for clusters and cloud computing. The trees generated by Poplar match closely with state-of-the-art published trees. The usage and performance of Poplar is far simpler and quicker than manually running a phylogenomic pipeline. Availability and implementation Freely available on GitHub at https://github.com/sandialabs/poplar. Implemented using Python and supported on Linux.

Koning, Elizabeth [Sandia National Laboratories (S↗

GenomeDepot: data management system for microbial comparative genomics

Summary GenomeDepot is an open-source web-based platform for annotation, management, and comparative analysis of microbial genomic sequences and associated data including ortholog families, protein domains, operons, regulatory interactions, strain taxonomy, and sample metadata. GenomeDepot supports rapid creation of websites for user-defined genome collections that include bioinformatic tools for interactive genome browsing, Basic Local Alignment Search Tool (BLAST) search, annotation search, comparative genomic neighborhood visualization, and sequence download. Gene function annotations are generated by a customizable annotation pipeline. The pipeline runs annotation tools in Conda environments and can be easily extended with additional user-specified tools. Availability and implementation GenomeDepot is open source and distributed under the GNU General Public License via GitHub (https://github.com/aekazakov/genome-depot). GenomeDepot is implemented in Python and was tested in Ubuntu Linux. Full installation instructions and documentation are available at https://aekazakov.github.io/genome-depot/. GenomeDepot demo server is freely accessible at https://iseq.lbl.gov/demogd/.

Kazakov, Alexey [Lawrence Berkeley National Labora↗

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

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

60 APPLIED LIFE SCIENCES↗

CoverM: read alignment statistics for metagenomics

SUMMARY: Genome-centric analysis of metagenomic samples is a powerful method for understanding the function of microbial communities. Calculating read coverage is a central part of analysis, enabling differential coverage binning for recovery of genomes and estimation of microbial community composition. Coverage is determined by processing read alignments to reference sequences of either contigs or genomes. Per-reference coverage is typically calculated in an ad-hoc manner, with each software package providing its own implementation and specific definition of coverage. Here we present a unified software package CoverM which calculates several coverage statistics for contigs and genomes in an ergonomic and flexible manner. It uses "Mosdepth arrays" for computational efficiency and avoids unnecessary I/O overhead by calculating coverage statistics from streamed read alignment results. AVAILABILITY AND IMPLEMENTATION: CoverM is free software available at https://github.com/wwood/coverm. CoverM is implemented in Rust, with Python (https://github.com/apcamargo/pycoverm) and Julia (https://github.com/JuliaBinaryWrappers/CoverM_jll.jl) interfaces.

Aroney, Samuel T N↗

CANA v1.0.0: efficient quantification of canalization in automata networks

The biomolecular networks underpinning cell function exhibit canalization, or the buffering of fluctuations required to function in a noisy environment. We present a new major release of $\tt{CANA}$, v1.0.0, an open-source Python package for understanding canalization in automata network models, discrete dynamical systems in which activation of biomolecular entities (e.g. transcription of genes) is modeled as the activity of coupled automata. One understudied putative mechanism for canalization is the functional equivalence of biomolecular regulators (e.g. among the transcription factors for a gene). We study this mechanism using the theory of symmetry in discrete functions. We present a new exact method, $\tt{schematodes}$, for finding maximal symmetry groups among the inputs to discrete functions, and integrate it into $\tt{CANA}$. The $\tt{schematodes}$ method substantially outperforms the inexact method of previous $\tt{CANA}$ versions both in speed and accuracy. We apply $\tt{CANA}$ v1.0.0 to study symmetry in 74 experimentally supported automata network models from the Cell Collective (CC) repository. The symmetry distribution is significantly different in the CC than in random automata with the same in-degree (connectivity) and bias (average output) (Kolmogorov–Smirnov test, P ≪ .001). Its spread is much wider than in a null model (IQR 0.31 versus IQR 0.20 with equal medians), demonstrating that the CC is enriched in functions with extreme symmetry or asymmetry.

Boolean networks↗

FluxRETAP: a REaction TArget Prioritization genome-scale modeling technique for selecting genetic targets

MOTIVATION: Metabolic engineering is rapidly evolving as a result of new advances in synthetic biology tools and automation platforms that enable high throughput strain construction, as well as the development of machine learning tools (ML) for biology. However, selecting genetic engineering targets that effectively guide the metabolic engineering process is still challenging. ML can provide predictive power for synthetic biology, but current technical limitations prevent the independent use of ML approaches without previous biological knowledge. RESULTS: Here, we present FluxRETAP, a simple and computationally inexpensive method that leverages the prior mechanistic knowledge embedded in genome-scale models for suggesting targets for genetic overexpression, downregulation or deletion, with the final goal of increasing the production of a desired metabolite. This method can provide a list of desirable engineering targets that can be combined with current ML pipelines. FluxRETAP captured 100% of reaction targets experimentally verified to improve Escherichia coli isoprenol production, 50% of targets that experimentally improved taxadiene production in E. coli and ∼60% of genetic targets from a verified minimal constrained cut-set in Pseudomonas putida, while providing additional high priority targets that could be tested. Overall, FluxRETAP is an efficient algorithm for identifying a prioritized list of testable genetic and reaction targets. AVAILABILITY AND IMPLEMENTATION: FluxRETAP is implemented in python and released under the creative commons license. The implementation and code are freely available at: https://github.com/JBEI/FluxRETAP.

Czajka, Jeffrey J↗

Accessible, uniform protein property prediction with a scikit-learn based toolset AIDE

Summary Protein property prediction via machine learning with and without labeled data is becoming increasingly powerful, yet methods are disparate and capabilities vary widely over applications. The software presented here, “Artificial Intelligence Driven protein Estimation (AIDE)”, enables instantiating, optimizing, and testing many zero-shot and supervised property prediction methods for variants and variable length homologs in a single, reproducible notebook or script by defining a modular, standardized application programming interface (API), i.e. drop-in compatible with scikit-learn transformers and pipelines. Availability and implementation AIDE is an installable, importable python package inheriting from scikit-learn classes and API and is installable on Windows, Mac, and Linux. Many of the wrapped models internal to AIDE will be effectively inaccessible without a GPU, and some assume CUDA. The newest stable, tested version can be found at https://github.com/beckham-lab/aide_predict and a full user guide and API reference can be found at https://beckham-lab.github.io/aide_predict/. Static versions of both at the time of writing can be found on Zenodo.

36 MATERIALS SCIENCE↗

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↗

Emission line predictions for mock galaxy catalogues: a new differentiable and empirical mapping from DESI

ABSTRACT We present a simple, differentiable method for predicting emission line strengths from rest-frame optical continua using an empirically determined mapping. Extensive work has been done to develop mock galaxy catalogues that include robust predictions for galaxy photometry, but reliably predicting the strengths of emission lines has remained challenging. Our new mapping is a simple neural network implemented using the JAX Python automatic differentiation library. It is trained on Dark Energy Spectroscopic Instrument Early Release data to predict the equivalent widths (EWs) of the eight brightest optical emission lines (including H α, H β, [O ii], and [O iii]) from a galaxy’s rest-frame optical continuum. The predicted EW distributions are consistent with the observed ones when noise is accounted for, and we find Spearman’s rank correlation coefficient ρs > 0.87 between predictions and observations for most lines. Using a non-linear dimensionality reduction technique, we show that this is true for galaxies across the full range of observed spectral energy distributions. In addition, we find that adding measurement uncertainties to the predicted line strengths is essential for reproducing the distribution of observed line-ratios in the BPT diagram. Our trained network can easily be incorporated into a differentiable stellar population synthesis pipeline without hindering differentiability or scalability with GPUs. A synthetic catalogue generated with such a pipeline can be used to characterize and account for biases in the spectroscopic training sets used for training and calibration of photo-z’s, improving the modelling of systematic incompleteness for the Rubin Observatory LSST and other surveys.

79 ASTRONOMY AND ASTROPHYSICS↗

guppy i : a code for reducing the storage requirements of cosmological simulations

ABSTRACT As cosmological simulations have grown in size, the permanent storage requirements of their particle data have also grown. Even modest simulations present a major logistical challenge for the groups which run these boxes and researchers without access to high performance computing facilities often need to restrict their analysis to lower quality data. In this paper, we present guppy, a compression algorithm and code base tailored to reduce the sizes of dark matter-only cosmological simulations by approximately an order of magnitude. guppy is a ‘lossy’ algorithm, meaning that it injects a small amount of controlled and uncorrelated noise into particle properties. We perform extensive tests on the impact that this noise has on the internal structure of dark matter haloes, and identify conservative accuracy limits which ensure that compression has no practical impact on single-snapshot halo properties, profiles, and abundances. We also release functional prototype libraries in C, Python, and Go for reading and creating guppy data.

79 ASTRONOMY AND ASTROPHYSICS↗

FORECASTOR – II. Simulating galaxy surveys with the Cosmological Advanced Survey Telescope for Optical and UV Research

The Cosmological Advanced Survey Telescope for Optical and UV Research (CASTOR) is a planned flagship space telescope, covering the blue-optical and UV part of the spectrum. Here, we introduce the CASTOR image simulator, a python GalSim package-based script capable of generating mock CASTOR images from an input catalogue. We generate example images from the CASTOR Wide, Deep, and Ultra-Deep surveys using simulated lightcones from the Santa Cruz semi-analytic model. We make predictions for the performance of these surveys by comparing galaxies that are extracted from each image using Source Extractor to the input catalogue. We find that the Wide, Deep, and Ultra-Deep surveys will be 75 per cent complete for point sources down to $\sim 27$, 29, and 30 mag, respectively, in the UV, u, and g filters, with the UV-split and u-split filters reaching a shallower depth. With a large area of $\sim 2200$ deg$^2$, the Wide survey will detect hundreds of millions of galaxies out to $z\sim 4$, mostly with $M_\ast \gtrsim 10^{9}\,{\rm M}_{\odot }$. The Ultra-Deep survey will probe to $z\sim 5$, detecting galaxies with $M_\ast \gtrsim 10^{7}{\rm M}_{\odot }$. These galaxy samples will enable precision measurements of the distribution of star formation in the cosmic web, connecting the growth of stellar mass to the assembly of dark matter haloes over two thirds of the history of the Universe, and other core goals of CASTOR’s legacy surveys. These image simulations and the tools developed to generate them will be a vital planning tool to estimate CASTOR’s performance and iterate the telescope and survey designs prior to launch.

79 ASTRONOMY AND ASTROPHYSICS↗