I have a fits image. It has an array dimension of 300 x 8500. When I plot the image, it shows the y-axis range from 0 to 300, x-axis range from 0 to 8500. If I want to change the x-axis to 1385.9--1213.9, how do you do it in python? I don't want to change the data value just the index. Currently, after reading in the fits file, I do
data_a=[:,:]
implot= plt.imshow(data_a,cmap=plt.cm.afmhot,interpolation='nearest',aspect='auto',origin='lower')
I would think something like the index = 1385.9 - numpy.arange(0,8500,1)*0.02
, will do but only interger or boolean is allowed for index.
index
is not a property of the data array; it is just a way of counting rows and columns.