cryoeraser is a Python package for erasing features in cryo electron microscopy data.
Removing high-contrast image features such as ice contamination or gold fiducial markers can be useful for downstream processing.
Masked image regions are replaced with noise drawn from a normal distribution matching the local mean and a global standard deviation of an image.
cryoeraser is available on the Python package index.
pip install cryoeraser
We recommend working in a virtual environment.
import tifffile
from cryoeraser import erase_2d
image = tifffile.imread('examples/data/TS_01_0.0.tiff')
mask = tifffile.imread('examples/data/TS_01_0.0_mask.tiff')
erased = erase_2d(image=image, mask=mask)
An example notebook is also provided.