odak.wave.electric_field_per_plane_wave¶
Definition to return state of a plane wave at a particular distance and time.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
amplitude |
float |
Amplitude of a wave. |
required |
opd |
float |
Optical path difference in mm. |
required |
k |
float |
Wave number of a wave, see odak.wave.parameters.wavenumber for more. |
required |
phase |
float |
Initial phase of a wave. |
0 |
w |
float |
Rotation speed of a wave, see odak.wave.parameters.rotationspeed for more. |
0 |
t |
float |
Time in seconds. |
0 |
Returns:
Type | Description |
---|---|
complex |
A complex number that provides the resultant field in the complex form A*e^(j(wt+phi)). |
Source code in odak/wave/vector.py
def electric_field_per_plane_wave(amplitude, opd, k, phase=0, w=0, t=0):
"""
Definition to return state of a plane wave at a particular distance and time.
Parameters
----------
amplitude : float
Amplitude of a wave.
opd : float
Optical path difference in mm.
k : float
Wave number of a wave, see odak.wave.parameters.wavenumber for more.
phase : float
Initial phase of a wave.
w : float
Rotation speed of a wave, see odak.wave.parameters.rotationspeed for more.
t : float
Time in seconds.
Returns
-------
field : complex
A complex number that provides the resultant field in the complex form A*e^(j(wt+phi)).
"""
field = amplitude*np.exp(1j*(-w*t+opd*k+phase))/opd**2
return field