Hi again Dirk, Here is the method2 in case you don't want to use MATLAB. The file is attached: ''tolerance decenter method2''. In this case, I am doing step by step what you asked for directly within Zemax OpticStudio. The file is set up the same way as in method1, with a pair of coordinate breaks around the lens. The first step is to generate the random number for D1' and D2' (both one event of their respective distribution). For that, I insert a dummy surface for surface type ''tilted''. This is to have access to the two unused parameter 1 and 2. Then, I use the Tolerance Data Editor to:     -Generate a uniform random rotation of the lens along the z axis.     -Generate a D1' and D2' with their respective distribution. Here is what the Tolerance Data Editor looks like: Now, we have D1' and D2', we need to calculate half of the difference and generate a random number with uniform distribution. To do that simple calculation, the easiest is to write a ZPL m
Hi Dirk, I believe the easiest solution is to use standard tolerance operands. What I have done in the attached file ''tolerance decenter method1'' is to set up a simple lens, with coordinates breaks around it. I used the ''tilt/decenter'' tool from the LDE toolbar to do that. Then, you just need to calculate, for example in MATLAB, your final distribution for the decenter and save it as a .UDD file (The syntax of the .UDD file is described in the help file). You will finally change the distribution in the TDE as well as the maximum value to model the decenter. My file is attached for you to review. This method requires the calculation of the distribution of the decenter of the lens itself. I will shortly post a second method if you don't want to use MATLAB.
Hi Matt, You can see the reference for the center of the beam array in the ''prop report'': You can also use a merit function like the one below to read the intercept of the center of the beam with a designated surface.  In the following, I read the x and y coordinate on surface 2 with POP, and with raytracing (they give the same result) All the best, Thomas
Here is a sample macro to show you how to do save the .txt output:
Hi Doug, In a lot of analysis in OpticStudio, you can copy the data to a clipboard from the icon in the toolbar of the analysis. You can also view the analysis as a text file when you clic on the tab called ''Text'' at the bottom of the analysis.
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.