Inline display when using GalSim on iPython Notebook

75 Views Asked by At

It seems that all the demos write the image file to the system so that we can view it with DS9. Is there a way we can view the images we make inline on iPython Notebook, as we code? This would speed up my coding a lot.

Thank you!

1

There are 1 best solutions below

0
Mike Jarvis On BEST ANSWER

GalSim Image objects store the pixel values in a numpy array: im.array. So if you're using an iPython notebook with %matplotlib inline, you can just do plt.imshow(im.array) to display an image of the data on the screen.