skillfed

fabio

FabIO is an I/O library for images produced by 2D X-ray detectors and written in Python

fabio v2026.6.0 96.1K downloads/30d#13,233 on PyPI66
Permissive license Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: fabio Upstream-Contact: Jérôme Kieffer <kieffer@esrf.eu> Source:… (full text in the JSON record) Active released

What it is and what it does

FabIO is a Python I/O library for reading and writing detector images from 2D X-ray diffraction experiments. It abstracts over 30 file formats from a dozen detector manufacturers into a unified interface: each image becomes a numpy array (data) plus an ordered dictionary of header metadata. The library handles formats ranging from simple TIFF and EDF to vendor-specific compressed formats like CBF and Pilatus, and supports HDF5-based formats like Eiger through h5py integration.

Typically used in synchrotron beamline software, crystallography pipelines, and scientific data processing workflows where detector images need to be read, inspected, and written without format-specific boilerplate. It includes convenience methods for statistics (min, max, mean, stddev), rebinning, and transparent decompression of gzip/bzip2 files. The package depends on numpy for array operations, h5py for HDF5 support, pillow for TIFF/image handling, lxml for XML formats, and filelock for concurrent access.

Use it for:

  • Load CBF or EDF detector frames and access pixel data and experimental parameters via a uniform interface.
  • Batch convert detector images between formats without writing format-specific code.
  • Read HDF5-based Eiger detector stacks and extract 2D slices as numpy arrays for analysis.
  • Build a data pipeline that accepts images from multiple detector types and processes them uniformly.
  • Inspect detector image headers and statistics quickly without loading the full array into memory.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

FabIO reads and writes 2D X-ray detector images in 30 different formats from vendors like Mar, Dectris, ADSC, and Hamamatsu, exposing image data as numpy arrays and headers as Python dictionaries.

Yes, if you work with 2D X-ray detector images from synchrotron or laboratory diffraction systems. The library is actively maintained, permissively licensed (MIT primary), and eliminates format-specific parsing code. Medium install friction from compiled dependencies is acceptable for the breadth of format support. Not relevant for general image processing; consider only if your workflow involves detector formats like CBF, EDF, or Eiger.

Install

fabio on PyPI

pip

pip install fabio

uv

uv add fabio

poetry

poetry add fabio

Installing fabio

Before you install

Medium install friction due to 6 runtime dependencies (numpy, h5py, hdf5plugin, lxml, pillow, filelock) and compiled C/Cython components. Actively maintained with recent release 56 days ago and ongoing repository activity.

License in practice

Primarily MIT-licensed with permissive treatment. Some components use LGPL-3.0+ and GPL-2.0+; verify compatibility if redistributing or modifying for proprietary use.

Quickstart

import fabio
obj = fabio.open("mydata0000.edf")
print(obj.data.shape)
print(obj.header["Omega"])

Requires h5py and hdf5plugin for HDF5/Eiger format support; gzip and bzip2 modules needed for transparent compressed file handling.

Verify before relying

  • Whether all 30 file formats are equally well-tested or if some are rarely used
  • Performance characteristics for large detector images or batch processing
  • Exact Python version support floor (requires >=3.11 but earliest tested version unclear)

Package facts

License Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: fabio Upstream-Contact: Jérôme Kieffer <kieffer@esrf.eu> Source:… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies 6 — numpy, h5py, hdf5plugin, lxml, pillow, filelock
Maintenance actively maintained — 56 days since the last release
Last repo commit
First released
Downloads 96,074/month — #13,233 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fabio-2026.6.0-cp311-cp311-macosx_10_9_x86_64.whl; fabio-2026.6.0-cp311-cp311-macosx_11_0_arm64.whl; fabio-2026.6.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; fabio-2026.6.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; fabio-2026.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; fabio-2026.6.0-cp311-cp311-win_amd64.whl; fabio-2026.6.0-cp312-cp312-macosx_10_13_x86_64.whl; fabio-2026.6.0-cp312-cp312-macosx_11_0_arm64.whl; fabio-2026.6.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; fabio-2026.6.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; fabio-2026.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; fabio-2026.6.0-cp312-cp312-win_amd64.whl; fabio-2026.6.0-cp313-cp313-macosx_10_13_x86_64.whl; fabio-2026.6.0-cp313-cp313-macosx_11_0_arm64.whl; fabio-2026.6.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; fabio-2026.6.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; fabio-2026.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; fabio-2026.6.0-cp313-cp313-win_amd64.whl; fabio-2026.6.0-cp314-cp314-macosx_11_0_arm64.whl; fabio-2026.6.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: CProgramming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: ChemistryTopic :: Scientific/Engineering :: PhysicsTopic :: Scientific/Engineering :: VisualizationTopic :: Software Development :: Libraries :: Python Modules

Tags

x-ray detector image iocbf edf tiff image reader2d detector data formatssynchrotron image processingcrystallography image loader
x-ray-diffractiondetector-formatscrystallography

More Python Modules packages