Skip to main content
Solved

Perform Image Simulation in ZOS-API


Buddy

Please do me a favor. Zemax has the function "Image Simulation". I can do this interactively. Now, I want to use "Image Simulation" to simulate 2000 frame images. Therefore, I want to use SampZOS-API Matlab programming to automatically do it. 

 

I have learned the code ZOS-API\Sample Code\MATLAB\MATLABStandalone_04_pull_data_from_FFTMTF.m" to acquire MTF curves. Would you please tell me how to program codes. The codes can realize to load, simulate and save 2000 frame images based on "Image Simulation" moduale.

 

It would be appreciated if you could reply me as soon as possible.

Best answer by David.Nguyen

Hi Buddy,

 

Similar to the FFT MTF, you can call the Image Simulation analysis with the line:

TheImageSimulation = TheSystem.Analyses.New_ImageSimulation()

The issue is, for that particular analysis, the settings and data grids aren’t available. It means, you can only run it, and it’ll execute based on the settings you’ve saved, and for the image to be created, you’d have had to set a filename before saving the settings manually. Also, because of that, the ZOS-API will save to the same image file, so you probably need to rename it in-between iterations of the loop. Finally, it might be tricky if you want to modify the settings of Image Simulation during the execution of your loop.

Let me know if this is clear, or if you have additional questions.

Take care,

 

David

View original
Did this topic help you find an answer to your question?

3 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1072 replies
  • Answer
  • September 6, 2021

Hi Buddy,

 

Similar to the FFT MTF, you can call the Image Simulation analysis with the line:

TheImageSimulation = TheSystem.Analyses.New_ImageSimulation()

The issue is, for that particular analysis, the settings and data grids aren’t available. It means, you can only run it, and it’ll execute based on the settings you’ve saved, and for the image to be created, you’d have had to set a filename before saving the settings manually. Also, because of that, the ZOS-API will save to the same image file, so you probably need to rename it in-between iterations of the loop. Finally, it might be tricky if you want to modify the settings of Image Simulation during the execution of your loop.

Let me know if this is clear, or if you have additional questions.

Take care,

 

David


Forum|alt.badge.img+2

Hi!

To follow on David’s answer, you can modify the settings but using the “old” method called MODIFYSETTINGS. The Image Simulation is not fully implemented, so in that case the settings can be changed via the MODIFYSETTINGS method. The details can be found in the help file:

Have a look at this post

I have listed there some examples:

 


mocquin
  • Infrared
  • 9 replies
  • January 13, 2025

Are there any updates on the implementation of the Image Simulation in the API ? It’d be quite convenient to parametrize this tool… :)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings