Skip to main content

Is it possible to re-randomize the rays selected for layouts?

I’m modeling an LED and the rays selected are nearly collimated, drawing a very misleading layout of the system.

(The Detector Viewers show the angular spread of rays I am expecting)

If I increase the # Layout Rays it starts showing wider angles but still doesn’t represent a ‘random’ set of rays.

Are you using a Source File?  If so, have you tried the Randomize switch (Parameter 6)?

 


I am using a Source File, thankyou for pointing me to this parameter! This is exactly what I was looking for.


Just 2 additional remarks:

1- be sure that your non sequential setting for the “Maximum Source File Rays In memory” is at least as big as the rays in the file. If not, Zemax will turn off the setting.

2- some LED manufacturers provide already randomized ray files (e.g. OSRAM). You can generate such randomized file yourself by either converting them outside of Zemax (e.g. in Matlab, python, you don’t need to do much, just use a permutation of the data) or by tracing the randomized file in Zemax and saving the result in a ray file. This means the rays must be captured by the detector as soon as they are emitted, so it’s not always easy for all ray files. Using a randomized file ensures that even if the setting is turned off and you did not notice, your simulation stays correct.


1- I did run into this issue. The setting is in the System Explorer > Non-Sequential > Maximum Source File Rays In Memory.

2- I’m glad the “Randomize?” parameter exists so I didn’t have to do any of that.


Reply