Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion py4DSTEM/process/diffraction/flowlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,11 @@ def fit_dist(x, *coefs):
z = np.maximum(z, 1.0)
coefs = [np.max(z), np.min(z), x[-1] * 0.25, 2]
bounds = ((1e-3, 0, 1e-3, 1.0), (np.inf, np.inf, np.inf, np.inf))
coefs = curve_fit(fit_dist, x, z, p0=coefs, bounds=bounds)[0]
try:
coefs = curve_fit(fit_dist, x, z, p0=coefs, bounds=bounds)[0]
except RuntimeError as e:
print(f"A runtime error has occured: {e}")
continue
coef_annular = coefs[2] * (np.log(1 / fraction_coefs) ** (1 / coefs[3]))
if orient_corr[ind, 0, 0] <= orient_corr[ind, -1, 0]:
coef_annular = orient_corr.shape[1] - 1 - coef_annular
Expand Down
3 changes: 3 additions & 0 deletions py4DSTEM/process/polar/polar_datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def __init__(
plot_radial_background,
model_radial_background,
make_orientation_histogram,
# Added
Comment thread
NJMarchese marked this conversation as resolved.
Outdated
find_peaks_single_pattern_segmented,
find_peaks_segmented,
)

# sampling methods + properties
Expand Down
Loading