Python package for loading and converting SPECS Phoibos analyzer data.
Project description
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
andspecsscan
in 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:
- Clone the repository:
git clone https://github.com/OpenCOMPES/specsanalyzer.git
cd specsanalyzer
- Check out test data (optional, requires access rights):
git submodule sync --recursive
git submodule update --init --recursive
- 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)
-
Prerequisites:
- Poetry: https://python-poetry.org/docs/
-
Create a virtual environment by typing:
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
andjupyter
:
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.
- Install the optional dependencies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file specsanalyzer-0.1.4.tar.gz
.
File metadata
- Download URL: specsanalyzer-0.1.4.tar.gz
- Upload date:
- Size: 37.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad84fff04e5a7b283c91923ab26c1b416385e9bd3821ff0da65454bfee0a9d42 |
|
MD5 | 0941b5cf822e838b5bb3214e8e6d0a2b |
|
BLAKE2b-256 | 0070f583a9ecbe3ed856a747f6dfb893b251a444d72e5c6d16b9449158cab23a |
File details
Details for the file specsanalyzer-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: specsanalyzer-0.1.4-py3-none-any.whl
- Upload date:
- Size: 40.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caa3ddc04624a2201a880f8c758975a0931099e82d0df941dc89e1246ec5b904 |
|
MD5 | 52ac93ea21b7d11089677ef21a2cef4b |
|
BLAKE2b-256 | 93f7decc52c10f5dac46ea2426b2ffc8d6100883c7edafd344bcd250c68ac8db |