(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 33256, 849]*) (*NotebookOutlinePosition[ 42398, 1056]*) (* CellTagsIndexPosition[ 40560, 1017]*) (*WindowFrame->Normal*) Notebook[{ Cell["Fourier Theory and Fourier Transforms", "Title", CellTags->"mmtag:18:Fourier_transform__discrete"], Cell[CellGroupData[{ Cell["Creating Simple Lattices for Subsequent Fourier Analysis", "Subtitle"], Cell["\<\ Create a simple lattice to upon which a fourier transform will \ taken\ \>", "Text", CellTags->"mmtag:18:lattice_images__example_creating"], Cell[BoxData[{ \(\(WhiteSquare = \ Table[1, {i, 8}, {j, 8}];\)\), "\[IndentingNewLine]", \(\(BlackSquare = Table[0, {i, 8}, {j, 8}];\)\), "\[IndentingNewLine]", \(Join[WhiteSquare, BlackSquare, BlackSquare] // MatrixForm\)}], "Input", CellTags->"mmtag:18:Join[]"], Cell["Example of construction of a slightly larger structure", "Text"], Cell[BoxData[ \(\(latcell\ = Join[\[IndentingNewLine]Transpose[ Join[BlackSquare, BlackSquare, BlackSquare, BlackSquare]], \[IndentingNewLine]Transpose[ Join[BlackSquare, BlackSquare, WhiteSquare, BlackSquare]], \[IndentingNewLine]Transpose[ Join[BlackSquare, BlackSquare, WhiteSquare, BlackSquare]], \[IndentingNewLine]Transpose[ Join[BlackSquare, BlackSquare, BlackSquare, BlackSquare]]\[IndentingNewLine]];\)\)], "Input", CellTags->"mmtag:18:Transpose[]"], Cell["Visualize structure:", "Text"], Cell[BoxData[ \(\(ListDensityPlot[latcell, MeshStyle \[Rule] {Hue[1]}];\)\)], "Input", CellTags->{ "mmtag:18:ListDensityPlot[]__example_on_created_lattice_image", "mmtag:18:MeshStyle__option"}], Cell[TextData[{ "The following duplicates an input matrix and creates ", Cell[BoxData[ \(TraditionalForm\`2\^n\)]], " copies alligned in a column:" }], "Text"], Cell[BoxData[ \(ColumnDuplicateNsq[matrix_\ , \ nlog2_]\ := \ Nest[Join[#, #] &, matrix, nlog2]\)], "Input", CellTags->"mmtag:18:Nest[]"], Cell["example:", "Text"], Cell[BoxData[ \(ListDensityPlot[ColumnDuplicateNsq[latcell, 2], MeshStyle \[Rule] {Hue[1]}]\)], "Input"], Cell[TextData[{ "The following duplicates an input matrix and create ", Cell[BoxData[ \(TraditionalForm\`2\^n\)]], " copies alligned in a row" }], "Text"], Cell[BoxData[ \(RowDuplicateNsq[matrix_\ , \ nlog2_]\ := Transpose[ColumnDuplicateNsq[matrix, nlog2]]\)], "Input"], Cell["example:", "Text"], Cell[BoxData[ \(ListDensityPlot[RowDuplicateNsq[latcell, 2], MeshStyle \[Rule] {Hue[1]}]\)], "Input"], Cell["Create a 256 by 256 data set", "Text"], Cell[BoxData[ \(\(\(XtalData\ = Transpose[ ColumnDuplicateNsq[RowDuplicateNsq[latcell, 3], 3]];\)\(\ \)\)\)], "Input"], Cell["Function to create graphics for delayed display", "Text"], Cell[BoxData[{ \(\(DisplayLater\ = \ DisplayFunction \[Rule] Identity;\)\), "\[IndentingNewLine]", \(\(DisplayNow\ = \ DisplayFunction \[Rule] \ $DisplayFunction;\)\)}], "Input", CellTags->"mmtag:18:DisplayNow_DisplayLater__example_of_option_definition"],\ Cell[BoxData[ \(ImagePlot[data_\ ] := \ ListDensityPlot[data, Mesh -> False, ImageSize \[Rule] 144, DisplayLater]\)], "Input"], Cell["Example", "Text"], Cell[BoxData[ \(XtalImage\ = \ ImagePlot[XtalData]\)], "Input"], Cell["To see the data:", "Text"], Cell[BoxData[ \(Show[XtalImage, DisplayNow, ImageSize \[Rule] 400]\)], "Input", CellTags->"mmtag:18:ImageSize__option"] }, Closed]], Cell[CellGroupData[{ Cell["Discrete Fourier Transforms on Simple 2D Lattices", "Subtitle"], Cell[BoxData[ \(\(FourierData\ = \ Fourier[XtalData];\)\)], "Input", CellTags->"mmtag:18:Fourier[]__example_on_constructed_data"], Cell["\<\ Create Image of Fourier Transform (Here a special color function is \ used (but not really explained). Red is high intensity, blue is low, gray is \ roughly zero) Abs is used to get intensities of spots at each of the N\[Times]M wavevectors\ \ \>", "Text"], Cell[BoxData[{ \(\(FourierColor\ := \ ColorFunction \[Rule] \((If[# < .1, Hue[1, 0, 0], Hue[ .66*\((1 - #)\), 1, 0.5\ + \ 0.5 #]] &)\);\)\), "\[IndentingNewLine]", \(FourierImagePlot[data_\ ]\ := \ ListDensityPlot[Abs[data], Mesh -> False, ImageSize \[Rule] 144, FourierColor, DisplayLater]\)}], "Input", CellTags->"mmtag:18:ColorFunction__example_of_option_definition"], Cell[BoxData[ \(FourierImage\ = \ FourierImagePlot[FourierData]\)], "Input"], Cell["\<\ Show original,its Fourier Transform (FT), and the FT the FT: Use Chop to remove small spurious imaginary values. Because the lattice is \ very perfect, the fourier spots are very small. One could use the \ magnification feature to improve the visibility of the spots.\ \>", "Text"], Cell[BoxData[ \(Show[ GraphicsArray[{XtalImage, FourierImage, \ ImagePlot[Chop[InverseFourier[FourierData]]]}], ImageSize \[Rule] 1000, \ DisplayNow]\)], "Input", CellTags->"mmtag:18:GraphicsArray[]"], Cell["\<\ Some notes on the plots above: The spot pattern in the Fourier \ transform extends over the entire pane but is hard to resolve except around \ the perimeter. Note periodic array of sharp spots in the Fourier transform, \ and note that there are some \"missing\" columns of spots that also repeat \ periodically. Note that the Fourier transform of the Fourier transform \ reconstructs the orignial object quite faithfully.\ \>", "Subsubsection"] }, Closed]], Cell[CellGroupData[{ Cell["Visualizing Diffraction Patterns", "Subtitle"], Cell["\<\ Microscopists are used to seeing the \"k=0\" point in the center of \ the fourier image (i.e., the periodic information at the center). We can \ write a function that translates the k=0 point to the center of the image and \ redisplay the result: \ \>", "Subsection"], Cell[BoxData[{ \(\(\(<< LinearAlgebra`MatrixManipulation`\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(KZeroAtCenter[matdat_]\ := \ Block[\[IndentingNewLine]{rows = \(Dimensions[matdat]\)[\([1]\)], cols = \ \(Dimensions[matdat]\)[\([2]\)], halfcol, halfrow, colrem, rowrem}, \[IndentingNewLine]halfcol = \ Round[cols/2]; halfrow = Round[rows/2]; colrem\ = \ cols\ - \ halfcol; \ rowrem\ = \ rows - halfrow; \ \[IndentingNewLine]Return[\[IndentingNewLine]BlockMatrix[\[IndentingNewLine]{\ \[IndentingNewLine]{Take[matdat, \(-rowrem\), \(-colrem\)], Take[matdat, \(-rowrem\), halfcol]}, \[IndentingNewLine]{Take[ matdat, halfrow, \(-colrem\)], Take[matdat, halfrow, halfcol]}\[IndentingNewLine]}\[IndentingNewLine]]\ \[IndentingNewLine]]\[IndentingNewLine]]\)}], "Input", CellTags->{ "mmtag:18:LinearAlgebra_MatrixManipulation__Package", "mmtag:18:Fourier_analysis__example_of_moving_origin", "mmtag:18:Take[]", "mmtag:18:Fourier_transforms__images_of", "mmtag:18:InverseFourier[]"}], Cell[BoxData[ \(\(\(FourierImagePlot[data_\ ]\ := \ ListDensityPlot[KZeroAtCenter[Abs[data]], Mesh -> False, ImageSize \[Rule] 144, FourierColor, DisplayLater]\)\(\[IndentingNewLine]\) \)\)], "Input"], Cell[BoxData[ \(FourierImage\ = \ FourierImagePlot[FourierData]\)], "Input"], Cell[BoxData[ \(Show[ GraphicsArray[{XtalImage, FourierImage, \ ImagePlot[Chop[InverseFourier[FourierData]]]}], ImageSize \[Rule] 1000, \ DisplayNow]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Diffraction Patterns and Defects in Lattices", "Subtitle"], Cell["\<\ Create a function to create a defect in the lattice...(there will \ be a small portion of the white rectangle at the lower left that is missing; \ otherwise the object will be the same as above).\ \>", "Text"], Cell[BoxData[ \(\(HoleFunc[data_\ , \ xc_\ , \ yc_, \ twicew_, \ twiceh_] := \ Module[{nrows, ncols}, nrows = \ \(Dimensions[data]\)[\([1]\)]; ncols\ = \ \(Dimensions[data]\)[\([2]\)]; Table[If[ And[Abs[j - xc]\ <= \ twicew, Abs[i\ - \ yc]\ <= \ twiceh], 0, 1], {i, nrows}, {j, ncols}]];\)\)], "Input"], Cell[BoxData[ \(\(\(XtalData\ = Transpose[ ColumnDuplicateNsq[RowDuplicateNsq[latcell, 3], 3]];\)\(\ \)\)\)], "Input"], Cell["Create template for defect creation", "Text"], Cell[BoxData[ \(\(hole\ = \ HoleFunc[XtalData, 28, 28, 6, 6];\)\)], "Input"], Cell["Recreate Images and Redisplay", "Text"], Cell[BoxData[{ \(\(XtalData\ = Transpose[ ColumnDuplicateNsq[RowDuplicateNsq[latcell, 3], 3]];\)\ \), "\[IndentingNewLine]", \(\(XtalData\ = \ hole*XtalData;\)\), "\[IndentingNewLine]", \(\(XtalImage\ = \ ImagePlot[XtalData];\)\), "\[IndentingNewLine]", \(\(FourierData\ = \ Fourier[XtalData];\)\), "\[IndentingNewLine]", \(\(FourierImage\ = \ FourierImagePlot[FourierData];\)\)}], "Input"], Cell[BoxData[ \(Show[ GraphicsArray[{XtalImage, FourierImage, \ ImagePlot[Chop[InverseFourier[FourierData]]]}], ImageSize \[Rule] 1000, \ DisplayNow]\)], "Input", CellTags->"mmtag:18:Fourier_transform__on_lattice_with_defect"], Cell["\<\ Note above that the Fourier transform continues to have the sharp \ spots associated with the perfect crystal, but that \"diffuse\" intensity \ (colored contours) now arises throughout reciprocal space. The details of \ the diffuse intensity distribution contain information about the structure of \ the defect. Once again, except for orientation, the \"backtransform\" gives a \ very accurate reconstruction of the original.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Visualization of the Fourier Transform of a lattice that has a \ little \"thermal\" noise in the lattice positions\ \>", "Subtitle"], Cell[TextData[{ "Function to make a square with a specified size, with a lattice composed \ of lattice vectors:\nMakeLattice[Width, Height, {", Cell[BoxData[ \(TraditionalForm\`a\_x\)]], ", ", Cell[BoxData[ \(TraditionalForm\`a\_y\)]], ", repeats}, {", Cell[BoxData[ \(TraditionalForm\`b\_x\)]], ", ", Cell[BoxData[ \(TraditionalForm\`b\_y\)]], ", repeats}, AtomSize, {noise_back, noise_forward}]\n", StyleBox["Function is not ideal, works best when the lattice vectors are \ perfect divisors of the width and height", FontSlant->"Italic"] }], "Text"], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(MakeLattice[W_, \ H_, \ latvecA_, \ latvecB_, \ size_\ , \ randrange_]\ := \ Module[{result = Table[0, {i, H}, {j, W}], lata = \(-1\), latb = \(-1\), xpos, ypos, \ \ untouched\ = \ Table[True, {i, H}, {j, W}]}, \[IndentingNewLine]For[ lata\ = \ 0, \ lata\ \[LessEqual] \ latvecA[\([3]\)], \[IndentingNewLine]For[ latb = 0, latb \[LessEqual] \ latvecB[\([3]\)], xpos = Mod[lata*latvecA[\([1]\)]\ + \ latb*latvecB[\([1]\)], H, 1]\ ; ypos\ = \ Mod[lata*latvecA[\([2]\)]\ + \ latb*latvecB[\([2]\)], W, 1]\ ; If[untouched[\([ypos, xpos]\)], untouched[\([ypos, xpos]\)] = False; xpos\ += \ Random[Integer, randrange]; \ ypos\ += \ Random[Integer, randrange]; \[IndentingNewLine]For[ j\ = \ 1\ , j \[LessEqual] \ size, For[i\ = \ 1, \ i\ \[LessEqual] \ size, result[\([Mod[ypos + j, H, 1], Mod[xpos + i, W, 1]]\)] = 1; \(i++\)]; \(j++\)]]; \[IndentingNewLine]\(latb++\)]; \ \[IndentingNewLine]\(lata++\)]; result\[IndentingNewLine]]\)\)\)], "Input", CellTags->"mmtag:18:two_dimensiona_lattices___example_creating"], Cell["Example of a lattice with no noise:", "Text"], Cell[BoxData[ \(latdata = \ MakeLattice[400, 400, {0, 20, 40}, {16, 4, 25}, 4, {0, 0}]; \ fourlat\ = \ Fourier[latdata];\)], "Input"], Cell[BoxData[ \(Show[ GraphicsArray[{ImagePlot[latdata], FourierImagePlot[fourlat], \ ImagePlot[Chop[InverseFourier[fourlat]]]}], ImageSize \[Rule] 1000, \ DisplayNow]\)], "Input"], Cell["\<\ Make identical lattice, but add a little noise to the system:\ \>", \ "Text"], Cell["\<\ The noise is simulated by making small random displacements of each \ \"atom\" about its site in the perfect crystal, then computing the Fourier \ transform of the resulting somewhat imperfect crystal...\ \>", "Text", CellTags-> "mmtag:18:two_dimensiona_lattices___example_creating_with_thermal_\ fluctuations"], Cell[BoxData[ \(thermallatdata = \ MakeLattice[400, 400, {0, 20, 40}, {16, 4, 25}, 4, {\(-2\), 2}]; \ thermalfourlat\ = \ Fourier[thermallatdata];\)], "Input"], Cell["\<\ Visualization of the original image, its fourier transform, and \ them inverse fourier transform of the fourier transform..\ \>", "Text"], Cell[BoxData[ \(Show[ GraphicsArray[{ImagePlot[thermallatdata], FourierImagePlot[thermalfourlat], \ ImagePlot[Chop[InverseFourier[thermalfourlat]]]}], ImageSize \[Rule] 1000, \ DisplayNow]\)], "Input"], Cell[TextData[{ "Notes on these images: The periodic array of spots seen in previous \ Fourier transforms from \"crystals\" are not visible here, but they ", StyleBox["are", FontSlant->"Italic"], " present. Once again, the imperfection of the object gives rise to a \ distribution of \"diffuse\" intensity in reciprocal space. Careful \ observation indicates that the back-transform on the right is rotated 180\ \[Degree] with respect to the original, as in the example above that \ contained the single defect." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Using an Aperature to look at a particular region of reciprocal \ space and visualizing its effect \ \>", "Subtitle"], Cell["\<\ The following is a fairly baroque function to do something what is \ conceptually straightforward: The function takes original data from a lattice and its fourier transform \ and graphically compares those to data from a \"noised-up\" lattice. The function allows the user to specify the center of the aperature \ in reciprocal space as well as (twice) the aperature width and height. The function will display eight images in two columns. The left \ column of graphics illustrates (from top to bottom)the \"clean\" input image, \ the entire fourier transform with the rectangular aperature illustrated, the \ \"reconstructed image\" that derives from the fourier transform of the \ aperature region, and finally a magnified image of the fourier transform \ within the aperature only. The right column is the same sequence of images for the \"noised-up\" \ initial data\ \>", "Text", CellTags-> "mmtag:18:Fourier_transform__example_of_selecting_regions_of_k_space"], Cell["\<\ Compare[] takes 8 arguments: \t\t\t\tThe first four are\t1) The input discrete lattice reference data \t\t\t\t\t\t\t2) The fourier transform of the input reference data \t\t\t\t\t\t\t3) The input \"perturbed\" data \t\t\t\t\t\t\t4) The fourier transform of the perturbed data \t\t\t\t\t\t\t \t\t\t\tThe second four are \t\t\t\t\t\t\t1-2) the x and y lattice coordinates of the center of the \ square \"aperature\" in fourier space (0,0) is the center and the \t\t\t\t\t\t\t\tedge depends on the size of the data. \t\t\t\t\t\t\t3-4) twice the width and height of the aperature.\ \>", \ "Subsubsection"], Cell[BoxData[ \(\(\(Compare[sharpdata_\ , \ sharpfourierdata_\ , \ diffusedata_, \ diffusefourierdata_, \ ApCenterx_\ , ApCentery_, \ \ ApTwicewidth_\ , \ ApTwiceheight_\ ]\ := \ Module[{sharpfourieraperature, diffusefourieraperature, \ dims\ = \ Dimensions[sharpdata], nrows, ncols, sharpfourimage, sharpapimage, diffusefourierimage, \ diffuseapimage, \ sharprevfourimage, diffusefourimage, \ sharpfourmagimage, diffusefourmagimage, aperature, xll, yll, xur, yur, theShiftedAperature, shiftedsharpfourier, shifteddiffusefourier, xc, yc}, \[IndentingNewLine]nrows = dims[\([1]\)]; \ ncols = \ dims[\([2]\)]; \ \[IndentingNewLine]\[IndentingNewLine]shiftedsharpfourier\ = \ KZeroAtCenter[ sharpfourierdata]; \[IndentingNewLine]shifteddiffusefourier\ = \ KZeroAtCenter[ diffusefourierdata]; \[IndentingNewLine]sharpfourimage = \ ListDensityPlot[Abs[shiftedsharpfourier], Mesh -> False, FourierColor, \[IndentingNewLine] (*\(ColorFunctionScaling \ \[Rule] False\)\(,\)*) \[IndentingNewLine]DisplayLater]; \ \[IndentingNewLine]diffusefourimage = \ ListDensityPlot[Abs[shifteddiffusefourier], Mesh -> False, FourierColor, \[IndentingNewLine] (*\(ColorFunctionScaling \ \[Rule] False\)\(,\)*) \[IndentingNewLine]DisplayLater]; \ \[IndentingNewLine]xc\ = Round[ncols/2]\ + \ ApCenterx; \[IndentingNewLine]yc\ = \ Round[nrows/2]\ + \ ApCentery; \[IndentingNewLine]xll\ = \ xc\ - ApTwicewidth; \[IndentingNewLine]yll = \ yc\ - \ ApTwiceheight; \[IndentingNewLine]xur\ = \ xc + \ ApTwicewidth; \[IndentingNewLine]yur\ = \ yc\ + \ ApTwicewidth; \[IndentingNewLine]\[IndentingNewLine]If[ And[xll\ < \ 1, yll < 1, xur > ncols, yur > nrows], sharpfourieraperature = shiftedsharpfourier; diffusefourieraperature = shifteddiffusefourier, \[IndentingNewLine]aperature = Table[If[ And[Abs[i - yc]\ <= \ ApTwiceheight, Abs[j\ - \ xc]\ <= \ ApTwicewidth], 1, 0], {i, nrows}, {j, ncols}]; \[IndentingNewLine]sharpfourieraperature = aperature*shiftedsharpfourier; diffusefourieraperature = aperature* shifteddiffusefourier]; \ \[IndentingNewLine]\[IndentingNewLine]theShiftedAperature\ = Line[{{\ xll - 1, \ yll - 1}, {\ xur + 1, \ yll - 1}, {xur + 1, \ yur + 1}, {\ xll - 1, \ yur + 1}, {xll - 1, yll - 1}}]\ ; \ \[IndentingNewLine]\[IndentingNewLine]sharpapimage\ = \ Show[sharpfourimage, Graphics[{\[IndentingNewLine] (*Hue[ .5, .5, 1]*) \ Hue[ .1667, 1, 1], Thickness[2/nrows], theShiftedAperature\[IndentingNewLine]}]]; \ \[IndentingNewLine]diffuseapimage\ = \ Show[diffusefourimage, Graphics[{\[IndentingNewLine] (*Hue[ .5, .5, 1]*) \ Hue[ .1667, 1, 1], Thickness[ 2/nrows], \[IndentingNewLine]theShiftedAperature}]]; \ \[IndentingNewLine] (*\(Print["\", \ nrows, \ "\< wide, and \>", \ ncols, \ "\< high\n\>", \ "\", xll, "\<,\>", \ xur, "\<) y\[Element](\>", yll, \ "\<,\>", \ yur, "\<)\>"];\)*) \[IndentingNewLine]\[IndentingNewLine]\ \[IndentingNewLine]xll\ = \ If[xll < 1, 1, xll]; \ xur\ = \ If[xur > nrows, nrows, xur]; \[IndentingNewLine]yll\ = \ If[yll < 1, 1, yll]; \ yur\ = If[yur > ncols, ncols, yur]; \[IndentingNewLine]\[IndentingNewLine]sharpfourmagimage = \ ListDensityPlot[\(Abs[shiftedsharpfourier]\)[\([Range[yll, yur], Range[xll, xur]]\)], Mesh -> False, FourierColor, (*\(ColorFunctionScaling \[Rule] False\)\(,\)*) \ DisplayLater]; \[IndentingNewLine]diffusefourmagimage = \ ListDensityPlot[\(Abs[shifteddiffusefourier]\)[\([Range[yll, yur], Range[xll, xur]]\)], Mesh -> False, FourierColor, (*\(ColorFunctionScaling \[Rule] False\)\(,\)*) \ DisplayLater]; \ \[IndentingNewLine]\[IndentingNewLine]sharprevfourimage = \ ListDensityPlot[ Abs[Chop[InverseFourier[KZeroAtCenter[sharpfourieraperature]]]], Mesh \[Rule] False, DisplayLater]; \[IndentingNewLine]diffuserevfourimage = \ ListDensityPlot[ Abs[Chop[ InverseFourier[KZeroAtCenter[diffusefourieraperature]]]], Mesh \[Rule] False, DisplayLater]; \[IndentingNewLine]\[IndentingNewLine]Show[ GraphicsArray[{\[IndentingNewLine]{ImagePlot[sharpdata], ImagePlot[diffusedata]}, \[IndentingNewLine]{sharpapimage, diffuseapimage}, \[IndentingNewLine]{sharprevfourimage, \ diffuserevfourimage}, \[IndentingNewLine]{sharpfourmagimage, diffusefourmagimage}\[IndentingNewLine]}\[IndentingNewLine]], ImageSize \[Rule] 1000, GraphicsSpacing \[Rule] { .001, .0}, DisplayNow];]\)\(\[IndentingNewLine]\) \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Visualizing Selected Area Diffraction on a Noisy Lattice", "Subtitle"], Cell["\<\ An example, use MakeLattice to produce a \"clean\" and a \ \"noised-up\" lattice\ \>", "Text"], Cell[BoxData[{ \(\(latdata = \ MakeLattice[400, 400, {0, 20, 40}, {16, 4, 25}, 4, {0, 0}];\)\ \), "\[IndentingNewLine]", \(\(fourlat\ = \ Fourier[latdata];\)\)}], "Input"], Cell[BoxData[ \(thermallatdata = \ MakeLattice[400, 400, {0, 20, 40}, {16, 4, 25}, 4, {\(-1\), 1}]; \ thermalfourlat\ = \ Fourier[thermallatdata];\)], "Input"], Cell[BoxData[ \(Compare[latdata, fourlat, thermallatdata, thermalfourlat, 0, 0, 50, 50]\)], "Input"], Cell[BoxData[ \(Compare[latdata, fourlat, thermallatdata, thermalfourlat, 100, 100, 25, 25]\)], "Input"], Cell[BoxData[ \(Compare[latdata, fourlat, thermallatdata, thermalfourlat, 20, 30, 15, 15]\)], "Input"], Cell[BoxData[ \(Compare[latdata, fourlat, thermallatdata, thermalfourlat, 30, 30, 15, 15]\)], "Input"], Cell[BoxData[ \(Compare[latdata, fourlat, thermallatdata, thermalfourlat, 35, 25, 15, 15]\)], "Input"], Cell["\<\ This suggests the (potentially) interesting exercise of modifying \ compare to take two aperature specifications to \"pick out\" other \ periodicities in the lattice--i.e., something like the following: Compare[cleandata_ , fouriercleandata_ , noisydata_, fouriernoisydata_, \ {FirstApLowX_, FirstApHiX_ , FirstApLowY_, FirstApHiY_}, \ {SecondApLowX_,SecondApHiX_ , SecondApLowY_, SecondApHiY_}] :=\ \>", "Text"], Cell["\<\ Consider what happens to the image when the noise is anisotropic... \ Modify the function MakeLattice to take two \"noise arguments\"\ \>", "Text", CellTags-> "mmtag:18:two_dimensional_lattices___example_creating_with_anisotropic_\ thermal_fluctuations"], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(MakeLattice[W_, \ H_, \ latvecA_, \ latvecB_, \ size_\ , \ Xrandrange_, \ Yrandrange_]\ := \ Module[{result = Table[0, {i, H}, {j, W}], lata = \(-1\), latb = \(-1\), xpos, ypos, \ \ untouched\ = \ Table[True, {i, H}, {j, W}]}, \[IndentingNewLine]For[ lata\ = \ 0, \ lata\ \[LessEqual] \ latvecA[\([3]\)], \[IndentingNewLine]For[ latb = 0, latb \[LessEqual] \ latvecB[\([3]\)], xpos = Mod[lata*latvecA[\([1]\)]\ + \ latb*latvecB[\([1]\)], H, 1]\ ; ypos\ = \ Mod[lata*latvecA[\([2]\)]\ + \ latb*latvecB[\([2]\)], W, 1]\ ; If[untouched[\([ypos, xpos]\)], untouched[\([ypos, xpos]\)] = False; xpos\ += \ Random[Integer, Xrandrange]; \ ypos\ += \ Random[Integer, Yrandrange]; \[IndentingNewLine]For[ j\ = \ 1\ , j \[LessEqual] \ size, For[i\ = \ 1, \ i\ \[LessEqual] \ size, result[\([Mod[ypos + j, H, 1], Mod[xpos + i, W, 1]]\)] = 1; \(i++\)]; \(j++\)]]; \[IndentingNewLine]\(latb++\)]; \ \[IndentingNewLine]\(lata++\)]; result\[IndentingNewLine]]\)\)\)], "Input"], Cell["\<\ The following data only has fluctuations in the up and down \ direction:\ \>", "Text"], Cell[BoxData[ \(thermallatdata = \ MakeLattice[400, 400, {0, 20, 40}, {16, 4, 25}, 4, {0, 0}, {\(-4\), 4}]; \ thermalfourlat\ = \ Fourier[thermallatdata];\)], "Input"], Cell["\<\ The resulting Fourier transform gets \"streaked\" in the left and \ right direction\ \>", "Text"], Cell[BoxData[ \(Compare[latdata, fourlat, thermallatdata, thermalfourlat, 0, 0, 200, 200]\)], "Input"], Cell["\<\ With the following aperature, we tend to pick out one lattice \ vector, but not the other\ \>", "Text"], Cell[BoxData[ \(Compare[latdata, fourlat, thermallatdata, thermalfourlat, 60, 10, 25, 15]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Fourier Transforms on Images", "Subtitle"], Cell[TextData[{ "Importing an image into Mathematica, .png is some of many graphics data \ types that Mathematica can process.\n(Note: all of the images below can be \ downloaded from ", ButtonBox["http://pruffle.mit.edu/3.016/Images/", ButtonData:>{ URL[ "http://pruffle.mit.edu/3.016/Images/"], None}, ButtonStyle->"Hyperlink"] }], "Text"], Cell[BoxData[ \(\(AnImage\ = \ Import["\"]\ ;\)\)], "Input", CellTags->"mmtag:18:Import[]__graphics_to_be_fourier_transformed"], Cell[BoxData[ \(Show[AnImage, DisplayNow]\)], "Input"], Cell["\<\ The gray values of this image are stored in the (1,1) position of \ the image with gray values in the range (0,255)\ \>", "Text"], Cell[BoxData[ \(\(ImageData\ = \ AnImage[\([1, 1]\)]/255;\)\)], "Input"], Cell[BoxData[ \(Dimensions[ImageData]\)], "Input"], Cell[BoxData[ \(\(FourierImageData = \ Fourier[ImageData];\)\)], "Input", CellTags->"mmtag:18:Fourier_transform__on_imported_images"], Cell[BoxData[ \(Show[ GraphicsArray[{ImagePlot[ImageData], FourierImagePlot[FourierImageData], \ ImagePlot[Chop[InverseFourier[FourierImageData]]]}], ImageSize \[Rule] 1000, \ DisplayNow]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Selected Area Diffraction on Image Data", "Subtitle"], Cell["\<\ Write a function that takes a file as input, as well as an \ aperature specification, then displays the image, its transform and its \ reverse transform of the aperature fraction of the image\ \>", "Text"], Cell[BoxData[ \(ImageFourierAperature[imagefile_, \ Apxmin_\ , Apxmax_, \ \ Apymin_\ , \ Apymax_\ ]\ := \ Module[{theimage\ = \ Import[imagefile], \ dims\ , nrows, ncols, fourierdata, fourimage, fourieraperature, apimage, \ fourmagimage, revfourierimage, aperature, xll, yll, xur, yur}, \[IndentingNewLine]\t\[IndentingNewLine]fourierdata = KZeroAtCenter[ Fourier[\((theimage[\([1, 1]\)]/ 255)\)]]; \[IndentingNewLine]fourimage = \ ListDensityPlot[Abs[fourierdata], Mesh -> False, ImageSize \[Rule] 144, FourierColor, DisplayLater]; \[IndentingNewLine]\[IndentingNewLine]dims = Dimensions[fourierdata]; \[IndentingNewLine]nrows = dims[\([1]\)]; \ ncols = \ dims[\([2]\)]; \[IndentingNewLine]xll\ = \ Round[ncols/2\ + \ Apxmin*ncols/2]; \[IndentingNewLine]yll = \ Round[nrows/2\ + \ Apymin*nrows/2\ ]; \[IndentingNewLine]xur\ = \ Round[ncols/2\ + \ Apxmax*ncols/2\ ]; \[IndentingNewLine]yur\ = \ Round[nrows/2\ + \ Apymax*nrows/2]; \[IndentingNewLine]xll\ = \ If[xll < 1, 1, xll]; \ xur\ = \ If[xur > ncols, ncols, xur]; \[IndentingNewLine]yll\ = \ If[yll < 1, 1, yll]; \ yur\ = If[yur > nrows, nrows, yur]; \[IndentingNewLine]\[IndentingNewLine]aperature = Table[If[ And[i\ \[GreaterEqual] \ yll, \ i\ \[LessEqual] \ yur, \ j\ \[GreaterEqual] \ xll, \ j\ \[LessEqual] \ xur]\ , 1, 0], {i, nrows}, {j, ncols}]; \[IndentingNewLine]fourieraperature = aperature* fourierdata; \[IndentingNewLine]\[IndentingNewLine]\ \[IndentingNewLine]apimage\ = \ Show[fourimage, Graphics[{\[IndentingNewLine]\ Hue[ .1667, 1, 1], Thickness[ 2/nrows], \[IndentingNewLine]Line[{{\ xll - 1, \ yll - 1}, {\ xur + 1, \ yll - 1}, {\ xur + 1, \ \ yur + 1}, {\ xll - 1, \ yur + 1}, {\ xll - 1, \ yll - 1}}]}]]; \[IndentingNewLine]\[IndentingNewLine]\ \[IndentingNewLine]xll\ = \ If[xll < 1, 1, xll]; \ xur\ = \ If[xur > nrows, nrows, xur]; \[IndentingNewLine]yll\ = \ If[yll < 1, 1, yll]; \ yur\ = If[yur > ncols, ncols, yur]; \[IndentingNewLine]\[IndentingNewLine]fourmagimage = \ ListDensityPlot[ Abs[fourierdata[\([Range[yll, yur], Range[xll, xur]]\)]], Mesh -> False, FourierColor, \ DisplayLater]; \[IndentingNewLine]\[IndentingNewLine]\ \[IndentingNewLine]revfourimage = \ ListDensityPlot[ Abs[Chop[InverseFourier[KZeroAtCenter[fourieraperature]]]], Mesh \[Rule] False, DisplayLater]; \[IndentingNewLine]\[IndentingNewLine]Show[ GraphicsArray[{\[IndentingNewLine]{theimage, apimage}, \[IndentingNewLine]{revfourimage, fourmagimage}\[IndentingNewLine]}\[IndentingNewLine]], ImageSize \[Rule] 1000, GraphicsSpacing \[Rule] { .001, .0}, DisplayNow];\[IndentingNewLine]]\)], "Input", CellTags-> "mmtag:18:ImageFourierAperature[]__example_function_to_perform_fourier_\ analysis_on_image_data"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Selected Area Diffraction on Image Data: Visualization \ Examples\ \>", "Subtitle"], Cell[BoxData[ \(ImageFourierAperature["\", \(-1\), 1, \(-1\), 1]\)], "Input"], Cell[BoxData[ \(ImageFourierAperature["\", \(-0.1\), 0.1, \(-0.2\), 0.2]\)], "Input"], Cell[BoxData[ \(ImageFourierAperature["\", .04, .14, .05, .15]\)], "Input"], Cell[BoxData[ \(ImageFourierAperature["\", .14, .24, .11, .21]\)], "Input"], Cell[BoxData[ \(ImageFourierAperature["\", .1, .3, .2, .4]\)], "Input", CellTags->"mmtag:18:imaging_grains_in_polycrystal"], Cell[BoxData[ \(ImageFourierAperature["\", \ \(-1\), 1, \(-1\), 1]\)], "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[BoxData[ \(ImageFourierAperature["\", \ \(-0.5\), 0.5, \(-0.05\), 0.05]\)], "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[BoxData[ \(ImageFourierAperature["\", \ \(-0.05\), 0.05, \(-0.5\), 0.5]\)], "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}] }, Closed]] }, FrontEndVersion->"5.2 for Macintosh", ScreenRectangle->{{4, 1280}, {0, 832}}, ScreenStyleEnvironment->"Presentation", PrintingStyleEnvironment->"Presentation", CellGrouping->Manual, WindowSize->{1217, 731}, WindowMargins->{{Automatic, -1281}, {Automatic, -22}}, WindowTitle->"Lecture 18 MIT 3.016 (Fall 2006) \[Copyright] W. Craig Carter \ 2003-2006", PrintingCopies->1, PrintingPageRange->{1, Automatic}, PrintingOptions->{"PrintingMargins"->{{54, 54}, {72, 72}}, "PrintCellBrackets"->False, "PrintRegistrationMarks"->True, "PrintMultipleHorizontalPages"->False}, ShowCellLabel->False, CellLabelAutoDelete->True, Magnification->1, StyleDefinitions -> "3016_Carter.nb" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{ "mmtag:18:Fourier_transform__discrete"->{ Cell[1754, 51, 106, 1, 72, "Title", CellTags->"mmtag:18:Fourier_transform__discrete"]}, "mmtag:18:lattice_images__example_creating"->{ Cell[1964, 58, 152, 4, 59, "Text", CellTags->"mmtag:18:lattice_images__example_creating"]}, "mmtag:18:Join[]"->{ Cell[2119, 64, 288, 5, 89, "Input", CellTags->"mmtag:18:Join[]"]}, "mmtag:18:Transpose[]"->{ Cell[2484, 73, 582, 11, 152, "Input", CellTags->"mmtag:18:Transpose[]"]}, "mmtag:18:ListDensityPlot[]__example_on_created_lattice_image"->{ Cell[3108, 88, 206, 4, 47, "Input", CellTags->{ "mmtag:18:ListDensityPlot[]__example_on_created_lattice_image", "mmtag:18:MeshStyle__option"}]}, "mmtag:18:MeshStyle__option"->{ Cell[3108, 88, 206, 4, 47, "Input", CellTags->{ "mmtag:18:ListDensityPlot[]__example_on_created_lattice_image", "mmtag:18:MeshStyle__option"}]}, "mmtag:18:Nest[]"->{ Cell[3491, 101, 151, 3, 47, "Input", CellTags->"mmtag:18:Nest[]"]}, "mmtag:18:DisplayNow_DisplayLater__example_of_option_definition"->{ Cell[4501, 139, 285, 5, 68, "Input", CellTags-> "mmtag:18:DisplayNow_DisplayLater__example_of_option_definition"]}, "mmtag:18:ImageSize__option"->{ Cell[5072, 159, 125, 2, 47, "Input", CellTags->"mmtag:18:ImageSize__option"]}, "mmtag:18:Fourier[]__example_on_constructed_data"->{ Cell[5306, 168, 136, 2, 47, "Input", CellTags->"mmtag:18:Fourier[]__example_on_constructed_data"]}, "mmtag:18:ColorFunction__example_of_option_definition"->{ Cell[5714, 180, 447, 8, 68, "Input", CellTags->"mmtag:18:ColorFunction__example_of_option_definition"]}, "mmtag:18:GraphicsArray[]"->{ Cell[6544, 200, 230, 5, 68, "Input", CellTags->"mmtag:18:GraphicsArray[]"]}, "mmtag:18:LinearAlgebra_MatrixManipulation__Package"->{ Cell[7603, 229, 1152, 20, 320, "Input", CellTags->{ "mmtag:18:LinearAlgebra_MatrixManipulation__Package", "mmtag:18:Fourier_analysis__example_of_moving_origin", "mmtag:18:Take[]", "mmtag:18:Fourier_transforms__images_of", "mmtag:18:InverseFourier[]"}]}, "mmtag:18:Fourier_analysis__example_of_moving_origin"->{ Cell[7603, 229, 1152, 20, 320, "Input", CellTags->{ "mmtag:18:LinearAlgebra_MatrixManipulation__Package", "mmtag:18:Fourier_analysis__example_of_moving_origin", "mmtag:18:Take[]", "mmtag:18:Fourier_transforms__images_of", "mmtag:18:InverseFourier[]"}]}, "mmtag:18:Take[]"->{ Cell[7603, 229, 1152, 20, 320, "Input", CellTags->{ "mmtag:18:LinearAlgebra_MatrixManipulation__Package", "mmtag:18:Fourier_analysis__example_of_moving_origin", "mmtag:18:Take[]", "mmtag:18:Fourier_transforms__images_of", "mmtag:18:InverseFourier[]"}]}, "mmtag:18:Fourier_transforms__images_of"->{ Cell[7603, 229, 1152, 20, 320, "Input", CellTags->{ "mmtag:18:LinearAlgebra_MatrixManipulation__Package", "mmtag:18:Fourier_analysis__example_of_moving_origin", "mmtag:18:Take[]", "mmtag:18:Fourier_transforms__images_of", "mmtag:18:InverseFourier[]"}]}, "mmtag:18:InverseFourier[]"->{ Cell[7603, 229, 1152, 20, 320, "Input", CellTags->{ "mmtag:18:LinearAlgebra_MatrixManipulation__Package", "mmtag:18:Fourier_analysis__example_of_moving_origin", "mmtag:18:Take[]", "mmtag:18:Fourier_transforms__images_of", "mmtag:18:InverseFourier[]"}]}, "mmtag:18:Fourier_transform__on_lattice_with_defect"->{ Cell[10766, 309, 256, 5, 68, "Input", CellTags->"mmtag:18:Fourier_transform__on_lattice_with_defect"]}, "mmtag:18:two_dimensiona_lattices___example_creating"->{ Cell[12259, 353, 1328, 22, 278, "Input", CellTags->"mmtag:18:two_dimensiona_lattices___example_creating"]}, "mmtag:18:two_dimensiona_lattices___example_creating_with_thermal_\ fluctuations"->{ Cell[14098, 395, 325, 7, 86, "Text", CellTags-> "mmtag:18:two_dimensiona_lattices___example_creating_with_thermal_\ fluctuations"]}, "mmtag:18:Fourier_transform__example_of_selecting_regions_of_k_space"->{ Cell[15699, 441, 1004, 17, 350, "Text", CellTags-> "mmtag:18:Fourier_transform__example_of_selecting_regions_of_k_space"]},\ "mmtag:18:two_dimensional_lattices___example_creating_with_anisotropic_\ thermal_fluctuations"->{ Cell[24324, 622, 268, 6, 59, "Text", CellTags-> "mmtag:18:two_dimensional_lattices___example_creating_with_anisotropic_\ thermal_fluctuations"]}, "mmtag:18:Import[]__graphics_to_be_fourier_transformed"->{ Cell[27077, 697, 202, 4, 47, "Input", CellTags->"mmtag:18:Import[]__graphics_to_be_fourier_transformed"]}, "mmtag:18:Fourier_transform__on_imported_images"->{ Cell[27622, 717, 139, 2, 47, "Input", CellTags->"mmtag:18:Fourier_transform__on_imported_images"]}, "mmtag:18:ImageFourierAperature[]__example_function_to_perform_fourier_\ analysis_on_image_data"->{ Cell[28320, 739, 3415, 63, 866, "Input", CellTags-> "mmtag:18:ImageFourierAperature[]__example_function_to_perform_fourier_\ analysis_on_image_data"]}, "mmtag:18:imaging_grains_in_polycrystal"->{ Cell[32420, 828, 188, 3, 47, "Input", CellTags->"mmtag:18:imaging_grains_in_polycrystal"]}, "mmtag:18:Emily"->{ Cell[32611, 833, 201, 3, 47, "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[32815, 838, 211, 3, 47, "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[33029, 843, 211, 3, 47, "Input", CellTags->{ "mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}]}, "mmtag:18:Fourier_transforms__of_a_face"->{ Cell[32611, 833, 201, 3, 47, "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[32815, 838, 211, 3, 47, "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[33029, 843, 211, 3, 47, "Input", CellTags->{ "mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}]} } *) (*CellTagsIndex CellTagsIndex->{ {"mmtag:18:Fourier_transform__discrete", 34389, 879}, {"mmtag:18:lattice_images__example_creating", 34536, 882}, {"mmtag:18:Join[]", 34661, 885}, {"mmtag:18:Transpose[]", 34766, 888}, {"mmtag:18:ListDensityPlot[]__example_on_created_lattice_image", 34918, \ 891}, {"mmtag:18:MeshStyle__option", 35122, 896}, {"mmtag:18:Nest[]", 35315, 901}, {"mmtag:18:DisplayNow_DisplayLater__example_of_option_definition", 35463, \ 904}, {"mmtag:18:ImageSize__option", 35629, 908}, {"mmtag:18:Fourier[]__example_on_constructed_data", 35773, 911}, {"mmtag:18:ColorFunction__example_of_option_definition", 35943, 914}, {"mmtag:18:GraphicsArray[]", 36090, 917}, {"mmtag:18:LinearAlgebra_MatrixManipulation__Package", 36235, 920}, {"mmtag:18:Fourier_analysis__example_of_moving_origin", 36591, 927}, {"mmtag:18:Take[]", 36911, 934}, {"mmtag:18:Fourier_transforms__images_of", 37254, 941}, {"mmtag:18:InverseFourier[]", 37584, 948}, {"mmtag:18:Fourier_transform__on_lattice_with_defect", 37939, 955}, {"mmtag:18:two_dimensiona_lattices___example_creating", 38112, 958}, {"mmtag:18:two_dimensiona_lattices___example_creating_with_thermal_\ fluctuations", 38317, 962}, {"mmtag:18:Fourier_transform__example_of_selecting_regions_of_k_space", \ 38541, 967}, {"mmtag:18:two_dimensional_lattices___example_creating_with_anisotropic_\ thermal_fluctuations", 38783, 973}, {"mmtag:18:Import[]__graphics_to_be_fourier_transformed", 39006, 978}, {"mmtag:18:Fourier_transform__on_imported_images", 39177, 981}, {"mmtag:18:ImageFourierAperature[]__example_function_to_perform_fourier_\ analysis_on_image_data", 39389, 985}, {"mmtag:18:imaging_grains_in_polycrystal", 39603, 990}, {"mmtag:18:Emily", 39727, 993}, {"mmtag:18:Fourier_transforms__of_a_face", 40154, 1003} } *) (*NotebookFileOutline Notebook[{ Cell[1754, 51, 106, 1, 72, "Title", CellTags->"mmtag:18:Fourier_transform__discrete"], Cell[CellGroupData[{ Cell[1885, 56, 76, 0, 72, "Subtitle"], Cell[1964, 58, 152, 4, 59, "Text", CellTags->"mmtag:18:lattice_images__example_creating"], Cell[2119, 64, 288, 5, 89, "Input", CellTags->"mmtag:18:Join[]"], Cell[2410, 71, 71, 0, 59, "Text"], Cell[2484, 73, 582, 11, 152, "Input", CellTags->"mmtag:18:Transpose[]"], Cell[3069, 86, 36, 0, 59, "Text"], Cell[3108, 88, 206, 4, 47, "Input", CellTags->{ "mmtag:18:ListDensityPlot[]__example_on_created_lattice_image", "mmtag:18:MeshStyle__option"}], Cell[3317, 94, 171, 5, 59, "Text"], Cell[3491, 101, 151, 3, 47, "Input", CellTags->"mmtag:18:Nest[]"], Cell[3645, 106, 24, 0, 59, "Text"], Cell[3672, 108, 115, 2, 47, "Input"], Cell[3790, 112, 166, 5, 59, "Text"], Cell[3959, 119, 126, 2, 47, "Input"], Cell[4088, 123, 24, 0, 59, "Text"], Cell[4115, 125, 112, 2, 47, "Input"], Cell[4230, 129, 44, 0, 59, "Text"], Cell[4277, 131, 155, 4, 47, "Input"], Cell[4435, 137, 63, 0, 59, "Text"], Cell[4501, 139, 285, 5, 68, "Input", CellTags-> "mmtag:18:DisplayNow_DisplayLater__example_of_option_definition"], Cell[4791, 147, 146, 3, 47, "Input"], Cell[4940, 152, 23, 0, 59, "Text"], Cell[4966, 154, 68, 1, 47, "Input"], Cell[5037, 157, 32, 0, 59, "Text"], Cell[5072, 159, 125, 2, 47, "Input", CellTags->"mmtag:18:ImageSize__option"] }, Closed]], Cell[CellGroupData[{ Cell[5234, 166, 69, 0, 74, "Subtitle"], Cell[5306, 168, 136, 2, 47, "Input", CellTags->"mmtag:18:Fourier[]__example_on_constructed_data"], Cell[5445, 172, 266, 6, 125, "Text"], Cell[5714, 180, 447, 8, 68, "Input", CellTags->"mmtag:18:ColorFunction__example_of_option_definition"], Cell[6164, 190, 81, 1, 47, "Input"], Cell[6248, 193, 293, 5, 125, "Text"], Cell[6544, 200, 230, 5, 68, "Input", CellTags->"mmtag:18:GraphicsArray[]"], Cell[6777, 207, 454, 7, 97, "Subsubsection"] }, Closed]], Cell[CellGroupData[{ Cell[7268, 219, 52, 0, 74, "Subtitle"], Cell[7323, 221, 277, 6, 87, "Subsection"], Cell[7603, 229, 1152, 20, 320, "Input", CellTags->{ "mmtag:18:LinearAlgebra_MatrixManipulation__Package", "mmtag:18:Fourier_analysis__example_of_moving_origin", "mmtag:18:Take[]", "mmtag:18:Fourier_transforms__images_of", "mmtag:18:InverseFourier[]"}], Cell[8758, 251, 234, 5, 89, "Input"], Cell[8995, 258, 81, 1, 47, "Input"], Cell[9079, 261, 190, 4, 68, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[9306, 270, 64, 0, 74, "Subtitle"], Cell[9373, 272, 219, 4, 86, "Text"], Cell[9595, 278, 370, 6, 89, "Input"], Cell[9968, 286, 155, 4, 47, "Input"], Cell[10126, 292, 51, 0, 59, "Text"], Cell[10180, 294, 81, 1, 47, "Input"], Cell[10264, 297, 45, 0, 59, "Text"], Cell[10312, 299, 451, 8, 131, "Input"], Cell[10766, 309, 256, 5, 68, "Input", CellTags->"mmtag:18:Fourier_transform__on_lattice_with_defect"], Cell[11025, 316, 450, 7, 140, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[11512, 328, 142, 3, 110, "Subtitle"], Cell[11657, 333, 599, 18, 137, "Text"], Cell[12259, 353, 1328, 22, 278, "Input", CellTags->"mmtag:18:two_dimensiona_lattices___example_creating"], Cell[13590, 377, 51, 0, 59, "Text"], Cell[13644, 379, 150, 3, 47, "Input"], Cell[13797, 384, 208, 4, 68, "Input"], Cell[14008, 390, 87, 3, 59, "Text"], Cell[14098, 395, 325, 7, 86, "Text", CellTags-> "mmtag:18:two_dimensiona_lattices___example_creating_with_thermal_\ fluctuations"], Cell[14426, 404, 176, 3, 68, "Input"], Cell[14605, 409, 147, 3, 59, "Text"], Cell[14755, 414, 240, 5, 68, "Input"], Cell[14998, 421, 534, 10, 140, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[15569, 436, 127, 3, 110, "Subtitle"], Cell[15699, 441, 1004, 17, 350, "Text", CellTags-> "mmtag:18:Fourier_transform__example_of_selecting_regions_of_k_space"], Cell[16706, 460, 614, 13, 265, "Subsubsection"], Cell[17323, 475, 5376, 94, 1286, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[22736, 574, 76, 0, 74, "Subtitle"], Cell[22815, 576, 104, 3, 59, "Text"], Cell[22922, 581, 201, 4, 68, "Input"], Cell[23126, 587, 176, 3, 68, "Input"], Cell[23305, 592, 111, 2, 47, "Input"], Cell[23419, 596, 115, 2, 47, "Input"], Cell[23537, 600, 113, 2, 47, "Input"], Cell[23653, 604, 113, 2, 47, "Input"], Cell[23769, 608, 113, 2, 47, "Input"], Cell[23885, 612, 436, 8, 191, "Text"], Cell[24324, 622, 268, 6, 59, "Text", CellTags-> "mmtag:18:two_dimensional_lattices___example_creating_with_anisotropic_\ thermal_fluctuations"], Cell[24595, 630, 1279, 21, 236, "Input"], Cell[25877, 653, 96, 3, 59, "Text"], Cell[25976, 658, 193, 4, 47, "Input"], Cell[26172, 664, 107, 3, 59, "Text"], Cell[26282, 669, 113, 2, 47, "Input"], Cell[26398, 673, 113, 3, 59, "Text"], Cell[26514, 678, 113, 2, 47, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[26664, 685, 48, 0, 74, "Subtitle"], Cell[26715, 687, 359, 8, 98, "Text"], Cell[27077, 697, 202, 4, 47, "Input", CellTags->"mmtag:18:Import[]__graphics_to_be_fourier_transformed"], Cell[27282, 703, 58, 1, 47, "Input"], Cell[27343, 706, 139, 3, 59, "Text"], Cell[27485, 711, 77, 1, 47, "Input"], Cell[27565, 714, 54, 1, 47, "Input"], Cell[27622, 717, 139, 2, 47, "Input", CellTags->"mmtag:18:Fourier_transform__on_imported_images"], Cell[27764, 721, 239, 5, 68, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[28040, 731, 59, 0, 74, "Subtitle"], Cell[28102, 733, 215, 4, 86, "Text"], Cell[28320, 739, 3415, 63, 866, "Input", CellTags-> "mmtag:18:ImageFourierAperature[]__example_function_to_perform_fourier_\ analysis_on_image_data"] }, Closed]], Cell[CellGroupData[{ Cell[31772, 807, 93, 3, 74, "Subtitle"], Cell[31868, 812, 132, 2, 47, "Input"], Cell[32003, 816, 140, 2, 47, "Input"], Cell[32146, 820, 134, 2, 47, "Input"], Cell[32283, 824, 134, 2, 47, "Input"], Cell[32420, 828, 188, 3, 47, "Input", CellTags->"mmtag:18:imaging_grains_in_polycrystal"], Cell[32611, 833, 201, 3, 47, "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[32815, 838, 211, 3, 47, "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}], Cell[33029, 843, 211, 3, 47, "Input", CellTags->{"mmtag:18:Emily", "mmtag:18:Fourier_transforms__of_a_face"}] }, Closed]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)