Skip to main content

Python package for loading and converting SPECS Phoibos analyzer data.

Project description

Documentation Status Ruff Coverage Status

specsanalyzer

This is the package specsanalyzer for conversion and handling of SPECS Phoibos analyzer data.

This package contains two modules: specsanalyzer is a package to import and convert MCP analyzer images from SPECS Phoibos analyzers into energy and emission angle/physical coordinates. specsscan is a Python package for loading Specs Phoibos scans acquired with the labview software developed at FHI/EPFL

Tutorials for usage and the API documentation can be found in the Documentation

Installation

Pip (for users)

  • Create a new virtual environment using either venv, pyenv, conda, etc. See below for an example.
python -m venv .specs-venv
  • Activate your environment:
source .specs-venv/bin/activate
  • Install specsanalyzer from PyPI:
pip install specsanalyzer
  • This should install all the requirements to run specsanalyzer and specsscanin your environment.

  • If you intend to work with Jupyter notebooks, it is helpful to install a Jupyter kernel for your environment. This can be done, once your environment is activated, by typing:

python -m ipykernel install --user --name=specs_kernel

Configuration and calib2d file

The conversion procedures require to set up several configuration parameters in a config file. An example config file is provided as part of the package (see documentation). Configuration files can either be passed to the class constructors, or are read from system-wide or user-defined locations (see documentation).

Most importantly, conversion of analyzer data to energy/angular coordinates requires detector calibration data provided by the manufacturer. The corresponding *.calib2d file (e.g. phoibos150.calib2d) are provided together with the spectrometer software, and need to be set in the config file.

For Contributors

To contribute to the development of specsanalyzer, you can follow these steps:

  1. Clone the repository:
git clone https://github.com/OpenCOMPES/specsanalyzer.git
cd specsanalyzer
  1. Check out test data (optional, requires access rights):
git submodule sync --recursive
git submodule update --init --recursive
  1. Install the repository in editable mode:
pip install -e .

Now you have the development version of specsanalyzer installed in your local environment. Feel free to make changes and submit pull requests.

Poetry (for maintainers)

poetry shell
  • A new shell will be spawned with the new environment activated.

  • Install the dependencies from the pyproject.toml by typing:

poetry install --with dev, docs
  • If you wish to use the virtual environment created by Poetry to work in a Jupyter notebook, you first need to install the optional notebook dependencies and then create a Jupyter kernel for that.

    • Install the optional dependencies ipykernel and jupyter:
    poetry install -E notebook
    
    • Make sure to run the command below within your virtual environment (poetry run ensures this) by typing:
    poetry run ipython kernel install --user --name=specs_poetry
    
    • The new kernel will now be available in your Jupyter kernels list.

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

specsanalyzer-1.2.0.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

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

specsanalyzer-1.2.0-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file specsanalyzer-1.2.0.tar.gz.

File metadata

  • Download URL: specsanalyzer-1.2.0.tar.gz
  • Upload date:
  • Size: 44.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for specsanalyzer-1.2.0.tar.gz
Algorithm Hash digest
SHA256 8cdddeba4c0a82249b630c3579ed85f2aba025e16cc7f0ac403e180cd093a2a3
MD5 c9d00f451e96e49ea2145311741071d9
BLAKE2b-256 4813e5a09712319b0976f07c2f76f39d39a720740210243bc7673a73e6cd9e54

See more details on using hashes here.

Provenance

The following attestation bundles were made for specsanalyzer-1.2.0.tar.gz:

Publisher: release.yml on OpenCOMPES/specsanalyzer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file specsanalyzer-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: specsanalyzer-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for specsanalyzer-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 728806c5ec579a14ac52a5b9fce575af222f8d9c8208b05cd808f2b9c828b3ef
MD5 bddf6a035a20a1752926dc4eda712291
BLAKE2b-256 cacada33008a5594aa4b7de3f9f5feb830fad22e2d3d6848db89a488e360aefc

See more details on using hashes here.

Provenance

The following attestation bundles were made for specsanalyzer-1.2.0-py3-none-any.whl:

Publisher: release.yml on OpenCOMPES/specsanalyzer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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