PySlice: Routine Vibrational Electron Energy Loss Spectroscopy Prediction with Universal Interatomic Potentials Harrison A. Walker, Thomas W. Pfeifer, Paul M. Zeiger, Jordan A. Hachtel, Sokrates T. Pantelides, Eric R. Hoglund Abstract Vibrational spectroscopy in the electron microscope can reveal phonon excitations with nanometer spatial resolution, yet routine prediction remains out of reach due to fragmented workflows requiring specialized expertise. Here we introduce PySlice, the first publicly available implementation of the Time Autocorrelation of Auxiliary Wavefunction (TACAW) method, providing an automated framework that produces momentum- and energy-resolved vibrational electron energy loss spectra directly from atomic structures. By integrating universal machine learning interatomic potentials with TACAW, PySlice eliminates the bottleneck of per-system potential development. Users input atomic structures and obtain phonon dispersions, spectral diffraction patterns, and spectrum images through a unified workflow spanning molecular dynamics, GPU-accelerated electron scattering, and frequency-domain analysis. We outline the formulation behind the code, demonstrate its application to canonical systems in materials science, and discuss its use for advanced analysis and materials exploration. The modular Python architecture additionally supports conventional electron microscopy simulations, providing a general-purpose platform for imaging and diffraction calculations. PySlice makes vibrational spectroscopy prediction routine rather than specialized, enabling computational screening for experimental design, systematic exploration of phonon physics across materials families, and high-throughput generation of simulated data for training of future machine learning models. keywords vibrational EELS, phonon spectroscopy, multislice simulation, universal interatomic potentials, TACAW, STEM 1 Introduction Vibrational electron energy loss spectroscopy (EELS) in the transmission electron microscope occupies a unique position among phonon measurement techniques, offering tunable access to both spatial and momentum resolution krivanek2014vibrational . Optical methods such as Raman and infrared spectroscopy, including near-field variants like nano-FTIR and SNOM that achieve nanoscale spatial resolution, remain restricted to zone-center phonons ( \mathbf{q}\approx 0 ) due to the negligible momentum of photons at vibrational energies. Inelastic neutron scattering and inelastic hard-X-ray scattering provide full momentum-resolved phonon dispersions, but require millimeter-scale samples and lack spatial resolution. Vibrational EELS bridges this gap: by varying the probe convergence angle, the technique can trade between nanometer spatial resolution (focused beam) and precise momentum resolution (parallel beam), sampling the uncertainty relation \Delta x\cdot\Delta p\gtrsim\hbar/2 according to experimental requirements. This tunability enables investigations ranging from momentum-resolved phonon dispersions to spatially-resolved mapping of interfacial phonons, localized strain fields, and defect-induced vibrational states senga2019 ; hage2020science ; hoglund2022nature ; haas2023nanolettgb ; hoglund2023advmat ; xu2023natmat ; hoglund2024advmat ; yan2024nanolett . The complexity of these experiments often necessitates predictive simulation to interpret results accurately and guide experimental design. Several computational approaches address different aspects of vibrational EELS simulation. General-purpose multislice simulation codes such as abTEM madsen2021abtem and Dr. Probe barthel2018dr provide GPU-accelerated electron scattering calculations with sophisticated treatment of aberrations and detector geometries. These codes support frozen-phonon methods loane1991thermal that approximate thermal disorder through static atomic displacements sampled from appropriate distributions. They capture diffuse scattering phenomena such as Kikuchi bands and thermal diffuse backgrounds. Separately, perturbative treatments based on harmonic phonon modes nicholls2019theory ; senga2019 ; rossi2024qeels provide theoretical models for the inelastic scattering cross-section, enabling prediction of EELS intensities from specific phonon excitations. An alternative approach by Dwyer dwyer2014localized propagates electrons through mode-specific perturbed potentials, incorporating dynamical diffraction while still treating individual harmonic phonon modes. Beyond these harmonic treatments, molecular dynamics (MD) simulations capture the full anharmonic dynamics of atomic motion. Methods such as those developed by Fransson et al. and Pfeifer et al. fransson2021dynasor ; pfeifer2025phonon extract dynamical structure factors directly from MD trajectories, providing efficient access to anharmonic-phonon dispersions that can be combined with theoretical cross-section formulations to predict EELS intensities. The Frequency Resolved Frozen Phonon Multislice (FRFPMS) method zeiger2020frfpms and the Time Autocorrelation of Auxiliary Wavefunctions (TACAW) castellanos2025tacaw combine beam propagation with MD trajectories, incorporating probe geometry and dynamical diffraction effects while accessing anharmonic dynamics. FRFPMS performs multislice calculations on frequency-filtered-trajectories, such that computational cost scales with both the number of frequency bins and the trajectory duration. TACAW simplifies this workflow by moving the frequency decomposition from the input to the output: molecular dynamics generates a time series of atomic configurations sampling all thermally populated modes simultaneously, multislice propagation yields a time-dependent exit wavefunction, and a single temporal Fourier transform of the wavefunction data recovers the full frequency spectrum. Recent developments in machine learning interatomic potentials (MLIPs) have expanded the scope of atomistic simulation. MLIPs are neural networks trained on databases of density-functional-theory (DFT) calculations that learn to predict energies and forces at near-DFT accuracy but orders of magnitude faster. Universal MLIPs (uMLIPs) such as ORB orb_ref , MACE batatia2022mace , CHGNet deng2023chgnet , Allegro-FM allegrofm2025 , and UMA uma2025 , trained on diverse materials datasets encompassing much of the periodic table (e.g., the Materials Project jain2013materialsproject , Alexandria alexandria2018 , OMat24 omat24 , OMol25 omol25 ), provide transferable predictions of interatomic forces across chemical spaces without requiring per-system retraining. A user can supply any crystal structure and obtain physically reasonable dynamics without developing a custom potential. Concurrently, modern tensor libraries such as PyTorch pytorch offer hardware abstraction across CPU and GPU backends and efficient batch operations that simplify implementation of numerical algorithms, enabling both the MLIPs and downstream multislice calculations to exploit GPU parallelism. While each of these approaches addresses part of the vibrational EELS prediction problem, no existing framework integrates them into a unified, automated workflow. Frozen phonon methods lack the frequency resolution central to vibrational spectroscopy. Perturbation-theory approaches do not capture anharmonic effects. Existing multislice codes provide high-quality scattering simulations but lack integrated pipelines for vibrational EELS. TACAW offers the necessary physics, but practical implementation has required coordinating multiple specialized software packages—an MD engine, a multislice code, and custom analysis scripts—with no publicly available implementation. This fragmentation has kept vibrational EELS prediction a specialized undertaking requiring extensive custom development. The convergence of uMLIPs, GPU-accelerated multislice, and the TACAW formalism now creates an opportunity to unify these elements into a general-purpose prediction pipeline. Here we present PySlice, the first publicly available implementation of the TACAW method. This modular Python framework integrates three key capabilities: (1) a unified interface to modern interatomic potentials including uMLIPs, with automated equilibration detection and MD trajectory management through ASE ase and OVITO ovito ; (2) GPU-accelerated multislice calculations using PyTorch pytorch , with persistent caching for simulation restarts and post-processing analyses; and (3) a structured data model for TACAW analysis that handles the time-to-frequency transformation and provides methods for extracting phonon dispersions, momentum-resolved spectra, and spectrum images. The object-oriented architecture maintains clean separation between MD, electron scattering, and spectroscopic analysis while enabling flexible composition of these elements for diverse simulation workflows. We demonstrate PySlice through systematic application to transition metal dichalcogenides (TMDCs), where a single script produces material-specific phonon dispersions and spectral diffraction patterns across MoS 2 , WS 2 , WSe 2 , and MoSe 2 . We further demonstrate with vibrational spectrum images at a bulk Si/Ge heterostructure interface and a silicon substitution defect in graphene. Beyond TACAW simulations, PySlice’s modular design supports conventional multislice imaging and diffraction simulations, providing a unified platform for TEM/STEM simulation tasks. By removing the practical barriers to vibrational EELS prediction and establishing consistent workflows, this work aims to accelerate both computational exploration and experimental validation of phonon spectroscopy in complex materials while fostering reproducibility in the community. 2 Methods Figure 1: PySlice workflow for automated vibrational EELS prediction. The pipeline integrates four stages: (1) input structures from CIF files, XYZ files, LAMMPS trajectories, or ASE Atoms objects; (2) optional molecular dynamics using universal machine learning interatomic potentials (ORB) with automated equilibration (NVT) and production (NVE) phases; (3) GPU-accelerated multislice simulation computing exit wavefunctions for each MD timestep; (4) TACAW analysis transforming time-domain wavefunctions to frequency-domain spectral intensities or conventional TEM/STEM such as frozen-phonon HAADF, TEM diffraction, or 4D-STEM. Data containers ( Trajectory , WFData , TACAWData , HAADFData ) manage information flow between stages. 2.1 Workflow Architecture Simulating vibrational EELS requires bridging three distinct computational domains: atomic dynamics, electron scattering, and spectroscopic analysis. PySlice addresses this through a modular pipeline (Fig. 1 ) that cleanly separates these concerns while maintaining efficient data flow between stages. The workflow begins with molecular dynamics simulations to generate thermally-populated atomic configurations. Rather than implementing yet another MD engine, PySlice’s MDCalculator acts as a unified interface to modern interatomic potentials through ASE’s molecular dynamics engine, with particular emphasis on the universal machine learning potential ORB. The MDCalculator handles equilibration detection automatically through convergence criteria such as temperature bounds and running averages, ensuring trajectories capture thermal phonon populations without manual intervention. For static imaging simulations, the MD is optional and trajectory will support only a single frame. These time-resolved atomic configurations feed into the MultisliceCalculator , which must calculate a complete multislice simulation for each MD timestep. For a typical vibrational EELS simulation of several hundred timesteps at each probe position, this represents a substantial computational investment. Each timestep requires propagating the electron wavefunction slice-by-slice through the entire specimen thickness, with the atomic positions from that particular snapshot determining the scattering potential distribution. The implementation uses PyTorch for GPU acceleration, with all numerically intensive operations executed on GPU hardware when available. The code automatically selects between CUDA, Apple Metal (MPS), or CPU backends depending on available hardware. Multislice calculations are cached at the frame level: each computed exit wave is written to disk as a NumPy array. This enables simulation restarts after interruption and allows post-processing analyses to operate on pre-computed wavefunction data without re-running the multislice calculations. While GPU acceleration is an integral feature to PySlice, the code also retains full functionality without PyTorch, optionally utilizing NumPy numpy as the backend. The TACAWData class then transforms the time-domain wavefunction data into frequency-domain spectra. For a trajectory with timesteps \{t_{i}\} separated by \Delta t , the exit wavefunction \psi(\mathbf{k},t_{i}) at each momentum point \mathbf{k} is transformed: \tilde{\psi}(\mathbf{k},\omega)=\mathcal{F}_{t}[\psi(\mathbf{k},t)-\langle\psi(\mathbf{k},t)\rangle_{t}] . The mean subtraction isolates the time-varying component of the scattering, which contains the phonon information. The vibrational EELS intensity I(\mathbf{k},\omega)=|\tilde{\psi}(\mathbf{k},\omega)|^{2} then reveals phonon excitations as peaks at energies \hbar\omega and momenta \hbar\mathbf{k} satisfying the phonon dispersion relation. The underlying physics is straightforward: as atoms vibrate at their characteristic phonon frequencies, they impart a periodic modulation (both temporally and spatially) on electron scattering potential. This modulation imparts the same temporal signature to the transmitted electron wavefunction, and elastic scattering to the corresponding wavevector is observed. A Fourier transform in time extracts these frequency components, revealing phonon modes as features in the momentum- and energy-resolved intensity I(\mathbf{k},\omega) . PySlice organizes this analysis into a data structure with integrated methods for common phonon spectroscopy tasks: extracting dispersions along reciprocal space paths, generating momentum-resolved spectra, and computing spectrum images. 2.2 Key Technical Elements Multislice Propagation. The multislice algorithm solves the electron scattering problem by decomposing the specimen into thin slices perpendicular to the beam direction. This approximation, valid when slice thickness is small compared to the transverse coherence length, allows the full 3D scattering problem to be treated as a sequence of 2D phase shifts (transmission) alternating with free-space propagation. Within each slice of thickness \Delta z , the wavefunction experiences a phase shift determined by the projected potential: t(\mathbf{r})=\exp(i\sigma V(\mathbf{r})) , where \sigma=2\pi m_{e}\lambda/h^{2} is the interaction parameter and m_{e} includes relativistic corrections. Between slices, Fresnel propagation in reciprocal space applies the operator P(\mathbf{k})=\exp(-i\pi\lambda\Delta z|\mathbf{k}|^{2}) . The complete propagation through N slices follows: \psi_{\text{exit}}=P_{N-1}t_{N}\cdots P_{1}t_{2}P_{0}t_{1}\psi_{\text{probe}} . Atomic Scattering Potentials. Accurate atomic potentials are essential for quantitative EELS simulation. PySlice uses Kirkland’s parameterized atomic structure factors kirkland2020advanced , which represent decades of refinement against both quantum mechanical calculations and experimental measurements. For each element Z , the momentum-space form factor takes the form f(\mathbf{q})=\sum_{i=1}^{3}\left[\frac{a_{i}}{|\mathbf{q}|^{2}+b_{i}}+c_{i}\exp(-d_{i}|\mathbf{q}|^{2})\right] , where the coefficients \{a_{i},b_{i},c_{i},d_{i}\} are tabulated. This parameterization captures both the high-angle scattering (first term) and low-angle scattering (second term) with sufficient accuracy for typical TEM conditions. The projected potential for each slice is assembled in reciprocal space by summing structure factors with appropriate phase factors for atomic positions: V(\mathbf{k})=\sum_{j}f_{Z_{j}}(\mathbf{k})\exp(-2\pi i\mathbf{k}\cdot\mathbf{r}_{j}) , where the sum runs over atoms within the slice z-bounds. An inverse FFT then yields the real-space projected potential. Molecular Dynamics. The TACAW method extracts phonon frequencies by Fourier transforming the time-dependent electron wavefunction, which inherits its temporal structure from atomic motion. This places two requirements on the MD trajectory: configurations must sample the thermal phonon population at the target temperature, and the time evolution must reflect deterministic phonon dynamics rather than thermostat-driven fluctuations. PySlice’s MDCalculator addresses these requirements through a two-phase protocol: Langevin dynamics (NVT) drives the system to thermal equilibrium, after which velocity-Verlet integration (NVE) generates the production trajectory. Alternatively, production can use Langevin dynamics with very low friction, which maintains better energy conservation with some MLIPs while minimally perturbing the phonon dynamics. Equilibration cannot be inferred from instantaneous temperature reaching its target as a system may pass through this value transiently while still relaxing toward thermal equilibrium. The MDCalculator instead evaluates convergence through three criteria assessed over sliding windows. First, the instantaneous temperature must have reached the target at least once, confirming sufficient thermal excitation. Second, the mean temperature over recent steps must remain within a tolerance of the target while its standard deviation stays below a stability threshold, ensuring the system fluctuates about the correct thermal state rather than drifting. Third, the relative standard deviation of potential energy per atom must fall below a threshold, indicating the system has settled into a stable region of configuration space rather than undergoing structural relaxation. Only when all three conditions are jointly satisfied does the simulation advance to production, automating what traditionally required manual inspection of thermalization curves. While the default parameters will work for most materials, the user has full control over the convergence criteria, timestep, and thermostat friction, which may be tuned depending on the task at hand. Guidance on selection of these parameters is discussed in supplemental materials. The resulting configurations and velocities from the MD run are automatically packaged into PySlice’s Trajectory format with proper timestep metadata, enabling seamless handoff to the multislice calculation stage. Spectral statistics can be further improved by averaging results over multiple independent trajectories or trajectory segments, though this multiplies the computational cost of the multislice calculations; guidance on this approach is provided in the supplemental materials. Data Structure Design. The software architecture separates data storage from analysis through four core classes. The Trajectory class encapsulates atomic configurations and provides methods for accessing positions, velocities, and derived quantities (mean positions, displacements) without exposing the underlying storage format. The WFData class stores multislice results as complex wavefunctions indexed by probe position, time, and reciprocal space coordinates. This organization matches the natural axes of the TACAW calculation and enables efficient slicing operations for analysis. The TACAWData class inherits from WFData but replaces the time axis with frequency, providing specialized methods for phonon analysis: dispersion() for extracting dispersion relations along k-space paths, spectral_diffraction() for momentum-resolved intensity at specific frequencies, and spectrum_image() for position-resolved vibrational mapping in STEM geometries. Common TEM and 4D-STEM analysis can be performed using the WFData class, e.g. real-space and reciprocal-space plotting for imaging and diffraction. The HAADFData class is also made available to streamline the post-processing on the x , y , k_{x} , k_{y} dataset contained in WFData , e.g. for conventional bright-field or annular dark field scanning probe imaging. 3 Results Figure 2: End-to-end automated TACAW spectra across the TMDC family. All simulations were generated from a single PySlice script that handled the complete workflow: crystal structure generation with ASE, ORB-driven molecular dynamics with automatic equilibration, GPU-accelerated multislice propagation through hundreds of timesteps, and TACAW frequency-domain analysis. No intermediate file manipulation, format conversion, or manual parameter adjustment was required between materials. The resulting phonon dispersions and spectral diffraction patterns for MoS 2 , WS 2 , WSe 2 and MoSe 2 capture material-specific vibrational signatures arising from differences in atomic masses and bonding. 3.1 Automated Workflow Across TMDCs To validate the automated workflow, we applied PySlice to four monolayer transition metal dichalcogenides: MoS 2 , WS 2 , MoSe 2 , and WSe 2 (Fig. 2 ). All four materials were processed within a single script using identical simulation parameters, iterating over the chemical formulas. For each material, the workflow proceeded automatically from crystal structure generation through ORB-driven molecular dynamics, multislice propagation across MD frames, and TACAW frequency-domain analysis. The resulting phonon dispersions (Fig. 2 , top row) show the expected material-specific features: acoustic branches rising from the \Gamma point, optical branches at higher frequencies, and the characteristic flattening near zone boundaries. The sulfides (MoS 2 , WS 2 ) exhibit optical modes extending to \sim 14 THz, while the heavier selenides (MoSe 2 , WSe 2 ) show correspondingly lower frequencies reaching \sim 10 THz. Spectral diffraction patterns at representative frequencies (Fig. 2 , bottom row) display the hexagonal symmetry expected for these 2H-phase materials. These results demonstrate that a single automated pipeline produces physically reasonable, material-specific phonon spectra across a chemically related family. The fidelity of these predictions to experimental measurements depends on the underlying interatomic potential, which we discuss in Section 4 . 3.2 Spatially-Resolved Phonon Modes Figure 3: Spectrum Images of Localized Vibrations. (a-c) Bulk Si/Ge heterostructure interface showing optical phonon confinement: (a) Ge optical modes ( \sim 8-10 THz) confined to the Ge region, (b) Si optical modes ( \sim 14-16 THz) confined to the Si region, and (c) the normalized difference of the two energy regions. (d-f) Silicon substitution defect in graphene showing localized defect modes: (d) Silicon vibrations (10-15 THz) localized to the isolated atom, while (e) Carbon vibrations (40-45 THz) appear throughout the structure. The difference plot in (f) highlights the Silicon impurity. These results demonstrate PySlice’s capability to predict spatially-resolved vibrational signals at interfaces and point defects. PySlice’s STEM scanning capability enables spatially-resolved phonon spectroscopy, revealing localized vibrational modes. We demonstrate this on two exemplary systems: a Si/Ge semiconductor interface and a silicon substitution in graphene (Fig. 3 ). The Si/Ge interface exemplifies phonon confinement at heterostructure boundaries. Due to the mass difference between Si (28 amu) and Ge (73 amu), optical phonon frequencies differ significantly between the two materials. TACAW spectrum imaging reveals that Ge optical modes (Fig. 3 a) are confined to the Ge region, while Si optical modes (Fig. 3 b) remain localized to the Si side of the interface. The normalized difference (Fig. 3 c) highlights this spatial separation. Acoustic modes, with wavelengths much longer than the interface width, propagate across both materials and are not spatially confined to either region in the spectrum images. The silicon substitution in graphene demonstrates detection of point defect vibrations. The substantial mass difference between silicon (28 amu) and carbon (12 amu) produces distinct vibrational signatures: carbon atoms in the graphene lattice vibrate at characteristic frequencies near 40–45 THz, while the heavier silicon impurity exhibits lower-frequency modes in the 10–15 THz range. TACAW spectrum imaging at these frequencies reveals the silicon atom as a localized bright spot against the uniform graphene background, demonstrating PySlice’s sensitivity to isolated atomic-scale defects. 4 Discussion 4.1 Implications for Materials Exploration Universal machine learning interatomic potentials make MD-based vibrational EELS prediction broadly accessible. Where researchers previously needed material-specific interatomic potentials, universal MLIPs provide transferable forces across chemical space. PySlice leverages this to enable automated spectroscopic predictions. This capability opens several avenues for materials exploration. High-throughput screening becomes feasible: one can systematically compute vibrational spectra across materials families, alloy compositions, or defect configurations to identify systems with targeted phonon properties. The automated workflow also enables prediction-driven experimental design, where simulated spectra guide the selection of materials and measurement conditions before committing microscope time. Furthermore, the ability to generate large datasets of simulated spectra will provide training data for future machine learning models that analyze experimental EELS data. The accuracy of predicted phonon frequencies and intensities depends on the underlying interatomic potential; PySlice faithfully propagates whatever physics the uMLIP encodes, but cannot correct for its deficiencies. Recent systematic benchmarking of uMLIPs against DFT phonon databases and experimental inelastic neutron scattering spectra demonstrates that models such as ORB achieve near-DFT accuracy for vibrational properties across diverse materials families han_cheng2025 . PySlice leverages this validated accuracy to enable automated vibrational EELS prediction. As uMLIPs continue to improve, the predictions from this workflow will correspondingly improve without requiring changes to the simulation infrastructure. Computational parameters also constrain the accessible spectral range. Supercell size sets the minimum resolvable wavevector, while the MD timestep determines the maximum frequency via the Nyquist criterion. The total number of recorded frames controls frequency resolution. These are standard tradeoffs in any time-domain phonon simulation, and users can adjust supercell dimensions and trajectory length to match the spectral features of interest. 4.2 Beyond Vibrational Spectroscopy PySlice is architected around TACAW, but the same multislice machinery handles conventional STEM simulation as a natural byproduct (Fig. 4 ). Having both in one framework is convenient as users can validate probe configurations, generate comparison images, and run full vibrational analyses without switching tools. For STEM imaging, the HAADFData class integrates scattered intensity within configurable collection angle ranges to produce annular dark-field images directly from multislice exit wavefunctions. High-angle configurations (inner angles of 50–80 mrad) yield Z-contrast images sensitive to atomic number, while adjusting the detector geometry accesses different scattering regimes. The underlying 4D dataset, diffraction patterns recorded at each probe position, remains accessible for more sophisticated 4D STEM analyses. Realistic simulations often require modeling lens imperfections. PySlice implements the standard aberration function supporting defocus, astigmatism, coma, spherical aberration, and higher-order terms. Aberrations can be applied either during probe formation or post-hoc to stored wavefunctions, enabling efficient exploration of through-focal series or aberration correction strategies without repeating the multislice calculation. The multislice propagation can optionally retain wavefunctions at each slice, providing depth-resolved scattering information relevant to convergent beam electron diffraction analysis. The Probe class also accepts arbitrary complex wavefront arrays, so users can construct custom phase profiles, spiral phases for vortex beams, for instance, and propagate them through the same infrastructure. This flexibility makes PySlice suitable for general TEM/STEM simulation tasks beyond its primary application in vibrational spectroscopy. Figure 4: Extended simulation capabilities beyond vibrational spectroscopy. (a) Annular dark field (ADF) imaging validation against established multislice codes. (b) Large-angle convergent beam electron diffraction (LACBED) pattern demonstrating thickness-dependent dynamical diffraction effects. (c) Vortex beam probe with orbital angular momentum, illustrating PySlice’s support for arbitrary wavefront profiles including chiral-sensitive illumination modes. 5 Conclusion We have presented PySlice, an automated framework for predicting vibrational electron energy loss spectra from atomic structures. By integrating universal machine learning interatomic potentials with GPU-accelerated multislice simulation and TACAW frequency-domain analysis, PySlice reduces the barrier to vibrational spectroscopy prediction from weeks of specialized development to hours of computation. We validated the approach on the transition metal dichalcogenide family, demonstrating material-specific phonon dispersions and spectral diffraction patterns from a single automated script. We further demonstrated vibrational spectrum images at heterostructure interfaces and point defects, capabilities that enable nanoscale phonon mapping in complex materials. PySlice provides a foundation for high-throughput spectroscopy prediction, training data generation, and prediction-driven experimental design in vibrational EELS. Example scripts and complete workflows are provided in the supplemental materials and code repository. Declarations • Funding: See Acknowledgements. • Conflict of interest: The authors declare no competing interests. • Data availability: All data presented in this work were generated using PySlice and can be reproduced using the scripts provided in the code repository. • Code availability: PySlice is available at https://github.com/h-walk/PySlice . • Author contribution: H.A.W. wrote the manuscript. H.A.W., T.W.P., and P.M.Z. developed the PySlice software. J.A.H., S.T.P., and E.R.H. provided guidance. All authors reviewed and edited the manuscript.