-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed R and T calculations to their own functions to ensure consist…
…ancy between different scans
- Loading branch information
1 parent
1c926b8
commit 073a423
Showing
7 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ReflectionCalc <-function(r){ | ||
return(r*Conj(r)) | ||
} | ||
|
||
TransmissionCalc <-function(t,angle,theta2, incident_medium.index,exit_medium.index,polarisation){ | ||
|
||
#remember t*conj(t) does NOT in general equal T. | ||
#correct phase conditions accounted for in scan files, and | ||
#found originally at https://github.com/sbyrnes321/tmm | ||
|
||
if(polarisation=="s"){ | ||
return(t*Conj(t)*(exit_medium.index*cos(theta2)/(incident_medium.index*cos(angle)))) | ||
} else if(polarisation=="p"){ | ||
return(t*Conj(t)*(exit_medium.index*Conj(cos(theta2))/(incident_medium.index*Conj(cos(angle))))) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.