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-14840 Make mask transparency and color "sticky" in display_firefly #17

Merged
merged 1 commit into from Aug 10, 2018

Conversation

stargaser
Copy link
Contributor

  • Store mask transparencies in the display
  • Store mask colors in the display
  • Implement getMaskTransparency method
  • Apply mask transparency as part of _mtv method

usedPlanes = long(afwMath.makeStatistics(mask, afwMath.SUM).getValue())
for k in self._maskDict:
if ((1 << self._maskDict[k]) & usedPlanes):
if (((1 << self._maskDict[k]) & usedPlanes) and
(k in self._maskPlaneColors) and

Choose a reason for hiding this comment

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

Can this condition (k in self._maskPlaneColors) ever be false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question! Looking at an example, _maskPlaneColors has fewer keys than _maskDict (which seems to have all possibilities) so it's possible to reference a key not in _maskPlaneColors.

Choose a reason for hiding this comment

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

Looking at line 192 and 193, I thought _maskDict and _maskPlaneColors would have identical keys. But I didn't read other part of the code so probably missed some subtleties.

@stargaser stargaser merged commit 2218967 into master Aug 10, 2018
@ktlim ktlim deleted the tickets/DM-14840 branch August 25, 2018 05:10
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