-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cdi plot #294
Cdi plot #294
Conversation
@@ -281,6 +283,10 @@ def cdi_recon(diffracted_pattern, sample_obj, sup, | |||
n_iterations : int, optional | |||
number of iterations to run. | |||
default is 1000. | |||
plot_function : function, optional | |||
plotting function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is a callback function that expects to receive these four objects: sample_obj, obj_error, diff_error, sup_error
Done. thanks! |
@@ -45,6 +45,7 @@ | |||
import numpy as np | |||
import time | |||
from scipy.ndimage.filters import gaussian_filter | |||
import matplotlib.pyplot as plt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not need this import here
Done! |
@@ -281,6 +282,12 @@ def cdi_recon(diffracted_pattern, sample_obj, sup, | |||
n_iterations : int, optional | |||
number of iterations to run. | |||
default is 1000. | |||
cb_function : function, optional | |||
This is a callback function that expects to receive these | |||
four objects: sample_obj, obj_error, diff_error, sup_error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also list the expected types. Imaging reading this doc string with out having read the function, but wanting to write a callback to plug into this.
Two minor doc/naming comments, but 👍 to merge as soon as those are fixed. |
Updated. |
Add plotting function to cdi reconstruction.