Skip to content

Adding methods to correct dead/hot pixels in data - #36

Merged
shum23 merged 19 commits into
devfrom
32-removing-a-dead-pixel-in-a-dispersion
May 28, 2026
Merged

Adding methods to correct dead/hot pixels in data#36
shum23 merged 19 commits into
devfrom
32-removing-a-dead-pixel-in-a-dispersion

Conversation

@phrgab

@phrgab phrgab commented May 26, 2026

Copy link
Copy Markdown
Owner

Adding helper methods for hot/bad-pixel correction in fixed mode and swept scans.

With associated basic unit tests.

Closes #32

@phrgab
phrgab marked this pull request as ready for review May 26, 2026 16:25
@phrgab
phrgab requested a review from shum23 May 26, 2026 16:25

@shum23 shum23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @phrgab. I've just suggested a couple of edits there mainly for the docstrings to make them clearer for users.

I've noticed that the docstring for correct_isolated_bad_pixels says 'up to 2x2' but the code doesn't actually check whether the bad blob passed is larger than that. Someone could in principle pass a 5x5 blob without triggering an error. Should we maybe add a ValueError guard or something to catch oversized pixels?

Comment thread peaks/core/process/tools.py Outdated
Comment thread peaks/core/process/tools.py Outdated
Comment thread peaks/core/process/tools.py Outdated
Comment thread peaks/core/process/tools.py Outdated
Comment thread peaks/core/process/tools.py Outdated
Comment thread peaks/core/process/tools.py
Comment thread peaks/core/process/tools.py Outdated
Comment thread peaks/core/process/tools.py
Comment thread peaks/core/process/tools.py Outdated
Comment thread peaks/core/process/tools.py Outdated
Comment thread tests/core/process/test_tools.py Outdated
phrgab and others added 11 commits May 28, 2026 15:44
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
Co-authored-by: Shu <148200713+shum23@users.noreply.github.com>
@phrgab

phrgab commented May 28, 2026

Copy link
Copy Markdown
Owner Author

Great, thanks for the careful checks and improvements @shum23.

I think all the suggestions should now be implemented, including the guarding against supplying a mask with >2x pixels

@shum23 shum23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks. Approved now.

@shum23
shum23 merged commit c2a34cd into dev May 28, 2026
4 checks passed
@shum23
shum23 deleted the 32-removing-a-dead-pixel-in-a-dispersion branch May 28, 2026 16:47
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