Skip to main content
Solved

set intensity threshold on split NSC rays using Matlab

  • October 20, 2022
  • 1 reply
  • 143 views

EK88

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. 

Best answer by Allen.Cheng

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

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

1 reply

Allen.Cheng
  • Single Emitter
  • 1 reply
  • Answer
  • October 31, 2022

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


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