Skip to content

Read, write, and manipulate diffraction images that use the MarCCD format

License

Notifications You must be signed in to change notification settings

Hekstra-Lab/marccd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marccd

Build codecov apm

Read, write, and manipulate diffraction images that use the MarCCD format

This Python library provides:

  • A MarCCD class for representing diffraction images and their header information
  • IO methods that support reading and writing MarCCD format diffraction images

Installation

I have not yet made this package available on PyPI. However, you can still install it with pip:

pip install git+https://github.com/Hekstra-Lab/marccd.git

Quick Start

Here is a short example of reading and plotting a diffraction image:

import matplotlib.pyplot as plt
from marccd import MarCCD

# Read image
mccd = MarCCD("tests/data/e074a_off1_011.mccd")

# Plot image and mark beam center
plt.imshow(mccd.image, cmap="gray_r", vmin=10, vmax=50)
plt.plot(*mccd.center, 'rx')
plt.axis("off")