load'math/fftw' NB. Get 1st half of real Fourier transform: FT=: {{ (<. -: #A){. A=. | fftw y }} NB. path=: '/your path to the data directory' path=: '/juno/jph/J6/FTreal/' NB. Usage: filename Fourier rate N NB. where rate=samples/sec, N=size of windows Fourier=: {{ D=: ,mread path,x 'rate N' =: y print 'Window size = ',": N qn=: <. 4 %~ N NB. points in 1/4 window. nn=: _3+ <. qn %~ #D NB. number of windows to transform ns=: qn* i. nn NB. starting points of windows s=: ns+ (nn,N)$ i. N NB. add start to nn rows of 0 of N-1 M=: #E=: s { D NB. E is data for each of the nn windows Hann=: (sin(1p1*i. N)%(N-1))^2 NB. Hann window function sfD=: +/ M%~ FT"1 E *"1 Hann NB. multiply windows by Hann & take FT sfD }} NB. Example: NB. load 'Fourier.ijs' NB. FTr=: 'RP-lowpass-5Dec_3-22.dat' Fourier 400 4096 NB. Then FTr is the Fourier transform computed with 75% overlapping NB. data windows and the Hann filter applied.