Skip to content

Instantly share code, notes, and snippets.

@ChrisBeaumont
Created April 21, 2015 22:00
Show Gist options
  • Save ChrisBeaumont/0510d7db5b3a8a23e7b3 to your computer and use it in GitHub Desktop.
Save ChrisBeaumont/0510d7db5b3a8a23e7b3 to your computer and use it in GitHub Desktop.
from glue import custom_viewer, qglue
from glue.clients.ds9norm import DS9Normalize
image = custom_viewer('image',
contrast=(0.0, 1.0),
image='att'
)
@image.plot_data
def draw(axes, image, contrast):
if len(image.shape) != 2:
return
norm = DS9Normalize()
norm.contrast = contrast
axes.imshow(image, norm=norm)
qglue(data='w5.fits')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment