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.2.0-cp312-cp312-manylinux_2_24_x86_64.whl (593.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64

cfelpyutils-2.2.0-cp311-cp311-manylinux_2_24_x86_64.whl (604.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64

cfelpyutils-2.2.0-cp310-cp310-manylinux_2_24_x86_64.whl (575.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64

cfelpyutils-2.2.0-cp39-cp39-manylinux_2_24_x86_64.whl (576.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64

File details

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

File metadata

File hashes

Hashes for cfelpyutils-2.2.0-cp312-cp312-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 e5773d74632e53ce28f73fc33e34f183ec0fdd5d344276e66059924073932a9a
MD5 349e324e3f15699be84cc3f47b9ac93f
BLAKE2b-256 c50bcd85b7b487e33ac90227d6f5b271cb2451447a62bd660c2dc4604af4173b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cfelpyutils-2.2.0-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 b12845f5e011ffbbe00e9e4e412d211309b910c35253781b403ee885791fa8ad
MD5 e29eae69deb5c29941184e3243f56074
BLAKE2b-256 07442c3ca416851a546be3a2645f21f23a8457d927c7c72b469cdb49db0ebf36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cfelpyutils-2.2.0-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 97fc2927c34cb9c7f1266fb49bb07782d9585f61f3e16d4ad5e77c2e4783059e
MD5 6ad94478284ed34bb9d0b8e52a098ef9
BLAKE2b-256 4350aeda74cc263dab7aa51d72a1e7fbe656bcfa677257d01cc9d9e007a8a81c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cfelpyutils-2.2.0-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 b94756e08d89090f5fdd8e3bacccd22a1e1b237b19f04ebba562e6515bd9b1e9
MD5 2f4088e4961c6217e5cbdafa33a3d1d8
BLAKE2b-256 432347e6cc4768cb647966489ace9e83afc1af94a437f0b976f9ba60e30d4034

See more details on using hashes here.

Supported by

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