mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-09-18 16:42:09 +02:00
0b122b0aca53a793ecf0e0e6a719abe134e4caf2
debugging_mod contains the various functions used to interface with the debugging data, while vid_read has examples of how to use them. I'm still in the process of trying to fix the g2 correlation function.
CDTools
CDTools is a python library for ptychography and CDI reconstructions, using an Automatic Differentiation based approach.
# imports
from matplotlib import pyplot as plt
from CDTools.datasets import Ptycho_2D_Dataset
from CDTools.models import SimplePtycho
# Load the file
dataset = Ptycho_2D_Dataset.from_cxi('ptycho_data.cxi')
# Generate a model from the data
model = SimplePtycho.from_dataset(dataset)
# Run a reconstruction
for i, loss in enumerate(model.Adam_optimize(10, dataset)):
print(i, loss)
# And look at the results!
model.inspect(dataset)
model.compare(dataset)
plt.show()
Full installation instructions and documentation can be found here.
Have a wonderful day!
Languages
Python
100%