-
Notifications
You must be signed in to change notification settings - Fork 150
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
A problem of "GetAmplitudes" #89
Comments
I also have this issue. I guess 'GetAmplitudes' method is obsolete or broken? |
It seems to be working after making this change. |
I did this change, but only GetAmplitudes only works por s-pol. Is the same for you? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I want to use "GetAmplitudes" for calculating reflection phase, but it can not work. The error is "GetAmplitudes: S4_Layer named 'Above1' not found."
I am confused about this issue and look forward to your help. The code is attached below.
filename1='GetAmplitudes.csv';
file1=io.output(filename1)
--Parameter-------------------------------------
um=1;
nm=um1e-3;
p=568nm;
tg1=0.8p;
lambda=1550nm;
S=S4.NewSimulation()
S:SetLattice({p,0},{0,0})
S:SetNumG(100)
S:AddMaterial("Vacuum",{1,0})
S:AddMaterial("Si",{3.483.48,0})
S:AddLayer('Above1',0,'Vacuum')
S:AddLayer('Slab1',tg1,'Vacuum')
S:SetLayerPatternRectangle('Slab1', "Si", {0,0}, 0, {0.29p,0})
S:AddLayer('Below1',0,'Vacuum')
S:SetExcitationPlanewave({80,0},{0,0},{1,0})
S:SetFrequency(1/lambda)
--Reflection-------------------------------
forw,back = S:GetAmplitudes('Above1',0)
file1:write(forw[1][1],",",forw[1][2],",",back[1][1],",",back[1][2],",")
file1:write("\n")
file1:close()
The text was updated successfully, but these errors were encountered: