Skip to main content

peaks

git GitHub Actions Workflow Status - CI GitHub Actions Workflow Status - install tests Latest version on pypi Latest version on conda-forge Supported Python versions docs Code Style: Ruff (Black-compatible)

peaks: Python Electron Spectroscopy Analysis by King Group St Andrews.

peaks provides a collection of analysis tools for the loading, processing and visualisation of spectroscopic data, with a core focus on tools for angle-resolved photoemission.

peaks is an evolution of the PyPhoto package originally developed by Phil King, Brendan Edwards, Tommaso Antonelli, Edgar Abarca Morales, Lewis Hart, and Liam Trzaska from the King group at the University of St Andrews. This version of peaks is the result of a major restructuring of the package in 2023-2025 by Brendan Edwards, Phil King, and Shu Mo.

Citation

If you use peaks in your work, please cite:

peaks: a Python package for analysis of angle-resolved photoemission and related spectroscopies
Phil D. C. King, Brendan Edwards, Shu Mo, Tommaso Antonelli, Edgar Abarca Morales, Lewis Hart, and Liam Trzaska
arXiv:2508.04803 (2025)

Installation

peaks is registered on PyPI under the name peaks-arpes, and is also distributed through the conda-forge channel under the same name peaks-arpes where the version may lag slightly behind that on PyPI.

peaks has been tested with Python 3.11 through 3.14. It is recommended to install peaks in its own isolated environment. E.g.

  • Using uv with a managed project:

    uv init peaks -p 3.13
    cd peaks
    uv add peaks-arpes
    
  • Using conda with an installer such as Miniforge or Miniconda:

    conda create -n peaks python=3.13
    conda activate peaks
    conda install -c conda-forge peaks-arpes # or install from PyPI: pip install peaks-arpes
    
  • Using Python virtual environments (This works with the default Python version installed on the OS. To use a specific Python version, see, e.g. uv-managed virtual environments):

    python -m venv peaks
    source peaks/bin/activate  # Windows PowerShell: peaks\Scripts\activate
    pip install peaks-arpes
    

peaks will then be installed together with its core dependencies.

Intel Mac users: peaks depends on numba which is no longer distributed via pip on Intel macOS. conda-forge still provides numba builds for this platform. Installing peaks from conda-forge is recommended on Intel Macs.

Optional dependencies

peaks can be installed with optional additional dependencies, as uv add "peaks-arpes[dep1, dep2, ...]" if using uv or pip install "peaks-arpes[dep1, dep2, ...]" with pip, where dep is the name of the dependency. The following options can currently be specified:

  • structure - required for the use of the bz module, for e.g. plotting Brillouin zones on the data;
  • ML - required for the use of the machine learning module;
  • dev - optional development dependencies, used for e.g. linting the code and installing pre-commit hooks.
  • docs - optional dependencies for building local copies of the documentation.

Conda users: conda does not support the [extras] syntax. To install with optional dependencies using conda, list them explicitly alongside peaks. E.g. for the structure group:

conda install -c conda-forge peaks-arpes ase trimesh

The full list of optional dependency groups and their packages is defined under [project.optional-dependencies] in pyproject.toml.

Installing from source

peaks can be installed directly from source:

pip install git+https://github.com/phrgab/peaks.git

By default, this installs the latest development version of peaks. To install a stable release from source, append @<tag> to the end of the git link where <tag> is the tag name of the release.

Basic Usage

peaks is typically run in a Jupyter notebook or equivalent. To import peaks run:

import peaks as pks

See the User Guide for more information on the package and its use.

Documentation

The peaks documentation can be found at research.st-andrews.ac.uk/kinggroup/peaks.

Support

For general questions (e.g. installation, usage, contributing), please use our GitHub Discussions page. If that is not possible, please e-mail Phil.

Contributing

Contributions to the package are welcome. Please see the contributing guide in the documentation for more information.

License

Copyright 2019-2026, peaks developers

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

peaks also makes extensive use of many other packages - see dependencies in pyproject.toml and their relevant licenses in the source control of those packages.

Metadata

Release files for peaks-arpes 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peaks-arpes 0.5.3
File Size Uploaded
peaks_arpes-0.5.3.tar.gz 492.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peaks-arpes 0.5.3
File Interpreter ABI Platform
peaks_arpes-0.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / peaks_arpes-0.5.3.tar.gz

Download URL peaks_arpes-0.5.3.tar.gz
Size 492.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b9bf7ab6d601c577dd2ef32256e7a7e5e18962ba6633b68e7d55fc433adc1ce3
BLAKE2b-256 checksum
How to use checksums
d495e0de6b73c6065e3c11d301490b8edd54de29726bd22ad691790dd657d74d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / peaks_arpes-0.5.3-py3-none-any.whl

Download URL peaks_arpes-0.5.3-py3-none-any.whl
Size 531.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a99c1b17f0973facd616288f50b86dea096e8730e988b30a1d8c4da7332f2e24
BLAKE2b-256 checksum
How to use checksums
1a31c71fe5a93aee4f5de368e3081794feba3bdf20f8deefb2672503bdcbb69b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.5.4

2 release files

This release

0.5.3 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page