Problems with using oplot and a for loop [message #76778] |
Fri, 01 July 2011 11:30 |
Alexa
Messages: 8 Registered: June 2011
|
Junior Member |
|
|
Hi All,
I'm am trying to plot a theoretical curve on top of my data. The
theoretical curve is being read into the program correctly but when I
use the oplot command the theoretical curve does not show up on the
plot. I think it has to do with the fact that I'm using a separate for
loop to read in the curve array but I don't know what else I should
do. Here is my code:
;;Open file and put list into an array
ReadCol, "NormTransList.txt",Transition,Lam0, format='a'
;;Read in theoretical curve file
ReadCol, "HITrans.t.txt", TCurve, format='a'
;;Plot radial velocities for each absorption feature
for nt=0, N_ELEMENTS(Transition)-1 do begin
ReadCol, Transition[nt], wavelength, flux, sigma, format='f,f,f'
for nr=0, N_Elements(TCurve)-1 do begin
ReadCol, TCurve[nr], curve, residule, format='f'
;print,curve
endfor
;;Calling the results from the conversion to the procedure
print, Transition[nt], lam0[nt]
Velocity=lam_conversion(Lam0[nt], wavelength, zabs)
oplot, Velocity, sigma,color=fsc_color("cyan")
oplot, Velocity, curve, color=fsc_color("red")
endfor
Any suggestions?
|
|
|