;+ ;- PRO spectrum filelength = 0 stringData = "" lun=0 filename=dialog_pickfile(/must_exist) if( filename NE '') then begin openr, lun, filename, /get_lun ;get file length in lines while ( EOF(lun) NE 1 ) do begin readf, lun, stringData filelength = filelength+1 endwhile ;allocate data data = dblarr( 3, filelength ); ;27/04/2006 , 23:55:51 , 0.520, -1.890 dt = "" tm="" temps="" ra= double(0.0) dec=double(0.0) jd= double (0.0) ;rewind to start point_lun, lun, 0 i = 0 while ( NOT EOF(lun) AND i LT filelength ) do begin readf, lun, temps ;print, temps reads, temps, dt,ra,dec,format='(a24, 2F0 )' ;print, dt,ra,dec strarr=strsplit( dt,'/:, ',/extract ) ;Result = JULDAY(Month, Day, Year, Hour, Minute, Second) jd = double(julday(strarr[1],strarr[0],strarr[2],strarr[3],strarr[4],strarr[5])) ;print, jd,format='(F)' data[0,i]=jd data[1,i]=ra data[2,i]=dec i=i+1 endwhile close, lun duration = (data[0,filelength-1]-data[0,0]) * 86400 interval = duration/filelength print, duration,interval plot, findgen(filelength)*duration/filelength,data[1,0:filelength-1] t=tvrd() write_png, dialog_pickfile(), t fourierX = fft(data[1,0:filelength-1]) fourierY = fft(data[2,0:filelength-1]) freq=findgen(filelength)/(interval*filelength) plot, freq,fourierX t=tvrd() write_png, dialog_pickfile(), t ;oplot, fourierY ENDIF end