Skip to content

A GPU and CPU accelerated python package for aligning tomography datasets.

Notifications You must be signed in to change notification settings

jtschwar/projection_refinement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A python implemenation of the projection matching method (PMA) developed by the Paul Scherrer Institute (PSI). When I created this repository, there was no python implementation available, which limited the capability of aligning large datasets with supercomupting resources. Although there is an official Matlab implementation, this is an available Python package that is a useful platform to test and develop more advanced alignment algorithms.

Installation

To build the alignment package, first build the tomo_TV reconstruction package. Once the reconstruction package is available, we can build tomoalign with pip install:

git clone https://github.com/jtschwar/projection_refinement.git
cd projection_refinement
pip install -e . 

Quick Start

To run the alignment script, we simply need to provide the the tilt series and tilt angles from the experiment.

from tomoalign.aligner import AlignmentWorkflow
from tomoalign import load_demo

# Initialize the Alignment Class
(tiltSeries, tiltAngles) = load_demo()
aligner = AlignmentWorkflow(tiltSeries, tiltAngles)

# We can play with different reconstruction algorithms 
# (1) aligner.params['alg'] = 'sart'; aligner.params['initAlg'] = 'sequential'
# (2) aligner.params['alg'] = 'sirt'; aligner.params['initAlg'] = None
# (3) aligner.params['alg'] = 'wbp'; aligner.params['initAlg'] = 'ram-lak'

# Results is a dictionary with the aligned sinogram, measured shifts, and parameters metadata.
aligner.run(binning_factors=[4,2,1])

# Apply the measured shifts to secondary datasets
eels_data = {'Ca': ca_tilt_series, 'Ni': ni_tilt_series, 'C': c_tilt_series}
aligned_eels = aligner.apply_alignments(eels_data, eels_angles)

# Save the Results to the given h5 file name.
aligner.save('aligned.h5')

References

If you use tomoalign for your research, we would appreciate it if you cite to the following papers:

Contact

email: jtschwar@gmail.com website: https://jtschwar.github.io

About

A GPU and CPU accelerated python package for aligning tomography datasets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages