{"action":"opened","issue":{"url":"https://api.github.com/repos/victorliu/S4/issues/68","repository_url":"https://api.github.com/repos/victorliu/S4","labels_url":"https://api.github.com/repos/victorliu/S4/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/victorliu/S4/issues/68/comments","events_url":"https://api.github.com/repos/victorliu/S4/issues/68/events","html_url":"https://github.com/victorliu/S4/issues/68","id":308382434,"number":68,"title":"Change the angle of incidence","user":{"login":"DylanMMarques","id":36501824,"avatar_url":"https://avatars1.githubusercontent.com/u/36501824?v=4","gravatar_id":"","url":"https://api.github.com/users/DylanMMarques","html_url":"https://github.com/DylanMMarques","followers_url":"https://api.github.com/users/DylanMMarques/followers","following_url":"https://api.github.com/users/DylanMMarques/following{/other_user}","gists_url":"https://api.github.com/users/DylanMMarques/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanMMarques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanMMarques/subscriptions","organizations_url":"https://api.github.com/users/DylanMMarques/orgs","repos_url":"https://api.github.com/users/DylanMMarques/repos","events_url":"https://api.github.com/users/DylanMMarques/events{/privacy}","received_events_url":"https://api.github.com/users/DylanMMarques/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-25T20:25:34Z","updated_at":"2018-03-25T20:25:34Z","closed_at":null,"author_association":"NONE","body":"Hi everyone,\r\n\r\nI am trying to use S4 to generate some reflection/transmission curves changing the angle of incidence. The code that I am using is the following one:\r\n`\r\nS = S4.NewSimulation()\r\nS:SetLattice({0.24,0}, {0,0.24})\r\nS:SetNumG(100)\r\nS:AddMaterial(\"silicon\", {30.847, 4.2994})\r\nS:AddMaterial(\"vacuum\", {1,0}) \r\nS:AddLayer('incidentMedium', 0 , 'vacuum')\r\nS:AddLayer('base', 10e3, 'silicon')\r\nS:AddLayer('bottom',0,'vacuum')\r\n\r\nS:SetFrequency(1/0.4)\r\n\r\nfor thetaI=0,70,10 do\r\n\tS:SetExcitationPlanewave({thetaI, 0 },{1,0}, {0,0})\r\n\tincident, reflect = S:GetPowerFlux('incidentMedium',0)\r\n\tprint(thetaI .. '\\t' .. -reflect/incident .. '\\t' .. incident)\r\nend\r\n`\r\n\r\nI have the respective output: \r\n0\t0.34997080849269\t1\r\n10\t0.34997080849269\t0.96984631039295\r\n20\t0.34997080849269\t0.88302222155949\r\n30\t0.34997080849269\t0.75\r\n40\t0.34997080849269\t0.58682408883347\r\n50\t0.34997080849269\t0.41317591116653\r\n60\t0.34997080849269\t0.25\r\n70\t0.34997080849269\t0.11697777844051\r\n\r\nWhich does not makes sense to me. Am I doing something wrong in my code?\r\n\r\nI tried to find any example changing the angle of incidence but all examples are for normal incidence.\r\n\r\nMany thanks,\r\nDylan Marques\r\n"}}
{"actor":{"display_login":"DylanMMarques"}}