Solved

set intensity threshold on split NSC rays using Matlab

  • 21 October 2022
  • 1 reply
  • 82 views

  • Single Emitter
  • 0 replies

Hi, I am using Matlab to run zemax simulation. could you tell me how to set up the intensity threshold when I am using the “RayTrace.SplitNSCRays = true”. Thanks a lot. 

icon

Best answer by Allen.Cheng 31 October 2022, 11:51

View original

1 reply

Hi EK88,

Hope that you have solved the problem. Before answering your question, I would like to check my understanding is correct. Is the "intensity threshold" you mentioned the value previously as follows?

 

If yes, I would like to tell you that the value is just a report to tell you the lost energy based on your threshold setting. If you want to pull it out in Matlab, the code is as follows:

NSCRayTrace.DeadRayThreshold

 

In OpticStudio, to my knowledge, we set the NSC raytracing threshold in the "System Explorer > Non-Sequential". We can set the threshold in two ways. One is based on relative ray intensity, the other is absolute ray intensity. You can see the further discussion in the help file if you are interested in the definition.

 

If you want to get or set them using Matlab, the code is the following.
 

%% Relative ray intensity

TheApplication.PrimarySystem.SystemData.NonSequentialData.MinimumRelativeRayIntensity


%% Absolute ray intensity

TheApplication.PrimarySystem.SystemData.NonSequentialData.MinimumAbsoluteRayIntensity

 

Hope this can give you some help.

Allen Cheng

Reply