ePSproc wavefunction plotting tests & demo: CH3I with animation


This notebook demos (continuum photoelectron) wavefunction plotting from ePS gridded file outputs, for a large dataset including animation. (See the basic notebook for starter demo material.) The plotting is handled with pyVista, with itkwidgets for interactive plotting. Both tools are built on the ITK/VTK toolchain.


  • Test & demo wfPlotter class for large datasets.
  • Demo animation routine.

See also:


  • 11/08/20 updating with rewritten plotWf method.
  • 03/08/20 v1 and testing


# Standard libs
import sys
import os
from pathlib import Path
import numpy as np
import xarray as xr

from datetime import datetime as dt
timeString = dt.now()

# For reporting
import scooby
# scooby.Report(additional=['holoviews', 'hvplot', 'xarray', 'matplotlib', 'bokeh'])
# TODO: set up function for this, see https://github.com/banesullivan/scooby
# Installed package version
# import epsproc as ep

# ePSproc test codebase (local)
if sys.platform == "win32":
    modPath = r'D:\code\github\ePSproc'  # Win test machine
    modPath = r'/home/femtolab/github/ePSproc/'  # Linux test machine

import epsproc as ep
* pyevtk not found, VTK export not available.

wfPlotter class

Data IO and plotting functions are set in the wfPlotter class.

from epsproc.vol.wfPlot import wfPlotter

# Load data from modPath\data
# dataPath = os.path.join(modPath, 'data', 'wavefn')  # Case for single test dataset in ePSproc repo

# Load data from an ePSdata download,
# See https://epsproc.readthedocs.io/en/dev/demos/ePSdata_download_demo_300720.html
# dataPath = r'/home/femtolab/Downloads/3660708/CH3I_1-60eV/orb20_A1_waveFn'  # Linux test machine
dataPath = r'D:\temp\3660708\CH3I_1-60eV\orb20_A1_waveFn'   # Win test machine

wfClass = wfPlotter(fileBase = dataPath, tempdir = Path(dataPath).parent)  # Optionally pass tempdir here for output image files (animation only), otherwise will be set to system default.