Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
25 changes: 5 additions & 20 deletions py4DSTEM/process/diffraction/digital_dark_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,16 +550,8 @@ def DDF_radial_image(points_array_w_rphi, radius, Rshape, tol=1):

radialimage = np.zeros(shape=Rshape)

for i in range(Rshape[0]):
for j in range(Rshape[1]):
radialimage[i, j] = np.where(
np.logical_and(
radial_filtered_points_array[:, 3] == i,
radial_filtered_points_array[:, 4] == j,
),
radial_filtered_points_array[:, 2],
0,
).sum()
for line in radial_filtered_points_array:
radialimage[int(line[3]), int(line[4])] += line[2]

return radialimage

Expand Down Expand Up @@ -612,14 +604,7 @@ def DDFradialazimuthimage(points_array_w_rphi, radius, phi0, phi1, Rshape, tol=1
)
radiusazimuthimage = np.zeros(shape=Rshape)

for i in range(Rshape[0]):
for j in range(Rshape[1]):
radiusazimuthimage[i, j] = np.where(
np.logical_and(
rphi_filtered_points_array[:, 3] == i,
rphi_filtered_points_array[:, 4] == j,
),
rphi_filtered_points_array[:, 2],
0,
).sum()
for line in rphi_filtered_points_array:
radiusazimuthimage[int(line[3]), int(line[4])] += line[2]

return radiusazimuthimage
4 changes: 2 additions & 2 deletions py4DSTEM/visualize/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ def show(
* 'centered': The vmin/vmax values are set to ``c -/+ m``, where by default
'c' is zero and m is the max(abs(ar-c), or the two params can be user
specified using the kwargs vmin/vmax -> c/m.
vmin (number): min intensity, behavior depends on clipvals
vmax (number): max intensity, behavior depends on clipvals
vmin (number): min intensity, behavior depends on intensity_range
vmax (number): max intensity, behavior depends on intensity_range
min,max: alias' for vmin,vmax, throws deprecation warning
power (number): specifies the scaling power
power_offset (bool): If true, image has min value subtracted before power scaling
Expand Down