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 DOI 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
Journal of Open Source Software 11, 10440 (2026)
https://doi.org/10.21105/joss.10440

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.4

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.4
File Size Uploaded
peaks_arpes-0.5.4.tar.gz 498.9 kB Details

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / peaks_arpes-0.5.4.tar.gz

Download URL peaks_arpes-0.5.4.tar.gz
Size 498.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dbc57f6472389d58a61d8f297cfc9ad7610dad1fb7e1cd8c0eefabf62a83eeb8
BLAKE2b-256 checksum
How to use checksums
d2f3ce175dbe44e2d1730bfbd1e18dc7f8da57d69be886053c77f7c0c26ed944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.4-py3-none-any.whl

Download URL peaks_arpes-0.5.4-py3-none-any.whl
Size 539.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d181afec748cfb11c13c954b6abf18713b50a4f02beaf7201b07d7609ec9c801
BLAKE2b-256 checksum
How to use checksums
e8ae8c8b7511c380e3b8f1d39d4ab67a645b5ac3c04735c4939b84b604cb361c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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

This release

0.5.4 This release

2 release files

0.5.3

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