Image Customisation#

Similarly to query(), the plot() method of a DataSet accepts various additional arguments depending on the kind of data that is being plotted.

When plotting an Image, two such arguments can be utilised: cmap and relative_axes.


Note

Calling open() automatically calls plot() if a figure has not already been generated. In this case, open() passes any additional keyword arguments to plot(). A new plot will also be generated if the keyword arguments passed to open() do not match those of the stored figure.


Changing the Colour Map#

The cmap parameter sets the colour map of the plotted image:

  1. viridis (default):

from ATK import query

ps_query = query("image", targets=2552928187080872832, survey="panstarrs", band="g", size=120, path="example_image_1.fits.gz")
ps_query.open(cmap="viridis")
Bokeh Figure



  1. grey:

ps_query.open(cmap="grey")
Bokeh Figure



  1. false_colour, which maps the wavelength of the image filter into a single RGB colour:

ps_query.open(cmap="false_colour")
Bokeh Figure




Configuring Axes Coordinates#

So far, all images have had coordinate axes that are defined relative to the image centre, i.e. relative_axes = True (default). To instead use absolute coordinates on the sky, pass ``relative_axes = False`:

ps_query.open(relative_axes=False)
Bokeh Figure





Download this Tutorial

Total running time of the script: (0 minutes 0.671 seconds)

Gallery generated by Sphinx-Gallery