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-41663: DM-37554 breaks ci_imsim #283

Merged
merged 2 commits into from Nov 10, 2023
Merged

DM-41663: DM-37554 breaks ci_imsim #283

merged 2 commits into from Nov 10, 2023

Conversation

plazas
Copy link
Contributor

@plazas plazas commented Nov 9, 2023

No description provided.

@plazas plazas requested a review from erykoff November 9, 2023 20:30
@@ -1826,7 +1826,7 @@ def defineEffectivePtc(self, ptcDataset, detector, bfGains, overScans, metadata)

# Check if the gain up to this point differs from the
# gain in bfGains. If so, raise or warn, accordingly.
if not boolGainMismatch and bfGains is not None:
if not boolGainMismatch and bfGains is not None and len(bfGains) != 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is bfGains guaranteed to be None or something that has a __len__()?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess below we are assuming it does have indexing, but I want to make sure we know all the options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have any other options in mind?

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, what formats can it be? If it's None or a dict, then actually should be bfGains is not None and ampName in bfGains

Copy link
Contributor

Choose a reason for hiding this comment

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

But if there's another possibility then we'd need to check that. But it may be that None/dict really are the only options (and this seems to be the case given ci_cpp and ci_imsim)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I can't think of other options, so that's why I was asking. @czwa ?

Copy link
Contributor

Choose a reason for hiding this comment

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

At least it should be checking the ampName and not the length.

@plazas plazas merged commit 5692000 into main Nov 10, 2023
2 checks passed
@plazas plazas deleted the tickets/DM-41663 branch November 10, 2023 18:51
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