#--Ploting a fits image with astropy. # conda activate py3.6 # ipython3 <-- start IPython (more functionality than python3) import astropy import numpy as np import matplotlib.pyplot as plt from astropy.visualization import astropy_mpl_style plt.style.use(astropy_mpl_style) from astropy.io import fits # put in the full path to some HST image: BD_file = '/home/tages/CLASS/A288C/BD30.dat/bd30_H-alpha.fits' im = fits.getdata(BD_file, ext=1) print(im.shape) plt.figure() plt.imshow(BD_data, cmap='rainbow') plt.colorbar() z=np.log(BD_data+0.25) plt.imshow(z, cmap='rainbow_r) w=BD_data**0.5 a=np.array([[1, 10, 100],[1e4, 1e5, 1.e6],[1.e7, 2.e7,3.e7],[1,4,16]]) a np.log10(a) np.sqrt(a) np.sum(a) np.sum(a,0) np.sum(a,1) run h_strip plt.figure() plt.plot((h_strip(im,400,600),'b')