(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 83025, 1938] NotebookOptionsPosition[ 77951, 1778] NotebookOutlinePosition[ 78951, 1813] CellTagsIndexPosition[ 78851, 1808] WindowTitle->Lecture 18 MIT 3.016 (Fall 2009) \251 W. Craig Carter \ 2003--2009 WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["\<\ Fourier Theory, Fourier Transforms, Diffraction and Computational Simulation \ of Transmission Electron Microscopy\ \>", "Title", CellChangeTimes->{{3.402833286804056*^9, 3.402833322804069*^9}}, CellTags->"mmtag:18:Fourier_transform__discrete"], Cell["\<\ Acknowledgement: Prof. S. Allen graciously provided useful physical insight \ on diffraction interpretation in these notes.\ \>", "Text", CellChangeTimes->{{3.402752688957191*^9, 3.402752748569779*^9}, 3.402913625074688*^9}], Cell[CellGroupData[{ Cell["\<\ Creating Sample Atomic Data and Lattices for Fourier Analysis and Diffaction \ Simulation.\ \>", "Subtitle", CellChangeTimes->{{3.402397954992833*^9, 3.402397969675847*^9}, { 3.4027519593381033`*^9, 3.4027519781787357`*^9}}], Cell["\<\ Here we create an image such as might be seen in an transmission electron \ microscope. For our first set of data, we use intererence of two sine waves \ to produce a simulation of the density of scattering centers in an atomic \ lattice. Most of the physical aspects of atomic imaging and diffraction can \ be simulated with the two-dimensional techniques that are produced in these \ notes.\ \>", "Text", CellChangeTimes->{{3.402398034810557*^9, 3.402398117835369*^9}, { 3.402751842875095*^9, 3.402751947377378*^9}, {3.40275198953094*^9, 3.4027519955536947`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"ISize", "=", "64"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"AtomDensity", "=", " ", RowBox[{"N", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "+", " ", RowBox[{"Sin", "[", RowBox[{"4", RowBox[{"(", RowBox[{"x", "+", "y"}], ")"}], "2", " ", RowBox[{"Pi", "/", "ISize"}]}], "]"}]}], ")"}], RowBox[{ RowBox[{"(", RowBox[{"1", " ", "+", " ", RowBox[{"Sin", "[", RowBox[{"2", RowBox[{"(", RowBox[{"x", "-", RowBox[{"2", "y"}]}], ")"}], "2", " ", RowBox[{"Pi", "/", "ISize"}]}], "]"}]}], ")"}], "/", "4"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "1", ",", "ISize"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "1", ",", "ISize"}], "}"}]}], "]"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.400844500837325*^9, 3.400844501001916*^9}, { 3.40157838309275*^9, 3.4015783837136097`*^9}, {3.402230995785942*^9, 3.402230995870049*^9}, {3.4022363834603443`*^9, 3.402236384058778*^9}, { 3.402239854999689*^9, 3.402239855709243*^9}, {3.402293510812248*^9, 3.402293511897634*^9}, {3.4022959830515127`*^9, 3.402295985288761*^9}, { 3.4023036575113297`*^9, 3.4023036578765*^9}, {3.4023060085024147`*^9, 3.402306018181211*^9}, {3.402306052119062*^9, 3.4023060573730803`*^9}, { 3.402306380953768*^9, 3.402306388784483*^9}, {3.402410146204164*^9, 3.402410207756895*^9}, {3.402410267059229*^9, 3.4024102866029053`*^9}, { 3.402410318046691*^9, 3.402410340857695*^9}}], Cell["\<\ We show the simplest visulations of our data, we will improve on the coloring \ methods below. Here we show our two dimensional crystal as a gray-intensity \ map and with a three dimensional plot of scattering intensity over an x-y \ plane.\ \>", "Text", CellChangeTimes->{{3.402409906862488*^9, 3.402409953972115*^9}, { 3.402752016273561*^9, 3.402752079345516*^9}}], Cell[BoxData[ RowBox[{"GraphicsRow", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ArrayPlot", "[", "AtomDensity", "]"}], ",", RowBox[{"ListPlot3D", "[", "AtomDensity", "]"}]}], "}"}], ",", RowBox[{"ImageSize", "\[Rule]", " ", "Full"}]}], "]"}]], "Input", CellChangeTimes->{{3.4024098772449903`*^9, 3.402409890274909*^9}, { 3.402410030741696*^9, 3.40241009648532*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Improving Visualization of Data and Diffraction with Contrast Functions\ \>", "Subtitle", CellChangeTimes->{{3.402397954992833*^9, 3.402397969675847*^9}, { 3.402589399966897*^9, 3.402589447708881*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "To view the data better, we create two versions of a contrast function, the \ first ", StyleBox["(normalcontrast)", FontSlant->"Italic"], " is useful when we wish to view the entire range of intensities, the second \ version ", StyleBox["(highcontrast) ", FontSlant->"Italic"], "when we wish to resolve differences at the low-end of the intensities." }], "Section", CellChangeTimes->{{3.402399822675634*^9, 3.402399876321368*^9}, { 3.402399951086812*^9, 3.40240003323774*^9}, {3.402409205976142*^9, 3.402409310816718*^9}, {3.402411000006432*^9, 3.402411009907366*^9}, { 3.4024111265901003`*^9, 3.402411232100206*^9}, {3.402411265200185*^9, 3.402411299580785*^9}}], Cell["\<\ In order to view the data better, we wish to develop contrast functions. \ Experience suggests that it is useful to construct two type of contrast, this \ one, normalcontrast will be used as a ColorFunction when we want to resolve \ the entire range of intensities.\ \>", "Text", CellChangeTimes->{{3.402398136535615*^9, 3.402398238611438*^9}, { 3.402409989060759*^9, 3.40240999559437*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"normalcontrast", "=", " ", RowBox[{"Function", "[", RowBox[{"intens", ",", RowBox[{"If", "[", RowBox[{ RowBox[{"intens", "<", "0.00001"}], ",", RowBox[{"GrayLevel", "[", "0", "]"}], ",", RowBox[{"Blend", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", ".2"}], "]"}], " ", ",", "Red", ",", " ", "White"}], "}"}], ",", "intens"}], "]"}]}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.400595065102829*^9, 3.4005952487528067`*^9}, { 3.4005952837028627`*^9, 3.4005953302566147`*^9}, {3.400595362878055*^9, 3.4005953641287117`*^9}, {3.4006284052950983`*^9, 3.40062842820564*^9}, { 3.400628605552018*^9, 3.400628615392365*^9}, {3.400628779479289*^9, 3.400628826924924*^9}, {3.4006290081327868`*^9, 3.4006290249314413`*^9}, { 3.40062907272433*^9, 3.400629106260103*^9}, {3.4006291668439293`*^9, 3.400629252196128*^9}, {3.400629335318657*^9, 3.400629339178825*^9}, { 3.400629380838748*^9, 3.400629515758959*^9}, {3.40062954653817*^9, 3.4006296049959908`*^9}, {3.4006297489336157`*^9, 3.4006297517549763`*^9}, 3.400629921045598*^9, {3.4006299949726353`*^9, 3.400629996746559*^9}, { 3.4007352612933273`*^9, 3.400735282829606*^9}, {3.400735332271503*^9, 3.400735362789998*^9}, {3.400747575095255*^9, 3.4007475992818193`*^9}, 3.400747682630427*^9, {3.400747749713751*^9, 3.40074780517068*^9}, { 3.400747846328766*^9, 3.400747853415237*^9}, {3.40074789358387*^9, 3.400748001767879*^9}, {3.4008416224407663`*^9, 3.400841624075169*^9}, { 3.40223977559356*^9, 3.402239830177415*^9}, {3.402239880610258*^9, 3.4022399539365463`*^9}, 3.4022400099707813`*^9, {3.402264490559642*^9, 3.402264523843051*^9}, {3.4022938302405024`*^9, 3.402293841640337*^9}, { 3.402293884728505*^9, 3.402293900966845*^9}, {3.402293951858556*^9, 3.402294081761503*^9}, {3.4022941391057673`*^9, 3.402294431710291*^9}, { 3.402294488816321*^9, 3.402294499523839*^9}, {3.4022945596527147`*^9, 3.402294616947535*^9}, {3.402294648461622*^9, 3.402294659275648*^9}, { 3.402294701653887*^9, 3.402294838756687*^9}, {3.402294889354982*^9, 3.4022951016188183`*^9}, {3.402295167888424*^9, 3.402295217822608*^9}, { 3.402295258871099*^9, 3.402295259566174*^9}, {3.402295305554123*^9, 3.4022953285297422`*^9}, {3.402295382497408*^9, 3.402295415807541*^9}, { 3.402295458240877*^9, 3.402295674710639*^9}, {3.4022957093654213`*^9, 3.4022957273892117`*^9}, {3.4022961749957027`*^9, 3.40229619286535*^9}, { 3.4022979772320967`*^9, 3.402298050619986*^9}, {3.4022986357400017`*^9, 3.402298661487275*^9}, {3.4022987636833477`*^9, 3.402298855961046*^9}, { 3.402298892377606*^9, 3.4022989394133587`*^9}, {3.4022989916279793`*^9, 3.402299060589603*^9}, {3.402299173170176*^9, 3.402299186311315*^9}, { 3.402299219238819*^9, 3.402299302798587*^9}, {3.40229933991046*^9, 3.402299368852063*^9}, {3.4022999621327953`*^9, 3.402300009323052*^9}, 3.402301661040245*^9, 3.4023980306703787`*^9, {3.402411024151422*^9, 3.402411053794305*^9}}], Cell["\<\ This second version, highcontrast, will be useful when we wish to resolve \ differences in the low-intensity region. Note how the colors change rapidly \ in the lower region.\ \>", "Text", CellChangeTimes->{{3.402398275659696*^9, 3.402398342739341*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"highcontrast", "=", RowBox[{"Function", "[", RowBox[{"intens", ",", RowBox[{"Blend", "[", RowBox[{ RowBox[{"{", RowBox[{"Black", ",", RowBox[{"GrayLevel", "[", "0.1", "]"}], ",", RowBox[{"Lighter", "[", "Blue", "]"}], ",", RowBox[{"Lighter", "[", "Green", "]"}], ",", "Green", ",", RowBox[{"Darker", "[", "Green", "]"}], ",", RowBox[{"Lighter", "[", "Red", "]"}], ",", "White"}], "}"}], ",", RowBox[{ RowBox[{"Abs", "[", "intens", "]"}], "^", RowBox[{"(", "0.25", ")"}]}]}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.402302975988677*^9, 3.4023032375013638`*^9}, { 3.4023032828740253`*^9, 3.402303318709743*^9}, {3.402303386798976*^9, 3.402303387797434*^9}, {3.4024110331958227`*^9, 3.40241105801747*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"ContrastGraphics", "=", RowBox[{"GraphicsColumn", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ArrayPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"i", "/", "256"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "24"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "256"}], "}"}]}], "]"}], ",", RowBox[{"ColorFunction", "\[Rule]", " ", "normalcontrast"}], ",", RowBox[{"ImageSize", "\[Rule]", "Large"}], ",", RowBox[{"PlotLabel", "\[Rule]", " ", "\"\\""}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ArrayPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"i", "/", "256"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "24"}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "256"}], "}"}]}], "]"}], ",", RowBox[{"ColorFunction", "\[Rule]", " ", "highcontrast"}], ",", RowBox[{"ImageSize", "\[Rule]", "Large"}], ",", RowBox[{"PlotLabel", "\[Rule]", " ", "\"\\""}]}], "]"}]}], "}"}], ",", RowBox[{"ImageSize", "\[Rule]", "Full"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.402411065056916*^9, 3.402411096197365*^9}, { 3.402412148697084*^9, 3.402412352400963*^9}}] }, Open ]], Cell[BoxData["ContrastGraphics"], "Input", CellChangeTimes->{{3.4024123573964157`*^9, 3.40241236268191*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Visualizing Atomic Densities", "Subtitle", CellChangeTimes->{{3.402397954992833*^9, 3.402397969675847*^9}, { 3.402589399966897*^9, 3.402589447708881*^9}, {3.402666664136183*^9, 3.402666675222246*^9}}], Cell["\<\ ImagePlot will be our \"work-horse\" function to dispay images, as well as \ Fourier data. It takes an rectangular array of data as input, and has thee \ optional arguments for a plot-label, the colorfunction to use (i.e., \ highcontrast or normalcontrast), and an indication of the image size.\ \>", "Text", CellChangeTimes->{{3.402407303652586*^9, 3.4024074523831787`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"ImagePlot", "[", RowBox[{ RowBox[{"data_", "?", "MatrixQ"}], ",", " ", RowBox[{"label_:", "None"}], ",", RowBox[{"colfunc_:", "highcontrast"}], ",", " ", RowBox[{"imagesize_:", "Medium"}]}], "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"absdata", "=", RowBox[{"Abs", "[", "data", "]"}]}], ",", "min", ",", "max"}], "}"}], ",", RowBox[{"ArrayPlot", "[", RowBox[{"absdata", ",", RowBox[{"ColorFunction", "\[Rule]", " ", "colfunc"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{"Small", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}]}], "}"}]}], ",", " ", RowBox[{"PlotLabel", "\[Rule]", "label"}], ",", RowBox[{"ImageSize", "\[Rule]", "imagesize"}]}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4008425097911987`*^9, 3.4008425313260527`*^9}, { 3.40084261425674*^9, 3.4008426238133087`*^9}, {3.4008437428487186`*^9, 3.400843743086899*^9}, {3.400843781172618*^9, 3.400843783647216*^9}, { 3.40084394392717*^9, 3.400843958070937*^9}, {3.400844019963122*^9, 3.400844053599671*^9}, {3.400844161276909*^9, 3.4008442510472813`*^9}, { 3.400844281532188*^9, 3.4008443110236197`*^9}, 3.400844582781439*^9, 3.400844707427195*^9, {3.4008451303370132`*^9, 3.4008452114839487`*^9}, { 3.400845322479594*^9, 3.4008453235086737`*^9}, {3.401553566854979*^9, 3.401553574076981*^9}, {3.4022355422658567`*^9, 3.402235548917375*^9}, { 3.402235697935432*^9, 3.402235705261644*^9}, {3.402238662834293*^9, 3.402238669112062*^9}, {3.402295794136739*^9, 3.402295832121482*^9}, { 3.402295868722425*^9, 3.402295955951459*^9}, {3.402297863477413*^9, 3.4022978718610687`*^9}, {3.4023005446351767`*^9, 3.4023005562075777`*^9}, {3.402374885057385*^9, 3.4023748962964153`*^9}, { 3.4023750858190193`*^9, 3.402375103297826*^9}, {3.402375166026105*^9, 3.402375171837878*^9}, {3.402398504429358*^9, 3.402398559899107*^9}, { 3.402398605315666*^9, 3.40239864322217*^9}, {3.402398776794433*^9, 3.402398778081696*^9}, 3.4024072440350647`*^9, {3.402407291109848*^9, 3.402407295981566*^9}}], Cell["\<\ Here we show the normal contrast and the highcontrast images of the simulated \ atomic data side-by-side.\ \>", "Text", CellChangeTimes->{{3.402407303652586*^9, 3.402407502903308*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"SimulatedGraphics", "=", RowBox[{"GraphicsRow", "[", RowBox[{"{", RowBox[{ RowBox[{"ImagePlot", "[", RowBox[{ "AtomDensity", ",", "\"\\"", ",", "normalcontrast"}], "]"}], ",", RowBox[{"ImagePlot", "[", RowBox[{ "AtomDensity", ",", "\"\\""}], "]"}]}], "}"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.400841869062313*^9, 3.400841879660644*^9}, { 3.400844076201189*^9, 3.4008440955461617`*^9}, 3.400844316285572*^9, { 3.400844533291955*^9, 3.400844533641136*^9}, {3.400845103129838*^9, 3.400845121047585*^9}, {3.402296018225347*^9, 3.4022960749824657`*^9}, { 3.402297879643476*^9, 3.402297889258812*^9}, {3.4022979298608837`*^9, 3.402297934418751*^9}, {3.402398658873773*^9, 3.4023987038816957`*^9}, { 3.402398805312447*^9, 3.402398811736032*^9}, {3.402589165569936*^9, 3.402589183744186*^9}}], Cell[BoxData["SimulatedGraphics"], "Input", CellChangeTimes->{{3.402589196853141*^9, 3.40258920051598*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Discrete Fourier Transforms on Simple 2D Lattices", "Subtitle"], Cell["\<\ We create a function that shows the original data, its Fourier transform, and \ then its inverse transform (hopefully) back to the original image.\ \>", "Text", CellChangeTimes->{{3.4024079827623653`*^9, 3.402408040830534*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"FourierRow", "[", "data_", "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"fourdat", "=", RowBox[{"Fourier", "[", "data", "]"}]}], "}"}], ",", "\[IndentingNewLine]", " ", RowBox[{"GraphicsRow", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ImagePlot", "[", RowBox[{ "data", ",", "\"\\"", ",", "normalcontrast"}], "]"}], ",", RowBox[{"ImagePlot", "[", RowBox[{ "fourdat", ",", "\"\\""}], "]"}], ",", RowBox[{"ImagePlot", "[", RowBox[{ RowBox[{"InverseFourier", "[", "fourdat", "]"}], ",", "\"\<\!\(\*SuperscriptBox[\(\[ScriptCapitalF]\), \(-1\)]\)[\ \[ScriptCapitalF][Original Data]],\>\"", ",", "normalcontrast"}], "]"}]}], "}"}], ",", RowBox[{"ImageSize", "\[Rule]", "Full"}]}], " ", "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4007338671549788`*^9, 3.400734047371183*^9}, 3.400734105613258*^9, 3.400734166924308*^9, {3.4007601869184113`*^9, 3.400760205817648*^9}, {3.400760245421255*^9, 3.400760335995579*^9}, { 3.4007604655436277`*^9, 3.40076047089977*^9}, {3.400760627629466*^9, 3.400760634076611*^9}, {3.400760893139502*^9, 3.4007608991052322`*^9}, { 3.4008420355559053`*^9, 3.400842153315234*^9}, {3.400842223196672*^9, 3.400842223562018*^9}, {3.400843197299129*^9, 3.400843545916296*^9}, { 3.400843649381196*^9, 3.4008436666858463`*^9}, {3.4008452291737957`*^9, 3.4008453466028767`*^9}, {3.4008453983659267`*^9, 3.400845464286396*^9}, { 3.402303429455585*^9, 3.4023034587894077`*^9}, {3.4026702272132072`*^9, 3.402670266016818*^9}, {3.402671036412024*^9, 3.402671069514161*^9}}], Cell["\<\ We will see the peaks of the image are located near (kx,ky) = 2 \[Pi] \ (a,b)/(Image Size), where (a,b) = {(0,0), (Image Size,0), (0,Image SIze), (Image Size, Image Size)}. \ These correspond to the longest wavelength periodicities.\ \>", "Text", CellChangeTimes->{{3.4024079827623653`*^9, 3.402408040830534*^9}, { 3.4024080772320423`*^9, 3.4024083051671057`*^9}, 3.4024083363890963`*^9}], Cell[BoxData[ RowBox[{"FourierRow", "[", "AtomDensity", "]"}]], "Input", CellChangeTimes->{{3.400842232945484*^9, 3.400842240783073*^9}}], Cell["\<\ The magnitude of fourier the fourier transform corresponds to the \ constructive interference of wave - like objects scattered from a real - \ space set of data. When the real-space data has translational symmetry, such \ as in a lattice, the fourier intensity results in bright spots corresponding \ to periodicities present in the lattice.The distance between spots is \ inversely proportional to the distance between periodic scattering features, \ and the orientation of the (kx, ky) vector corresponds to the normal to the \ groups of constructively interering scatterers.\ \>", "Text", CellChangeTimes->{{3.402763476109188*^9, 3.402763503387308*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Simulating Diffraction", "Subtitle", CellChangeTimes->{{3.402671216264765*^9, 3.402671224190012*^9}}], Cell[TextData[{ "Materials Scientists, Microscopists, and Crystallographers are used to \ seeing the ", Cell[BoxData[ FormBox[ OverscriptBox["k", "\[RightVector]"], TraditionalForm]]], "=0 spot at the center of the diffraction image; so we write a function that \ takes the Fourier data and manipulates to so as to move spots to the center." }], "Text", CellChangeTimes->{{3.4024079827623653`*^9, 3.402408040830534*^9}, { 3.4024080772320423`*^9, 3.4024083051671057`*^9}, 3.4024083363890963`*^9, { 3.402408376213595*^9, 3.402408492275194*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"KZeroMiddle", "[", RowBox[{"fourmat_", "?", "MatrixQ"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"nrows", ",", "ncols"}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"nrows", ",", "ncols"}], "}"}], "=", RowBox[{"Dimensions", "[", "fourmat", "]"}]}], ";", RowBox[{"RotateRight", "[", RowBox[{"fourmat", ",", RowBox[{"{", RowBox[{ RowBox[{"Quotient", "[", RowBox[{"nrows", ",", "2"}], "]"}], ",", RowBox[{"Quotient", "[", RowBox[{"ncols", ",", "2"}], "]"}]}], "}"}]}], "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.400595392756175*^9, 3.400595618428577*^9}, { 3.4007743668346786`*^9, 3.400774446479514*^9}, {3.4007744768850718`*^9, 3.400774513923359*^9}, {3.400774608467059*^9, 3.4007746306430492`*^9}, 3.40077473587228*^9, {3.4008415822901993`*^9, 3.4008415888028517`*^9}, 3.400841671553728*^9}], Cell["\<\ And, we modify our FourierRow function to use the k-at-zero transformation.\ \>", "Text", CellChangeTimes->{{3.4024079827623653`*^9, 3.402408040830534*^9}, { 3.4024080772320423`*^9, 3.4024083051671057`*^9}, 3.4024083363890963`*^9, { 3.402408376213595*^9, 3.4024085381071587`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"FourierRowK0", "[", "data_", "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"fourdat", "=", RowBox[{"Fourier", "[", "data", "]"}]}], "}"}], ",", "\[IndentingNewLine]", " ", RowBox[{"GraphicsRow", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ImagePlot", "[", RowBox[{ "data", ",", "\"\\"", ",", "normalcontrast"}], "]"}], ",", RowBox[{"ImagePlot", "[", RowBox[{ RowBox[{"KZeroMiddle", "[", "fourdat", "]"}], ",", "\"\<\[ScriptCapitalF][data] \!\(\*OverscriptBox[\(k\), \(\ \[RightVector]\)]\)=\!\(\*OverscriptBox[\(0\), \(\[RightVector]\)]\) centered \ (high contrast)\>\"", ",", "highcontrast"}], "]"}], ",", RowBox[{"ImagePlot", "[", RowBox[{ RowBox[{"InverseFourier", "[", "fourdat", "]"}], ",", "\"\<\!\(\*SuperscriptBox[\(\[ScriptCapitalF]\), \(-1\)]\)[\ \[ScriptCapitalF][Original Data]]\>\"", ",", "normalcontrast"}], "]"}]}], "}"}], ",", RowBox[{"ImageSize", "\[Rule]", "Full"}]}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4007338671549788`*^9, 3.400734047371183*^9}, 3.400734105613258*^9, 3.400734166924308*^9, {3.4007601869184113`*^9, 3.400760205817648*^9}, {3.400760245421255*^9, 3.400760335995579*^9}, { 3.4007604655436277`*^9, 3.40076047089977*^9}, {3.400760627629466*^9, 3.400760634076611*^9}, {3.400760893139502*^9, 3.4007608991052322`*^9}, { 3.4008420355559053`*^9, 3.400842153315234*^9}, {3.400842223196672*^9, 3.400842223562018*^9}, {3.4008428202282143`*^9, 3.400842838085331*^9}, { 3.400845539399379*^9, 3.400845632947823*^9}, {3.4008456769511967`*^9, 3.4008456790584297`*^9}, {3.400845733304275*^9, 3.400845734099419*^9}, { 3.400846067837366*^9, 3.4008460751474113`*^9}, {3.400847240942524*^9, 3.4008472856704683`*^9}, {3.4008476460376463`*^9, 3.4008476507153177`*^9}, {3.4008478327167177`*^9, 3.40084790910861*^9}, { 3.402297731407935*^9, 3.40229773661404*^9}, {3.402297786143943*^9, 3.402297787534099*^9}, {3.402298164599745*^9, 3.4022981658301363`*^9}, { 3.402302684292995*^9, 3.402302697010037*^9}, {3.4023034798164263`*^9, 3.402303493846856*^9}, 3.4023037310626097`*^9, {3.40230378202245*^9, 3.402303832279345*^9}, 3.402303889281971*^9, {3.402303940298436*^9, 3.4023039577391577`*^9}, {3.402304000978407*^9, 3.4023040048361177`*^9}, { 3.402304048848052*^9, 3.40230407758444*^9}, {3.4023041427384863`*^9, 3.402304150224557*^9}, {3.4023132620994473`*^9, 3.4023133082389917`*^9}, { 3.402317827301187*^9, 3.402317827735511*^9}, {3.402399157317808*^9, 3.402399174350316*^9}, {3.4023992075989923`*^9, 3.402399228677545*^9}, { 3.402399547874112*^9, 3.402399562501272*^9}, {3.402408555766803*^9, 3.402408569324285*^9}, {3.4024103798846807`*^9, 3.402410389722674*^9}, { 3.402671470365596*^9, 3.402671475139749*^9}}], Cell[BoxData[ RowBox[{"FourierRowK0", "[", "AtomDensity", "]"}]], "Input", CellChangeTimes->{{3.400842848704218*^9, 3.4008428588171*^9}}], Cell["\<\ The middle image is a good simulation of what is observed for electron \ diffraction in the TEM. The white spot (at the center) is called the \ \"direct beam\" or the \"transmitted beam\" and the other spots correspond to \ diffraction peaks from different (hkl) planes (or (hk) in 2D). The pattern \ corresponds the the reciprocal lattice of the crystal object. A vector from \ the origin (white spot) to a particular peak is the reciprocal lattice vector \ for that particular set of diffracting planes.\ \>", "Text", CellChangeTimes->{{3.402752660773066*^9, 3.402752680177462*^9}, { 3.4027527745934687`*^9, 3.4027528655619698`*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Alternative Diffraction Visualization", "Subtitle", CellChangeTimes->{{3.402671216264765*^9, 3.402671224190012*^9}, { 3.402672062506072*^9, 3.402672074990996*^9}}], Cell["\<\ Here is an alternative visualiazation of the diffraction peaks using a third \ dimension to indicate the intensity of the peak. We write it so we can \ specify the range optionally.\ \>", "Text", CellChangeTimes->{{3.402408644275908*^9, 3.4024087111976852`*^9}, { 3.402673098169661*^9, 3.40267311451923*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Spots3D", "[", RowBox[{"data_", ",", " ", RowBox[{"range_:", "All"}]}], "]"}], " ", ":=", " ", RowBox[{"ListPlot3D", "[", RowBox[{ RowBox[{"KZeroMiddle", "[", RowBox[{"Abs", "[", RowBox[{"Fourier", "[", "data", "]"}], "]"}], "]"}], ",", RowBox[{"ColorFunction", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"highcontrast", "[", "#3", "]"}], "&"}], ")"}]}], ",", RowBox[{"PlotRange", "\[Rule]", " ", "range"}], ",", RowBox[{"ImageSize", "\[Rule]", "Medium"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.402408731420512*^9, 3.40240875962022*^9}, { 3.402841014331581*^9, 3.4028410151676283`*^9}, {3.402841057636232*^9, 3.402841061537809*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Spots3DRow", "[", RowBox[{"data_", ",", " ", "range_"}], "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "plt", "}"}], ",", RowBox[{ RowBox[{"plt", "=", RowBox[{"Spots3D", "[", "data", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"GraphicsRow", "[", RowBox[{ RowBox[{"{", RowBox[{"plt", ",", RowBox[{"Show", "[", RowBox[{"plt", ",", RowBox[{"PlotRange", "\[Rule]", " ", "range"}]}], "]"}]}], "}"}], ",", RowBox[{"ImageSize", "\[Rule]", "Full"}]}], "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.402408731420512*^9, 3.40240875962022*^9}, { 3.402408858129627*^9, 3.402409008096365*^9}, {3.402409075529748*^9, 3.402409081576715*^9}, {3.4026732037158623`*^9, 3.402673204178811*^9}, { 3.402841040055077*^9, 3.402841075390678*^9}}], Cell[BoxData[ RowBox[{"Spots3DRow", "[", RowBox[{"AtomDensity", ",", RowBox[{"{", RowBox[{"0", ",", "7"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{ 3.400768604857977*^9, {3.400847916132221*^9, 3.400847924820374*^9}, { 3.402304102628923*^9, 3.40230410688339*^9}, 3.402304164587448*^9, { 3.402399574570282*^9, 3.4023995828841267`*^9}, {3.402409011766626*^9, 3.4024090213024178`*^9}, {3.402409106792719*^9, 3.402409129736705*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Visualizing Diffraction Patterns of Crystals with a Defect", "Subtitle", CellChangeTimes->{{3.400842972896484*^9, 3.400843000301516*^9}, { 3.402683331044836*^9, 3.402683338785102*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Algorithm to Create a Defect in a Simulated Atomic Density Image : \nHere, \ the algorithm will create new data which will be called \n", StyleBox["AtomDensityWithDefect", FontSlant->"Italic"] }], "Section", CellChangeTimes->{{3.402399822675634*^9, 3.402399876321368*^9}, { 3.402399951086812*^9, 3.40240003323774*^9}, {3.402409205976142*^9, 3.402409310816718*^9}}], Cell["\<\ Look for a maximum in the atomic density map, and replace a circle around it \ with a \"hole\"\ \>", "Text", CellChangeTimes->{{3.402566452037835*^9, 3.402566485942504*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"MinMax", "[", "alist_List", "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"flatlist", "=", RowBox[{"Flatten", "[", "alist", "]"}]}], "}"}], ",", RowBox[{"Return", "[", RowBox[{"{", RowBox[{ RowBox[{"Min", "[", "flatlist", "]"}], ",", RowBox[{"Max", "[", "flatlist", "]"}]}], "}"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"minval", ",", "maxval"}], "}"}], "=", RowBox[{"MinMax", "[", "AtomDensity", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"randx", ",", "randy"}], "}"}], "=", RowBox[{"RandomChoice", "[", RowBox[{"Position", "[", RowBox[{"AtomDensity", ",", "maxval"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MakeDefect", "[", RowBox[{ RowBox[{"data_", "?", "MatrixQ"}], ",", "size_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"defect", " ", "=", " ", RowBox[{"{", "}"}]}], ",", "nx", ",", "ny", ",", RowBox[{"ssq", "=", RowBox[{"size", "^", "2"}]}], ",", " ", "minval", ",", " ", "maxval", ",", " ", "rx", ",", "ry"}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"minval", ",", "maxval"}], "}"}], "=", RowBox[{"MinMax", "[", "data", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"rx", ",", "ry"}], "}"}], "=", RowBox[{"RandomChoice", "[", RowBox[{"Position", "[", RowBox[{"data", ",", "maxval"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"nx", ",", "ny"}], "}"}], "=", " ", RowBox[{"Dimensions", "[", "data", "]"}]}], ";", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"i", "^", "2"}], " ", "+", " ", RowBox[{"j", "^", "2"}]}], ")"}], "\[LessEqual]", " ", "ssq"}], ",", RowBox[{"AppendTo", "[", RowBox[{"defect", ",", RowBox[{"{", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"i", "+", "rx"}], ",", "nx", ",", "1"}], "]"}], ",", RowBox[{"Mod", "[", RowBox[{ RowBox[{"j", "+", "ry"}], ",", "ny", ",", "1"}], "]"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"-", "8"}], ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"-", "8"}], ",", "8"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Return", "[", RowBox[{"ReplacePart", "[", RowBox[{"data", ",", RowBox[{"defect", "\[Rule]", "0"}]}], "]"}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"AtomDensityWithDefect", "=", RowBox[{"MakeDefect", "[", RowBox[{"AtomDensity", ",", "4"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.400758013738647*^9, 3.400758028080903*^9}, { 3.400758066580698*^9, 3.4007580761390133`*^9}, {3.400758137117282*^9, 3.400758240940247*^9}, {3.400758562609264*^9, 3.400758638042638*^9}, 3.4007587128732758`*^9, {3.400758772697752*^9, 3.400758816098544*^9}, { 3.400758851444256*^9, 3.4007589739011374`*^9}, {3.400759056443253*^9, 3.400759070842998*^9}, {3.400759284277611*^9, 3.400759494832245*^9}, { 3.400759529331345*^9, 3.400759531792653*^9}, {3.400759599336577*^9, 3.400759653827544*^9}, {3.40075972958123*^9, 3.400759933320966*^9}, { 3.400759963941231*^9, 3.400760004626657*^9}, {3.4007609293677473`*^9, 3.400760946805915*^9}, {3.402317662222262*^9, 3.402317671704179*^9}, 3.4023993389601583`*^9, {3.4023993828844337`*^9, 3.402399393821553*^9}, { 3.402407253931554*^9, 3.4024072561752367`*^9}, {3.4026526981797247`*^9, 3.4026529717905617`*^9}, {3.402653014496171*^9, 3.4026531792862253`*^9}, { 3.402653320635352*^9, 3.4026533516635036`*^9}, {3.402653422080532*^9, 3.402653467550815*^9}, {3.4026535506100683`*^9, 3.4026535841505337`*^9}, { 3.402841277373024*^9, 3.402841284492093*^9}}] }, Open ]], Cell["\<\ We will show some examples of the diffraction and image reconstruction of \ different kinds of simulated data, these data will be explored below in the \ Computational Microscopy sections.\ \>", "Text", CellChangeTimes->{{3.4024097458771*^9, 3.4024098230237103`*^9}}], Cell[BoxData[ RowBox[{"FourierRowK0", "[", "AtomDensityWithDefect", "]"}]], "Input", CellChangeTimes->{3.400760036792889*^9, 3.400847418135264*^9}], Cell["\<\ In the above, the defect causes diffuse intensity to appear in the pattern. \ Using methods produced below, we can investigate how much of reciprocal \ space is needed to reproduce the defect in the inverse transform (i.e., the \ image of the scatters that is produced in a TEM). \ \>", "Text", CellChangeTimes->{{3.402752947187274*^9, 3.4027529541859207`*^9}, { 3.402753007348345*^9, 3.402753060849967*^9}}], Cell[BoxData[ RowBox[{"Spots3DRow", "[", RowBox[{"AtomDensityWithDefect", ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"1", "/", "2"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4007600695852957`*^9, 3.40076011649683*^9}, { 3.400761084209115*^9, 3.400761098357709*^9}, {3.400761151498518*^9, 3.4007611599219027`*^9}, {3.4007612061146107`*^9, 3.400761254382717*^9}, { 3.4007613409619102`*^9, 3.400761342774577*^9}, {3.400761380840907*^9, 3.4007613833431*^9}, 3.400761650614687*^9, {3.40076172692623*^9, 3.400761752225006*^9}, {3.400761827027986*^9, 3.400761832992893*^9}, { 3.400847946571773*^9, 3.400847959524591*^9}, {3.402317795373341*^9, 3.402317796322913*^9}, 3.402317865603931*^9, {3.402399632313115*^9, 3.402399722455758*^9}, {3.402409328088038*^9, 3.402409341609529*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Visualizing Diffraction Patterns of Crystals Thermal Noise", "Subtitle", CellChangeTimes->{{3.400842972896484*^9, 3.400843000301516*^9}, { 3.402683331044836*^9, 3.402683338785102*^9}, {3.402683668898459*^9, 3.4026836713286247`*^9}}], Cell[CellGroupData[{ Cell["\<\ Function to Create A Lattice of Squares : NoisyLattice[TotalSize, LatticeVector1, LatticeVector2, SquareSize, \ RandomDisplacements]\ \>", "Section", CellChangeTimes->{{3.402399822675634*^9, 3.402399876321368*^9}, { 3.402399951086812*^9, 3.40240003323774*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"NoisyLattice", "[", RowBox[{"size_", ",", RowBox[{"{", RowBox[{"xa_", ",", "ya_"}], "}"}], ",", RowBox[{"{", RowBox[{"xb_", ",", "yb_"}], "}"}], ",", "edge_", ",", RowBox[{"{", RowBox[{"noisex_", ",", "noisey_"}], "}"}]}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "data", ",", "px", ",", "py", ",", "maxa", ",", "maxb", ",", "rx", ",", "ry", ",", "vals"}], "}"}], ",", RowBox[{ RowBox[{"data", "=", RowBox[{"vals", "=", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"size", ",", "size"}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"maxa", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"xa", "\[GreaterEqual]", " ", "ya"}], ",", RowBox[{"Quotient", "[", RowBox[{"size", ",", "xa"}], "]"}], ",", RowBox[{"Quotient", "[", RowBox[{"size", ",", "ya"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"maxb", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"xb", "\[GreaterEqual]", " ", "yb"}], ",", RowBox[{"Quotient", "[", RowBox[{"size", ",", "xb"}], "]"}], ",", RowBox[{"Quotient", "[", RowBox[{"size", ",", "yb"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", " ", RowBox[{"For", "[", RowBox[{ RowBox[{"ib", "=", RowBox[{"-", "maxb"}]}], ",", RowBox[{"ib", "\[LessEqual]", " ", "maxb"}], ",", RowBox[{"ib", "++"}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"ia", "=", RowBox[{"-", "maxa"}]}], ",", RowBox[{"ia", "\[LessEqual]", " ", "maxa"}], ",", RowBox[{"ia", "++"}], ",", RowBox[{ RowBox[{"ry", "=", RowBox[{"noisey", "*", RowBox[{"RandomInteger", "[", "]"}]}]}], ";", RowBox[{"rx", "=", RowBox[{"noisex", "*", RowBox[{"RandomInteger", "[", "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"px", ",", "py"}], "}"}], " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"ia", "*", "xa"}], "+", " ", RowBox[{"ib", "*", "xb"}]}], ",", "size", ",", "1"}], "]"}], ",", RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"ia", "*", "ya"}], "+", " ", RowBox[{"ib", "*", "yb"}]}], ",", "size", ",", "1"}], "]"}]}], "}"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"vals", "[", RowBox[{"[", RowBox[{"px", ",", "py"}], "]"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"vals", "[", RowBox[{"[", RowBox[{"px", ",", "py"}], "]"}], "]"}], "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"data", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"px", "+", "rx", " ", "+", "ax"}], ",", "size", ",", "1"}], "]"}], ",", RowBox[{"Mod", "[", RowBox[{ RowBox[{"py", "+", "ry", "+", "ay"}], ",", "size", ",", "1"}], "]"}]}], "]"}], "]"}], "=", "1"}], ",", RowBox[{"{", RowBox[{"ax", ",", "0", ",", "edge"}], "}"}], ",", RowBox[{"{", RowBox[{"ay", ",", "0", ",", "edge"}], "}"}]}], "]"}]}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], ";", RowBox[{"Return", "[", "data", "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4023322624212437`*^9, 3.402332326403459*^9}, { 3.402332358695229*^9, 3.4023324208462677`*^9}, 3.402332461543923*^9, { 3.40233252888881*^9, 3.402332582590272*^9}, {3.402332758201126*^9, 3.40233276443863*^9}, {3.4023329058102283`*^9, 3.402332985674416*^9}, { 3.4023330283887997`*^9, 3.402333191673313*^9}, 3.402333295562492*^9, 3.40233442551381*^9, {3.4023344769910183`*^9, 3.40233448562361*^9}, { 3.4023347244277983`*^9, 3.402334809101821*^9}, {3.402334843031711*^9, 3.4023348620064163`*^9}, {3.402334895794242*^9, 3.402334927638483*^9}, { 3.4023350746729927`*^9, 3.4023351988230352`*^9}, {3.402335331361443*^9, 3.402335334146721*^9}, 3.402367966729617*^9, 3.402399777902597*^9}] }, Open ]], Cell["\<\ First look at an example with no noise, we create a lattice of squares with \ lattice vectors (8,4) and (16,16). This function will create smaller unit \ cells if the last vectors are divisors of the total size. Here we set the \ edge of the square to 1 and indicate that we want 0,0 noise in the x,y \ directions.\ \>", "Text", CellChangeTimes->{{3.402566527991001*^9, 3.4025666678627853`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"NoNoise", "=", RowBox[{"NoisyLattice", "[", RowBox[{"64", ",", RowBox[{"{", RowBox[{"8", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"16", ",", "16"}], "}"}], ",", "1", ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.402328642256261*^9, 3.4023286527579*^9}, { 3.4023287101501503`*^9, 3.4023287254572277`*^9}, {3.402328765048455*^9, 3.402328776238139*^9}, {3.402328849719335*^9, 3.402328909376586*^9}, { 3.402329410672598*^9, 3.402329416494673*^9}, 3.402329520504962*^9, { 3.402329665313241*^9, 3.4023296682227373`*^9}, {3.402329811815269*^9, 3.4023298259599743`*^9}, {3.402329983576343*^9, 3.402329986877952*^9}, { 3.4023319725228558`*^9, 3.402331973072851*^9}, {3.402332060186987*^9, 3.402332070608902*^9}, {3.402332428870616*^9, 3.402332434462525*^9}, { 3.40233263125601*^9, 3.402332640710454*^9}, 3.4023327111791153`*^9, 3.402332772686965*^9, 3.40233280333713*^9, {3.402333208786096*^9, 3.4023332362263393`*^9}, {3.4023333314659863`*^9, 3.402333403753578*^9}, { 3.402333438985483*^9, 3.402333449871533*^9}, {3.4023335426497803`*^9, 3.402333580127596*^9}, 3.4023336373376637`*^9, {3.4023337020329027`*^9, 3.402333727255419*^9}, {3.402333769632629*^9, 3.4023338642385597`*^9}, { 3.4023338949210463`*^9, 3.4023339004784517`*^9}, {3.402333970882913*^9, 3.402334089224635*^9}, {3.40233411973877*^9, 3.402334289066381*^9}, { 3.402566522545578*^9, 3.4025665231222*^9}}], Cell[BoxData[{ RowBox[{"FourierRowK0", "[", "NoNoise", "]"}], "\[IndentingNewLine]", RowBox[{"GraphicsRow", "[", RowBox[{"{", RowBox[{ RowBox[{"Spots3D", "[", "NoNoise", "]"}], ",", RowBox[{"Spots3D", "[", RowBox[{"NoNoise", ",", RowBox[{"{", RowBox[{"0", ",", "2"}], "}"}]}], "]"}]}], "}"}], "]"}]}], "Input", CellChangeTimes->{{3.402321352052396*^9, 3.402321383860836*^9}, { 3.402321964128845*^9, 3.40232196795166*^9}, {3.402322168823853*^9, 3.4023221766779623`*^9}, {3.402322466151688*^9, 3.4023225045429163`*^9}, { 3.402322624375017*^9, 3.4023226441099987`*^9}, {3.402322840384994*^9, 3.402322865312049*^9}, {3.402322895802006*^9, 3.402322935232156*^9}, 3.402322980186181*^9, {3.402323187122418*^9, 3.402323216297426*^9}, { 3.402323248816523*^9, 3.402323285367633*^9}, 3.402323406211808*^9, { 3.402323668241094*^9, 3.4023237334708157`*^9}, {3.402323871656838*^9, 3.402323888806518*^9}, 3.4023239759938307`*^9, {3.4023241856797647`*^9, 3.402324230489834*^9}, {3.4023243117866917`*^9, 3.402324426737349*^9}, { 3.4023245466580477`*^9, 3.40232454986368*^9}, {3.4023245810097427`*^9, 3.402324613681355*^9}, {3.4023249525939903`*^9, 3.402324967663776*^9}, 3.40232502687394*^9, {3.402325067913639*^9, 3.402325172521813*^9}, { 3.402325375888917*^9, 3.402325419335823*^9}, {3.402325452065283*^9, 3.402325524850911*^9}, {3.402325835897749*^9, 3.402325845873748*^9}, { 3.402325881242104*^9, 3.402325887848143*^9}, 3.4023263522108097`*^9, { 3.402332023659741*^9, 3.402332033009747*^9}, 3.402333492761571*^9, 3.402400072377955*^9, {3.402400185826877*^9, 3.402400271402766*^9}}], Cell["\<\ We reconstruct the example from above, but introduce random unit \ displacements of the squares in the x and y directions.\ \>", "Text", CellChangeTimes->{{3.402566687580361*^9, 3.4025667320217953`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"SomeNoise", "=", RowBox[{"NoisyLattice", "[", RowBox[{"64", ",", RowBox[{"{", RowBox[{"8", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"16", ",", "16"}], "}"}], ",", "1", ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"FourierRowK0", "[", "SomeNoise", "]"}], "\[IndentingNewLine]", RowBox[{"GraphicsRow", "[", RowBox[{"{", RowBox[{ RowBox[{"Spots3D", "[", "SomeNoise", "]"}], ",", RowBox[{"Spots3D", "[", RowBox[{"SomeNoise", ",", RowBox[{"{", RowBox[{"0", ",", "2"}], "}"}]}], "]"}]}], "}"}], "]"}]}], "Input", CellChangeTimes->{{3.402325591474267*^9, 3.402325608616879*^9}, 3.4023258573218117`*^9, {3.4023259033860283`*^9, 3.402325904757903*^9}, 3.4023263664587727`*^9, {3.402326544640004*^9, 3.40232656700478*^9}, { 3.4023270611819344`*^9, 3.40232706476418*^9}, {3.402334328627535*^9, 3.402334341881649*^9}, {3.4023352538712273`*^9, 3.402335256693357*^9}, { 3.4023681564706573`*^9, 3.402368175823502*^9}, 3.402368216791109*^9, { 3.40240033039075*^9, 3.402400346308692*^9}}], Cell["\<\ The appearance of diffuse intensity (e.g. the intensity that does not \ correspond to the bright spots for the ideal lattice) corresponds to random \ shifts in the original figure. This is a simulation of isotropic thermal \ vibrations. In crystals, the amplitudes would be larger in elastically soft \ directions. It is instructive to use the last two arguments in the \ NoisyLattice function to make the \"noise\" anisotropic and observe its \ effect on the diffration pattern--the streaks that you will observe \ correspond to observations in the TEM.\ \>", "Text", CellChangeTimes->{{3.4027532987609053`*^9, 3.402753519793745*^9}, { 3.4028271684842787`*^9, 3.402827196571372*^9}}] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Computational Microscopy", "Subtitle", CellChangeTimes->{{3.4008484744734383`*^9, 3.400848483918366*^9}}], Cell[TextData[{ "Transmission electron microscopy works by accelerating electrons with a \ voltage difference and sending them towards a target. The electrons interact \ with the target and scatter. After the electrons have passed through the \ sample, they are focused with a magnetiic objective lens (or typically \ lenses). This lens produces a plane at which electrons scattered in the same \ direction arrive\nat the same point---this is the diffraction pattern. \ Because diffraction transforms periodic elements into points, it is closely \ related to the fourier transform. An image of the target is created beyond \ this diffraction plane. An operator of an electron microscope can toggle \ between looking at the diffraction-plane or the image-plane.\n\nSpecific \ periodic features can be imaged by blocking all the electrons except those \ that appear at a point in the diffrations plance. To put it another way, one \ puts an aperature around a particular spot in order to selectively image the \ features that from that spot's periodicity. We can do this with a Fourier \ transform by selectling only a circular subset of points to be subsequently \ inversely transformed into an image.\n\nThe \"Bright-Field Image\" consists \ of using a central aperature around the direct beam to block off all others \ from contributing to the image.\n\nThe \"Dark-Field Image\" consists of \ selecting a specific diffracted peak with the aperature and using that to \ form an image\n\nA \"Structure image,\" or a \"lattice image,\" uses the \ direct beam and one or more diffracted beams to form the image. In this \ case, the aperatures are typically much larger than for bright- or dark-field \ imaging. \n\nAperature size is effectively limited because of spherical \ aberrations that become significant for beams that are \"off-axis\" by a \ significant amount. So, in practice one can only use ", StyleBox["part", FontWeight->"Bold"], " of the Fourier spectrum (reciprocal space) to produce an image in TEM. \ You always lose some structure information in the image formation." }], "Text", CellChangeTimes->{{3.402743459660557*^9, 3.4027434745097*^9}, { 3.4027445905680437`*^9, 3.4027446315348787`*^9}, {3.4027623866621523`*^9, 3.402762453058673*^9}, {3.402762742980431*^9, 3.402762762706769*^9}, { 3.402762799596429*^9, 3.402762822338852*^9}, {3.40276286598703*^9, 3.4027628863388443`*^9}, {3.402762926490994*^9, 3.402763008442873*^9}, { 3.4027632238702517`*^9, 3.4027633897870617`*^9}, {3.402763524642994*^9, 3.402763584370823*^9}, {3.40276483123668*^9, 3.4027648414526033`*^9}, { 3.4027648803156*^9, 3.402765122947605*^9}, {3.402765293141967*^9, 3.4027653006230793`*^9}, {3.4027654990919456`*^9, 3.4027655000793543`*^9}}], Cell["", "Text", CellChangeTimes->{{3.4027448923899612`*^9, 3.402745221051655*^9}, 3.4027652821071367`*^9}], Cell[CellGroupData[{ Cell[TextData[{ "Function to Create Two Circular Aperatures (i.e, to remove all data from a \ Fourier Transform except the regions inside two specified circles):\n\n", StyleBox["CircAps[Center1, Center2, Radius1, Radius2, FourierData]", FontSlant->"Italic"] }], "Section", CellChangeTimes->{{3.402401586508342*^9, 3.402401709067363*^9}, 3.402828826709182*^9}], Cell[BoxData[ RowBox[{ RowBox[{"CircAps", "[", RowBox[{ RowBox[{"{", RowBox[{"xpos1_", ",", "ypos1_"}], "}"}], ",", RowBox[{"{", RowBox[{"xpos2_", ",", " ", "ypos2_"}], "}"}], ",", "rad1_", ",", "rad2_", ",", RowBox[{"fourmat_", "?", "MatrixQ"}]}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "rad1sq", ",", "rad2sq", ",", "ncols", ",", "nrows", ",", "y1", ",", "y2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"nrows", ",", "ncols"}], "}"}], "=", RowBox[{"Dimensions", "[", "fourmat", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"mindim", "=", RowBox[{"Min", "[", RowBox[{ RowBox[{"{", RowBox[{"nrows", ",", "ncols"}], "}"}], "=", RowBox[{"Dimensions", "[", "fourmat", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"y1", "=", RowBox[{"nrows", " ", "+", " ", "1", " ", "-", "ypos1"}]}], ";", "\[IndentingNewLine]", RowBox[{"y2", "=", RowBox[{"nrows", " ", "+", " ", "1", " ", "-", "ypos2"}]}], ";", "\[IndentingNewLine]", RowBox[{"rad1sq", "=", RowBox[{"rad1", "^", "2"}]}], ";", "\[IndentingNewLine]", RowBox[{"rad2sq", "=", RowBox[{"rad2", "^", "2"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"j", "-", "xpos1"}], "]"}], " ", "\[LessEqual]", " ", "rad1"}], " ", "&&", " ", RowBox[{ RowBox[{"Abs", "[", RowBox[{"i", "-", "y1"}], "]"}], " ", "\[LessEqual]", " ", "rad1"}], " ", "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"xpos1", "-", "j"}], ")"}], "^", "2"}], " ", "+", " ", RowBox[{ RowBox[{"(", RowBox[{"y1", "-", "i"}], ")"}], "^", "2"}]}], "\[LessEqual]", " ", "rad1sq"}]}], ")"}], " ", "||", "\[IndentingNewLine]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"j", "-", "xpos2"}], "]"}], " ", "\[LessEqual]", " ", "rad2"}], " ", "&&", " ", RowBox[{ RowBox[{"Abs", "[", RowBox[{"i", "-", "y2"}], "]"}], " ", "\[LessEqual]", " ", "rad2"}], " ", "&&", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"xpos2", "-", "j"}], ")"}], "^", "2"}], " ", "+", " ", RowBox[{ RowBox[{"(", RowBox[{"y2", "-", "i"}], ")"}], "^", "2"}]}], "\[LessEqual]", " ", "rad2sq"}]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{"fourmat", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nrows"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "ncols"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4007360362110653`*^9, 3.400736047419795*^9}, { 3.400736097151675*^9, 3.4007361797945538`*^9}, {3.400762237624034*^9, 3.4007622709160557`*^9}, {3.400762304054421*^9, 3.400762399757588*^9}, { 3.400762517917267*^9, 3.4007626513810368`*^9}, {3.400762686642083*^9, 3.4007628474086103`*^9}, 3.4007687366993504`*^9, {3.4007689333092823`*^9, 3.4007690306763678`*^9}, {3.40076915868563*^9, 3.400769179260544*^9}, { 3.400769292595731*^9, 3.400769292715234*^9}, {3.400769577057342*^9, 3.400769641431471*^9}, {3.400769707903273*^9, 3.400769712754806*^9}, { 3.400769749196559*^9, 3.400769785068705*^9}, {3.400770007501521*^9, 3.40077003045364*^9}, {3.4007704384088697`*^9, 3.4007704488727922`*^9}, { 3.400770536855791*^9, 3.400770541024469*^9}, {3.4007705892687397`*^9, 3.40077059401053*^9}, {3.400770816775845*^9, 3.400770824174604*^9}, { 3.4007711321628838`*^9, 3.400771138114017*^9}, {3.4007713566751547`*^9, 3.400771363320838*^9}, {3.400771394114938*^9, 3.400771401528739*^9}, { 3.400771762065398*^9, 3.400771765168585*^9}, 3.4007718787685537`*^9, { 3.400772466121398*^9, 3.400772471621808*^9}, {3.400772672450355*^9, 3.400772737589993*^9}, {3.4007728371326*^9, 3.400772850481583*^9}, { 3.400772933995998*^9, 3.400772949931065*^9}, {3.400773169889916*^9, 3.400773204232839*^9}, {3.400773235706046*^9, 3.400773249567944*^9}, 3.400773303418528*^9, {3.400773510254642*^9, 3.400773569043708*^9}, 3.400773605349283*^9, {3.400773715261516*^9, 3.4007737209001303`*^9}, 3.400773806885708*^9, {3.400773969058044*^9, 3.4007739763292103`*^9}, 3.400774007155428*^9, {3.400774077354892*^9, 3.400774116596458*^9}, 3.400848885817699*^9, {3.401449478278308*^9, 3.4014494915813313`*^9}, { 3.4014496073437977`*^9, 3.401449607581662*^9}, {3.4014527251476593`*^9, 3.401452748226945*^9}, {3.401455835239297*^9, 3.401455846430468*^9}, { 3.401455912272088*^9, 3.40145603448311*^9}, {3.40157458356254*^9, 3.4015745934525537`*^9}, {3.401577579944819*^9, 3.401577609853334*^9}, { 3.401577651074109*^9, 3.401577689234336*^9}, {3.401578057164926*^9, 3.401578086318755*^9}, {3.402234241734857*^9, 3.4022344204889097`*^9}, { 3.402235150759897*^9, 3.402235170316977*^9}, {3.402235210568528*^9, 3.402235252150303*^9}, {3.402236122466179*^9, 3.402236125938406*^9}, { 3.4022371016106052`*^9, 3.402237343833948*^9}, {3.402368304269993*^9, 3.402368308833024*^9}, {3.402400428365266*^9, 3.402400452335868*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Function to Perform Diffraction Spot Microscopy on Real-Space Images\n\n", StyleBox["DiffractionMicroscopy[RealData]", FontSlant->"Italic"], "\n\nCreates a Interactive Structure with Four Windows Arranged in a Square.\ \n\t\n\t", StyleBox["NorthWest:", FontVariations->{"Underline"->True}], " All Fourier Data from Real Image with Movable Aperatures, use a clicked \ mouse to move aperatures to various diffraction peaks.\n\t\n\t", StyleBox["NorthEast", FontVariations->{"Underline"->True}], ": The original real space image.\n\t\n\t", StyleBox["SouthWest", FontVariations->{"Underline"->True}], ": The Fourier image of the aperature filtered data. (Don't try to move \ these aperatures)\n\t\n\t", StyleBox["SouthEast", FontVariations->{"Underline"->True}], ": The reconstructed image from the aperature filtered data." }], "Section", CellChangeTimes->{{3.402401586508342*^9, 3.402401709067363*^9}, { 3.402401778055777*^9, 3.402401842811143*^9}, {3.402401874900329*^9, 3.4024020445480843`*^9}, {3.4028278198327303`*^9, 3.402827820494035*^9}, { 3.402827876959392*^9, 3.4028278777247477`*^9}, {3.402828569613647*^9, 3.4028286614914703`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"DiffractionMicroscopy", "[", "data_", "]"}], " ", ":=", " ", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "fd", ",", "nrows", ",", "ncols", ",", "image", ",", "fourimage", ",", "rawimage", ",", "applot"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rawimage", "=", RowBox[{"ImagePlot", "[", RowBox[{ "data", ",", "\"\\"", ",", "normalcontrast", ",", RowBox[{"Scaled", "[", "0.25", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fd", "=", RowBox[{"KZeroMiddle", "[", RowBox[{"Fourier", "[", "data", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"nrows", ",", "ncols"}], "}"}], "=", RowBox[{"Dimensions", "[", "data", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fourimage", "=", " ", RowBox[{"ImagePlot", "[", RowBox[{ "fd", ",", "\"\\"", ",", "highcontrast", ",", RowBox[{"Scaled", "[", "0.5", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"gcirc1", "=", RowBox[{"{", RowBox[{ RowBox[{"Lighter", "[", "Purple", "]"}], ",", "Thick", ",", RowBox[{"Circle", "[", RowBox[{"pt1", ",", "radius1"}], " ", "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"gcirc2", "=", RowBox[{"{", RowBox[{"Yellow", ",", "Thick", ",", RowBox[{"Circle", "[", RowBox[{"pt2", ",", "radius2"}], " ", "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"apdata", "=", RowBox[{"CircAps", "[", RowBox[{ "pt1", ",", "pt2", ",", "radius1", ",", "radius2", ",", "fd"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Grid", "[", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Show", "[", RowBox[{"fourimage", ",", RowBox[{"Epilog", "\[Rule]", RowBox[{"{", RowBox[{"gcirc1", ",", "gcirc2"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"Scaled", "[", "0.25", "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", "rawimage"}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"applot", "=", RowBox[{"Show", "[", RowBox[{ RowBox[{"ImagePlot", "[", RowBox[{ "apdata", ",", "\"\\"", ",", "highcontrast"}], "]"}], ",", RowBox[{"Epilog", "\[Rule]", " ", RowBox[{"{", RowBox[{"gcirc1", ",", "gcirc2"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", " ", RowBox[{"Scaled", "[", "0.25", "]"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Show", "[", "applot", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"ImagePlot", "[", RowBox[{ RowBox[{"InverseFourier", "[", "apdata", "]"}], ",", "\"\\"", ",", "normalcontrast", ",", RowBox[{"Scaled", "[", "0.25", "]"}]}], "]"}]}], "\[IndentingNewLine]", "}"}]}], "}"}], "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"radius1", ",", RowBox[{"ncols", "/", "20"}], ",", "\"\\""}], "}"}], ",", "0", ",", RowBox[{"Round", "[", RowBox[{"0.707", "*", "ncols"}], "]"}], ",", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"radius2", ",", RowBox[{"ncols", "/", "45"}], ",", "\"\\""}], "}"}], ",", "0", ",", RowBox[{"Quotient", "[", RowBox[{"ncols", ",", "20"}], "]"}], ",", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"pt1", ",", RowBox[{"{", RowBox[{ RowBox[{"nrows", "/", "4"}], ",", RowBox[{"ncols", "/", "6"}]}], "}"}]}], "}"}], ",", "Locator", ",", RowBox[{"Appearance", "\[Rule]", "None"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"pt2", ",", RowBox[{"{", RowBox[{ RowBox[{"nrows", "/", "2"}], ",", RowBox[{"ncols", "/", "2"}]}], "}"}]}], "}"}], ",", "Locator", ",", RowBox[{"Appearance", "\[Rule]", "None"}]}], "}"}], ",", RowBox[{"ControlPlacement", "\[Rule]", RowBox[{"{", RowBox[{"Top", ",", "Bottom"}], "}"}]}], ",", RowBox[{"ContinuousAction", "\[Rule]", "False"}], ",", RowBox[{"SaveDefinitions", "\[Rule]", "True"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.402238220171451*^9, 3.4022382318407707`*^9}, { 3.4022382709590063`*^9, 3.402238399652821*^9}, {3.4022384672467823`*^9, 3.402238592571917*^9}, {3.402238830595076*^9, 3.402238843759122*^9}, 3.402238874297756*^9, {3.40223905964832*^9, 3.40223906653506*^9}, { 3.402239138691313*^9, 3.402239153802073*^9}, {3.402293558179634*^9, 3.4022935747301283`*^9}, {3.402296302144353*^9, 3.402296328552421*^9}, { 3.4022964504405727`*^9, 3.402296453416584*^9}, {3.402297150682675*^9, 3.4022971741240063`*^9}, {3.402304762020466*^9, 3.40230483694102*^9}, { 3.4023048740531693`*^9, 3.40230491195529*^9}, {3.402305033508193*^9, 3.402305039579549*^9}, {3.402305079053646*^9, 3.402305104619378*^9}, { 3.4023076187604218`*^9, 3.4023076402235613`*^9}, {3.4023131100237913`*^9, 3.4023131138925*^9}, {3.402317228954443*^9, 3.402317255410503*^9}, { 3.4023172951193237`*^9, 3.4023173893627157`*^9}, {3.402317427443425*^9, 3.4023174325387907`*^9}, {3.40231749694412*^9, 3.402317501397316*^9}, { 3.4023683399621677`*^9, 3.4023683903059397`*^9}, {3.402369444314283*^9, 3.4023694691758547`*^9}, {3.402369612089821*^9, 3.402369639247045*^9}, { 3.402369736195342*^9, 3.402369761658763*^9}, {3.40237048781903*^9, 3.402370502553657*^9}, {3.402371043051076*^9, 3.402371106162352*^9}, { 3.402371143357286*^9, 3.4023711533889513`*^9}, {3.4023715828227243`*^9, 3.402371655593268*^9}, {3.402371821728838*^9, 3.4023718268456917`*^9}, { 3.402371988835644*^9, 3.4023720005973797`*^9}, {3.402372050009392*^9, 3.402372052803707*^9}, {3.402372091946212*^9, 3.402372114737232*^9}, { 3.402372172750263*^9, 3.4023721984294367`*^9}, {3.402374305262463*^9, 3.402374327128314*^9}, {3.402374375245882*^9, 3.4023744167087507`*^9}, { 3.402374787830151*^9, 3.4023747886588383`*^9}, {3.402374978275077*^9, 3.402374981736709*^9}, {3.402386662831916*^9, 3.402386692282872*^9}, { 3.402386728293921*^9, 3.40238673170015*^9}, {3.4023868316288567`*^9, 3.4023868359339647`*^9}, {3.402400468642351*^9, 3.402400519836252*^9}, { 3.4024006394605417`*^9, 3.402400695657012*^9}, {3.402400730642421*^9, 3.402400744232862*^9}, {3.402400792311511*^9, 3.4024008091101027`*^9}, { 3.402400875336705*^9, 3.4024008781337433`*^9}, 3.402401400492463*^9, { 3.402406110592237*^9, 3.402406111300466*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Function to Create Simulated Grain Structure for Subsequent Computational \ Microscopy Demo\n\n", StyleBox["GrainStructure[TotalSize, GrainSize]", FontSlant->"Italic"], "\n\nCreates an array of \"square grains\" with stripes oriented in somewhat \ random orientations\n\t" }], "Section", CellChangeTimes->{{3.402401586508342*^9, 3.402401709067363*^9}, { 3.402401778055777*^9, 3.402401842811143*^9}, {3.402401874900329*^9, 3.4024020445480843`*^9}, {3.4024063400234203`*^9, 3.402406469844455*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"GrainStructure", "[", RowBox[{"size_", ",", "grainsize_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "xgrains", ",", "ygrains", ",", " ", "ngrains", ",", "rotmat", ",", "thetalist", ",", "xrot", ",", "yrot"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"xgrains", "=", RowBox[{"size", "/", "grainsize"}]}], ";", "\[IndentingNewLine]", RowBox[{"ygrains", " ", "=", " ", RowBox[{"size", "/", "grainsize"}]}], ";", "\[IndentingNewLine]", RowBox[{"ngrains", "=", RowBox[{"xgrains", "*", "ygrains"}]}], ";", "\[IndentingNewLine]", RowBox[{"thetalist", "=", RowBox[{"RandomSample", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"xc", "*", RowBox[{"Pi", "/", "ngrains"}]}], ",", RowBox[{"{", RowBox[{"xc", ",", "1", ",", "ngrains"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"rotmat", "[", RowBox[{"i_", ",", "j_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"rotmat", "[", RowBox[{"i", ",", "j"}], "]"}], "=", RowBox[{"N", "[", RowBox[{"RotationMatrix", "[", RowBox[{"thetalist", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "*", "ygrains"}], " ", "+", " ", RowBox[{"Mod", "[", RowBox[{"j", ",", "xgrains", ",", "1"}], "]"}]}], "]"}], "]"}], "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Return", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"xrot", ",", "yrot"}], "}"}], "=", RowBox[{ RowBox[{"rotmat", "[", RowBox[{ RowBox[{ RowBox[{"Quotient", "[", RowBox[{ RowBox[{"xv", "-", "1"}], ",", "grainsize"}], "]"}], "+", "1"}], ",", RowBox[{ RowBox[{"Quotient", "[", RowBox[{ RowBox[{"yv", "-", "1"}], ",", "grainsize"}], "]"}], "+", "1"}]}], "]"}], ".", RowBox[{"{", RowBox[{"xv", ",", "yv"}], "}"}]}]}], ";", RowBox[{ RowBox[{"(", RowBox[{"1", "+", " ", RowBox[{"Sin", "[", RowBox[{"xrot", " ", "2", " ", "Pi", " ", RowBox[{"5", "/", "grainsize"}]}], "]"}]}], ")"}], "/", "2"}]}], ",", RowBox[{"{", RowBox[{"xv", ",", "1", ",", "size"}], "}"}], ",", RowBox[{"{", RowBox[{"yv", ",", "1", ",", "size"}], "}"}]}], "]"}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.402240463492096*^9, 3.402240600563622*^9}, { 3.4022406557582607`*^9, 3.402240655835803*^9}, {3.402240779786269*^9, 3.402240816715087*^9}, {3.402240867323256*^9, 3.402240961178043*^9}, { 3.402241068417039*^9, 3.402241114574524*^9}, {3.402241156855195*^9, 3.402241218791926*^9}, {3.402241257409511*^9, 3.402241298951891*^9}, { 3.4022413425445347`*^9, 3.402241361847169*^9}, {3.4022413979438553`*^9, 3.4022413980391083`*^9}, {3.402241498811205*^9, 3.40224150124984*^9}, { 3.402241531298767*^9, 3.4022415352084837`*^9}, {3.4022415667947483`*^9, 3.4022415741201353`*^9}, {3.402241628842978*^9, 3.402241632649222*^9}, { 3.402241739772098*^9, 3.402241771107934*^9}, {3.4022418110464277`*^9, 3.402241811563684*^9}, {3.4022419120782146`*^9, 3.402241912705658*^9}, 3.4022622465975924`*^9, {3.402262284406006*^9, 3.402262301768324*^9}, { 3.4022624858921223`*^9, 3.402262529582252*^9}, {3.402262562830797*^9, 3.402262563065259*^9}, {3.4022936147115717`*^9, 3.402293615437522*^9}, { 3.402293698543521*^9, 3.4022936987895327`*^9}, {3.402306871112822*^9, 3.402306876350602*^9}, {3.40230693273381*^9, 3.402306949463709*^9}, { 3.402306984462261*^9, 3.402306984939269*^9}, {3.402307493371772*^9, 3.402307528371298*^9}, {3.402307826174645*^9, 3.402307826745173*^9}, { 3.402307875627943*^9, 3.402307889490163*^9}, {3.402308011535898*^9, 3.402308037080576*^9}, {3.4023080696182337`*^9, 3.402308312434297*^9}, { 3.4023086941639147`*^9, 3.40230870939664*^9}, {3.402308785822907*^9, 3.4023088873158503`*^9}, {3.4023091521732264`*^9, 3.40230916532312*^9}, { 3.402309412397339*^9, 3.40230946191546*^9}, {3.402309624491562*^9, 3.402309817425983*^9}, {3.402309852130373*^9, 3.4023098573535547`*^9}, { 3.4023099066954203`*^9, 3.402309935265771*^9}, 3.402309969531986*^9, { 3.4023100118052063`*^9, 3.402310026090683*^9}, {3.402310058734152*^9, 3.40231006382688*^9}, 3.40231013309085*^9, {3.402310198060519*^9, 3.4023102195376167`*^9}, 3.40231065409503*^9, {3.402310796015441*^9, 3.4023109015835247`*^9}, {3.4023113088874273`*^9, 3.402311330374819*^9}, { 3.4023113675001907`*^9, 3.4023113734740543`*^9}, {3.402311412492879*^9, 3.402311420529523*^9}, {3.402311525155622*^9, 3.402311531401648*^9}, { 3.402311595053*^9, 3.402311595296261*^9}, {3.402311637635353*^9, 3.402311670691183*^9}, {3.402311705268553*^9, 3.4023117472763577`*^9}, { 3.402312065107442*^9, 3.402312068562313*^9}, {3.402312141068781*^9, 3.402312155001213*^9}, {3.402312204764525*^9, 3.40231221054732*^9}, { 3.4023122804873133`*^9, 3.402312365207347*^9}, {3.4023124496941*^9, 3.40231259090902*^9}, 3.402312628591917*^9, {3.4023127131505613`*^9, 3.4023127165801992`*^9}, {3.402312802089703*^9, 3.4023128541183233`*^9}, { 3.402315647263105*^9, 3.402315650764608*^9}, {3.402315732246129*^9, 3.402315797955832*^9}, {3.4023160195863132`*^9, 3.402316065719737*^9}, { 3.402316102618367*^9, 3.402316108607366*^9}, {3.402316151594081*^9, 3.402316159450397*^9}, {3.4023162034421253`*^9, 3.402316242656567*^9}, { 3.4023162755538692`*^9, 3.402316318303939*^9}, {3.402316355884488*^9, 3.402316363316353*^9}, {3.402316587060038*^9, 3.402316633462517*^9}, { 3.402316848775917*^9, 3.4023168555027227`*^9}, {3.402316894856859*^9, 3.402316898581935*^9}, {3.402317113504331*^9, 3.402317119830308*^9}, { 3.402368406315117*^9, 3.402368542699465*^9}, {3.402368581680509*^9, 3.402368696113975*^9}, {3.4023687374025583`*^9, 3.402368772280876*^9}, 3.4023688660845327`*^9, {3.402368930638517*^9, 3.4023689392323008`*^9}, { 3.40236900014111*^9, 3.4023690007623262`*^9}, {3.402369045052227*^9, 3.402369068139954*^9}, 3.402369123526073*^9, {3.402400546958407*^9, 3.402400547437158*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Simulated Grain Structure (Polycrystal)", "Subtitle", CellChangeTimes->{{3.4008484744734383`*^9, 3.400848483918366*^9}, { 3.4028292807980843`*^9, 3.4028293390034122`*^9}, {3.402830262997498*^9, 3.402830276308494*^9}}], Cell["\<\ Here is a simple example of four grains with the same modulated density, but \ each with a different orientation.\ \>", "Text", CellChangeTimes->{{3.402566750273052*^9, 3.402566799119598*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Grains", "=", RowBox[{"GrainStructure", "[", RowBox[{"128", ",", "64"}], "]"}]}], ";"}], "\n", RowBox[{"ImagePlot", "[", RowBox[{ "Grains", ",", "\"\\"", ",", "normalcontrast", ",", "Large"}], "]"}]}], "Input", CellChangeTimes->{{3.4023156957548523`*^9, 3.402315698007147*^9}, { 3.4023687912927217`*^9, 3.4023688490253363`*^9}, {3.4023690886421432`*^9, 3.402369108043552*^9}, {3.40236929128314*^9, 3.402369291483738*^9}, 3.402406490633027*^9}] }, Closed]], Cell[CellGroupData[{ Cell["Bright Field, Dark Field, Lattice Imaging of a Polycrystal", "Subtitle", CellChangeTimes->{{3.4008484744734383`*^9, 3.400848483918366*^9}, { 3.4028292807980843`*^9, 3.4028293390034122`*^9}}], Cell["\<\ Diffraction Spot Microscopy on grain structure. Notice that if you leave the \ small yellow aperature at the center, and move the green aperature over other \ diffraction spots, then the grain in that particular orientation will \"light \ up\" and its modulation will appear. Now toggle to the \"Dark-Field \ Imaging\" mode by removubg the yellow aperature (by shrinking its radius to \ zero); notice that only one grain \"lights up\" but without any modulation.\ \>", "Text", CellChangeTimes->{{3.402406515974367*^9, 3.402406639067218*^9}, { 3.4024066705946608`*^9, 3.4024067131306963`*^9}, {3.4027653932054033`*^9, 3.402765438971882*^9}}], Cell[BoxData[ RowBox[{"DiffractionMicroscopy", "[", "Grains", "]"}]], "Input", CellChangeTimes->{{3.402241860009658*^9, 3.402241861103311*^9}, 3.402307003616172*^9, {3.402313124788279*^9, 3.402313129659884*^9}, { 3.402316919520286*^9, 3.402316923214059*^9}, {3.4023691592789793`*^9, 3.402369170051486*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Bright Field, Dark Field, Lattice Imaging of a Polycrystal", "Subtitle", CellChangeTimes->{{3.4008484744734383`*^9, 3.400848483918366*^9}, { 3.4028292807980843`*^9, 3.4028293390034122`*^9}}], Cell["\<\ Diffraction Spot Microscopy on Idealized Lattice. Notice that when you \ select pairs of spots, that particular atom planes are visualized. Use the \ purple aperature to select a spot on the same ray (i.e., with the same plane \ normals), the modulation doubles. You are visualizing (abc)-planes in one \ case and (abc)/2 planes in the second case. When two apperatures are used, \ you are using \"lattice image\" or \"structural image\" mode.\ \>", "Text", CellChangeTimes->{{3.402406515974367*^9, 3.402406639067218*^9}, { 3.4024066705946608`*^9, 3.402406932446579*^9}, {3.402765455123769*^9, 3.402765524347262*^9}}], Cell[BoxData[ RowBox[{"DiffractionMicroscopy", "[", "NoNoise", "]"}]], "Input", CellChangeTimes->{{3.402241860009658*^9, 3.402241861103311*^9}, 3.402307003616172*^9, {3.402313124788279*^9, 3.402313129659884*^9}, { 3.402316919520286*^9, 3.402316923214059*^9}, {3.4023691592789793`*^9, 3.402369170051486*^9}, {3.402387496794712*^9, 3.402387499435709*^9}}], Cell["\<\ Diffraction Spot Microscopy on Noisy Lattice. Notice that when you select \ pairs of the brightest spots, you still get a fairly robust image of those \ planes, even though they are not perfectly alligned in the original image. \ Most of the information is contained in the sharp peaks and those must \ represent perfect modulations at that point. The noise information is \ diffused over the entire Fourier spectrum.\ \>", "Text", CellChangeTimes->{{3.402406515974367*^9, 3.402406639067218*^9}, { 3.4024066705946608`*^9, 3.402406932446579*^9}, {3.4024069744058237`*^9, 3.4024070488074083`*^9}, {3.402407084001307*^9, 3.402407152665434*^9}}], Cell[BoxData[ RowBox[{"DiffractionMicroscopy", "[", "SomeNoise", "]"}]], "Input", CellChangeTimes->{{3.402387690729714*^9, 3.402387691315817*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Frivolous Example: Beautiful Data are in the Eye of the Beholder\ \>", "Subtitle", CellChangeTimes->{{3.402661101195352*^9, 3.402661129702189*^9}, { 3.402769130015695*^9, 3.4027691363639603`*^9}}], Cell["\<\ Import some random intensities that we have collected off the web:\ \>", "Text", CellChangeTimes->{{3.402765597372513*^9, 3.4027656137954063`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"AnImage", " ", "=", " ", RowBox[{"Import", "[", RowBox[{ "\"\\"", ",", "\"\\""}], "]"}]}], ";"}]], "Input"], Cell["Let' s image that data with ArrayPlot", "Text", CellChangeTimes->{{3.4027656170921373`*^9, 3.4027656255236053`*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"ArrayPlot", "[", "AnImage", "]"}]}]], "Input"], Cell["Oops, it' s inside out.", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{"ZMin", ",", " ", "ZMax"}], "}"}], " ", "=", " ", RowBox[{"MinMax", "[", "AnImage", "]"}]}]], "Input"], Cell["\<\ Let's rescale the image to fill out the full intensity range and flip it into \ a more recognizable orientation.\ \>", "Text", CellChangeTimes->{{3.402765636508411*^9, 3.4027657136511927`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"KCData", "=", " ", RowBox[{"N", "[", RowBox[{"1", " ", "-", " ", RowBox[{ RowBox[{"(", RowBox[{"AnImage", "-", "ZMin"}], ")"}], "/", RowBox[{"(", RowBox[{"ZMax", "-", "ZMin"}], ")"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ArrayPlot", "[", "KCData", "]"}]}], "Input"], Cell["Let's view the data in real space and diffract it. ", "Text", CellChangeTimes->{{3.402765636508411*^9, 3.4027657970113153`*^9}}], Cell[BoxData[ RowBox[{"DiffractionMicroscopy", "[", "AnImage", "]"}]], "Input"] }, Open ]] }, PrintingStyleEnvironment->"Presentation", CellGrouping->Manual, WindowSize->{1169, 748}, WindowMargins->{{54, Automatic}, {115, Automatic}}, WindowTitle->"Lecture 18 MIT 3.016 (Fall 2009) \[Copyright] W. Craig Carter \ 2003--2009", PrintingCopies->1, PrintingPageRange->{1, Automatic}, PrintingOptions->{"PrintCellBrackets"->False, "PrintMultipleHorizontalPages"->False, "PrintRegistrationMarks"->True, "PrintingMargins"->{{54, 54}, {72, 72}}}, ShowSelection->True, ShowCellLabel->False, CellLabelAutoDelete->True, Magnification->1., FrontEndVersion->"7.0 for Mac OS X x86 (32-bit) (November 11, 2008)", StyleDefinitions->"3016-Carter.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "mmtag:18:Fourier_transform__discrete"->{ Cell[628, 22, 256, 5, 158, "Title", CellTags->"mmtag:18:Fourier_transform__discrete"]} } *) (*CellTagsIndex CellTagsIndex->{ {"mmtag:18:Fourier_transform__discrete", 78735, 1802} } *) (*NotebookFileOutline Notebook[{ Cell[628, 22, 256, 5, 158, "Title", CellTags->"mmtag:18:Fourier_transform__discrete"], Cell[887, 29, 239, 5, 26, "Text"], Cell[CellGroupData[{ Cell[1151, 38, 237, 5, 107, "Subtitle"], Cell[1391, 45, 583, 10, 41, "Text"], Cell[1977, 57, 1675, 39, 53, "Input"], Cell[3655, 98, 380, 7, 41, "Text"], Cell[4038, 107, 397, 9, 37, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[4472, 121, 214, 4, 93, "Subtitle"], Cell[CellGroupData[{ Cell[4711, 129, 700, 15, 74, "Section"], Cell[5414, 146, 403, 7, 41, "Text"], Cell[5820, 155, 3187, 52, 37, "Input"], Cell[9010, 209, 264, 5, 26, "Text"], Cell[9277, 216, 872, 19, 53, "Input"], Cell[10152, 237, 1479, 35, 98, "Input"] }, Open ]], Cell[11646, 275, 109, 1, 37, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[11792, 281, 212, 3, 56, "Subtitle"], Cell[12007, 286, 387, 6, 41, "Text"], Cell[12397, 294, 2252, 44, 68, "Input"], Cell[14652, 340, 195, 4, 26, "Text"], Cell[14850, 346, 1035, 22, 68, "Input"], Cell[15888, 370, 108, 1, 37, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[16033, 376, 69, 0, 56, "Subtitle"], Cell[16105, 378, 238, 4, 26, "Text"], Cell[16346, 384, 1828, 39, 82, "Input"], Cell[18177, 425, 404, 7, 41, "Text"], Cell[18584, 434, 139, 2, 37, "Input"], Cell[18726, 438, 668, 10, 56, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[19431, 453, 108, 1, 56, "Subtitle"], Cell[19542, 456, 557, 11, 70, "Text"], Cell[20102, 469, 1015, 26, 70, "Input"], Cell[21120, 497, 297, 5, 70, "Text"], Cell[21420, 504, 2985, 54, 70, "Input"], Cell[24408, 560, 139, 2, 70, "Input"], Cell[24550, 564, 651, 10, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[25238, 579, 172, 2, 56, "Subtitle"], Cell[25413, 583, 322, 6, 26, "Text"], Cell[25738, 591, 743, 18, 53, "Input"], Cell[26484, 611, 906, 23, 53, "Input"], Cell[27393, 636, 457, 9, 37, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[27887, 650, 193, 2, 56, "Subtitle"], Cell[CellGroupData[{ Cell[28105, 656, 391, 8, 74, "Section"], Cell[28499, 666, 184, 4, 26, "Text"], Cell[28686, 672, 4362, 110, 143, "Input"] }, Open ]], Cell[33063, 785, 278, 5, 26, "Text"], Cell[33344, 792, 149, 2, 37, "Input"], Cell[33496, 796, 422, 7, 41, "Text"], Cell[33921, 805, 833, 14, 37, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[34791, 824, 244, 3, 56, "Subtitle"], Cell[CellGroupData[{ Cell[35060, 831, 274, 6, 70, "Section"], Cell[35337, 839, 4955, 123, 70, "Input"] }, Open ]], Cell[40307, 965, 407, 7, 70, "Text"], Cell[40717, 974, 1557, 27, 70, "Input"], Cell[42277, 1003, 1669, 27, 70, "Input"], Cell[43949, 1032, 214, 4, 70, "Text"], Cell[CellGroupData[{ Cell[44188, 1040, 1176, 26, 70, "Input"], Cell[45367, 1068, 699, 11, 70, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[46115, 1085, 112, 1, 56, "Subtitle"], Cell[46230, 1088, 2764, 39, 281, "Text"], Cell[48997, 1129, 112, 2, 26, "Text"], Cell[CellGroupData[{ Cell[49134, 1135, 368, 7, 94, "Section"], Cell[49505, 1144, 5919, 124, 233, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[55461, 1273, 1188, 25, 294, "Section"], Cell[56652, 1300, 7871, 169, 398, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[64560, 1474, 523, 10, 134, "Section"], Cell[65086, 1486, 6688, 130, 173, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[71823, 1622, 229, 3, 70, "Subtitle"], Cell[72055, 1627, 203, 4, 26, "Text"], Cell[72261, 1633, 539, 12, 53, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[72837, 1650, 199, 2, 56, "Subtitle"], Cell[73039, 1654, 659, 10, 56, "Text"], Cell[73701, 1666, 319, 5, 37, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[74057, 1676, 199, 2, 56, "Subtitle"], Cell[74259, 1680, 636, 10, 56, "Text"], Cell[74898, 1692, 366, 5, 37, "Input"], Cell[75267, 1699, 659, 10, 56, "Text"], Cell[75929, 1711, 148, 2, 37, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[76114, 1718, 209, 4, 107, "Subtitle"], Cell[76326, 1724, 158, 3, 26, "Text"], Cell[76487, 1729, 217, 6, 37, "Input"], Cell[76707, 1737, 123, 1, 26, "Text"], Cell[76833, 1740, 104, 2, 53, "Input"], Cell[76940, 1744, 40, 0, 26, "Text"], Cell[76983, 1746, 156, 4, 37, "Input"], Cell[77142, 1752, 204, 4, 26, "Text"], Cell[77349, 1758, 365, 11, 53, "Input"], Cell[77717, 1771, 135, 1, 26, "Text"], Cell[77855, 1774, 80, 1, 37, "Input"] }, Open ]] } ] *) (* End of internal cache information *)