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-40171: Adapt test to accommodate 2 diffims with ~13% template coverage #105

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

yalsayyad
Copy link
Contributor

No description provided.

self.check_sources(
["forced_diff", "forced_diff_diaObject"],
self._num_exposures_good_templates - self._num_forced_astrom_failures,
self._min_sources
num_expected_dia_successes,
Copy link

Choose a reason for hiding this comment

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

This isn't a problem with the code, but is there any reason you made the num_expected_dia_successes variable here in the test_forced_phot_diffim function and passed that into check_sources, but didn't do the same in the test_image_difference or test_forced_source_tables functions? Of course the result's the same either way; just wondering about it from a consistency and ease of future bulk editing standpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this function used this value twice, and the other two used it once. Assigning a variable when you use it twice reduces lines of code/duplication. Assigning a variable when you use it once adds lines of code. That it is all.

and require DIA catalogs and forced source catalogs
to have non-zero length rather than length > 100 like
the source and coadd source catalogs do.
check_sources also checks datasets.
@yalsayyad yalsayyad merged commit f00b9c5 into main Oct 23, 2023
4 checks passed
@yalsayyad yalsayyad deleted the tickets/DM-40171 branch October 23, 2023 22:39
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