Skip to content

slsdetectorgroup/cbf

 
 

Repository files navigation

Build Status

Overview

CBF is a simple Python package (Python 3.x) for reading and writing cbf files.

Installation

PYPI

pip install cbf

Anaconda

conda install -c https://conda.anaconda.org/paulscherrerinstitute cbf

Usage

  • Read CBF file
import cbf
content = cbf.read('example.cbf')

numpy_array_with_data = content.data
header_metadata = content.metadata

# Plot image with matplot lib
from matplotlib import pyplot as plt
plt.imshow(numpy_array_with_data, cmap='gray', vmax=50)
plt.show()
  • Write CBF file
import cbf
cbf.write('example.cbf', numpy_array)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 54.2%
  • C++ 27.7%
  • C 17.4%
  • Other 0.7%