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

DM-49497: Add check for valid BFK #303

Merged
merged 1 commit into from
Mar 20, 2025
Merged

DM-49497: Add check for valid BFK #303

merged 1 commit into from
Mar 20, 2025

Conversation

Alex-Broughton
Copy link
Contributor

No description provided.

# Edges should converge to zero
valid = np.all(np.isclose(kernelEdges, 0, rtol=5*kernelEdgeStd))
# Kernel should be negative
valid = np.all(bfk.ampKernels[ampName] <= 5*kernelEdgeStd)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a *= here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! Thanks :)

xv, yv = np.meshgrid(range(kernelSize), range(kernelSize))
# Get a mask for a 3px picture frame
valid = True
if kernelSize >= 7:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should any of this be configurable (the 3x3, the 7 size, the 5 times std) or you think these are fixed-fixed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The 5 sigma can be a config, but the 3px shouldn't be. The kernel should be just big enough to have 3 px on the edge that go to zero. 7 is then just the minimum size (3*2 + 1)

@Alex-Broughton Alex-Broughton force-pushed the tickets/DM-49497 branch 2 times, most recently from 0a3f7ac to 3669bfb Compare March 19, 2025 15:29
@Alex-Broughton Alex-Broughton force-pushed the tickets/DM-49497 branch 3 times, most recently from 67e8d63 to b12f6de Compare March 19, 2025 19:48
@Alex-Broughton Alex-Broughton merged commit 8a32c3b into main Mar 20, 2025
2 checks passed
@Alex-Broughton Alex-Broughton deleted the tickets/DM-49497 branch March 20, 2025 15:18
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