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 accquired 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 constructures, 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.calbid2d) 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-0.1.6a0.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

specsanalyzer-0.1.6a0-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file specsanalyzer-0.1.6a0.tar.gz.

File metadata

  • Download URL: specsanalyzer-0.1.6a0.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for specsanalyzer-0.1.6a0.tar.gz
Algorithm Hash digest
SHA256 2d513ae29e789dada801a10a58dae94ea933e1a778cb50a9d204f2e84fb60438
MD5 e8fab4083da2cafb3a5ca6a308134e78
BLAKE2b-256 38f1f1121adc7f12fa9e5402f1b9bfb245c45e505627c56972dfc114ccc54ee9

See more details on using hashes here.

File details

Details for the file specsanalyzer-0.1.6a0-py3-none-any.whl.

File metadata

File hashes

Hashes for specsanalyzer-0.1.6a0-py3-none-any.whl
Algorithm Hash digest
SHA256 51fdb162686549fd66f2c9896d815ca56ef625b7e680b0d2fbee8d4131cd31d0
MD5 af5065fa95268a58207ec6952b807ff5
BLAKE2b-256 5297477e207de72cf270c217224bdae8252018265a08aa5b0d25aa22f3a13e62

See more details on using hashes here.

Supported by

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