summaryrefslogtreecommitdiff
path: root/basis_transformation.m
diff options
context:
space:
mode:
Diffstat (limited to 'basis_transformation.m')
-rw-r--r--basis_transformation.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/basis_transformation.m b/basis_transformation.m
index 1bcf676..179e333 100644
--- a/basis_transformation.m
+++ b/basis_transformation.m
@@ -28,4 +28,12 @@ function oldlin2newlin_m = oldlin2newlin(theta)
];
endfunction
+% rotate x polarized light by angle phi around
+% light propagation axis (Z)
+function [E_field_x, E_field_y] = rotXpolarization(phi, E_field_linear, modulation_freq)
+ % important negative frequency behave as they rotate in opposite direction
+ E_field_x=cos(phi*sign(modulation_freq)).*E_field_linear;
+ E_field_y=sin(phi*sign(modulation_freq)).*E_field_linear;
+endfunction
+
% vim: ts=2:sw=2:fdm=indent