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-39390: Add edge flag to trailed sources #14

Merged
merged 3 commits into from Oct 2, 2023
Merged

Conversation

bsmartradio
Copy link
Contributor

@bsmartradio bsmartradio commented Sep 20, 2023

Add a flag in NaivePlugin.py to check if the trailed source extends off the image or if either the beginning or end of the trail contains edge pixels. If any of these cases are true, set ext_trailedSources_Naive_flag_edge to True. Additionally, added several unit tests to check the new flags.

Flag handling was missing the required boolean input and thus not working correctly. This has been fixed by adding True to all flaghandlers.
Add a check to see if the trailed source beginning or end pixels are off chip. If so, flag them. Otherwise, check if the beginning or end pixel of a trail lands on a pixel marked with an edge flag. If so, add and edge flag to those trailed sources.
@bsmartradio bsmartradio force-pushed the tickets/DM-39390 branch 4 times, most recently from c76b065 to 9d73213 Compare September 20, 2023 23:49
@bsmartradio
Copy link
Contributor Author

Copy link

@mrawls mrawls left a comment

Choose a reason for hiding this comment

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

This appears to do what it says on the tin! My comments are pretty minor and I don't see anything blocking merging. Thank you for writing a test for this new functionality. Please do squash your commits appropriately and write a brief description in the PR.

python/lsst/meas/extensions/trailedSources/NaivePlugin.py Outdated Show resolved Hide resolved
python/lsst/meas/extensions/trailedSources/NaivePlugin.py Outdated Show resolved Hide resolved
python/lsst/meas/extensions/trailedSources/NaivePlugin.py Outdated Show resolved Hide resolved
tests/test_trailedEdgeSources.py Outdated Show resolved Hide resolved
tests/test_trailedEdgeSources.py Outdated Show resolved Hide resolved
tests/test_trailedEdgeSources.py Outdated Show resolved Hide resolved
tests/test_trailedEdgeSources.py Outdated Show resolved Hide resolved
@bsmartradio bsmartradio force-pushed the tickets/DM-39390 branch 3 times, most recently from 47de196 to 918b188 Compare October 2, 2023 17:05
@bsmartradio
Copy link
Contributor Author

@bsmartradio bsmartradio force-pushed the tickets/DM-39390 branch 2 times, most recently from 5a119ac to b9cc125 Compare October 2, 2023 18:11
Copy link

@mrawls mrawls left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to make sure this did what it was supposed to do! 😄

tests/test_trailedEdgeSources.py Outdated Show resolved Hide resolved
tests/test_trailedEdgeSources.py Outdated Show resolved Hide resolved
tests/test_trailedEdgeSources.py Outdated Show resolved Hide resolved
@bsmartradio bsmartradio force-pushed the tickets/DM-39390 branch 2 times, most recently from 6496133 to 578c76b Compare October 2, 2023 18:43
Added a specific unit test that tests 2 trailed sources, one which crosses into edge pixels and one which does not.
@bsmartradio bsmartradio merged commit 3ddfee8 into main Oct 2, 2023
2 checks passed
@bsmartradio bsmartradio deleted the tickets/DM-39390 branch October 2, 2023 22:14
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