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-38246: SourceDetectionTask will not detect on pixels flagged as NO_DATA or EDGE #261

Merged
merged 3 commits into from May 16, 2023

Conversation

isullivan
Copy link
Contributor

No description provided.

"xSize": xSize, "ySize": ySize}
dipoleFlag = "ip_diffim_DipoleFit_flag_classification"
# kwargs = {"seed": staticSeed, "psfSize": 2.4, "fluxLevel": fluxLevel, "fluxRange": fluxRange,
# "nSrc": nSources}
Copy link
Member

Choose a reason for hiding this comment

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

Commented lines here look like relics.

else:
self.assertEqual(np.sum(~goodSrcFlags), 0)
for diaSource, goodSrcFlag in zip(output.diaSources, goodSrcFlags):
if ~goodSrcFlag:
Copy link
Member

Choose a reason for hiding this comment

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

What type is goodSrcFlag here, and why ~ instead of not? I'm used to seeing that elementwise inversion of numpy arrays, but you also can't test for the truthiness of an entire array like this, so I wonder if you really mean if not goodSrcFlag.any() 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.

This test is a little simpler than that: it's iterating through all of the sources, so goodSrcFlag is a single boolean. I could certainly change that to not goodSrcFalg for readability.

else:
self.assertEqual(np.sum(~goodSrcFlags), 0)
for diaSource, goodSrcFlag in zip(output.diaSources, goodSrcFlags):
if ~goodSrcFlag:
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as in the other test method.

@isullivan isullivan force-pushed the tickets/DM-38246 branch 2 times, most recently from 382ad3a to 35e975a Compare May 16, 2023 00:43
@isullivan isullivan merged commit a640e65 into main May 16, 2023
1 check passed
@isullivan isullivan deleted the tickets/DM-38246 branch May 16, 2023 23:59
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