Skip to content

epanepucci/cbf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 57.1%
  • C++ 22.0%
  • C 20.4%
  • Other 0.5%