Skip to main content

Utility functions and classes for CFEL software projects

Project description

# The CFELPyUtils Library

## Introduction

CFELPyUtils is a utility library written in Python and developed at the Center For Free Electron Laser Science (CFEL) in Hamburg. It contains several functions and classes that perform various tasks related to the processing of x-ray imaging data. It is used by several internal and released CFEL software projects.

### Features

  • Read and apply geometry information to x-ray detector data

  • peak finding algorithm (new in v2.0)

  • calibration tool for the AGIPD 1M detector (new in v2.0)

  • module for reading [CrystFEL](https://www.desy.de/~twhite/crystfel/) streams (new in v2.0)

Please see the [migration guide](#migration-guide) below before upgrading from CFELPyUtils 0.x or 1.x.

## Installation

The CFELPyUtils library is available on the [Python Package Index](https://pypi.org/) (PyPI). It can be installed using the ‘pip’ command:

pip install cfelpyutils

For Python 2, please use the 1.0 version.

pip install cfelpyutils==1.0.1

The library can also be installed manually by checking out this repository and running:

python setup.py install

### Migration Guide

The following table lists functions for which the module affiliation has changes in v2.0. Please replace all old occurances with the new ones.

cfelpyutils-0.x,-1.x | cfelpytuils-2 |
———————- | ————— |
geometry_utils.compute_pix_maps() | geometry.compute_pix_maps() |
geometry_utils.compute_visualization_pix_maps() | geometry.compute_visualization_pix_maps() |
geometry_utils.apply_geometry_to_data() | geometry.apply_geometry_to_data() |
crystfel_utils.load_crystfel_geometry() | geometry.load_crystfel_geometry() |

Please note that geometry.load_crystfel_geometry() now returns a namedtuple of geometry.CrystFELGeometry. Previously it returned only a geometry.TypeDetector. This is not the first element of the tuple.

If your code did this before

`python from cfelpyutils.crystfel_utils import load_crystfel_geometry geometry = load_crystfel_geometry(path_to_geometry_file) `

it needs to be changed to something like

`python from cfelpyutils.geometry import load_crystfel_geometry geometry_tuple = load_crystfel_geometry(path_to_geometry_file) geometry = geometry_tuple.detector ` or `python from cfelpyutils.geometry import load_crystfel_geometry geometry_tuple = cfelpyutils.geometry.load_crystfel_geometry(path_to_geometry_file) geometry = geometry_tuple[0] `

## Contributors

The CFELPyUtils library is currently developed in the lab of [Henry Chapman](https://cid.cfel.de/) at the Center For Free Electron Laser Science in Hamburg.

Many people from different institutions worlwide contribute code, testing and support to the project:

  • Valerio Mariani

  • Anton Barty

  • Andrew Morgan

  • Thomas A. White

  • Thomas Kluyver

  • Philipp Middendorf

  • Luca Gelisio

  • Florian Lauck

If you have any questions or want to contribute, please [contact us](mailto:sc@cfel.de).

## Documentation

Documentation for the CFELPyUtils is available on [GitLab at DESY](https://cfel-sc-public.pages.desy.de/cfelpyutils/) and in the [docs/](docs) of the [repository](https://gitlab.desy.de/cfel-sc-public/cfelpyutils).

## Source Code

The source code of the CFELPyUtils library can be found on the DESY GitLab instance: https://gitlab.desy.de/cfel-sc-public/cfelpyutils

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

cfelpyutils-2.1.0-cp312-cp312-manylinux_2_24_x86_64.whl (613.3 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.24+ x86-64

cfelpyutils-2.1.0-cp311-cp311-manylinux_2_24_x86_64.whl (620.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.24+ x86-64

cfelpyutils-2.1.0-cp310-cp310-manylinux_2_24_x86_64.whl (582.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

cfelpyutils-2.1.0-cp39-cp39-manylinux_2_24_x86_64.whl (586.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

File details

Details for the file cfelpyutils-2.1.0-cp312-cp312-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for cfelpyutils-2.1.0-cp312-cp312-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 2d30c991c8a6baf018289b07ad5222cf16f382e9387418fc7e4568dee03c03b6
MD5 4be709bb74372a2de0adff72baec1e7e
BLAKE2b-256 9e3d0b331aaef8ae8c1f2e3225d488fa2d9b7a68867fb68d5ab36f772298b249

See more details on using hashes here.

File details

Details for the file cfelpyutils-2.1.0-cp311-cp311-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for cfelpyutils-2.1.0-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 ec347ce5fbf676bf6f0e9c708a1d6268d26bff5c129aa724c2246101ac9ce5e9
MD5 f9014986aa38475f8758aaa8467fc823
BLAKE2b-256 aaf6772f06b488437f1256b1c0a8f70f2a7202d7e99680c9ba0dcb73f5c27adc

See more details on using hashes here.

File details

Details for the file cfelpyutils-2.1.0-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for cfelpyutils-2.1.0-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 da7712f39ff4ca0a42f9e6b7588e8b637e1098563f0a9962aceed1bf31a6ccba
MD5 7f8f2a6b67667418911a5f881913963c
BLAKE2b-256 59d32364531d4df6884ee469d0de2141a704a70f172d5e32151f1b53b9ef17d2

See more details on using hashes here.

File details

Details for the file cfelpyutils-2.1.0-cp39-cp39-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for cfelpyutils-2.1.0-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 792258a5898fc86f1af15bcced39ff05d3ca878ea6ab90243992561010291ff0
MD5 5e6221e03182575e510c26070f9c2e3c
BLAKE2b-256 9bd75b0d73af3a205b99353bc3a0a593ff95360aa53f50383965b3d72a9161e7

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