(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 4.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[ 8243, 313]*) (*NotebookOutlinePosition[ 8970, 338]*) (* CellTagsIndexPosition[ 8926, 334]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["The Sound of the Big Bang", "Title", TextAlignment->Center], Cell["\<\ A simulation of the sound frequencies present in the early universe, based on data from WMAP measurements of Cosmic Background Radiation small-angle structure.\ \>", "Subtitle", TextAlignment->Center], Cell[TextData[{ StyleBox["John G. Cramer", FontSize->18], "\nProfessor of Physics\nUniversity of Washington\nSeattle, WA 98195-1560\n\ cramer@phys.washington.edu\nNovember 4, 2003" }], "Subsubtitle", TextAlignment->Center], Cell[CellGroupData[{ Cell["Setup", "Section"], Cell[BoxData[{ \(\(Clear["\"];\)\), "\n", \(\(Off[General::spell];\)\), "\n", \(\(Off[General::spell1];\)\)}], "Input"], Cell[CellGroupData[{ Cell[TextData[{ "Define path to input and output files ", StyleBox["\n(This statement is system-dependent and should be modified for \ your system.)", FontSlant->"Italic"] }], "Subsection"], Cell[BoxData[ \(\(fil0 = "\";\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Set the frequency scale factor (1.5).\n", StyleBox["(This sets the pitch of the overall sound and is chosen \"by \ ear\";\nfPk=1.5 means that a Cosmic Background Radiation frequency of L=1 \ produces a sound\nfrequency 1.5 Hz at the peak of CBR emission )", FontSlant->"Italic"] }], "Subsection"], Cell[BoxData[ \(\(fPk = 1.5;\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Set the duration for sound file (100 sec). The value will be included in the \ output file name.\ \>", "Subsection"], Cell[BoxData[ \(\(dur = 100;\)\)], "Input"], Cell[BoxData[ \(\(d2 = dur/2;\)\)], "Input"], Cell[BoxData[ \(\(duSt = ToString[dur];\)\)], "Input"], Cell[BoxData[ \(\(ffac = fPk*d2^\((2/3)\);\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Set peak time of Cosmic Background Radiation emission (379 thousand years).\ \>", "Subsection"], Cell[BoxData[ \(\(cbrPk = 379;\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Set sigma of Cosmic Background Radiation emission (118 thousand years).\n\ ", StyleBox["Sigma is the time required for emission to fall to ", FontSlant->"Italic"], Cell[BoxData[ \(TraditionalForm\`e\^\(\(-1\)/2\)\)], FontSlant->"Italic"], StyleBox[" = 60.7% of peak value.", FontSlant->"Italic"] }], "Subsection"], Cell[BoxData[ \(\(cbrSg = 118;\)\)], "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Simulation", "Section"], Cell[CellGroupData[{ Cell["Read in WMAP Data", "Subsection"], Cell[BoxData[ \(\(Temp = ReadList[fil0 <> "\<\WMAPdata.txt\>", Number, RecordLists \[Rule] True];\)\)], "Input"], Cell[BoxData[ \(lenT = Length[Temp]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Plot WMAP Data", "Subsection"], Cell[BoxData[ \(\(ListPlot[Table[{Temp[\([j, 1]\)], Temp[\([j, 2]\)]}, {j, lenT}], Frame \[Rule] True, FrameLabel \[Rule] {"\", "\", "\", \ "\<\>"}, ImageSize \[Rule] 600];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Define Big Bang Sound Function", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[{ StyleBox[\(First\ line\ is\ a\ Gaussian\ profile\ of\ sound\ intensity;\), FontSize->12], "\n", StyleBox[\(Second\ line\ is\ an\ intensity\ adjustment\ for\ height\ \ \[Times]\ histogram\ width\ of\ each\ frequency;\), FontSize->12], "\n", StyleBox[\(Third\ line\ is\ frequency, \ using\ cosines\ that\ start\ with\ maximum\ at\ t = 0\ and\ are\), FontSize->12], "\n", RowBox[{ RowBox[{ StyleBox["Doppler", FontSize->12], StyleBox["-", FontSize->12], RowBox[{ StyleBox["shifted", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["by", FontSize->12], StyleBox[" ", FontSize->12], FormBox[\(t\^\(\(-2\)/3\)\), "TraditionalForm"]}]}], StyleBox[",", FontSize->12], StyleBox[" ", FontSize->12], RowBox[{ StyleBox["so", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["that", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["the", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["net", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["time", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["dependence", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["goes", FontSize->12], StyleBox[" ", FontSize->12], StyleBox["like", FontSize->12], StyleBox[" ", FontSize->12], RowBox[{ FormBox[\(t\^\(1/3\)\), "TraditionalForm"], StyleBox[".", FontSize->12]}]}]}]}], "Subsubsection"], Cell[BoxData[ \(BBSnd[t_] = Exp[\(-\((\((t - d2)\)/\((cbrSg*d2/cbrPk)\))\)^2\)\ /2]* Sum[\((\((\((Temp[\([j, 1]\)] - Temp[\([j - 1, 1]\)])\)/ Temp[\([j, 1]\)])\)*Temp[\([j, 2]\)])\)* Cos[ffac*2 \[Pi]*Temp[\([j, 1]\)]*t^\((1/3)\)], {j, 2, lenT}]\)], "Input"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Output", "Section"], Cell[CellGroupData[{ Cell["Plot Sound Function", "Subsection"], Cell[BoxData[ \(\(Plot[BBSnd[t], {t, 0, dur}, Frame \[Rule] True, FrameLabel \[Rule] {"\", "\", "\", "\<\>"}, PlotRange \[Rule] All, ImageSize \[Rule] 600];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Play Sound Function ", StyleBox[" (This requires some CPU time, particularly for large ", FontSlant->"Italic"], "dur", StyleBox[" values. Be patient.)", FontSlant->"Italic"] }], "Subsection"], Cell[BoxData[ \(\(BBs = Play[BBSnd[t], {t, 0, dur}, PlayRange \[Rule] All];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Record Sound Function on hard disk as .wav file", "Subsection"], Cell[BoxData[ \(Export[fil0 <> "\<\BBSnd\>" <> duSt <> "\<.wav\>", BBs, "\"]\)], "Input"] }, Open ]] }, Open ]] }, Open ]] }, FrontEndVersion->"4.2 for Microsoft Windows", ScreenRectangle->{{0, 1280}, {0, 937}}, WindowSize->{1141, 873}, WindowMargins->{{Automatic, 45}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, Magnification->1.5 ] (******************************************************************* 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->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 67, 1, 171, "Title"], Cell[1846, 56, 212, 5, 181, "Subtitle"], Cell[2061, 63, 232, 6, 215, "Subsubtitle"], Cell[CellGroupData[{ Cell[2318, 73, 24, 0, 89, "Section"], Cell[2345, 75, 144, 3, 94, "Input"], Cell[CellGroupData[{ Cell[2514, 82, 197, 5, 94, "Subsection"], Cell[2714, 89, 70, 1, 42, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[2821, 95, 321, 6, 146, "Subsection"], Cell[3145, 103, 47, 1, 42, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[3229, 109, 127, 3, 68, "Subsection"], Cell[3359, 114, 47, 1, 42, "Input"], Cell[3409, 117, 48, 1, 42, "Input"], Cell[3460, 120, 58, 1, 42, "Input"], Cell[3521, 123, 61, 1, 42, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[3619, 129, 105, 2, 68, "Subsection"], Cell[3727, 133, 49, 1, 42, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[3813, 139, 356, 10, 94, "Subsection"], Cell[4172, 151, 49, 1, 42, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[4270, 158, 29, 0, 89, "Section"], Cell[CellGroupData[{ Cell[4324, 162, 39, 0, 68, "Subsection"], Cell[4366, 164, 136, 3, 42, "Input"], Cell[4505, 169, 52, 1, 42, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[4594, 175, 36, 0, 68, "Subsection"], Cell[4633, 177, 237, 4, 68, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[4907, 186, 52, 0, 68, "Subsection"], Cell[CellGroupData[{ Cell[4984, 190, 1925, 68, 141, "Subsubsection"], Cell[6912, 260, 322, 6, 94, "Input"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[7295, 273, 25, 0, 89, "Section"], Cell[CellGroupData[{ Cell[7345, 277, 41, 0, 68, "Subsection"], Cell[7389, 279, 231, 4, 68, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[7657, 288, 225, 7, 68, "Subsection"], Cell[7885, 297, 103, 2, 42, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[8025, 304, 69, 0, 68, "Subsection"], Cell[8097, 306, 106, 2, 42, "Input"] }, Open ]] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)