Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Matplotlib”

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 19 records

Enhancing Power Grid Resilience with Causal Loops Diagram and Bayesian Networks

Enhancing power grid resilience through improved analysis and planning of Distributed Energy Resources is a key for power system planner. This paper explores the integration of Causal Loop Diagrams (CLDs) and Bayesian Networks (BNs) for enhancing resilience in power systems, focusing on Distributed Energy Resources (DER) planning. By automating CLD analysis in Python's matplotlib, we present a tool for rapid model validation and structural accuracy, crucial for power system planners. This hybrid approach utilizes BNs for inferential depth and CLDs for dynamic system modeling, offering a comprehensive framework for policy formulation and collaborative strategy development against disruptions. Here, we highlight the tool's capability to identify and analyze interconnected feedback loops, facilitating a deeper understanding of DER integration's impact on network resilience. This work aims to bridge quantitative analysis and qualitative insights, addressing the limitations of each method while providing a robust model for power system resilience assessment.

14 SOLAR ENERGY↗

SPRFSim

SPRFSim is a code that performs RF/Beam interaction simulations for an ion LINAC. The input files can be constructed from scratch or parsed from PARMELA or TraceWin simulations. The code is written in Python, and relies on matplotlib and numpy.

Edelen, Jonathan↗

Curvallis

Curvallis is a plotting program written in Python using MatPlotLib to visualize and modify experimental equation of state data. It does this by plotting individual isotherms as lines. Data can be either 1d or 2d, meaning there can be 1 or many isotherms plotted at once. Data points on these lines can be moved around, and new points can be added or removed. 1d data can have different equations fitted to them, which best fit the data. These equations are currently only Nth degree polynomials and Equations of State, but any equation can be added. Manipulating data points causes this fitted line to be recalculated and redisplayed. The manipulated data points, as well as the fitted line, can be written to a file.

Leek, Jim↗

Becquerel (Bq) v0.1

Becquerel is a Python package for analyzing nuclear spectroscopic measurements. The core functionalities are reading and writing different spectrum file types, fitting spectral features, performing detector calibrations, and interpreting measurement results. It will include tools for plotting radiation spectra and fits of different spectral features, as well as convenient access to tabulated nuclear data. It relies heavily on the standard scientific Python stack of numpy, scipy, matplotlib, and pandas. It is intended to be general-purpose enough that it can be useful to anyone from an undergraduate taking a laboratory course to the advanced researcher.

Plimley, BrianC↗

BuildingsPy

BuildingsPy is a Python package that can be used to run Modelica simulations and to process Modelica output files. It can also be used to run unit tests as part of the development of LBNL's Modelica Buildings library. The package provides functions to extract data series from the output file for further use in the python packages matplotlib for plotting and SciPy for scientific computing.

Wetter, Michael↗

becquerel (bq) v0.4.0

Becquerel is a Python package for analyzing nuclear spectroscopic measurements. The core functionalities are reading and writing different spectrum file types, fitting spectral features, rebinning spectrum counts to different bin edges, performing detector calibrations and interpreting measurement results. It also includes tools for visualizing radiation spectra and fits of different spectral features, as well as convenient access to tabulated nuclear data both from remote servers and local caches. It relies heavily on the standard scientific Python stack of numpy, scipy, matplotlib, pandas, and numba. It is intended to be general-purpose enough that it can be useful to anyone from an undergraduate taking a laboratory course to the advanced

Bandstra, Mark↗

coloring v.1.0

SAND2024-02435O The software coloring allows applications written in the C++ language to generate publication-quality 2D plots. Its functionality is similar to Microsoft Excel's chart functionality or the Python language's matplotlib package. The value of coloring is that it is written purely in C++ and thus can be compiled on systems where Python is not available and linked into high performance computing software. For drawing shapes onto an image, coloring uses the mathematical definition of quadratic Bezier splines and uses Newton's method to search for the closest point on a spline to a given query point. This is then used to do accurate sub-pixel sampling to get clean, non-pixelated images. For working with the actual plot data, coloring has basic statistical methods such as finding maxima and minima as well as axis scaling such as logarithms. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Ibanez, Daniel↗

becquerel (bq) v0.7.0

Becquerel is a Python package for analyzing nuclear spectroscopic measurements. The core functionalities are reading and writing different spectrum file types, fitting spectral features, rebinning spectrum counts to different bin edges, performing detector calibrations and interpreting measurement results. It also includes tools for visualizing radiation spectra and fits of different spectral features, as well as convenient access to tabulated nuclear data both from remote servers and local caches. It relies heavily on the standard scientific Python stack of numpy, scipy, matplotlib, pandas, and numba. It is intended to be general-purpose enough that it can be useful to anyone from an undergraduate taking a laboratory course to the advanced researcher.

Bandstra, Mark [Lawrence Berkeley National Laborat↗

Model Data Archive Associated with Manuscript "Fire-altered Carbon Pools Create Disturbance Memory in Stream Dissolved Organic Carbon"

This data package supports the publication “Fire-altered Carbon Pools Create Disturbance Memory in Stream Dissolved Organic Carbon” by Li et al. (2026). The package contains processed model inputs, configuration files, restart files, simulation outputs, scripts, and visualization products used to evaluate post-fire dissolved organic carbon (DOC) dynamics in the Naches River Watershed, Washington, USA, following the 2021 Schneider Springs Fire. The modeling workflow couples ELM-BGC, the biogeochemistry-enabled Energy Exascale Earth System Model Land Model; ATS, the Advanced Terrestrial Simulator for integrated surface-subsurface hydrology; and PFLOTRAN, a reactive transport model for multicomponent aqueous geochemistry. Together, these models simulate how wildfire-induced changes in vegetation, litter, coarse woody debris, and soil organic matter influence DOC production, transport, and reaction from burned hillslopes to stream networks. The archive includes preprocessed meteorological, geospatial, hydrologic, and biogeochemical forcing data; ELM-BGC-derived DOC source terms; ATS mesh files; PFLOTRAN reactive-transport inputs; model configuration files; spin-up and transient restart files; watershed-scale diagnostic outputs; stream concentration time series; and figures or visualization files used to inspect and reproduce key results. File types include Hierarchical Data Format 5 (HDF5) files for gridded forcing and model-coupling data, model input and configuration files for ELM-BGC, ATS, and PFLOTRAN, restart and simulation-output files generated by the modeling workflow, tabular or time-series diagnostic outputs, scripts for post-processing and figure generation, and image or visualization products associated with the manuscript. Use of the package depends on the intended task. Re-running the simulations requires the relevant modeling software, including ELM-BGC, ATS, and PFLOTRAN as ATS's geochemical engine. Inspecting outputs and reproducing figures requires Python with scientific plotting libraries such as Matplotlib, and three-dimensional model outputs may be viewed with ParaView. Geographic information system files or maps may be inspected with ArcGIS Pro or comparable GIS software. The data package is intended to enable traceability, reuse, and partial reproduction of the coupled land-to-watershed hydro-biogeochemical modeling workflow used to test how wildfire disturbance affects terrestrial carbon pools and downstream DOC dynamics.

ATS↗

Monthly Mean In Situ Surface Flux Observations Paired with Satellite-Derived and Reanalysis-Based Flux Data for the Great Lakes Region, 2001–2020

Surface radiative and turbulent heat fluxes over the Great Lakes strongly influence regional hydrological and meteorological processes, and their accurate representation is critical for numerical weather prediction and coupled atmosphere–lake modeling. However, direct flux observations are spatially sparse across the region, so gridded reanalysis and satellite-derived products are often used for climatological analyses and model evaluation despite differences in their flux representations. This dataset provides processed, quality-controlled, monthly mean surface flux observations from the Great Lakes Evaporation Network (GLEN), AmeriFlux, and the National Data Buoy Center, paired with spatiotemporally matched flux estimates from two reanalysis products, the fifth generation European Centre for Medium-Range Weather Forecasts (ECMWF) reanalysis dataset (ERA5) and the Modern Era Reanalysis for Research and Applications, version 2 (MERRA-2), and two satellite-derived products, the Clouds and Earth's Radiant Energy Systems Energy Balanced and Filled (CERES-EBAF) and the Cloud, Albedo and Surface Radiation dataset from AVHRR data - Edition 3 (CLARA-A3). The dataset includes sixteen observational stations with variable temporal coverage within 2001–2020. For each station, a CSV file contains monthly time series of available flux variables, including surface downwelling shortwave radiation (SW), surface downwelling longwave radiation (LW), sensible heat (SH) flux, and latent heat flux (LH), alongside matched gridded product values where available. Columns in the CSV file correspond to different variables sourced from each dataset, with column titles structured as "{dataset}_{variable}". Columns with relevant metadata are also provided in each CSV file, including station latitude and longitude, monthly timestamps, and the name of the sourced observational data. These files are structured for direct use in common analysis tools, including Microsoft Excel, Python pandas, and Python matplotlib. This dataset supports climatological analysis of the Great Lakes regional surface energy budget, evaluation of satellite-derived and reanalysis-based flux products, and development or validation of flux representations in numerical weather prediction and coupled atmosphere–lake models.

Great Lakes↗

CCSI Toolset 3.18 Release

CCSI Toolset 3.18 Release Highlights FOQUS was updated to allow installation for users using MacOS on Apple silicon. FOQUS Cloud support was added for user plugins. The Optimality-Based Design of Experiments tutorials were updated to reflect the latest changes in the user interface flow. The plot discrete sliders were fixed for CDF and 3D plots within Uncertainty Quantification, which were not working due to a matplotlib depreciation. The installation was updated to set the default location for the PSUADE executable if found in the environment. Updates were made to allow compatibility with NumPy 1.25. Additional documentation changes were made to fix typographical errors and fix a broken link to optional software.

AS↗

Validation of CTF Droplet Entrainment and Annular/Mist Closure Models using Riso Steam/Water Experiments

This report summarizes the work done to validate the droplet entrainment and de-entrainment models as well as two-phase closure models in the CTF code by comparison with experimental data obtained at Riso National Laboratory. The Riso data included a series of over 250 steam/water experiments that were performed in both tube and annulus geometries over a range of various pressures and outlet qualities. Experimental conditions were set so that the majority of cases were in the annular/mist ow regime. Measurements included liquid lm ow rate, droplet ow rate, lm thickness, and two-phase pressure drop. CTF was used to model 180 of the tubular geometry cases, matching experimental geometry, outlet pressure, and outlet ow quality to experimental values. CTF results were compared to the experimental data at the outlet of the test section in terms of vapor and entrained liquid ow fractions, pressure drop per unit length, and liquid lm thickness. The entire process of generating CTF input decks, running cases, extracting data, and generating comparison plots was scripted using Python and Matplotlib for a completely automated validation process. All test cases and scripting tools have been committed to the COBRA-TF master repository and selected cases have been added to the continuous testing system to serve as regression tests. The dierences between the CTF- and experimentally-calculated ow fraction values were con- sistent with previous calculations by Wurtz, who applied the same entrainment correlation to the same data. It has been found that CTF's entrainment/de-entrainment predictive capability in the annular/mist ow regime for this particular facility is comparable to the licensed industry code, COBRAG. While lm and droplet predictions are generally good, it has been found that accuracy is diminished at lower ow qualities. This nding is consistent with the noted deciencies in the Wurtz entrainment model employed by CTF. The CTF predicted two-phase pressure drop in the annular/mist ow regime has been found to be highly inaccurate, exhibiting a clear bias with respect to the experimental data. This inaccuracy led to an investigation that revealed deciencies in the implementation of the annular/mist interfacial friction model, which should be investigated further in the future. Looking to published COBRAG results for this same facility reveal it exhibits no bias with regard to experimental pressure drop results. In addition to the problems with pressure drop prediction, the lm thickness was also signicantly under-predicted by CTF compared to both experimental data and Wurtz's analytical calculations. Film thickness is calculated using a simple geometric relationship and lm void fraction in CTF, which is dependent on slip ratio and interfacial friction. It is possible that the issues aecting the pressure drop and lm void prediction are related.

97 MATHEMATICS AND COMPUTING↗

CTT: Tools for Fine Alignment of Flash X-ray Systems

The CTT code is a compilation of the python code that was prototyped in the interest of making a method for fine alignment of Flash X-ray Systems at the lab. It contains python code for interacting with LTT and running optimization loops using LTT simulations or ray tracing with RaySpace. It Includes classes for creating phantom objects and modular geometry objects in the simulations. It allows one to generate a random phantom that has been optimized to stay with a certain cubic volume and maximize the minimum distance between any two ball phantom centers in all projections. It was primarily made to work on ball phantoms which were simulated as Teflon spheres. It allows the alignment from some nominal position to some displaced position to simulate recovery of a real geometry from the nominal geometry of the system. Fine alignment can be done with the projections in LTT while a rough alignment is faster using rayspace. If rayspace works well for the use case it should be preferred since it is considerably faster and less resource intensive in general. Some Notes about using this code is that one will have to edit the imports for the files to get to the correct LTT path, LTT GUI path and to the CTT path when importing. This was made by using anaconda with python 3 on windows 10. The LTT code was stored in a anaconda environment which seemed to help the python find the LTT although it shouldn’t be necessary if you append the path in your code using sys.path.append(r'add the path you want here’). The sys.path.append method is a quick way to give your python code access to a given folder when running it (such as LTT or CTT). Note that since the code was originally made with paths for a specific machine that a new user will have to edit those paths to make it work in all the files that use the old paths. This is somewhat tedious but will be required to run the code on a new machine. The methodology used to run and make these notebooks starts with opening a command prompt as administrator in windows 10. After this one would activate the anaconda environment in the appropriate directory using “conda activate myenv” in the command prompt. After this open a jupyter-notebook using the keyword “jupyter-notebook". After that a notebook should open in a browser. Note that some libraries used may not come with anaconda so those may have to be installed. There shouldn’t be much though since the main things used are scipy, numpy, matplotlib, and LTT. LTTQuicksetup also requires some paths that will be specific to the computer so that should be changed as well.

42 ENGINEERING↗

The Polar System Analysis Package (Ver. 1 Specifications)

The Polar System Analysis Package (POLeSTAr) is a modern data fusion tool being designed to benchmark,evaluate and compare the polar physics and biogeochemistry of Earth System Models (ESMs). It is being written in Python to make use of libraries including Xarray, Matplotlib, SciPy, NumPy and PyTorch within algorithms developed specifically for polar system modeling. Initial POLeSTAr algorithms will be adapted from the MATLAB Ridgepack package that was designed to analyze the Model for Prediction Across Scales (MPAS) sea ice component of the Energy Exascale Earth System Model (E3SM) and sea ice model CICE within the Community Earth System Model (CESM).

97 MATHEMATICS AND COMPUTING↗

Fast Semi-automated Filtration Method for Non-targeted LC-QTOF Data of Aged Nitroplasticizer Samples

A full dataset of aged nitroplasticizer (NP) is composed of more than 2000 unique mass-to-charges (m/z) when combining the non-targeted data obtained from both positive and negative electrospray ionization modes in time-of-flight mass spectrometry. Therefore, manual processing of these data often takes days, weeks, or even months to scrutinize for mechanistic insights. To effectively extract meaningful signals that represent vital degradation intermediates in the early NP degradation mechanism, a semi-automated postprocessing workflow for data filtering, tailored to the aging experiment of NP, has been developed. The automated portion of this workflow is written in a Python code (using pandas, numpy, and matplotlib libraries), which removes more than 65% of potential false signals within seconds via four threshold-based adjustable filters: signal sensitivity, coefficient of variation, number of measurements, and retention time variability. As for the manual portion, a pattern-based inspection method is employed to reduce another 23% or more false positives, which greatly simplifies data visualization and results in less than 3% of potential candidate m/z needing in-depth data interpretation. As a positive control, known compounds are verified. Using this semi-automated data reduction method, the amount of time required is reduced to a matter of hours for data filtering in the non-targeted datasets of aged NP, which saves more time and effort for compound identification.

36 MATERIALS SCIENCE↗

A Python Script to Read MCNP6.3 Surface-Source Files

This report provides a Python script to read an MCNP ® surface source file created with the SSW card with SYM = 0 (i.e., the default symmetry treatment). For background: the general format of an MCNP surface-source file is described in; however, that document did not provide coding and/or a tool to interrogate such files. The current format will not be given in this document other than through the record-read statements necessary for the script to function. The reader capability in this report is augmented with the ability to directly write a couple demonstrative outputs: 1. A comma-separated value (CSV) file containing particle phase-space state information and 2. A Matplotlib histogram of the energy distribution of the particles. This report also describes accompanying verification work that shows the script performing as required with MCNP6.2, MCNP6.3, and (expected) MCNP6.4 surface-source files. However, users of the enclosed script must still verify that the script is behaving correctly for their own work.

97 MATHEMATICS AND COMPUTING↗

Stochastic and Deterministic Crystal Structure Solution Methods in GSAS-II: Monte Carlo/Simulated Annealing Versus Charge Flipping

One of the goals in developing GSAS-II was to expand from the capabilities of the original General Structure Analysis System (GSAS) which largely encompassed just structure refinement and post refinement analysis. GSAS-II has been written almost entirely in Python loaded with graphics, GUI and mathematical packages (matplotlib, pyOpenGL, wxpython, numpy and scipy). Thus, GSAS-II has a fully developed modern GUI as well as extensive graphical display of data and results. However, the structure and operation of Python has required new approaches to many of the algorithms used in crystal structure analysis. The extensions beyond GSAS include image calibration/integration as well as peak fitting and unit cell indexing for powder data which are precursors for structure solution. Structure solution within GSAS-II begins with either Pawley or LeBail extracted structure factors from powder data or those measured in a single crystal experiment. Both charge flipping and Monte Carlo-Simulated Annealing techniques are available; the former can be applied to (3+1) incommensurate structures as well as conventional 3D structures.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Data release for A search for extremely-high-energy neutrinos and first constraints on the ultra-high-energy cosmic-ray proton fraction with IceCube

<h1 id="summary">Summary</h1> <p>Title: Data Release for A search for extremely-high-energy neutrinos and first constraints on the ultra-high-energy cosmic-ray proton fraction with IceCube</p> <p>The IceCube observatory analyzed 12.6 years of data in search of extremely-high-energy (EHE) neutrinos above 5 PeV. The resultant limit of the search (Fig 1), and the effective area of the event selection (Fig 7), are provided in this data release.</p> <h1 id="contents">Contents</h1> <ul> <li><p>README file: this file</p> </li> <li><p><code>differential_limit_and_sensitivity.csv</code>: a comma separated value file, giving the observed experimental differential limit, and sensitivity, of the search as a function of neutrino energy. This is the content of Fig 1 in the paper. The first column is the neutrino energy in GeV. The second column is the limit in units of GeV/cm2/s/sr. The third column is the sensitivity in units of GeV/cm2/s/sr.</p> </li> <li><p><code>effective_area.csv</code>: a comma separated value file, giving the effective area of the search as a function of energy. This is the content of Fig 7 in the paper. The first column is the neutrino energy in GeV. The second column is the total effective area of the search, summed across neutrino flavors, and averaged across neutrinos and antineutrinos, in meters-squared. The third column is the effective area of the search for the average of electron neutrino and electron antineutrinos in units of meters-squared. The fourth column is the same as the third, but for muon-flavor neutrinos. The fifth column is the same as the third and fourth, but for tau-flavor neutrinos.</p> </li> <li><p><code>demo.py</code>: a short python script to demonstrate how to read the files. Run like <code>python demo.py</code>. A standard base python installation is sufficient, as the only dependencies are numpy and matplotlib.</p> </li> </ul> <h1 id="contacts">Contacts</h1> <p>For any questions about this data release, please write to analysis@icecube.wisc.edu</p>

Astronomy and Astrophysics↗