diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-02-28 14:59:55 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-02-28 14:59:55 -0500 |
commit | e4360a48435cc762855d356b208b5544e6f40c4b (patch) | |
tree | 71c6c83c247cb07495265b93ec062eefc3e928a8 /beam_tracing/python/classes.py | |
parent | a08ed173692ce16b79002733003049ec32a02485 (diff) | |
download | wgmr-e4360a48435cc762855d356b208b5544e6f40c4b.tar.gz wgmr-e4360a48435cc762855d356b208b5544e6f40c4b.zip |
Added python version of mode-matching code by Bain Bronner
Diffstat (limited to 'beam_tracing/python/classes.py')
-rw-r--r-- | beam_tracing/python/classes.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/beam_tracing/python/classes.py b/beam_tracing/python/classes.py new file mode 100644 index 0000000..d4ee631 --- /dev/null +++ b/beam_tracing/python/classes.py @@ -0,0 +1,37 @@ +import numpy as np
+
+class beam:
+ def __init__(self):
+ '''light beam class'''
+ # source of light beam; default (0,0)
+ beam.origin = np.array([])
+ # k-vector or direction of light beam; default (1,1)
+ beam.k = np.array([])
+ # intensity of light beam; default max
+ beam.intensity = 1.0
+ # if beam starts at a face, the face index; default none
+ beam.face = None
+ # 0 for s-polarization 1 for p-polarization; default s
+ beam.polarization = 0
+ # status: incoming, reflected, or refracted; default incoming
+ beam.status = 'incoming'
+
+class face:
+ def __init__(self):
+ '''prism face class'''
+ # first vertex point
+ face.vertex1 = np.array([])
+ # second vertex point
+ face.vertex2 = np.array([])
+ # left (right) side is left (right) of line from vertex 1 to 2
+ # index of refraction for the left side
+ face.nLeft = np.array([])
+ # index of refraction for the right side
+ face.nRight = np.array([])
+
+class border:
+ def __init__(self):
+ border.vertex1 = np.array([])
+ border.vertex2 = np.array([])
+ border.nLeft = np.array([])
+ border.nRight = np.array([])
\ No newline at end of file |