Basis Function Expansions

Basis Function Expansions, or BFE, are the technical engine that powers much of my science. The most powerful tool to this end is EXP (pronounced 'E-X-P'), short for EXPANSION, a C++ code developed by Martin Weinberg. The theory behind the code is described primarily in this paper. While mature, the code is still actively being developed, and we are working to build the user base.

Project Overview

Basis Function Expansions (BFEs) are a powerful tool to represent distributions. I most often use them to characterise 3d density fields from sets of points (particles), but that isn't where BFE stop! One can also use them for 2d distributions, or for non-density quantities. I'm actively working on their technical development, please reach out if you are interested!

The main software

I'm actively developing tutorials for the use of EXP (currently in a soft release). I'm currently offering live versions of some basic instructions to get EXP up and running. The PDF notes from the sessions that have already run are here. Recordings of the live demonstrations are here for 'Running N-body' and here for 'Building a basis'. The material for running the tutorials is hosted here on Google Drive.

Auxiliary software

A modestly updated spherical basis tutorial is available here. Additionally, this file has a simplified version of the stars in the Naidu et al. (2021) GSE model.


A pedagogical approach to multichannel singular spectral analysis (MSSA) may be found here, along with a data file.


I maintain a set of tools for galactic dynamics that are built on basis function expansions: exptool.


I maintain a header-only C++ library that supports simple basis function utilities: sphexpansion.