Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10209

Re: Fourier DFT scaling problem

From Dana DeLouis <dana01@me.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Fourier DFT scaling problem
Date 2012-05-25 08:55 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jpnhdf$q85$1@smc.vnet.net> (permalink)

Show all headers | View raw


> FourierTransform[Psi[x], x, k]
> 
> OUT: (Pi^(-1/4)) (E^(-k^2/2))

Hi.  I don't have a solution, but does anything here help?
Does changing the default settings help in some way?

xData={-1,+1};
xSignal={+1,-1};
xDefault = {0,1};

Psi[x_] := (Pi^(-1/4)) (E^(-x^2/2))

SetOptions[{FourierTransform,InverseFourierTransform},FourierParameters->xDefault];

FourierTransform[Psi[x],x,k]
E^(-(k^2/2))/\[Pi]^(1/4)

SetOptions[{FourierTransform,InverseFourierTransform},FourierParameters->xSignal];

FourierTransform[Psi[x],x,k]
Sqrt[2] E^(-(k^2/2)) \[Pi]^(1/4)

SetOptions[{FourierTransform,InverseFourierTransform},FourierParameters->xData];

FourierTransform[Psi[x],x,k]
E^(-(k^2/2))/(Sqrt[2] \[Pi]^(3/4))

= = = = = 
Dana DeLouis
Mac & Math 8
= = = = = 


On May 22, 5:20 am, Arthur <art...@ymail.com> wrote:
> Hi all.
> 
> I hope someone can help me with what seems to be a fairly elementary problem, nevertheless I have spent a good deal of time trying to come to a solution without any success. I am fairly new to the Fourier transform.
> 
> My problem is that the output of the Fourier[] command has a scaling dependency on my sampling parameters which I cannot figure out how to remove.
> 
> In general I have a numerical function Psi[x] (a wavefunction) and I would like to compute an approximation to the Fourier transform F[Psi[x]] ~~ Psihat[k].
> 
> I am assuming the best way to achieve this is using the built in Fourier[] function.
> 
> Now although I expect to have a numerical function Psi[x] my problem is apparent even when I define Psi[x] analytically.
> 
> If I have
> 
> Psi[x_] := (Pi^(-1/4)) (E^(-x^2/2))
> 
> and take the continuous FT
> 
> FourierTransform[Psi[x], x, k]
> 
> OUT: (Pi^(-1/4)) (E^(-k^2/2))
> 
> The output is as expected an identical function of k (since Psi[x] was a normalized eigenfunction of the FT).
> 
> If I try to take the DFT of Psi[x] however:
> 
> /******CODE******/
> 
> n1 = 2^8.; (* sampling points *)
> L = 32.; (* domain [-L/2,L/2] *)
> dx = L/n1; (*step size*)
> 
> X = Table[-dx n1/2 + (n - 1) dx, {n, n1}]; (* lattice *)
> 
> rot[X_] := RotateLeft[X, n1/2]; (* rotate input/output of fourier *)
> F[X_] := rot@Fourier@rot@X; (* DFT *)
> 
> SetOptions[ListLinePlot, PlotRange -> {{-L/2, L/2}, {0, 1}},
>  DataRange -> {-L/2, L/2}, Filling -> Axis];
> 
> ListLinePlot[Abs[Psi[X]]^2]
> ListLinePlot[Abs[F@Psi[X]]^2]
> 
> /******END******/
> The second graph of the squared modulus of F@Psi[X] is evidently incorrectly scaled. Moreover this scaling error is not improved by increasing the sampling frequency, and is in fact exacerbated by it.
> 
> It seems reasonable that the scaling be dependent on the value dx, though I have done a lot of experimentation with the FourierParameters command to remove this dependence though I can't get it to work in a way that is independent of the choice of Psi[x].
> 
> Any help would be *greatly* appreciated!
> 
> Thanks and best regards,
> 
> Arthur


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Fourier DFT scaling problem Dana DeLouis <dana01@me.com> - 2012-05-25 08:55 +0000

csiph-web