Sep 24, 2020
Shake your fear of the Application Programming Interface and unleash its power

In Optics, integrating highly complex optical and mechanical components is occurring more than ever before. How do you get relevant information from your complex optical system when Zemax OpticStudio is not designed to address a particular scenario?
The Application Programming Interface (API) is a powerful tool that can enhance, automate, and expand the design and analysis capabilities of Zemax OpticStudio. These additional capabilities provided by the API can virtually adapt to all modeling needs. While object-oriented coding for APIs can be frightening, it does not have to be! Once you are introduced to a simple usage of the API, you are in!
We use APIs all the time. Our phones use a software intermediary (an API) to communicate with an application in a server to send a picture to our favorite social platforms. To check the weather, we use an API to access the system that contains this information. Therefore, we are already familiar with APIs. Nowadays, some of them are called - you know - "Apps!". These APIs are remarkably useful to send, retrieve, and process data. With OpticStudio API, we are doing nothing different except that we control the process through a programming language such as Phyton, Mathlab, or C++. Therefore, we can process the ray trace data to address specific project's needs.
For example, in the life sciences, an important characteristic of optical systems such microscopes is their Numerical Aperture (NA). Why? The NA, in conjunction with the wavelength, defines the maximum theoretical resolution. In other scenarios, such as in Multiphoton Microscopy (MPM), the NA is one of the parameters that define the excitation efficiency. If the NA changes, the efficiency changes. I often found myself wondering if the NA of the system I was designing was homogenous along the entire field of view. After all, we want a diffraction-limited and aberration-free image with a high Singal to Noise ratio along the whole field of view. OpticStudio does not offer an analysis tool for the NA as a function of the field of view. I needed a tool that could analyze all my designs along their entire field of view in a precise way. The OpticStudio's API was the tool for the job.
If you are looking to learn how to use OpticStudio API's power, you came to the right blog. Here, I provide you with the basics needed to start using the API with confidence. I talk about the code's necessary structure and introduce a simple workflow to address your specific needs utilizing the API example code provided by Zemax. You will see that merely copying, pasting, and modifying a few parameters can go a long way. I also demonstrate the API's power by presenting a simplified version of the NA analysis tool that I created to evaluate optical systems for their use in the life sciences, specifically for multiphoton microscopy. Therefore, it is now your turn to watch the webinar and learn how to leverage the OpticStudio API's power to your projects.
Watch the webinar.
Author:
David VegaUniversity Of Arizona