Recently active
I have setup a simple experiment in non-sequential mode to test the effect of beam divergence on focal position. The lens file I am using is from the Thorlabs website (f=250 mm, VIS achromat). I set the divergence value (or collimation) using a Gaussian Source with the appropriate beam size and position (P) values, and then scan a detector rectangle along the optical axis measuring the beam waist a various locations. Contrary to my knowledge of geometric optics, the focal position shifts closer to the focusing lens with increasing beam divergence; I am using divergence angles of 0.04-0.08 mrads (half angle). Interestingly, when I set the Position value to give a converging beam, the focal position shifts away from the focusing lens. I’m concerned that there is something that I have missed when constructing this model, and was wondering if anyone could help? I have uploaded my Zemax file for convenience. Many thanks, Chris.
What is the best way to validate that the parameters input by the user are valid? For example, say that I have a parameter “n_rows” that needs to be an integer greater than zero. Should I check this upon initialization of the DLL (case 8)? If the input is invalid, should I then change the corresponding FD->param[i] it to be a valid value (e.g., if the user input 0 then change it to 1)? Or is this a bad idea? The example files state that the DLL should only modify FIXED_DATA in case 7, when Zemax is asking for safe data. Thanks
Hi everyone, Here is a post to collect any of your feedback or questions about the new feature of TM-25 rayfiles.In Zemax OpticStudio 24 R2.0, we support TM-25 rayfiles with extension filename .tm25ray. You can access this file format with following functions:* Save Rays in Raytrace Dialog* Source File Object* Save Rays On Object in Ray Database Viewer* Source Directivity Plot* Source Polar Plot* Flux vs. Wavelength* Light Source Analysis (sequential mode) In addition, when the TM-25 rayfile is exported by Zemax OpticStudio, now the phase and complete electric field (Ex, Ey, Ez) will be exported too. This is important when the rayfile is supposed to be used in a polarization-sensitive applications or coherent analysis. It’s highly suggested you read the new content in Help File in this section. The Setup Tab » Editors Group (Setup Tab) » Non-sequential Component Editor » Non-sequential Sources » Source File for more information. In below, we are going to provide a couple of examples to
My codes (that were working with the 2024 version) do not work anymore with the 2025 release.this is the error I get in the function “InitConnection()”:Message: Could not load file or assembly 'ZemaxEngine.dll' or one of its dependencies. The dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)Source: mscorlibHelpLink: None
Hi everybody,I need your advice / help for using the API.I am currently trying to run my Zemax file over the interactive mode with python. So far, I have managed with the help of the ZOS-API Syntax help and the examples presented there, but I am not getting any further at this point. The Zemax file I want to control is a non-sequential system.I would like to create a Universal 1-D Plot where I plot the value of one operand (=NSDD) in my merit function in dependence of the tilt angle of an object in my system. In the image attached at the bottom you can see the settings I would like to set over python. I am struggling with setting the field “NSC Data” with python. In the documentation under KEYWORDS-->MODIFYSETTINGS I cannot find any setting for this option: UN1_CATEGORY: Use 0 for surface, 1 for system, 2 for config. I tried 3 for “NSC data” without success. You can find the python snippet I used below. My question boiled down:Is there a way to set the NSC category in an univ
溶液中に存在する粒子の吸光、散乱を評価できるようなモデルをノンシーケンシャル系で作成していて質問があります。Mie.1dllを使用し、光源、溶液、ディテクタの3つのオブジェクトで評価しているのですが、Particle Indexの設定時にわからないことがございます。シェードモデルで光線を確認しながらParticle indexを大きく(初期値から溶液の屈折率より上)していくと、散乱が発生する回数が増える事象が起きました。(光線を保存して光線データベースビューアで確認し、実際に代わっていることも確認しました)想定では屈折率が変わったときに散乱方向や散乱強度に影響はあるが、散乱回数は変わらないと思っていたのですが、こちらはどういった理由で起きているのでしょうか。
Has anyone developed a script that can takes an implemented blackbox coating performance vs. angle and vs. wavelength and build a custom coating table (Help File » The Libraries Tab » Coatings Group » Defining Coatings » The TABLE Data Section) ?Thanks in advance for any pointers.
Hello,Could someone please show how to setup in Non-Sequential Mode a Detector and export the angle of incidence for all the light rays hitting the detector?The goal for me is to import this distribution in matlab for plotting angle of incidence distribution/histogram and additional convolution with other curves to understand the properties of the light source as well as how it interacts with the detector.
I have a non-sequential optical system consists of several lenses and mirrors. The incoming laser beam passes through them and then I use a rectangular detector to collect info about the outcoming beam. I am interested in knowing whether I lose any intensity if the divergence of the incoming beam increases. Is there a way in Zemax to find out the lost intensity? Thanks in advance and best regards,Maryam
ノンシーケンシャルでWaterの内部透過率を確認すると100%透過となっております。Waterの再現は難しいのでしょうか。
Dear OpticStudio Users,We have identified a significant issue in the 2025 R1 release affecting ZOS-API tools. Specifically, any ZOS-API tool designed to read ZRD (Zemax Ray Database) files is currently not functioning as intended.Issue Details: Symptom: ZOS-API tools that read ZRD files fail to work properly. Impact: Users relying on ZOS-API for tasks involving ZRD data will encounter errors or unexpected behavior. We understand the critical role these tools play in automating workflows and analyzing ray data, and we are actively working on a fix. Updates will be provided as soon as a resolution is available.In the meantime, if you encounter this issue, please reach out to our support team for assistance or share your experiences in the comments below.We apologize for the inconvenience and thank you for your patience as we address this problem.Best regards,Tom Pickering
How can I extract detector data using the API? And how can I be sure I'm using the correct settings?
Hi! I am new to Zemax Optic Studio and am struggling to set up a system with a source, diffraction grating, and detector. I have been following this video as a guide: https://www.youtube.com/watch?v=NtjN7wr_Pl8&ab_channel=OzenEngineering%2CInc. I get the same results until close to the end of the video-- they change the wavelength and suddenly the diffraction pattern appears. As far as I can tell, I am using the same values in the non sequential component editor but cannot get the same results. I must be missing something, any help would be really appreciated! I’ve got the link for the .zar file I’m working with here: https://drive.google.com/file/d/11rnClZi5eTzIQc3PFDJTwQYhQvJ6gR08/view?usp=drive_link
We have a mobile lens design file designed by zemax.The type of Fields in this design file is currently "angle", and if I attempt to replace it with "real image height", the following warning message appears:"Cannot find rays to yield requested image height"How can I change the field type to real image height while resolving these warning messages?
Hello Community!I have an optical assembly where I’m accessing the performance utilizing two different materials, stainless steel and aluminum over a temperature range. The calculated RBM’s that I’m getting from the STAR module are contradicting my intuition. The FEA software I’m using is Ansys Mechanical. My intuition tells me that if you were accessing deformation due to temperature range that is centered at ambient, then the calculated RBM’s should be equal in magnitude but in opposite directions. Assuming the temp range is symmetric about ambient. That holds true when looking at the deformation magnitude in Ansys Mechanical but not the RBM’s as calculated by the STAR Module. With help from this community, would anybody mind putting these two FEA text files into the STAR Module and let me know what the calculated RBM’s are? After much investigation, the only source I can think of is an issue with the calculation of the FEA data/.txt file to RBM’s. Verifying the calculated RBM
In non-sequential mode, when a ray intercepts a detector, can you confirm that the angle of incidence is not taken into account when computnig the irradiance ? For example for for 2 rays with the same power incident on the same pixel, but with different angle of incidence -one normal and one at 45°, is there a cosine weight assigned to the power of the oblique ray ?I tried to check for myself by setting up a single pixel detector with 2 source rays of 1W each. WIth normal incidence the total power is 2W, and still with one of them being incident with a 45° angle - so I’d guess angle of incidence are not taken into account, but I’d rather have confirmation from Zemax team -or even better written explicitely in t he docs (maybe I did not find it)
I often need to model lenses or diffuser plate with some texture grains applied on some part of it. Normally it’s called out as Mold-tech or VDI texture grain, which are commonly used for surface diffusing optical elements.The question is how do I apply that correctly in the Zemax optical model. Is there any DLL library for that or should I use Gaussian or AGg to approximate that? Problem is there is no available data to correlate such scatter model to Mold-tech definitions.
I am trying to run a GridDistorsion analysis using the ZOS API but it seems the analysis has no results whatsoever : Using : distorsion_grid_analysis = system.Analyses.New_GridDistortion()distorsion_grid_settings = distorsion_grid_analysis.GetSettings()distorsion_grid_settings = zosapi.Analysis.Settings.Aberrations.IAS_GridDistortion(distorsion_grid_settings)# set the settings here ...distorsion_grid_analysis.ApplyAndWaitForCompletion()analysis_results = distorsion_grid_analysis.GetResults()print(analysis_results.NumberOfDataGrids)print(analysis_results.NumberOfDataGridsRgb)print(analysis_results.NumberOfDataScatterPoints)print(analysis_results.NumberOfDataScatterPointsRgb)print(analysis_results.NumberOfDataSeries)print(analysis_results.NumberOfDataSeriesRgb)print(analysis_results.NumberOfMessages)print(analysis_results.NumberOfRayData) I get only zeros so it seems the results object exposes nothing, I would expect at least DataSeries to acces the data from the “Text” results interface
Hi everyone,I am new here and trying to write a macro for a simple setup that I have. I have a beam at source with specific NA and goes through few optics and get focused on a surface with floating aperture. My inputs are relative position of source/object respect to image in X and Y and output is efficiency at “Geometric Image Analysis”. How can I write such a Macro?
The Python code converts the Excel data into ZBF text format. The sample Excel is provided as ZBF_Example.xlsx. Click here to download Date Version OpticStudio Version Comment 2025/01/26 1.0 - Creation
I cannot find in the doc what are the names of the parameters in the API to change the field density and wavelength, especialy in the MODIFYSETTINGS which does not mention this type of analysisMaybe it is not implemented ?Also, the analysis results do not exihbit any data: print(analysis_results.NumberOfDataGrids)print(analysis_results.NumberOfDataGridsRgb)print(analysis_results.NumberOfDataScatterPoints)print(analysis_results.NumberOfDataScatterPointsRgb)print(analysis_results.NumberOfDataSeries)print(analysis_results.NumberOfDataSeriesRgb)print(analysis_results.NumberOfMessages)print(analysis_results.NumberOfRayData)all print 0, so is there a way to retrieve the results from this analysis ?
Off-axis conic mirrors in Zemax can be created by adding an off-axis aperture to a rotationally symmetric mirror. It is sometimes inconvenient to have the origin of the off-axis mirror at the vertex of the parent mirror, though, for tasks like positioning and pivoting during tolerancing. Also, larger mirrors are polished directly into blanks, so the substrate edges are roughly parallel to the surface normal at the vertex. The Off-Axis Conic Freeform can be used to represent these off-axis mirrors, instead, so that the local origin is located at the vertex of the part and the substrate shape is correct.A system with a Standard off-axis conic, and another using the Off-Axis conic freeform.Off-axis mirrors can be converted from Standard surface types to Off-Axis Conic Freeforms using a few key values from the surface.In the Lens Data Editor for the starting system, we’ve got a standard off-axis parabola at surface 4. We’ll replace this with the Off-Axis Conic Freeform. The aperture i
From reading this interesting discussion below.I went down a rabbit hole when I was figuring out where the object principal plane of a thick plano-convex lens is. I’ve been taught to find the principal planes like its described at RP Photonics, that is:extrapolate the ingoing and outgoing rays such that they meet in a planeHowever, when rays parallel to the optical axis enter through the plane face of the lens, the ingoing and outgoing rays will meet exactly along the convex face, which is not a plane.Therefore, I believe the principal plane is defined as the plane coincident with the convex surface vertex. At least, this is what I’ve taken away when I used OpticStudio (surface 1 is the convex surface).I also found this information here:Plano-convex and plano-concave lenses have one principal plane that intersects the optical axis, at the edge of the curved surface, and the other plane buried inside the glass.I can accept this definition, but I was curious, from a teaching perspective,
Hello Optics Team! I meet a question when writing ZPL. There is a mirror-reflected system and I would like to do the sensitivity analysis on some tolerances. When it comes to decenter, I found that it was difficult to pick up a surface’s ‘Before surface tilt/decenter’. There is a function of picking up ‘After surface tilt/decenter’ (SURP 66) but no such a function for ‘Before surface tilt/decenter’.Anyone have some experience about it? Thank you!