I have heard that I can re-use data from the OSLO Spreadsheet Buffer in my own CCL macro commands. But I don’t know what the Spreadsheet Buffer is. How do I access the Spreadsheet Buffer?
Accessing the OSLO Spreadsheet Buffer
Whenever you perform analyses in OSLO that results in text output, OSLO also places this data into a buffer that we call the Spreadsheet Buffer. You can think of the Spreadsheet Buffer as a big Excel spreadsheet that works behind the scenes in OSLO. You can also think of the Text Window is a convenient “window” that looks at the data contained inside the Spreadsheet Buffer.
Let’s look at an example in OSLO:
Load any lens into OSLO and issue the command “pxs” on the command line. You will get output in the Text window that looks similar to the following (you numbers will be different depending on the lens you had loaded):*PARAXIAL SETUP OF LENS APERTURE Entrance beam radius: * 6.250000 Image axial ray slope: -0.124999 Object num. aperture: 6.2500e-20 F-number: 4.000043 Image num. aperture: 0.124999 Working F-number: 4.000043 FIELD Field angle: * 20.000000 Object height: -3.6397e+19 Gaussian image height: 18.198709 Chief ray ims height: 18.154007 CONJUGATES Object distance: 1.0000e+20 Srf 1 to prin. pt. 1: 13.429779 Gaussian image dist.: 43.080554 Srf 6 to prin. pt. 2: -6.919987 Overall lens length: 17.000000 Total track length: 1.0000e+20 Paraxial magnification: -5.0001e-19 Srf 6 to image srf: 42.950000 OTHER DATA Entrance pupil radius: 6.250000 Srf 1 to entrance pup.: 10.466307 Exit pupil radius: 6.643768 Srf 6 to exit pupil: -10.070166 Lagrange invariant: -2.274814 Petzval radius: -149.381547 Effective focal length: 50.000541 SPOT DIAGRAMS Aperture divisions: 17.030000 Gaussian apod. spec.: Off X 1/e^2 entr. irrad.: 1.000000 Y 1/e^2 entr. irrad.: 1.000000Now, in the Text window, click on the number for the “Petzval Radius”. If this is the first analysis you have written to the text window in this OSLO session, note that in the OSLO comment area (the comment area is just below the command line) the full precision of the Petzval Radius will be displayed in a format similar to the following: b12 = -149.3815465797474Note that “b12” refers to Spreadsheet Buffer cell location of: column 2 and row 12. Don’t worry if you have a different cell location than b12, that just means that your Spreadsheet Buffer is partially full of data from other OSLO analyses that you have performed.
To prove that the data in the Spreadsheet Buffer is available for you to use, issue the following command on the command line:
print “The Petzval Radius is = ” b12and hit the key (remember to substitute the cell location you that was reported to you). Note the result that is printed in the Text window. It should look similar to the following: The Petzval Radius is = -149.381547 Note that if you issue the PXS command, again and again, the resulting analysis values will end up in different locations within the Spreadsheet Buffer. How can you find analysis data in a consistent Spreadsheet Buffer cell that you can rely on? That is a subject for another Knowledge Base article.