Class ElementaryPropagationOperators
- Namespace
- VirtualLabAPI.Core.FreeSpacePropagation
- Assembly
- VirtualLabAPI.dll
This class contains a number of static member functions performing well-known elementary wave propagation operators. Every function warns for numerical problems that can occur during propagation. Additionally some functions are supported that can estimate numerical errors without performing a propagation.
public class ElementaryPropagationOperators
- Inheritance
-
ElementaryPropagationOperators
- Inherited Members
Methods
AreFrtSamplingProblems(ComplexAmplitude, double)
Checks for sampling problems of the propagation core during Fresnel Propagation. the function takes into account a present separate spherical phase factor too. The SphericalPhaseRadius is approximated as a quadratic phase factor in accordance of the paraxial approximation of the Fresnel Propagation.
public static bool AreFrtSamplingProblems(ComplexAmplitude ca, double distance)
Parameters
caComplexAmplitudeComplexAmplitude to be propagated.
distancedoublePropagation distance in meters.
Returns
- bool
Result of operation.
AreFrtSamplingProblems(ComplexAmplitude, double, double)
Checks for sampling problems of the propagation core during Fresnel Propagation. the function takes into account a present separate spherical phase factor too. The SphericalPhaseRadius is approximated as a quadratic phase factor in accordance of the paraxial approximation of the Fresnel Propagation.
public static bool AreFrtSamplingProblems(ComplexAmplitude ca, double distance, double samplingFactor)
Parameters
caComplexAmplitudeComplexAmplitude to be propagated.
distancedoublePropagation distance in meters.
samplingFactordoubleThe sampling factor indicates how much the number of sampling points per array size will be increased before the propagation. This will reduce the numerical errors.
Returns
- bool
Result of operation.
AreRayleighSommerfeldSamplingProblems(ComplexAmplitude, double)
Checks for sampling problems of the propagation core during Rayleigh-Sommerfeld convolution propagation and for sampling problems of the spherical phase factor.
public static bool AreRayleighSommerfeldSamplingProblems(ComplexAmplitude ca, double distance)
Parameters
caComplexAmplitudeComplexAmplitude to be propagated
distancedoublePropagation distance in meters
Returns
- bool
Result of operation.
AreSpwSamplingProblems(ComplexAmplitude, double)
Checks for sampling problems of the propagation core during Spectrum of Plane Waves propagation and additionally for sampling problems of a possibly present spherical phase factor. If the propagation core of the spherical phase factor is undersampled numerical errors will occur during the propagation.
public static bool AreSpwSamplingProblems(ComplexAmplitude ca, double distance)
Parameters
caComplexAmplitudeComplexAmplitude to be propagated.
distancedoublePropagation distance in meters.
Returns
- bool
Result of operation.
Frt(ComplexAmplitude, double, out bool)
Propagates the given ComplexAmplitude by the specified distance by computing the Fresnel transform.
public static void Frt(ComplexAmplitude ca, double distance, out bool areSamplingProblems)
Parameters
caComplexAmplitudeComplexAmplitude to be propagated. It is changed during the propagation.
distancedoublePropagation distance in meters.
areSamplingProblemsboolIndicates whether sampling problems can occur in the propagated field. Returned by reference.
Frt(ComplexAmplitude, double, Complex, out bool)
Propagates the given ComplexAmplitude by the specified distance by computing the Fresnel transform.
public static void Frt(ComplexAmplitude ca, double distance, Complex n, out bool areSamplingProblems)
Parameters
caComplexAmplitudeComplexAmplitude to be propagated. It is changed during the propagation.
distancedoublePropagation distance in meters.
nComplexComplex refractive index of the homogeneous medium.
areSamplingProblemsboolIndicates whether sampling problems can occur in the propagated field. Returned by reference.
RayleighSommerfeldConvolution(ComplexAmplitude, double, bool, Complex, out bool)
Propagates the given ComplexAmplitude by the specified distance by a convolution of the complex amplitude and the propagation core (Rayleigh-Sommerfeld integral). The convolution is calculated in the frequency domain. The function ignores present separate spherical phase factors. Because of this additional numerical errors may occur during the propagation. Use AreRayleighSommerfeldSamplingProblems(ComplexAmplitude, double) to check for numerical errors before propagating.
public static void RayleighSommerfeldConvolution(ComplexAmplitude ca, double distance, bool invert, Complex n, out bool areSamplingProblems)
Parameters
caComplexAmplitudeThe complex amplitude to be propagated. It is changed during the propagation.
distancedoublePropagation distance in meters.
invertboolflag that indicates if propagation shall be inverse
nComplexComplex refractive index of the homogeneous medium.
areSamplingProblemsboolIndicates whether sampling problems can occur in the propagated field.
RayleighSommerfeldConvolution(ComplexAmplitude, double, Complex, out bool)
Propagates the given ComplexAmplitude by the specified distance by a convolution of the complex amplitude and the propagation core (Rayleigh-Sommerfeld integral). The convolution is calculated in the frequency domain. The function ignores present separate spherical phase factors. Because of this additional numerical errors may occur during the propagation. Use AreRayleighSommerfeldSamplingProblems(ComplexAmplitude, double) to check for numerical errors before propagating.
public static void RayleighSommerfeldConvolution(ComplexAmplitude ca, double distance, Complex n, out bool areSamplingProblems)
Parameters
caComplexAmplitudeThe complex amplitude to be propagated. It is changed during the propagation.
distancedoublePropagation distance in meters.
nComplexComplex refractive index of the homogeneous medium.
areSamplingProblemsboolIndicates if sampling problems can occur in the propagated field.
RayleighSommerfeldCore(SamplingParameters, double, double, Complex)
Generates the propagation core for the Rayleigh-Sommerfeld convolution.
public static ComplexAmplitude RayleighSommerfeldCore(SamplingParameters samplingParameters, double distance, double Wavelength, Complex n)
Parameters
samplingParametersSamplingParametersContains information about the number of sampling points and the sampling distance.
distancedoublePropagation distance.
WavelengthdoubleWavelength
nComplexRefractive index of the homogeneous medium.
Returns
- ComplexAmplitude
The ComplexAmplitude with the propagation core.
Spw(ComplexAmplitude, double, bool, Complex, out bool, CancellationToken)
Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function ignores present separate spherical phase factors. Because of this additional numerical errors may occur during the propagation. Use AreSpwSamplingProblems(ComplexAmplitude, double) to check for numerical errors before propagating.
public static void Spw(ComplexAmplitude ca, double distance, bool invert, Complex n, out bool areSamplingProblems, CancellationToken cancellationToken)
Parameters
caComplexAmplitudeThe complex amplitude to be propagated. It is changed during the propagation.
distancedoubleThe propagation distance in meters
invertboolflag that indicates if propagation shall be inverse
nComplexRefractive index of the homogeneous medium.
areSamplingProblemsboolindicates if sampling problems can occur in the propagated field
cancellationTokenCancellationTokenToken for cooperative task cancellation.
Spw(ComplexAmplitude, double, out bool, CancellationToken?)
Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function ignores present separate spherical phase factors. Because of this additional numerical errors may occur during the propagation. Use AreSpwSamplingProblems(ComplexAmplitude, double) to check for numerical errors before propagating.
public static void Spw(ComplexAmplitude ca, double distance, out bool areSamplingProblems, CancellationToken? cancellationToken = null)
Parameters
caComplexAmplitudeThe complex amplitude to be propagated. It is changed during the propagation.
distancedoublePropagation distance in meters.
areSamplingProblemsboolIndicates whether sampling problems can occur in the propagated field.
cancellationTokenCancellationToken?Optional token for cooperative task cancellation.
Spw(ComplexAmplitude, double, Complex, CancellationToken, out bool)
Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function ignores present separate spherical phase factors. Because of this additional numerical errors may occur during the propagation. Use AreSpwSamplingProblems(ComplexAmplitude, double) to check for numerical errors before propagating.
public static void Spw(ComplexAmplitude ca, double distance, Complex n, CancellationToken cancellationToken, out bool areSamplingProblems)
Parameters
caComplexAmplitudeThe complex amplitude to be propagated. It is changed during the propagation.
distancedoublePropagation distance in meters.
nComplexComplex refractive index of the homogeneous medium.
cancellationTokenCancellationTokenToken for cooperative task cancellation.
areSamplingProblemsboolIndicates whether sampling problems can occur in the propagated field.