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-15333 Apply pan and scale at time of image display in display_firefly #16

Merged
merged 3 commits into from Aug 8, 2018

Conversation

stargaser
Copy link
Contributor

Modify the display_firefly backend to remember the results of scale (stretch) commands, and to apply scale and pan parameters when displaying an image with lsst.afw.display.mtv.

  • Remember and apply the serialized RangeValues string that Firefly uses
  • Correct pan command by 0.5 pixels to follow LSST convention
  • Apply the remembered pan position when using mtv
  • Make 'slate.html' the default if it is not passed explicitly or if the environment variable FIREFLY_HTML is not defined. This is necessary for Firefly to show readout of LSST pixel convention.

@stargaser stargaser requested a review from tgoldina August 7, 2018 21:12
# center of the first pixel.
extraParams['InitialCenterPosition'] = '{0:.3f};{1:.3f};PIXEL'.format(
self._lastPan[0]+0.5,
self._lastPan[1]+0.5)
Copy link

Choose a reason for hiding this comment

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

We can save the corrected value in _lastPan rather than applying the correction in two places.

if not specified, min and max are presumed to be in 'absolute' units.

*args, **kwargs : additional keyword arguments, e.g. Q for asinh
and gamma for powerlaw_gamma
Copy link

Choose a reason for hiding this comment

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

Do we want to document all keys here or it's OK to skip zscale parameters, because people commonly use the default values? (Can we refer to Firefly's set_stretch docs for extra info?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it would be good to document zscale parameters here. We can also refer to set_stretch, perhaps with a link to online documentation.

@stargaser stargaser merged commit bf7ee46 into master Aug 8, 2018
@ktlim ktlim deleted the tickets/DM-15333 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