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
Conversation
python/lsst/ip/isr/isrTask.py
Outdated
@@ -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: |
There was a problem hiding this comment.
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__()
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
No description provided.