summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basis_transformation.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/basis_transformation.m b/basis_transformation.m
index 8b8eb04..b62168a 100644
--- a/basis_transformation.m
+++ b/basis_transformation.m
@@ -42,6 +42,14 @@ function [E_field_x, E_field_y] = rotXpolarization(phi, E_field_linear)
E_field_y=sin(phi)*E_field_linear;
endfunction
+% rotate lin polarized light by angle phi around
+% light propagation axis (Z)
+function [E_field_x, E_field_y] = rotLinPolarization(phi, E_field_x_old, E_field_y_old)
+ % important negative frequency behave as they rotate in opposite direction
+ E_field_x=cos(phi)*E_field_x_old - sin(phi)*E_field_y_old;
+ E_field_y=sin(phi)*E_field_x_old + cos(phi)*E_field_y_old;
+endfunction
+
% transform x,y,z linearly polarized light in the lab/light system coordinate
% to left, right, linear along z atom system of coordinate
% atom magnetic field is along new axis Z wich is at angle theta with respect to