pro fft_data,trange = tr,vname=v,window=wind $ ,color=col,lim=lim,overplot=overplot $ ,npoints=np sel_data,t,y,trange=tr,vname=v,npoints=np if not keyword_set(wind) then wind=[1.,1.] c= n_elements(t) if not keyword_set(lim) then lim={xlog:1,ylog:1} if c ne 0 then begin w = interp(wind,c) print ,'Using ',c,' Points in the fft of ',v(0) fy = abs(fft(y*w))^2 dt = t(c-1)-t(0) fx = findgen(c)/dt fx = fx(0:c/2) fy = fy(0:c/2) if not keyword_set(overplot) then box,lim,fx,fy extract_tags,oplotstuff,lim,/oplot add_str_element,oplotstuff,'color',col oplot,fx,fy,_extra = oplotstuff ;stop endif overplot=1 end