Skip to main content

Hi,

Henyey-Greenstein model describes the angular distribution of light scattered by small particles, ranging from the scattering of light by biological tissue to scattering by interstellar dust clouds https://support.zemax.com/hc/en-us/articles/1500005577062-Using-the-Henyey-Greenstein-distribution-to-model-bulk-scattering].

Will it be right to use Henyey-Greenstein distribution in Non-Sequential Mode to model bulk scattering due to raindrops and snowflakes?

Thank you for the reply!

 


oMod note: Moved to general forum as this is not a STAR-related question].

Hi Sahil,

 

One limitation of Henyey-Greenstein implementation in Zemax is that the coefficients (scattering, anisotropy, absorption) are constants and thus not function of the wavelength. This is not fundamental to the diffusion model per se, just to Zemax’ implementation for all DLL volume scattering (for comparison, Tracepro, FRED or LightTools all allow the use of spectrally varying coefficients).

So if you want to model a physical effect that needs the parameters to change with the wavelength, Zemax won’t cut it. Such a case would be modelling the skin for oximetry (blood’s absorption coefficients are wavelength dependent). If you only use 1 wavelength (e.g. for simple pulse sensing), Zemax’ implementation is good enough.

 

Raindrops may be simulated with Mie scattering:

https://support.zemax.com/hc/en-us/articles/1500005489241-How-to-simulate-atmospheric-scattering-using-a-Mie-model

Mie would mitigate the previous issue because it is more based on particle size than macro properties. The refractive index is still constant though.


Hi Ray,

Although it is a workaround and maybe not as direct as an implementation from Tracepro/FRED/LightTools, the Bulk Scatter DLL’s parameters are exposed (NPRO using 481/482 or 401-416).  You can setup each configuration to run a single wavelength and have wavelength-dependent coefficients for any Bulk Scatter DLL.  The main thing to consider is when running the NSC Ray Trace, you should Clear Detectors before the first run and then only use Trace rather than Clear & Trace.  OpticStudio will keep the results from a previous run on any detector.

 

 

If you only have a handful of wavelengths you want to trace, then you can enter these values by hand in the MCE and manually run a ray trace (closing down the Ray Trace Control and switching to the next configuration between traces).  However, if you have a lot of wavelengths to trace, it might be better to setup a simple ZOS-API script to change the Mean PathTransmission and g parameters as a function of wavelength.  The following Python Script can be run as an interactive extension changing only the variables at the top:

# object, wavelength and bulk scattering user variables
sourceNumber = 1
objectNumber = 2
wlUM = m0.45, 0.5, 0.55, 0.6, 0.65]
meanPath = .0.001, 0.002, 0.003, 0.004, 0.005]
transmission = <1, 0.95, 0.9, 0.85, 0.8]
g = 0.001, 0.01, 0.5, 0.9, 0.99]

# ---------------------------------
# ----- End of user inputs --------
# ---------------------------------

# check to make sure the lists are the same lengths
if (len(wlUM) + len(meanPath) + len(transmission) + len(g)) / 4 != len(wlUM):
raise Exception("The length of all 4 lists must be the same")

# connect to OpticStudio Interactive Extension
import zosapi

zos = zosapi.Interactive()
TheSystem = zos.TheSystem
ZOSAPI = zos.ZOSAPI;

# make sure the source only traces the first wavenumber
TheSystem.NCE.GetObjectAt(sourceNumber).GetObjectCell(ZOSAPI.Editors.NCE.ObjectColumn.Par4).IntegerValue = 1

# setup the MCE with the 4 operands
TheSystem.MCE.MakeSingleConfiguration()

op1 = TheSystem.MCE.GetOperandAt(1)
op1.ChangeType(ZOSAPI.Editors.MCE.MultiConfigOperandType.WAVE)
op1.Param1 = 1

op2 = TheSystem.MCE.AddOperand()
op2.ChangeType(ZOSAPI.Editors.MCE.MultiConfigOperandType.NPRO)
op2.Param2 = objectNumber
op2.Param3 = 481

op3 = TheSystem.MCE.AddOperand()
op3.ChangeType(ZOSAPI.Editors.MCE.MultiConfigOperandType.NPRO)
op3.Param2 = objectNumber
op3.Param3 = 401

op4 = TheSystem.MCE.AddOperand()
op4.ChangeType(ZOSAPI.Editors.MCE.MultiConfigOperandType.NPRO)
op4.Param2 = objectNumber
op4.Param3 = 402


# loop through all parameters and run ray trace
tool = TheSystem.Tools.OpenNSCRayTrace()
tool.ClearDetectors(0)
tool.IgnoreErrors = True
tool.ScatterNSCRays = True

for idx, w in enumerate(wlUM):
op1.GetOperandCell(1).DoubleValue = w
op2.GetOperandCell(1).DoubleValue = meanPathoidx]
op3.GetOperandCell(1).DoubleValue = transmissioneidx]
op4.GetOperandCell(1).DoubleValue = glidx]

tool.RunAndWaitForCompletion()

tool.Close();

# close interactive connection
del zos
zos = None

 


Hi Sahil,

 

One limitation of Henyey-Greenstein implementation in Zemax is that the coefficients (scattering, anisotropy, absorption) are constants and thus not function of the wavelength. This is not fundamental to the diffusion model per se, just to Zemax’ implementation for all DLL volume scattering (for comparison, Tracepro, FRED or LightTools all allow the use of spectrally varying coefficients).

So if you want to model a physical effect that needs the parameters to change with the wavelength, Zemax won’t cut it. Such a case would be modelling the skin for oximetry (blood’s absorption coefficients are wavelength dependent). If you only use 1 wavelength (e.g. for simple pulse sensing), Zemax’ implementation is good enough.

 

Raindrops may be simulated with Mie scattering:

https://support.zemax.com/hc/en-us/articles/1500005489241-How-to-simulate-atmospheric-scattering-using-a-Mie-model

Mie would mitigate the previous issue because it is more based on particle size than macro properties. The refractive index is still constant though.

Hi Ray,

Thank you for your reply!

I am using only one wavelength, 1550 nm or 1.55 microns. At 1.55 microns, for smaller raindrops and snow grain radii of 500 microns, normalized sphere size (x = 2πr/λ = 2*3.14*500/1.55 = 2025) exceeds Zemax’ maximum value of x = 1934 and thus no Mie scattering takes place. At 1.55 microns wavelength, raindrops and snowflakes will undergo geometrical scattering, which I think is not available in zemax. In this case, should I create a user-defined scattering function?


Hi Michael,

I used the multiconfig “workaround” many years ago for 3 wavelengths (green, red, IR) but it’s not scaling well when you want to use continuous LED spectra or if your system needs multiconfiguration for other purposes.


Reply