Skip to content

Add ProcessSteps for masking - #119

Open
ahoermann wants to merge 7 commits into
mainfrom
masking
Open

Add ProcessSteps for masking#119
ahoermann wants to merge 7 commits into
mainfrom
masking

Conversation

@ahoermann

Copy link
Copy Markdown
Collaborator

This PR proposes to add two ProcessSteps related to masking.

  1. ApplyMask: The signal and optionally other BaseData are modified in-place, setting the values where mask = 1 to zero.
  2. ThresholdMask: A new mask is created based on whether the values in signal are greater than threshold.

Both steps have been tested qualitatively but not formally with pytest.

@ahoermann

Copy link
Copy Markdown
Collaborator Author

Added tests for the new ProcessSteps, 100% coverage

@toqduj

toqduj commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Threshold masking looks good, should probably have both a lower and upper threshold (dectris marks invalid pixels with a negative integer), and should be applicable to not just signal but any specified BaseData reference. The latter is useful if we want to, for example, mask pixels where the flatfield correction matrix exceeds a certain band. All improvements though, so feel free to leave for later (or leave for me).

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.

2 participants