Skip to main content

Is it possible to plot multiple PSFs in zemax in one window using macro?

 

Best,

Sure, no macro necessary.  Analysis/Reports, select one of the formats, and put PSFs in each sub-window.  You have to individually make all the desired settings for each PSF, including which configuration.  Then View All will display all the sub-windows in one window.


@Mike.Jones Thank you.

I can’t see View All in zemax. 

What I want is I already extracted multiple PSFs with different object distances using macro and then want to get a plot for each PSF in one window to see how the PSF size increases for each object defocus.

 

Best


Hi @tk1234 , 

Mike has a great suggestion! It sounds like you’ve already used a ZPL macro to adjust an object distance in your Lens Data Editor and then extract a PSF for each distance. With the ZPL itself, I don’t believe there is a method to place all of those extracted PSF’s within a single window. If you wanted to accomplish this via scripting, I would recommend using something like Matlab to place each PSF into a single graphic. 

But as Mike mentioned, you can also accomplish this with the report graphic feature and without using a macro. You would want to do the following to get it to work: 

  1. Instead of using a macro, create a multi-configuration system. Each configuration would represent a different object distance for which you want to calculate the PSF.
  2. Open one of the Report Graphic Options in the Analyze...Reports section of the ribbon bar.

 

  1. Once you open the graphic option you want, use the settings to set the PSF analysis that you want to analyze.
  1. Note that you will need to adjust the settings of all PSF plots within the Report Graphics tool. You can adjust these by clicking into each PSF in the bottom ribbon bar. My recommendation is to adjust all of the settings for each PSF analysis (sampling, configuration number, etc.), and then click the Save button in the “View All” tab so that you can re-open this graphic without having to re-do all of the settings.

 

I’ve attached a ZAR file that I put together using this feature so that you can look at an example. I hope this helps!


@Mike.Jones, @Jordan.Teich thank you very much. I appreciate your time.

 

Best


Reply