;This is a simple program that I use to make a spectral index plot for a given ;pixel in my maps. This program uses the same text file as spectralmap.pro; 'FREQDATA'. ;I use it by looking at one of the I images in ds9 and picking the pixel I'm ;interested in. Then you start IDL and enter, for example, ;>spectralplot, 512,542 ;and the file spec_index.ps will be created. pro spectralplot, pix1,pix2 readcol, 'FREQDATA', format= 'd,a,d', freq, iname, rms_vector n=size(ifnum,/n_elements) ;number of IFs lgfreq=alog10(freq) spec_image=dblarr(1024,1024) chi_image=dblarr(1024,1024) spec_vector=dblarr(8) i1=readfits(iname[0]) i2=readfits(iname[1]) i3=readfits(iname[2]) i4=readfits(iname[3]) i5=readfits(iname[4]) i6=readfits(iname[5]) i7=readfits(iname[6]) i8=readfits(iname[7]) temp1=i1[pix1,pix2] temp2=i2[pix1,pix2] temp3=i3[pix1,pix2] temp4=i4[pix1,pix2] temp5=i5[pix1,pix2] temp6=i6[pix1,pix2] temp7=i7[pix1,pix2] temp8=i8[pix1,pix2] spec_vector[0]=alog10(temp1) spec_vector[1]=alog10(temp2) spec_vector[2]=alog10(temp3) spec_vector[3]=alog10(temp4) spec_vector[4]=alog10(temp5) spec_vector[5]=alog10(temp6) spec_vector[6]=alog10(temp7) spec_vector[7]=alog10(temp8) entry_device = !d.name set_plot, 'PS' device, filename = 'spec_index.ps' plot,lgfreq,spec_vector,title='0809+39 P-band',xtitle='log(freq)',ytitle='log(flux)',psym=4 device, /close_file set_plot, entry_device end