usnistgov / pyscatmech Goto Github PK
View Code? Open in Web Editor NEWpySCATMECH is a Python interface to SCATMECH: Polarized Light Scattering C++ Class Library
Home Page: https://pages.nist.gov/pySCATMECH/index.html
License: Other
pySCATMECH is a Python interface to SCATMECH: Polarized Light Scattering C++ Class Library
Home Page: https://pages.nist.gov/pySCATMECH/index.html
License: Other
Hi,
I am pretty new to Python and my computer is an M1 Mac. Could anybody help me run pySCATMECH in Python still?
There error I get is;
"Collecting pyscatmech
Using cached pySCATMECH-0.1.0.tar.gz (354 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/private/var/folders/0c/brm449sn4j539cjpxj46m2yw0000gn/T/pip-install-vynbs0il/pyscatmech_fa8e432ead0c4ae7a60509a3312f0eea/setup.py", line 172, in
extra_compile_args = extra_compile_args,
NameError: name 'extra_compile_args' is not defined
platform.system() = Darwin
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
(base) o[NAME OF COMPUTER] ~ % "
Does anybody know the solution? You'll have my eternal gratitude!
From the website's example, the grating parameters can set by:
gratingParameters = {
None : 'Single_Line_Grating',
'period' : 10,
'medium_i' : 1,
'medium_t' : 'silicon',
'material' : 'silicon',
'space' : 1,
'height' : '0.5',
'topwidth' : '0.4',
'bottomwidth' : '0.15',
'offset' : '0',
'nlevels' : '10'}
But the error show : At SetParameter, SCATMECH: Cannot open file "silicon"
Are there any solution for this error? Or how can I use other parameter to replace the "silicon"?
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,
Hi,
I have pip installed pySCATMECH in windows 10 PC.
I am trying to run the test example code (https://github.com/usnistgov/pySCATMECH/blob/master/tests/testPySCATMECH.py) and it is getting stuck at various materials like silicon, aluminum, gold etc.
Below is a copy of first error which I could resolve by downloading the silicon.txt file in the parent folder.
Is there a way to include other materials as well? How do I download/create these materials library?
Traceback (most recent call last):
File "D:\Python\RCWA\test.py", line 243, in
plt.plot(wavelengths, [silicon(w).real for w in wavelengths], label="Si n")
File "D:\Python\RCWA\test.py", line 243, in
plt.plot(wavelengths, [silicon(w).real for w in wavelengths], label="Si n")
File "C:\Users\K-lab_manish\anaconda3\envs\test\lib\site-packages\pySCATMECH\fresnel.py", line 73, in call
return SCATPY.GetOpticalConstant(wavelength,self.name)
Exception: At GetOpticalConstant, SCATMECH: Cannot open file "silicon.txt"`
Hi,
I think there is an array index missing in this line:
pySCATMECH/pySCATMECH/mueller.py
Line 929 in 50867ae
Think it should be retarder[1:4, 0]=0
If you think it is right I can make a PR.
And thanks for the awesome work.
Best,
Paulo Sampaio
In the documentation for the RCW_Model (https://pages.nist.gov/pySCATMECH/rcw.html) and CrossRCW_Model (https://pages.nist.gov/pySCATMECH/crossrcw.html), there is a method for calculating the Jones matrix for a given diffraction order. However, when I try to get the Jones matrix for a default set up, python returns an error:
model = RCW_Model()
print(model.DiffractionAmplitude(0))
AttributeError: 'RCW_Model' object has no attribute 'DiffractionAmplitude'
Using print(dir(model)), I can see that the model has DiffractionEfficiency and Direction as possible methods, but no DiffractionAmplitude method. Am I doing something wrong, or has the Jones matrix method been removed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.