Visualization with DeepLenstronomy

deeplenstronomy has a couple built-in visualization functions to help you inspect your simulated data. To see these functions in action, let's start by simulating a dataset.

view_image()

The view_image() function is built on top of matplotlib.pyplot.imshow() and takes care of some formatting things for you. It is defined as follows:

view_image() can be used to display a single image:

view_image() can be used to display an array of images, useful for displaying all the bands simultaneously:

You can apply a stretching function to your images before plotting:

You can pass matplotlib.pyplot.imshow() keyword arguments directly to view_image():

Note: The stretching function is applied before passing keyword arguments to imshow. Therefore, in this example vmin is really $10^1$ and vmax is really $10^2$ if we are considering the unstreteched pisel values.

view_image_rgb()

The view_image_rgb() function is built on top of matplotlib.pyplot.imshow() and astropy.visualization.make_lupton_rgb(). It is defined as follows:

You can utilize this function by passing an array of images, ordered from bluest to reddest. This function struggles with noisy and low signal-to-noise images, but is a great check to make sure colors are appearing as expected.

You will often have to tweak the Q and stretch values when using this function. Again, you can also pass matplotlib.pyplot.imshow() keyword arguments to the function, but keywords like cmap are discouraged to allow the make_lupton_rgb() to control the colors displayed.