Skip to main content

Python tools for analysis of angle-resolved photoemission and related spectroscopic data

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peaks_arpes-0.5.1.tar.gz (485.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peaks_arpes-0.5.1-py3-none-any.whl (524.9 kB view details)

Uploaded Python 3

File details

Details for the file peaks_arpes-0.5.1.tar.gz.

File metadata

  • Download URL: peaks_arpes-0.5.1.tar.gz
  • Upload date:
  • Size: 485.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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}

File hashes

Hashes for peaks_arpes-0.5.1.tar.gz
Algorithm Hash digest
SHA256 46d7065b1b6b7b39a280d80da6809fb019c35f2318920e68305f55512fed216a
MD5 1e6e250edeecb46b5b4251becd396daa
BLAKE2b-256 c4b68b4be30f6393c51a9295e44fcd83af21159d9ccc9b0122da3a2636c65d69

See more details on using hashes here.

File details

Details for the file peaks_arpes-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: peaks_arpes-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 524.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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}

File hashes

Hashes for peaks_arpes-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1f0b4d70cac394604ff8c3777f1506ca99d3846aece5455a04548382500e63d
MD5 157b3a2e21cb7eea04cb9fca4561113c
BLAKE2b-256 89bd32f6c63ee387e3b3d4383aa6a30a5bacee00e40a2df693e4e23843f959e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page