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

Patch for failing extraction at volume edges #60

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

McHaillet
Copy link
Collaborator

@McHaillet McHaillet commented Nov 8, 2023

I encountered an error where pytom_extract_candidates.py was crashing because it was trying to extract a particle at the edge of the score volume. This should never happen as in line 46-51 the edge region is masked out.

My fixes:

  • Regions of the score map that should not be extracted are now set to 0 instead of -1. This was leading to errors as the peak mask that was multiplied with the score map had 0 values, which lead to -1 values being reset to 0.
  • This now also means the extraction cut_off cannot be smaller than 0 and the check for each particle (in extract.py line 92) is now changed to <= instead of < as this guarantees the program stops once a 0 value has been encountered as the maximum.

@McHaillet McHaillet changed the title Patch for extraction cut off Patch for failing extraction at volume edges Nov 8, 2023
@McHaillet McHaillet requested a review from sroet November 9, 2023 10:24
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 change and please update the version number for this bugfix

src/pytom_tm/extract.py Show resolved Hide resolved
@McHaillet
Copy link
Collaborator Author

version is also updated to 0.3.2

Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to merge

@McHaillet McHaillet merged commit 996800a into SBC-Utrecht:main Nov 10, 2023
@McHaillet McHaillet deleted the patch-extraction-cut-off branch November 10, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants