4.7 Java1491-2d fourier transforms using java, part 2  (Page 4/21)

 Page 4 / 21

The xform2D method

The beginning of the class and the beginning of the static method named xform2D is shown in Listing 1 .

This method computes a forward 2D Fourier transform from the space domain into the wavenumber domain. The number of points produced for the wavenumberdomain matches the number of points received for the space domain in both dimensions. Note that the input data must be purely real. In other words, theprogram assumes that there are no imaginary values in the space domain. Therefore, this is not a general purpose 2D complex-to-complex transform.

Listing 1. Beginning of the class named ImgMod30.
```class ImgMod30{ static void xform2D(double[][] inputData,double[][]realOut, double[][] imagOut,double[][]amplitudeOut){ int height = inputData.length;int width = inputData[0].length;System.out.println("height = " + height);System.out.println("width = " + width);```

Parameters

The first parameter is a reference to a 2D double array object containing the data to be transformed. The remaining three parameters arereferences to 2D double array objects of the same size that will be populated with the following transform results:

• The real part
• The imaginary part
• The amplitude (square root of sum of squares of the real and imaginary parts)

Listing 1 also determines and displays the dimensions of the incoming 2D array of data to be transformed.

I won't bore you with the details as to how and why the 2D Fourier transform does what it does. Neither will I bore you with the details of the code thatimplements the 2D Fourier transform. If you understand the material that I have previously published on Fourier transforms in one dimension, this code and these concepts should be astraightforward extension from one dimension to two dimensions.

The remainder of the xform2D method

The remainder of the xform2D method is shown in Listing 2 . Note that it was necessary to sacrifice indentation in order to force these very long equationsto be compatible with this narrow publication format and still be somewhat readable.

Listing 2. The remainder of the xform2D method.
```//Two outer loops iterate on output data. for(int yWave = 0;yWave<height;yWave++){ for(int xWave = 0;xWave<width;xWave++){ //Two inner loops iterate on input data.for(int ySpace = 0;ySpace<height; ySpace++){for(int xSpace = 0;xSpace<width; xSpace++){//Compute real, imag, and ampltude. realOut[yWave][xWave] +=(inputData[ySpace][xSpace]*cos(2*PI*((1.0* xWave*xSpace/width)+(1.0*yWave*ySpace/height))))/sqrt(width*height);imagOut[yWave][xWave ]-= (inputData[ySpace][xSpace]*sin(2*PI*((1.0*xWave*xSpace/width) + (1.0*yWave*ySpace/height)))) /sqrt(width*height);amplitudeOut[yWave][xWave] =sqrt( realOut[yWave][xWave] * realOut[yWave][xWave] +imagOut[yWave][xWave]* imagOut[yWave][xWave]); }//end xSpace loop}//end ySpace loop }//end xWave loop}//end yWave loop }//end xform2D method```

The inverseXform2D method

The inverseXform2d method is shown in its entirety in Listing 3 . This method computes an inverse 2D Fourier transform from the complex wavenumber domain into thereal space domain. The number of points produced for the space domain matches the number of points received for the wavenumber domain in both dimensions.

anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials​ and their applications of sensors.
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!