subroutine simpleft( adj, add, t0,dt,tt,nt, f0,df, ff,nf) integer it,ie, adj, add, nt, nf complex cexp, cmplx, tt(nt), ff(nf) real pi2, freq, time, scale, t0,dt, f0,df call adjnull( adj, add, tt,nt*2, ff,nf*2 ) pi2= 2. * 3.14159265; scale = 1./sqrt( 1.*nt) df = (1./dt) / nf f0 = - .5/dt do ie = 1, nf { freq= f0 + df*(ie-1) do it = 1, nt { time= t0 + dt*(it-1) if( adj == 0 ) ff(ie)= ff(ie) + tt(it) * cexp(cmplx(0., pi2*freq*time)) * scale else tt(it)= tt(it) + ff(ie) * cexp(cmplx(0.,-pi2*freq*time)) * scale }} return; end
The total frequency band is radians per sample unit or Hz. Dividing the total interval by the number of points nf gives .We could choose the frequencies to run from 0 to radians/sample. That would work well for many applications, but it would be a nuisance for applications such as differentiation in the frequency domain, which require multiplication by including the negative frequencies as well as the positive. So it seems more natural to begin at the most negative frequency and step forward to the most positive frequency. Next, we must make a confusing choice.