#%load obr.py import pyfits obr = pyfits.open('barnard_y_0007.fits') img = obr[0].data obr.close() import matplotlib.pyplot as plt plt.imshow(img) plt.set_cmap('Greys') img.mean() img.std() # interval 0 .. 1 img1 = (img - 680)/255 # orezani img2 = img1 numpy.clip(img1,0.0,1.0,img2) # sRGB transformace (gamma funkce) img3 = 1.055*img2**(1/2.4) - 0.055 # img4 = img3 numpy.clip(img3,0.0,1.0,img4) plt.imshow(img4) # http://matplotlib.org/users/image_tutorial.html