Data and code from: Inferring lunar wake potentials from electron phase space densities
Data files
Jul 24, 2026 version files 12.99 GB
-
data-artemis.tar.gz
2.03 MB
-
data-vpic.tar.gz
12.98 GB
-
hamiltonian_shift.tar.gz
99.89 KB
-
notebooks.tar.gz
8.26 MB
-
README.md
15.57 KB
Abstract
Inferring electric potentials from electron phase space density measurements in the lunar wake is complicated by the asymmetry between the two sides of the wake driven by the solar wind strahl and the presence of ion acoustic shocks in the central wake. We develop the Hamiltonian inversion method, which addresses both challenges through a domain-decomposition strategy based on the quasi-static Vlasov equilibrium, validate it against particle-in-cell (PIC) simulation data, and apply it to ARTEMIS spacecraft observations at two evolutionary stages of the lunar wake.
Dataset DOI: 10.5061/dryad.0p2ngf2gk
Overview
The dataset contains three components:
PIC simulation data (~12 GB): Electric field (.gda) and electron phase space density (.bin) files at early and late stages of plasma refilling, used as ground-truth validation for the Hamiltonian inversion method.
Processed ARTEMIS data (~2 MB): Electron phase space density measurements (.sav) from two ARTEMIS lunar wake crossings corresponding to the same evolutionary stages, selected during intervals of stable solar wind conditions.
Hamiltonian shift method results (~97.6 kB): Electric potential profiles inferred by the Hamiltonian shift method for both the PIC simulation and ARTEMIS datasets (.txt and .sav), provided for direct comparison with the Hamiltonian inversion method results.
This dataset contains simulation output, spacecraft observations, and Jupyter notebooks needed to reproduce the results in the associated paper:
An, X., Xu, S., Angelopoulos, V., Liu, T. Z., Poppe, A. R., Halekas, J. S., & Plaschke, F. (2026). Inferring lunar wake potentials from electron phase space densities. arXiv preprint arXiv:2604.17825.
The dataset covers two physical scenarios of solar wind plasma refilling into the lunar wake:
- Early stage (t = 3000 ω_pi⁻¹): strong electron asymmetry driven by the solar wind strahl, no ion acoustic shocks.
- Late stage (t = 10000 ω_pi⁻¹): ion acoustic shocks present in the central wake, with flat-top trapped electron distributions.
Background and Terminology
The lunar wake is a plasma-depleted region that forms downstream of the Moon as the solar wind flows past it. As the solar wind refills the wake, electric fields develop along the magnetic field direction that control particle motion.
The electron phase space density f(x, p_x) describes the number of electrons per unit volume of phase space at position x along the magnetic field and momentum p_x. It is the primary observable used to infer the electric potential in this study.
The electric potential φ(x) (in units of T_e/e, where T_e is the electron temperature and e is the elementary charge) describes the electrostatic energy landscape along the magnetic field line. Electrons gain or lose kinetic energy as they move through regions of different potential.
The Hamiltonian inversion method infers φ(x) by exploiting the quasi-static Vlasov equilibrium condition f = f(H), where H = p_x²/(2m_e) − eφ(x) is the electron Hamiltonian. The method uses a domain-decomposition strategy to handle the asymmetry between the two sides of the wake and the flat-top distributions in the central wake.
The Hamiltonian shift method is a conventional comparison method that infers φ(x) by identifying the energy shift that aligns local electron distributions with a reference solar wind distribution.
Simulation units: all PIC simulation quantities are stored in the following normalized units:
- Length: electron inertial length d_e
- Velocity: speed of light c
- Time: inverse electron plasma frequency ω_pe⁻¹ (note: snapshot times in the file descriptions are expressed in units of ω_pi⁻¹, the inverse ion plasma frequency, which is the physically relevant timescale for ion refilling; the two are related by ω_pi⁻¹ = sqrt(m_i/m_e) × ω_pe⁻¹)
- Electric potential: m_e·c²/e, where e is the elementary charge and m_e is the electron mass
- Electric field: m_e·c²/(e·d_e)
Note: the domain geometry is described in units of d_i (ion inertial length) for physical clarity, where d_i = sqrt(m_i/m_e) × d_e. The electric potential in the plain text files (.txt) is expressed in normalized units of eφ/T_e, where T_e is the electron temperature, which differs from the native simulation unit m_e·c²/e by a factor of T_e/(m_e·c²).
File Structure
notebooks.tar.gz — Jupyter notebooks for reproducing all figures
data-vpic.tar.gz — PIC simulation output data (~12 GB)
data-artemis.tar.gz — Processed ARTEMIS spacecraft data (~4.3 MB)
hamiltonian_shift.tar.gz — Electric potentials from Hamiltonian shift method (~97.6 kB)
Data Files
data-vpic.tar.gz (~12 GB)
Output files from a one-dimensional particle-in-cell (PIC) simulation of the lunar wake. The simulation models a field-aligned slice of plasma across the wake, with the domain spanning −30 d_i ≤ x ≤ 30 d_i (300,000 grid cells). The Moon occupies |x| ≤ 13.2 d_i. The simulation is run using the VPIC code (Bowers et al. 2008). Working code to read all files in this archive is provided in the Jupyter notebooks (see Notebooks section below).
Electric field file
| File | Description | Format | Units |
|---|---|---|---|
ex.gda |
Parallel electric field E_x(x, t) along the magnetic field line, stored for all simulation time steps | Binary (.gda), little-endian 32-bit float |
m_e·c²/(e·d_e) |
The .gda file is a raw binary file containing a time series of 1D electric field snapshots (time indices 0 to 12000). It requires the helper function read_xyz provided in ReadFile.py in the notebooks directory. A minimal example to read the electric field at time index it:
import numpy as np
import ReadFile
nx = 300000
it = 10000 # any integer from 0 to 12000
ex = (ReadFile.read_xyz(nx, 1, 1, it, 'ex', datadir))[:, 0, 0]
print(ex)
To obtain the electric potential φ(x) at a given time step, integrate E_x along x (note: φ = −∫E_x dx). To reduce particle noise, we recommend averaging E_x over a window of ~200 consecutive time steps before integrating, as done in the associated Jupyter notebooks.
Electron phase space density files
The electron phase space density f(x, p_x) is split into two populations by the direction of electron travel along the magnetic field:
- Left-originating (
el): electrons originating from the left (sunward) boundary, traveling in the +x direction - Right-originating (
er): electrons originating from the right (anti-sunward) boundary, traveling in the −x direction
The total phase space density is f = f_left + f_right.
The phase space grid covers:
- x: 3000 spatial cells spanning −30 d_i to 30 d_i (spatial resolution: 0.02 d_i per cell, stored in units of d_e)
- p_x: 400 momentum cells spanning −18.5 m_e·v_T to 18.5 m_e·v_T, where v_T is the core electron thermal velocity
| File | Description | Format | Units |
|---|---|---|---|
elxvx.15150000.bin |
Left-originating electron phase space density f_left(x, p_x) at t = 3000 ω_pi⁻¹ | Binary (.bin), little-endian 32-bit float |
a.u. |
erxvx.15150000.bin |
Right-originating electron phase space density f_right(x, p_x) at t = 3000 ω_pi⁻¹ | Binary (.bin), little-endian 32-bit float |
a.u. |
elxvx.50500000.bin |
Left-originating electron phase space density f_left(x, p_x) at t = 10000 ω_pi⁻¹ | Binary (.bin), little-endian 32-bit float |
a.u. |
erxvx.50500000.bin |
Right-originating electron phase space density f_right(x, p_x) at t = 10000 ω_pi⁻¹ | Binary (.bin), little-endian 32-bit float |
a.u. |
Each .bin file contains a single 2D array of shape (400, 3000) with p_x along the first axis and x along the second axis. A minimal example to read the left-originating electron phase space density at t = 3000 ω_pi⁻¹:
import numpy as np
nvx, nx = 400, 3000
fxvxel = np.fromfile('elxvx.15150000.bin', dtype=np.float32)
fxvxel = np.reshape(fxvxel, (nvx, nx), order='C')
print(fxvxel)
Other .bin files can be read in the same way by substituting the appropriate filename.
data-artemis.tar.gz (~2 MB)
Processed electron phase space density measurements from the ARTEMIS P1 spacecraft during two lunar wake crossings. ARTEMIS (Acceleration, Reconnection, Turbulence and Electrodynamics of the Moon's Interaction with the Sun) is a NASA mission consisting of two spacecraft (P1 and P2) orbiting the Moon. The data are provided in IDL save format (.sav), which can be read in Python using scipy.io.readsav (included in the scipy package) or in IDL using the restore command.
| File | Description | Wake crossing date | Format |
|---|---|---|---|
efpara-2016-07-29.sav |
Electron phase space density f(x, p_x) during early-stage wake crossing | 2016-07-29 | IDL save (.sav) |
efpara-2011-10-23.sav |
Electron phase space density f(x, p_x) during late-stage wake crossing | 2011-10-23 | IDL save (.sav) |
A minimal example to read the data:
from scipy.io import readsav
sav_data = readsav('efpara-2011-10-23.sav')
print(sav_data)
Each .sav file contains the following variables:
| Variable | Description | Units |
|---|---|---|
tarr |
Time array (Unix time) | seconds |
freduce1ds |
Electron phase space density f(x, p_x) measured by ARTEMIS | s/(km cm³) |
The keys of any .sav file can be listed using print(sav_data.keys()), and data corresponding to each key can be accessed as sav_data['key_name'].
hamiltonian_shift.tar.gz (~97.6 kB)
Electric potential profiles inferred by the Hamiltonian shift method (Xu et al. 2019), provided for direct comparison with the Hamiltonian inversion method results presented in the paper.
| File | Description | Case | Format |
|---|---|---|---|
model_pot_err_updated_t3000.txt |
Hamiltonian shift potential for PIC simulation at t = 3000 ω_pi⁻¹ | Early stage | Plain text (.txt) |
model_pot_err_updated_t10000.txt |
Hamiltonian shift potential for PIC simulation at t = 10000 ω_pi⁻¹ | Late stage | Plain text (.txt) |
art_pot_2016-07-29_200-1100eV_XinData_updated.sav |
Hamiltonian shift potential for ARTEMIS crossing on 2016-07-29 | Early stage | IDL save (.sav) |
art_pot_2011-10-23_XinData_updated.sav |
Hamiltonian shift potential for ARTEMIS crossing on 2011-10-23 | Late stage | IDL save (.sav) |
Plain text files (.txt): each file contains two columns — position x (in units of d_i) and normalized electric potential eφ/T_e — with one header line. Readable with any text editor or standard numerical software.
IDL save files (.sav) for ARTEMIS Hamiltonian shift results: readable using scipy.io.readsav in Python or restore in IDL, following the same approach as for the ARTEMIS data files above. Each file contains the following variables:
| Variable | Description | Units |
|---|---|---|
t |
Time array (Unix time) | seconds |
pot_para |
Electric potential inferred from electrons with parallel momentum p_x > 0 | V |
pot_anti |
Electric potential inferred from electrons with parallel momentum p_x < 0 | V |
pot_full |
Composite potential combining pot_para and pot_anti | V |
err_para |
Uncertainty associated with pot_para | V |
err_anti |
Uncertainty associated with pot_anti | V |
Notebooks
All notebooks are contained in notebooks.tar.gz. Each notebook is self-contained and includes working code to read the data files and reproduce the figures for one case in the paper.
PIC Simulation Cases
plots3_pot_optimum_jit-near.ipynb
Infers the lunar wake electric potential at the early stage of plasma refilling (t = 3000 ω_pi⁻¹, no ion acoustic shocks) using the Hamiltonian inversion method, and compares the result with the Hamiltonian shift method.
Required data files:
data-vpic.tar.gz:ex.gda,elxvx.15150000.bin,erxvx.15150000.binhamiltonian_shift.tar.gz:model_pot_err_updated_t3000.txt
plots3_pot_optimum_jit-far.ipynb
Infers the lunar wake electric potential at the late stage of plasma refilling (t = 10000 ω_pi⁻¹, ion acoustic shocks present in the central wake) using the Hamiltonian inversion method, and compares the result with the Hamiltonian shift method.
Required data files:
data-vpic.tar.gz:ex.gda,elxvx.50500000.bin,erxvx.50500000.binhamiltonian_shift.tar.gz:model_pot_err_updated_t10000.txt
ARTEMIS Spacecraft Cases
plots3_pot_optimum_jit_scdata-near.ipynb
Infers the lunar wake electric potential from ARTEMIS observations during an early-stage wake crossing (2016-07-29) using the Hamiltonian inversion method, and compares the result with the Hamiltonian shift method.
Required data files:
data-artemis.tar.gz:efpara-2016-07-29.savhamiltonian_shift.tar.gz:art_pot_2016-07-29_200-1100eV_XinData_updated.sav
plots3_pot_optimum_jit_scdata-far.ipynb
Infers the lunar wake electric potential from ARTEMIS observations during a late-stage wake crossing (2011-10-23) using the Hamiltonian inversion method, and compares the result with the Hamiltonian shift method.
Required data files:
data-artemis.tar.gz:efpara-2011-10-23.savhamiltonian_shift.tar.gz:art_pot_2011-10-23_XinData_updated.sav
Software Requirements
- Python 3.x
- Jupyter Notebook or JupyterLab
- Required Python packages:
numpy,scipy,matplotlib,numba scipy.io.readsavfor reading.savfiles (included inscipy)
References
- Bowers, K. J. et al. (2008). Ultrahigh performance three-dimensional electromagnetic relativistic kinetic plasma simulation. Physics of Plasmas, 15, 055703. https://doi.org/10.1063/1.2840133
- Xu, S. et al. (2019). Mapping the lunar wake potential structure. Journal of Geophysical Research: Space Physics, 124, 3360–3372. https://doi.org/10.1029/2019JA026536
Contact
For questions about the data or notebooks, please contact Xin An at the Department of Earth, Planetary, and Space Sciences, University of California, Los Angeles (UCLA).
