Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "density" parameter does not work in the BV local model #3

Open
LYXCoding opened this issue May 8, 2023 · 5 comments
Open

The "density" parameter does not work in the BV local model #3

LYXCoding opened this issue May 8, 2023 · 5 comments

Comments

@LYXCoding
Copy link

LYXCoding commented May 8, 2023

First of all, thank Germer @thomas-germer lot for this useful open source code project, which helped me in my work.

During my using local BRDF model, I found below issue.

particleModel = Local_BRDF_Model("Bobbert_Vlieger_BRDF_Model",parameters)

As for the above model, if we change the value for the 'density' key in the parameters dict, the result(DSC, or cross section) does not change, which I believe should be changed as the MIST sw does.

parameters = {'lambda' : 0.532,
'substrate' : Si,
'type' : 0,
'sphere' : SiO2,
'radius' : diameter/2,
'spherecoat' : spherecoat,
'stack' : stack,
'density': 1,
'delta' : 0,
'lmax' : 0,
'order' : -1,
'Norm_Inc_Approx' : 0,
'improve' : 3}

BTW, the default value for density is 1, but the DSC or cross section result with density=1 does not match with MIST output with the same parameters,

@thomas-germer
Copy link
Member

Models that inherit Local_BRDF_Model in SCATMECH have the parameter "density," since a Local_BRDF_Model is a BRDF_Model which in turn must return a BRDF. The internal code for all classes inheriting Local_BRDF_Model calculate a differential scattering cross section (DSC) instead of the BRDF, and the virtual class Local_BRDF_Model multiplies the DSC by density/cos(thetai)/cos(thetas) to determine the BRDF for a uniform flat surface covered with these local scatterers.

A Local_BRDF_Model in pySCATMECH provides access to the DSC functionality of Local_BRDF_Model. Unfortunately, the way these models are set up, the parameter "density" is there, but it is not used.

The DSC is a characteristic of an individual scatterer and does not depend upon the density of those scatterers.

I hope this helps!

@LYXCoding
Copy link
Author

LYXCoding commented May 18, 2023

Thanks a lot for the reply!
image

But I'm still a little bit confused why MIST use this paramter differently for calculating the integrated cross section. As explained above on the NIST website, this parameter should set as cos(thetai) when one wants to calculate the integrated cross section for an isolated particle, and if set it another value, the result will be changed. But in pySCATMECH, it seems not need to set this parameter, and no matter what value set to this paramter, the result will NOT be changed.

@thomas-germer
Copy link
Member

It is a kludge. MIST only accesses the BRDF functionality of BRDF_Model in SCATMECH. If you are interested in cross section of individual particles, you need to reverse the calculation that goes from cross section to BRDF. One way to do that is to set the parameter density to cos(incidentangle). You could also do this by setting density to 1, but further down, in the OUTPUTS section, to output crosssection = Detector*cos(incidentangle).

I hope this helps!

@LYXCoding
Copy link
Author

Thanks Germer! Yes, it helps.
I see why I was confused by this cos(incidentangle) thing. In the pySCATMECH document, the definition of the BRDF of local defects is below one, which has cos(thetai) in the definition, so if one wants cross section then need to calculate it from BRDF*cos(thetai), is this right?
image

But in Stover's paper, the definition of dsc is :
image

there is no cos(thetai), could you please help to explain more on this difference?

@thomas-germer
Copy link
Member

Yes, this is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants