FabIO is an I/O library for diffraction images written in python. It combines the functionalities which evolved in Fabian and ImageD11.
The design specification can be viewed at: PyImageIO.
Changelog from FabIO-0.0.4 to FabIO-0.0.6: - Support for CBF files from Pilatus detectors - Support for KCD files from Nonius Kappa CCD images - write EDF with their native data type (instead of uint16 by default)
fabio can be downloaded from the fable download page on sourceforge.net. Presently the source code has been distributed as a zip package and a compressed tarball. Download either one and unpack it.
e.g.
tar xvzf fabio-0.0.6.tar.gz
or
unzip fabio-0.0.6.zip
all files are unpacked into the directory fabio-0.0.6. To install these do
cd fabio-0.0.6
and install fabio with
python setup.py install
most likely you will need to do this with root privileges (e.g. put sudo in front of the command).
The newest development version can be obtained by checking it out from the subversion (SVN) repository. Do
svn checkout https://fable.svn.sourceforge.net/svnroot/fable/fabio/ fabio
cd fabio/trunk
sudo python setup.py install
If you are using MS Windows you also download a binary version packaged as executable installation files. Dependant on your python version open either
fabio-0.0.6.win32-py2.5.exe
or
fabio-0.0.6.win32-py2.6.exe
The installation of modules is easiest if Python 2.5 or later (but not Python 3.00 is installed. Since precompiled and installation ready versions are available of all the needed python modules.
For full functionality of fabio the following modules need to be installed.
To use fabio on Ubuntu (a linux distribution based on Debian) the needed python modules can be installed either through the Synaptic Package Manager (found in System -> Administration) or using apt-get on from the command line in a terminal.
The extra ubuntu packages needed are:
using apt-get these can be installed as:
sudo apt-get install python-imaging python-imaging-tk python-numpy
using Synaptic Package Manager:
**search** to find the specific ubuntu packages instead
**mark** them for installation
**Apply** to install
Fabio is expected to handle gzip and bzip2 compressed files transparently. Perhaps also zip if someone adds it. Following a query about the performance of reading compressed data, some benchmarking details have been collected at [fabio_compressed_speed]. This means that when your python was configured and built you needed the bzip and gzip modules to be present (eg libbz2-dev package for ubuntu)
Example:
>>> import fabio
>>> obj = fabio.edfimage("mydata0000.edf")
>>> obj.data.shape
(2048, 2048)
>>> obj.header["Omega"]
23.5
We hope it will be relatively easy to add new file formats to fabio in the future. The basic idea is the following:
Wiki: FitAllB
Wiki: Home
Wiki: fabian
Wiki: fabio_compressed_speed
Wiki: fabric
Wiki: imaged11