Open kenc0210 opened 12 months ago
medium_t and material can take either specific indices of refraction or a filename with the refractive index as a function of wavelength. In the example above, he is using a file with the name 'silicon' to tell the program what index to use. Since we don't have that file, you will have to either make your own 'silicon' file or hard-code the values into the program
Yeah silicon.txt is a tabulated form of the wavelength, refractive index, and extinction coefficient modelling dispersion in crystaline silicon.
You can find tables for other materials here.
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"?