Supporting Code for: Hammerhead: An Ultra-Compact 300 kV Vacuum Bushing
Authors: M. Borghei, M. Vorenkamp, N. van Moon, R. McMullen, R. Langtry, and B. Riordan
Corresponding Author: Moein Borghei, mborghei@avalanche.energy
Journal: Nature Communications
Date: 08/12/2025

1. System Requirements
-----------------------
- Python >= 3.8
- Operating Systems tested:
  * Windows 10 (64-bit)
  * Ubuntu 20.04 LTS
  * macOS Monterey 12.x
- Required Python packages:
    pandas >= 1.3.0
    numpy >= 1.21.0
    bokeh >= 3.0.0
    jupyter >= 1.0.0
- Optional packages for figure export:
    selenium >= 4.0.0
    pillow >= 9.0.0
- Non-standard hardware: None required beyond a standard desktop/laptop.

2. Installation Guide
----------------------
1. Install Python (version 3.8 or higher).
2. Install Jupyter Notebook or JupyterLab:
    pip install jupyter
3. Install dependencies:
    pip install pandas numpy bokeh selenium pillow

Typical installation time: < 5 minutes.

3. Demo
-------
Instructions to run on demo data:
1. Place the provided demo CSV file (hammerhead_data.csv) in the same directory as Hammerhead_Experimental_Figures.ipynb.
2. Launch Jupyter:
    jupyter notebook
3. Open Hammerhead_Experimental_Figures.ipynb.
4. Run all cells sequentially.

Expected output:
1) Figure 8 in the manuscript: I-V characteristics for current and gas conditioning.  The solid lines represent the mean cathode current versus voltage for gas-conditioned (blue) and current-conditioned (orange) operation, while the shaded bands denote the standard deviation.
2) Figure 10 in the manuscript: The time spent at each voltage range for both gas and current conditioning.
3) Figure 11 in the manuscript: Cathode voltage and current over the course of the experiment. Each data point is plotted with low opacity; overlapping points appear progressively darker, indicating more time spent conditioning at that voltage.

Expected runtime: < 1 minute.

4. Instructions for Use
-----------------------
Running on your own data:
1) Prepare a CSV file containing at least:
    LocalTimeCol, test_type, cathode_voltage_kV, cathode_current_mA
2) Update the file path in the Data Preparation cell of the notebook.
3) Run the notebook as in the Demo section.

5. Reproduction:
Running the script with the given dataset reproduces all the experimental figures.

6. License
----------
This software is released under the MIT License.

7. Code Functionality Overview
------------------------------
- Data preparation: Loads CSV, normalizes timestamps, assigns day numbers, applies jitter.
- Computation: Calculates cumulative conditioning time from timestamps.
- Visualization: Generates I-V curves for each conditioning method, the time spent in 15kV voltage intervals, and the distribution of voltage and current over testing days,
- Output: Opens a Bokeh html webpage plots, optional image export can be added using Selenium package.