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

HLA-1427: Improve algorithm for switching to crowded field kernel for HAP segment catalogs #1953

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

mdlpstsci
Copy link
Collaborator

Resolves HLA-1427

Closes #

Added a third test using the size in pixels of the largest determined segment as a discriminant with regard to switching from a Gaussian to a Ricker-Wavelet kernel. The kernel is used to convolve with the input image to increase the signal-to-noise ratio for the detection of faint sources.

Checklist for maintainers

  • added entry in CHANGELOG.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant label(s)

@mdlpstsci mdlpstsci added enhancement jirahub-ignore Avoid linking to Jira labels Feb 20, 2025
@mdlpstsci mdlpstsci self-assigned this Feb 20, 2025
@mdlpstsci mdlpstsci requested a review from a team as a code owner February 20, 2025 16:46
segment as a discriminant with regard to switching from a Gaussian to a
Ricker-Wavelet kernel.  The kernel is used to convolve with the input image
to increase the signal-to-noise ratio for the detection of faint sources.
Copy link
Collaborator

@rlwastro rlwastro left a comment

Choose a reason for hiding this comment

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

This all looks good to me. I suggested one minor change, but it affects only the readability of the code and not the functionality.

Co-authored-by: Rick White <rlw@stsci.edu>
@@ -2846,6 +2846,7 @@ def _evaluate_segmentation_image(self, segm_img, image_data, big_island_only=Fal
real_pixels = (np.isfinite(image_data) & (image_data != 0)).sum().clip(min=1)
biggest_source = segm_img.areas.max()/real_pixels
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to delete the redundant definition of biggest_source on line 2847. It is replaced by new line 2849.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is what I get for just accepting the change via the GUI which I basically never do - except for this time!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm sure I could have marked it up correctly in the GUI so it was OK to accept the change! So it is my fault.

Copy link
Collaborator

@rlwastro rlwastro left a comment

Choose a reason for hiding this comment

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

All looks good now!

@mdlpstsci mdlpstsci merged commit a2a1c3d into spacetelescope:main Feb 20, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement jirahub-ignore Avoid linking to Jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants