Skip to content
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

Improve weight stack function #12

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion etspy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ def weight_stack(
weighted_stack.data * window[np.newaxis, :, :],
axis=(1, 2),
)

# Update the status and adjustments for slices with weighted sums below min_mass
update_mask = (status != 0) & (weighted_mass < min_mass)
status[update_mask] = 0
Expand All @@ -249,6 +248,7 @@ def weight_stack(
# In this step the severity of the window is calculated again using the value
# calculated in the coarse step and the window is made more restrictive in 1
# pixel increments.

status = np.ones(ntilts)
status[min_slice] = 0

Expand Down
Loading