Use this space to learn more about your software!
Rays avoiding an object to speed up raytrace and reduce rays needed
Hey all, A model I am working with is composed of a source ellipse, a 500mm lens tube and an aspheric lens used to focus rays from the source ellipse onto a detector. All of this is using the non-sequential mode. I am finding that when I set a ray amount (1e7)  the raytrace takes some time and very few of the rays are actually making it to my focal plane, and the resulting image drawn is very sparse with not nearly the amount of data that I am looking for. My question is:  Because the object is 500mm away from my input aperture (the aspheric lens), is it possible to tell Zemax to perform a raytrace but only draw rays that eventually land on the focal plane? A lot of the rays it's emitting from the source are being "wasted" by only emitting into free-space or the lens tube which I don't are about, and it slows the ray traces down.  Any help is appreciated. Thanks, Justin
Question about decenter tolerance of a lens inside a lens mount
Hello, I have the following scenario: A round lens has a given diameter tolerance D1 +/- delta_D1, distribution 1. The lens is glued inside a mount. The inner diameter of the lens mount has also a given tolerance D2 +/- delta_D2, distribution 2. This clearance fit implies a decenter tolerance of the optical axis of the lens. The position of the lens inside the (larger) mount should be uniform distributed. In Matlab I would simulate this the following way: 1. Calculate random number for D1 +/- delta_D1, distribution 1 2. Calculate random number for D2 +/- delta_D2, distribution 2 3. Calculate difference between both random numbers and devide result by 2 =: X 4. Calculate random number for +/- X, uniform distribution. This is the random decenter of the optical axis of the lens How can I simulate this correctly in Zemax? Can I simulate this with standard tolerance operands? Or do I need to work with tolerance script?  Does anybody has an idea?
Scattering analysis of transparent objects with VDI roughness surface finish
Please, can anybody help with simulating different roughness surface finish expressed in VDI / Ra? There is some plate made of Polycarbonate and has transmittance of 90%. I need to evaluate scattering of light depending on different roughness surface finish of one of the object faces. The factory can provide only VDI data. How can scattering be modeled knowing only VDI values?  Thanks
Gaussian Gx, Gy and M2
I'd like to model a flat top laser beam using the non-sequential source ellipse.  The laser beam has a central wavelength of 1064 nm, an M2 = 5 (called "M squared" or beam quality parameter", a diameter of 11 mm, and a divergence of 3 mrad.  My problem is that the source ellipse is defined in terms of the Gaussian Gx and Gy parameters, and I'm not sure how they relate to the M2 value or the divergence.  Can anyone explain how to use Gx and Gy to represent a laser beam of the parameters that I just mentioned?
How to make parametric simulation of non-sequential model.
Hello, I would like to solve a parametric non-sequential model, where I change certain geometrical parameters. At the moment I do this manually step by step, saving one model for every parameter setting. I'm sure there is something that allows for automatic batch calculation of these parameters. Best would be to have all solutions in one model and the ability to switch between these results. I know there are the options Slider, MC Editor or ZPL-Macros. However, In Slider I cannot set the increment between the parameter steps, which gives me way too much solutions I don't need and which take lots of time to calculate. For MCEditor and ZPL-Macros I could not find any useful tutorial allowing me to learn these topics in rather short time. I would really appreciate if someone could give me a starting point, how to solve this problem with a rather handy solution. Thank you for reading, Clemens
Hello! I'm new to OpticStudio, and I'm currently working on analyzing a microscope design that uses Grintech GRIN lenses. Whenever I open any of the files related to this project (including the Zemax file from Grintech's website), I get the error that the material GTAGNEU is not found in the SGRIN.DAT file (image attached). I have not been able to find any way to rectify this, and other people using the files don't seem to be having similar issues. I do have a student Zemax license, if that's relevant. Any help is much appreciated!
projection of an off axis object onto a hemispherical surface in squential ray tracing
Hi all, We have an object with 13.6mm height , a convex spherical mirror with 60mm diameter and 45mm radius of curvature and a 2 feet diameter hemispherical surface (Radius of curvature 1 feet). Here I'm attaching the optical lay out of the system. The object has to be projected onto a 2 feet hemispherical surface using a convex spherical mirror. The mirror has to be placed at a height of 270mm from the optical axis of hemispherical surface.  How to simulate using sequential ray tracing in zemax?  Thanks & Regards, Kabeer
ZOS-API - POP Analysis - Display Tab - MODIFYSETTINGS - parameters
I'm looking for a description how to access the parameters in the display tab of a POP Analysis in a ZOS Application. In particular, I want to save the output beam on all surfaces to a specific file. What are the parameters which need to be set in the cfg file via the MODIFYSETTINGS command to accomplish that? In the help pdf file only descriptions for the parameters in the other 3 tabs of the POP analysis window are given. Or is this not possible? Thanks, Dirk
migration from perpetual to subscription licence
Hello, I became aware a few months ago that Zemax had decided to introduce subscription licencing (i.e. software leasing rather than software purchase), which changes radically (and IMHO not positively) the nature of the relationship between Zemax and its customers. As my single user private perpetual licence support is about to expire, I have asked for a quotation for support renewal. Not only that the support renewal price went up by 20% over last year (which pushes me well over the limit of what I can afford to fork out for licence support every year in exchange for, judging by the experience of past updates, little more than cosmetic changes and minor bug fixes), but I was also told that I am strongly encouraged to transition to an even more expensive subscription licence, which apparently will include access to more technical innovation in the OpticStudio updates than offered by the perpetual licence. I have a few related questions:   1) what exactly in terms of software u
Converting black box lens model to non-sequential version
Hello, I'm using the following knowledge base article to convert a lens design file (sequential) into it's non-sequential alternative: https://customers.zemax.com/os/resources/learn/knowledgebase/how-to-convert-sequential-surfaces-to-non-sequenti Does it also work on black box models? Thank you in advance!
ZOS-API- How to use tools like Set Variable, Optimization, Tolerancing, Calculate RMSspot etc.?
TheSystem.Tools. SetAllRadiiVariable(); TheSystem.Tools. SetAllThicknessesVariable (); Set all radii variables Set all thicknesses variables LocalOpt = TheSystem.Tools.OpenLocalOptimization(); LocalOpt.Algorithm = ZOSAPI.Tools.Optimization.OptimizationAlgorithm.DampedLeastSquares; LocalOpt.Cycles = ZOSAPI.Tools.Optimization.OptimizationCycles.Automatic; LocalOpt.NumberOfCores = 8; LocalOpt.RunAndWaitForCompletion(); LocalOpt.Close(); Run local optimization with DLS GlobalOptimTimeInSeconds = 15; GlobalOpt = TheSystem.Tools.OpenGlobalOptimization(); GlobalOpt.Algorithm = ZOSAPI.Tools.Optimization.OptimizationAlgorithm.DampedLeastSquares; GlobalOpt.NumberToSave = ZOSAPI.Tools.Optimization.OptimizationSaveCount.Save_10; GlobalOpt.RunAndWaitWithTimeout(GlobalOptimTimeInSeconds); GlobalOpt.Cancel(); GlobalOpt.WaitForCompletion(); GlobalOpt.Close(); Run global search and cancel it after 15 seconds HammerOpt = TheSystem.Tools.OpenHammerOptimization(); HammerOpt.RunAndWaitWithTimeo
ZOS-API- How to set operands in Multi-Configuration Editor?
MCoperand1= TheSystem.MCE.GetOperandAt(1); MCoperand1.ChangeType(ZOSAPI.Editors.MCE.MultiConfigOperandType. XFIE); MCoperand1.Param1 = 1; MCoperand1.GetOperandCell(1).DoubleValue = 10.0; MCoperand1.GetOperandCell(2).DoubleValue = 20.0;   The above code set multi configuration operand#1 as XFIE. TheSystem.MCE.InsertConfiguration(2, true); TheSystem.MCE.DeleteConfiguration(2); TheSystem.MCE.MakeSingleConfiguration(); TheSystem.MCE.SetCurrentConfiguration(1); TheSystem.MCE.CurrentConfiguration; TheSystem.MCE.NumberOfConfigurations; In the above code: Insert a new configuration at config#2 with pickups from the first configuraiton Delete config#2 Delete all the multi-configuration data, leaving the lens as a single configuration system in whatever configuration is active at the time this tool is used. Set the currently active configuration for the system Get the current configuration number Get the total number of configurations
ZOS-API- How to set operands and save .tol file in Tolerance Data Editor?
Toperand1= TheSystem.TDE.GetOperandAt(1); Toperand1.ChangeType(ZOSAPI.Editors.TDE.ToleranceOperandType.TTHI); Toperand1.GetCellAt(2).IntegerValue=3; Toperand1.GetCellAt(3).IntegerValue=4; Toperand1.Min=-0.5; Toperand1.Max=0.5; Toperand1.Comment= ' 'Thickness of surf3'' ;   The above code set tolerance operand#1 as TTHI. tolFileName= ‘C:\MYDIR\MYLENS.TOL’; TheSystem.TDE.SaveToleranceFile (tolFileName); TheSystem.TDE.SaveToleranceFile('file in default folder.tol'); TheSystem.TDE.LoadToleranceFile ('file in default folder.tol'); Save tolerance file to user defined path Save  tolerance file to default folder Leave tolerance file
ZOS-API- How to access properties and methods in Non-Sequential Component Editor?
TheSystem.NCE.GetObjectAt(1). Comment;TheSystem.NCE.GetObjectAt(1). RefObject;TheSystem.NCE.GetObjectAt(1). InsideOf;TheSystem.NCE.GetObjectAt(1). XPosition;TheSystem.NCE.GetObjectAt(1). YPosition;TheSystem.NCE.GetObjectAt(1). Zposition;TheSystem.NCE.GetObjectAt(1). TiltAboutX;TheSystem.NCE.GetObjectAt(1). TiltAboutY;TheSystem.NCE.GetObjectAt(1). TiltAboutZ;TheSystem.NCE.GetObjectAt(1). Material; The above code can get and set values of RefObject, InsideOf, XPosition, YPosition, Zposition, TiltAboutX, TiltAboutY, TiltAboutZ; strings of Comment, Material.TheSystem.NCE. ReloadAllObjects();TheSystem.NCE. ReloadObject(2);In the above code:Reload all objects Reload object#2[bool_return,R11,R12,R13,R21,R22,R23,R31,R32,R33,Xo,Yo,Zo]=TheSystem.NCE.GetMatrix(1);TheSystem.NCE.PrevNSCGroup();TheSystem.NCE.NextNSCGroup();Get the rotation and position matrices for NSC object 1 relative to the NSC surface origin Select the previously available non-sequential surface Select the next available non-seq
ZOS-API- How to access properties and methods in Lens Data Editor?
TheSystem.LDE.GetSurfaceAt(1). Radius; TheSystem.LDE.GetSurfaceAt(1). Thickness; TheSystem.LDE.GetSurfaceAt(1). SemiDiameter; TheSystem.LDE.GetSurfaceAt(1). ChipZone; TheSystem.LDE.GetSurfaceAt(1). Conic; TheSystem.LDE.GetSurfaceAt(1). TCE; TheSystem.LDE.GetSurfaceAt(1). Comment; TheSystem.LDE.GetSurfaceAt(1). Material; TheSystem.LDE.GetSurfaceAt(1). Coating; The above code can get and set values of Radius, Thickness, SemiDiameter, ChipZone, Conic, TCE; strings of Comment, Material, Coating. get_add_coating_tool=TheSystem.LDE.GetTool_AddCoatingsToAllSurfaces(); get_add_coating_tool.CoatingToAdd= 'None'; TheSystem.LDE.RunTool_AddCoatingsToAllSurfaces(get_add_coating_tool); get_add_coating_tool.CoatingToAdd= 'AR'; TheSystem.LDE.RunTool_AddCoatingsToAllSurfaces(get_add_coating_tool); In the above code: use tool Add Coating To All Surfaces to remove all coatings use tool Add Coating To All Surfaces to add ‘AR’ coating to all surface Accessible tools include: RunTool_ConvertLoc
ZOS-API- How to manipulate operands (and apply optimization wizard) in Merit function editor?
TheMFE = TheSystem.MFE; TheSystem.MFE.AddOperand(); TheSystem.MFE.InsertNewOperandAt(1); TheSystem.MFE. RemoveOperandsAt(1,3); TheSystem.MFE. CopyOperands(1,3,5); TheSystem.MFE. GetOperandAt(2); In the above code: Add a new operand to the end of the merit function editor Insert a new operand at operand # 1 Remove 3 operands from operand #1 Copy 3 operands from operand#1 and paste at operand#5 Get access to operand#2 for further modification or definition operand1= TheSystem.MFE.GetOperandAt(1); operand1.ChangeType(ZOSAPI.Editors.MFE.MeritOperandType.REAY); operand1.Target = 0.0; operand1.Weight = 10.0; operand1.GetCellAt(2).IntegerValue = 3; operand1.GetCellAt(3).IntegerValue = 2; operand1.GetCellAt(7).DoubleValue = 1.0; In the above code: Access operand#1 Change Type as REAY Set Target as 0 Set Weight as 10.0 Set Surf (the 2nd cell) as 3 Set Wave (the 3rd cell) as 2 Set Py (the 7th cell) as 1.0 mfDir= TheSystem.MFE.MeritFunctionDirectory; TheSystem.MFE.SaveMerit
ZOS-API- How can I change the settings (e.g. apodization..) of the System Explorer?
For example, If I want to:  Set apodization type as Gaussian, use the enumeration ZOSAPI.SystemData.ZemaxApodizationType.Gaussian. Set Apodization factor as 1 Untick Fast Semi-Diameters Tick Adjust Index Data To Environment The following code can be used:  TheSystemData.Aperture.ApodizationType = ZOSAPI.SystemData.ZemaxApodizationType.Gaussian; TheSystemData.Aperture.ApodizationFactor = 1; TheSystemData.Aperture.FastSemiDiameters = false; TheSystemData.Environment.AdjustIndexToEnvironment = true; If I want to: Set Coating File as COATING.DAT Set Scatter Profile as SCATTER_PROFILE.DAT Set ABg Data File as ABG_DATA.DAT Reload above data files Add Title and Notes The following code can be used:  TheSystem.SystemData.Files.CoatingFile = 'COATING.DAT'; TheSystem.SystemData.Files.ScatterProfile = 'SCATTER_PROFILE.DAT'; TheSystem.SystemData.Files. .ABgDataFile = 'ABG_DATA.DAT'; TheSystem.SystemData.Files.ReloadFiles(); TheSy
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.