{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 92 "\"Surface Plot\" is design ed to allow the user to select a file on the computer to be plotted." }}{PARA 0 "" 0 "" {TEXT -1 82 "It assumes that the file chosen has bee n produced by Brian Smith's Labview program" }}{PARA 0 "" 0 "" {TEXT -1 87 "\"Normalized Scan\". This program is easiest to use if the ent ire worksheet is executed " }}{PARA 0 "" 0 "" {TEXT -1 10 "at once. \+ " }}{PARA 0 "" 0 "" {TEXT -1 85 " This program is intended for use if the data file was obtained with only ONE mirror" }}{PARA 0 "" 0 "" {TEXT -1 89 "on the shearing/tilting apparatus. It also contains code to correct for the presence of " }}{PARA 0 "" 0 "" {TEXT -1 27 "only \+ a single beamsplitter." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 80 " 7/21/2004 Update! It seems that every datafile we 've analyzed so far has the " }}{PARA 0 "" 0 "" {TEXT -1 83 "x-coordin ate halved! I've included code in this version of Surface plot to cor rect" }}{PARA 0 "" 0 "" {TEXT -1 62 "for this oversight by doubling th e x-coordinate when plotting." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 21 "Author: Bryan Killett" }}{PARA 0 "" 0 "" {TEXT -1 15 "Coded: 7/4/2003" }}{PARA 0 "" 0 "" {TEXT -1 18 "Revised: \+ 7/21/2004" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 9 "Comments:" }}{PARA 0 "" 0 "" {TEXT -1 76 "This section first clears Maple's memory, then loads the necessary packages." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "with(plots):with(ListTools):with(Maplets[Elements]):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been redefined \n" }}{PARA 7 "" 1 "" {TEXT -1 58 "Warning, the assigned name Group no w has a global binding\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "Pop u p the file dialog box (NOT WORKING)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 175 "#fileselector := Maplet(FileDialog['FD1'](\n# 'ona pprove' = Shutdown(['FD1']),\n# 'oncancel' = Shutdown(),\n# 'title ' = \"Select data file to plot:\",\n# 'height' = 500\n#)):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "#filepath := Maplets[Display ](fileselector)[1];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 136 "fil epath := \"C:\\\\Documents and Settings\\\\Bryan\\\\My Documents\\\\Ra ymer research\\\\Noteworthy Results\\\\Single Slit\\\\Single Slit test 4.txt\";" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%)filepathGQ]rC:\\Docume nts~and~Settings\\Bryan\\My~Documents\\Raymer~research\\Noteworthy~Res ults\\Single~Slit\\Single~Slit~test~4.txt6\"" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 105 "This section loads the data from the selected file, th en grabs the number of shear points and tilt points" }}{PARA 0 "" 0 " " {TEXT -1 37 "from the first two lines of the file." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "INSERT CODE TO DEAL WITH BAD FILE SELECTION" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "rawpoints := readdata(filep ath,float,3):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "shearpoints := flo or(rawpoints[1,2]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "tiltpoints : = floor(rawpoints[2,2]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%,shearpo intsG\"#]" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%+tiltpointsG\"#]" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Delete the first two lines, they'r e no longer necessary." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "r awpoints := subsop(1=NULL,2=NULL,rawpoints):" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 129 "Sort the data into rows and columns, but remember that the interferometer scans back and forth so all the even rows are reve rsed." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 96 "orderedpoints := [ seq([seq(rawpoints[shearpoints*(i-1)+j],j=1..shearpoints)],i=1..tiltp oints)]:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "This section reverses every even row in the data structure \"orderedpoints\"." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "for i from 2 by 2 to tiltpoints do " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "orderedpoints[i] := Reverse(ord eredpoints[i]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "end do:" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 99 "This section compensates for the e ffect of only having a single beamsplitter in the interferometer." }} {PARA 0 "" 0 "" {TEXT -1 96 "The Wigner function comes out upside down , so I'm doing two things to correct this. The largest" }}{PARA 0 "" 0 "" {TEXT -1 88 "normalized intensity is identified and then subtract ed from each data point. The result" }}{PARA 0 "" 0 "" {TEXT -1 92 "s hould be a right-side up Wigner function that is centered at zero. Th is is a crude way of " }}{PARA 0 "" 0 "" {TEXT -1 100 "removing the co nstant pedastal and correcting for the inversion, so it's useful for g raphing results" }}{PARA 0 "" 0 "" {TEXT -1 31 "only, not actual data \+ analysis." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "max_intensity \+ := 0; # Initialize the variable used to identify the maximum intensity ." }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%.max_intensityG\"\"!" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 191 "for i from 1 to shearpoints do\n for j from 1 to tiltpoints do\n if orderedpoints[j][i][3] > \+ max_intensity\n then max_intensity := orderedpoints[j][i][3]: \n \+ end if:\n end do:\nend do:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 152 "for i from 1 to shearpoints do\n for j from 1 to tiltpoints \+ do\n orderedpoints[j][i][3] := (max_intensity - orderedpoints[j][i] [3]):\n end do:\nend do:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "This is the final line: it produces the plot, which has the full filename \+ as the title." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 224 "surfdata( orderedpoints,shading=zhue,style=patchcontour,axes=framed,lightmodel=l ight4,orientation=[-60,45],title=filepath,labels=[\"x (mm)\",\"k (mm^- 1)\",\"normalized intensity\"],labeldirections=[HORIZONTAL,HORIZONTAL, VERTICAL]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 14 0" 13 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }