Programming Reference for VirtualLab Fusion  2022.1
Static Public Member Functions | List of all members
ElementaryFieldScalingPropagationOperators Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class contains a number of static member functions performing well-known elementary wave propagation operators. In difference to the ElementaryPropagationOperators class all functions change number of sampling points and the sampling distance automatically the number of sampling points and the sampling distance to avoid numerical errors. Additionally some functions are provided that can estimate the necessary number of sampling points and the sampling distance to avoid numerical errors. More...

Static Public Member Functions

static ComplexAmplitude FarFieldPropagation (ComplexAmplitude ca, double distance, Complex n, double accuracyFactor, bool automaticOutputFieldSizeShape, double outputFieldSizeFactor, VectorD outputFieldFieldSize, BasicParameter.eApertureShape outputFieldShape, double outputFieldBorderWidth, bool automaticOutputFieldSampling, double outputFieldSamplingFactor, int outputFieldEmbedFrameWidth, SamplingParameters outputFieldSamplingParameters, out bool areNumericalErrors, InterpolationMethod interpolationMethod, FarFieldPropagationMode farFieldPropagationMode, bool isParaxialApproximation, SpreadSheetObjectUsedIn usedIn)
 Performs a far field propagation without paraxial approximation. The far field approximation of the Rayleigh-Sommerfeld propagation is used. Just for paraxial wave the far field is the Fourier Transform of the waist of the wave. In general it is the Fourier Transform plus a coordinate transformation. If a propagation between two far field points is performs it is assumed that the SphericalPhaseRadius information is equal to the distance from the waist. More...
 
static HarmonicFieldsSet FarFieldPropagation (HarmonicFieldsSet hfs, double distance, double accuracyFactor, bool automaticOutputFieldSizeShape, double outputFieldSizeFactor, VectorD outputFieldFieldSize, BasicParameter.eApertureShape outputFieldShape, double outputFieldBorderWidth, bool automaticOutputFieldSampling, double outputFieldSamplingFactor, int outputFieldEmbedFrameWidth, SamplingParameters outputFieldSamplingParameters, out bool areNumericalErrors, InterpolationMethod interpolationMethod, FarFieldPropagationMode farFieldPropagationMode, bool isParaxialApproximation, SpreadSheetObjectUsedIn usedIn)
 Performs a far field propagation without paraxial approximation. The far field approximation of the Rayleigh-Sommerfeld propagation is used. Just for paraxial wave the far field is the Fourier Transform of the waist of the wave. In general it is the Fourier Transform plus a coordinate transformation. If a propagation between two far field points is performs it is assumed that the SphericalPhaseRadius information is equal to the distance from the waist. More...
 
static ComplexAmplitude Frt (ComplexAmplitude ca, double distance, bool automaticInputFieldSampling, double accuracyFactor, VectorD inputFieldSamplingDistance)
 Propagates given ComplexAmplitude by the specified distance by computing the Fresnel transform. The function can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The function uses the WaveParameters of the object to perform an optimal propagation. If no WaveParameters is present function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance -SphericalPhaseRadius and a Fresnel Propagation by a distance SphericalPhaseRadius + distance to reduce numerical errors. More...
 
static ComplexAmplitude Frt (ComplexAmplitude ca, double distance, Complex n, bool automaticInputFieldSampling, double inputFieldSamplingFactor, VectorD inputFieldSamplingDistance, bool automaticOutputFieldSizeShape, double outputFieldSizeFactor, VectorD outputFieldFieldSize, BasicParameter.eApertureShape outputFieldShape, double outputFieldBorderWidth, bool automaticOutputFieldSampling, double outputFieldSamplingFactor, int outputFieldEmbedFrameWidth, SamplingParameters outputFieldSamplingParameters, out bool areNumericalErrors)
 [AI] Propagates the given ComplexAmplitude by the specified distance by computing the Fresnel propagation. The function modifies the sampling distance of the input field specified in the inputFieldSamplingDistance parameter before the propagation in order to reduce numerical errors. The modification can be done by user or automatically Additionally the user may specify the output field sampling parameters and the field size, shape and broder width of the output field. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance \(-SphericalPhaseRadius\) and a Fresnel Propagation by a distance \(SphericalPhaseRadius + distance\) to reduce numerical errors. More...
 
static ComplexAmplitude Frt (ComplexAmplitude ca, double distance, Complex n, double accuracyFactor, out bool areNumericalErrors)
 Propagates given ComplexAmplitude by the specified distance by computing the Fresnel transform. The function can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The function uses the WaveParameters of the object to perform an optimal propagation. If no WaveParameters is present function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance -SphericalPhaseRadius and a Fresnel Propagation by a distance SphericalPhaseRadius + distance to reduce numerical errors. The output field size of the propagated field is estimated depending on the WaveParameters. More...
 
static ComplexAmplitude Frt (ComplexAmplitude ca, double distance, Complex n, VectorD outputFieldSize, double accuracyFactor, out bool areNumericalErrors)
 Propagates given ComplexAmplitude by the specified distance by computing the Fresnel transform. The function can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The function uses the WaveParameters of the object to perform an optimal propagation. If no WaveParameters is present function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance -SphericalPhaseRadius and a Fresnel Propagation by a distance SphericalPhaseRadius + distance to reduce numerical errors. The desired output field size of the propagated field must be specified by the user. More...
 
static VectorD GetFarFieldPropagationArraySize (ComplexAmplitude ca, double distance, Complex n, FarFieldPropagationMode farFieldPropagationMode, bool isParaxialApproximation)
 Calculates the optimal sampling distance and number of sampling points of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20. More...
 
static VectorD GetFarFieldPropagationSamplingDistance (ComplexAmplitude ca, double distance, Complex n, FarFieldPropagationMode farFieldPropagationMode)
 Calculates the optimal sampling distance of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20. More...
 
static VectorD GetFarFieldPropagationSamplingDistance (ComplexAmplitude ca, double distance, Complex n, FarFieldPropagationMode farFieldPropagationMode, bool isParaxialApproximation)
 Calculates the optimal sampling distance of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20. More...
 
static SamplingParameters GetFarFieldPropagationSamplingParameters (ComplexAmplitude ca, double distance, Complex n, FarFieldPropagationMode farFieldPropagationMode, bool isParaxialApproximation)
 Return the outpuf field sampling parameters of the non paraxial far field propagation. More...
 
static SamplingParameters GetFarFieldPropagationSamplingParameters (ComplexAmplitude ca, double distance, Complex n, VectorD diameterOutputField, FarFieldPropagationMode farFieldPropagationMode)
 Calculates the optimal sampling distance and number of sampling points of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20. More...
 
static SamplingParameters GetFarFieldPropagationSamplingParameters (ComplexAmplitude ca, double distance, Complex n, VectorD diameterOutputField, FarFieldPropagationMode farFieldPropagationMode, bool isParaxialApproximation)
 Calculates the optimal sampling distance and number of sampling points of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20. More...
 
static SamplingParameters GetFrtInputFieldSamplingParametersFromOutputFieldSize (ComplexAmplitude ca, double distance, Complex n, VectorD outputFieldSize, out bool useBackToWaist)
 Estimates the sampling parameters of the field to propagate so that the output field generated by the FRT will have the diameter as specified by the outputFieldSize parameter. In order to have small numerical errors of the simulation result the outputFieldSize should be so large that the most of the power (typically >99.99%) are included in this area. If a smaller output field size will be selected significant numerical errors may appear. The propagation can be done in a one step or two step process. In case of a one step propagation the propagation is directly done from the plane containing the complex amplitude into the target plane. The two step process tries to propagate back in the source plane of the spherical phase and to perform a second propagation step into the target plane. The two step process can be used if a spherical phase in present and if the required computer memory will be smaller as in case of a one step process. If the returned input field sampling parameters differ from the sampling parameters of the ComplexAmplitude to propagate an interpolation is required. The two step requires probably a further interpolation after the first interpolation step. More...
 
static void GetFrtInputFieldSamplingParametersFromOutputFieldSize (SamplingParameters fieldSamplingParameters, bool hasSphericalPhase, double sphericalPhaseRadius, double wavelength, double distance, Complex n, VectorD outputFieldSize, double accuracyFactor, out bool perform2StepPropagation, out SamplingParameters samplingParametersStep1, out SamplingParameters samplingParametersStep2)
 Estimates the sampling parameters of the field to propagate so that the output field generated by the FRT will have the diameter as specified by the outputFieldSize parameter. In order to have small numerical errors of the simulation result the outputFieldSize should be so large that the most of the power (typically >99.99%) are included in this area. If a smaller output field size will be selected significant numerical errors may appear. The propagation can be done in a one step or two step process. In case of a one step propagation the propagation is directly done from the plane containing the complex amplitude into the target plane. The two step process tries to propagate back in the source plane of the spherical phase and to perform a second propagation step into the target plane. The two step process can be used if a spherical phase in present and if the required computer memory will be smaller as in case of a one step process. If the returned input field sampling parameters differ from the sampling parameters of the ComplexAmplitude to propagate an interpolation is required. The two step requires probably a further interpolation after the first interpolation step. More...
 
static SamplingParameters GetFrtSamplingParameters (ComplexAmplitude ca, double distance, Complex n)
 Calculates the samplingparameters for the Fresnel Propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points. More...
 
static SamplingParameters GetFrtSamplingParameters (ComplexAmplitude ca, double distance, Complex n, double samplingFactor)
 Calculates the samplingparameters for the Fresnel Propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points. More...
 
static SamplingParameters GetRayleighSommerfeldConvolutionSamplingParameters (ComplexAmplitude ca, double distance, Complex n)
 Calculates the sampling parameters for the Rayleigh-Sommerfeld Convolution propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points. The function takes into account possible spherical phase factors. More...
 
static SamplingParameters GetRayleighSommerfeldConvolutionSamplingParameters (ComplexAmplitude ca, double distance, Complex n, double accuracyFactor)
 Calculates the sampling parameters for the Rayleigh-Sommerfeld Convolution propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points. The function takes into account possible spherical phase factors. More...
 
static VectorD GetRayleighSommerfeldSummationSamplingDistance (ComplexAmplitude ca, double distance, Complex n)
 Calculates the optimal sampling distance of the propagated field. More...
 
static SamplingParameters GetSpwInputFieldSamplingParameters (ComplexAmplitude ca, double distance, Complex n, double accuracyFactor)
 Calculates the sampling parameters of the input field to propagate by the spectrum of plane waves propagation to avoid numerical errors during the propagation. The function can increase the number of sampling points and can decrease the sampling distance in case of a present spherical phase factor. The sampling parameters return the width (sampling points mulitplied by sampling distance divided by 2) of the wave after the SPW propagation. Is the width of the returned sampling parameters larger than the width of the ca object embed the field before the propagation. Is the width of the sampling parameters smaler than the width of the ca obect first propagate the field and then extract the necessary sampling points. The function uses the WaveParameters (if present) to approximate the changing of the wave width during the propagation. Is the HasWaveParameters property of the ComplexAmplitude object false then the function assumes the the object is in the waist and sets the WaveParameters. More...
 
static SamplingParameters GetSpwInputFieldSamplingParametersFromOutputFieldSize (ComplexAmplitude ca, double distance, Complex n, VectorD outputFieldSize, double accuracyFactor)
 Estimates the sampling parameters of the field to propagate so that the output field generated by the SPW will have the diameter as specified by the outputFieldSize parameter. In order to have small numerical errors of the simulation result the outputFieldSize should be so large that the most of the power (typically >99.99%) are included in this area. If a smaller output field size will be selected significant numerical errors may appear. If the returned input field sampling parameters differ from the sampling parameters Complex Amplitude to propagate an interpolation is required. More...
 
static SamplingParameters GetSpwOutputFieldSamplingParameters (ComplexAmplitude ca, double distance, Complex n, double accuracyFactor)
 Calculates the sampling parameters of the output field for the spectrum of plane waves propagation to avoid numerical errors during the propagation. The function can increase the number of sampling points and can decrease the sampling distance in case of a present spherical phase factor. The sampling parameters return the width (sampling points mulitplied by sampling distance divided by 2) of the wave after the SPW propagation. Is the width of the returned sampling parameters larger than the width of the ca object embed the field before the propagation. Is the width of the sampling parameters smaler than the width of the ca obect first propagate the field and then extract the necessary sampling points. The function uses the WaveParameters (if present) to approximate the changing of the wave width during the propagation. Is the HasWaveParameters property of the ComplexAmplitude object false then the function assumes the the object is in the waist and sets the WaveParameters. More...
 
static ComplexAmplitude RayleighSommerfeldConvolution (ComplexAmplitude ca, double distance, bool automaticInputFieldSampling, double accuracyFactor, VectorD inputFieldSamplingDistance)
 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 can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The ComplexAmplitude ca is changed during the propagation. More...
 
static ComplexAmplitude RayleighSommerfeldConvolution (ComplexAmplitude ca, double distance, Complex n, bool automaticInputFieldSampling, double accuracyFactor, VectorD inputFieldSamplingDistance, bool automaticOutputFieldSizeShape, double outputFieldSizeFactor, VectorD outputFieldFieldSize, BasicParameter.eApertureShape outputFieldShape, double outputFieldBorderWidth, bool automaticOutputFieldSampling, double outputFieldSamplingFactor, int outputFieldEmbedFrameWidth, SamplingParameters outputFieldSamplingParameters, out bool areNumericalErrors)
 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 can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The ComplexAmplitude ca is changed during the propagation. More...
 
static ComplexAmplitude RayleighSommerfeldSummation (ComplexAmplitude ca, VectorD resultLateralOffset, double distance, bool automaticInputFieldSampling, double accuracyFactor, SamplingParameters inputFieldSamplingParameters, bool automaticOutputFieldSizeShape, double outputFieldSizeFactor, VectorD outputFieldFieldSize, BasicParameter.eApertureShape outputFieldShape, double outputFieldBorderWidth, bool automaticOutputFieldSampling, double outputFieldSamplingFactor, int outputFieldEmbedFrameWidth, SamplingParameters outputFieldSamplingParameters, Complex n, out Boolean areSamplingProblems)
 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 ComplexAmplitude ca is changed during the propagation. The function ignores present WaveParameters. Because of this additional numerical errors may occure during the propagation. Use areSamplingProblems to check for numerical errors before propagating. More...
 
static ComplexAmplitude Spw (ComplexAmplitude ca, double distance, bool automaticInputFieldSampling, double accuracyFactor, SamplingParameters inputFieldSamplingParameters)
 Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function can increase the number of sampling points to avoid numerical errors. The minimum embedding of the complex amplitude is determined by Globals.SamplingFactor. The function uses the WaveParameters of the object to provide a optimal propagation. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist. More...
 
static ComplexAmplitude Spw (ComplexAmplitude ca, double distance, Complex n, bool automaticInputFieldSampling, double accuracyFactor, SamplingParameters inputFieldSamplingParameters, bool automaticOutputFieldSizeShape, double outputFieldSizeFactor, VectorD outputFieldFieldSize, BasicParameter.eApertureShape outputFieldShape, double outputFieldBorderWidth, bool automaticOutputFieldSampling, double outputFieldSamplingFactor, int outputFieldEmbedFrameWidth, SamplingParameters outputFieldSamplingParameters, out bool areNumericalErrors)
 [AI] Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function modifies the sampling parameters of the input field specified in the inputFieldSamplingParameters parameter before the propagation in order to reduce numerical errors. The modification can be done by user or automatically Additionally the user may specify the output field sampling parameters and the field size, shape and broder width of the output field. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist. More...
 
static ComplexAmplitude Spw (ComplexAmplitude ca, double distance, Complex n, double accuracyFactor, out bool areNumericalErrors)
 Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function can increase the number of sampling points to avoid numerical errors. The minimum embedding of the complex amplitude is determined by Globals.SamplingFactor. The function uses the WaveParameters of the object to provide a optimal propagation. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist. More...
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class contains a number of static member functions performing well-known elementary wave propagation operators. In difference to the ElementaryPropagationOperators class all functions change number of sampling points and the sampling distance automatically the number of sampling points and the sampling distance to avoid numerical errors. Additionally some functions are provided that can estimate the necessary number of sampling points and the sampling distance to avoid numerical errors.

Member Function Documentation

◆ FarFieldPropagation() [1/2]

static ComplexAmplitude FarFieldPropagation ( ComplexAmplitude  ca,
double  distance,
Complex  n,
double  accuracyFactor,
bool  automaticOutputFieldSizeShape,
double  outputFieldSizeFactor,
VectorD  outputFieldFieldSize,
BasicParameter.eApertureShape  outputFieldShape,
double  outputFieldBorderWidth,
bool  automaticOutputFieldSampling,
double  outputFieldSamplingFactor,
int  outputFieldEmbedFrameWidth,
SamplingParameters  outputFieldSamplingParameters,
out bool  areNumericalErrors,
InterpolationMethod  interpolationMethod,
FarFieldPropagationMode  farFieldPropagationMode,
bool  isParaxialApproximation,
SpreadSheetObjectUsedIn  usedIn 
)
static

Performs a far field propagation without paraxial approximation. The far field approximation of the Rayleigh-Sommerfeld propagation is used. Just for paraxial wave the far field is the Fourier Transform of the waist of the wave. In general it is the Fourier Transform plus a coordinate transformation. If a propagation between two far field points is performs it is assumed that the SphericalPhaseRadius information is equal to the distance from the waist.

Parameters
caComplexAmplitude to propagate.
distancePropagation distance.
nComplex refractive index of media in which propagation is applied.
accuracyFactorThe accuracy factor. A larger factor leads to more accurate results but to higher computational effort.
automaticOutputFieldSizeShapeIf true the output field size, shape and border width are determined by VirtualLab automatically. Otherwise the values can be specified using the outputFieldSize, outputFieldShape and outputFieldBorderWidth parameters.
outputFieldSizeFactorIn case of automaticOutputFieldSizeShape VirtualLab estimates the correct size of the propagated field. The resulting value is multiplied by this factor.
outputFieldFieldSizeThe diameter of the output field in meters. The diameter is measured before the beginning of the border decay of amplitude.
outputFieldShapeThe shape of the field.
outputFieldBorderWidthThe width of the borders of the field relative to the field diameter. The border width is measured between the begin of the amplitude decay and the zero position of the field.
automaticOutputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the output field to minimize numerical errors. Additionally the user may use the outputFieldSamplingFactor to additionally increase or reduce the number of sampling points. The array size of the output field will be calculated from the estimation of the field size multiplied by the outputFieldSizeFactor plus the outputFieldBorderWidth multiplied by the field size plus the embedFrameWidth multiplied by the sampling distance. If automaticOutputFieldSampling is false the outputFieldSamplingParameters will be used.
outputFieldSamplingFactorIf automaticOutputFieldSampling is true VirtualLab estimates the number of sampling points of the output field and multiplies the value by outputFieldSamplingFactor.
outputFieldEmbedFrameWidthIf automaticOutputFieldSampling is false additionally a frame with dark pixels (amplitude equals zero) around the field can be added. This embed frame is required since the continuous field distribution can be reconstructed using a sinc interpolation. This interpolation will introduce small sized loops that are larger than the numerical field size. To take this side loops at least partially into account during the interpolation this embed frame is required. The extension of this frame in sampling points can be specified by this parameter.
outputFieldSamplingParametersThe sampling parameters of the output field. Normally these sampling parameters should be equal to the inputFieldSamplingParameters but the use may change it to any other value.
areNumericalErrorsReturns true if the user defined settings of the numerical accuracy parameter may caused numerical errors during the propagation. This is typically the case if numericalAccuracyFactor is smaller than one.
interpolationMethodA coordinate transform is performed during the propagation. To do this an interpolation is necessary. This parameters specifies the used point wise interpolation method.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
isParaxialApproximationIf true the far field propagation will be calculated in non-paraxial approximation (Fraunhofer propagation).
usedInTODO
Returns
Result of operation.

◆ FarFieldPropagation() [2/2]

static HarmonicFieldsSet FarFieldPropagation ( HarmonicFieldsSet  hfs,
double  distance,
double  accuracyFactor,
bool  automaticOutputFieldSizeShape,
double  outputFieldSizeFactor,
VectorD  outputFieldFieldSize,
BasicParameter.eApertureShape  outputFieldShape,
double  outputFieldBorderWidth,
bool  automaticOutputFieldSampling,
double  outputFieldSamplingFactor,
int  outputFieldEmbedFrameWidth,
SamplingParameters  outputFieldSamplingParameters,
out bool  areNumericalErrors,
InterpolationMethod  interpolationMethod,
FarFieldPropagationMode  farFieldPropagationMode,
bool  isParaxialApproximation,
SpreadSheetObjectUsedIn  usedIn 
)
static

Performs a far field propagation without paraxial approximation. The far field approximation of the Rayleigh-Sommerfeld propagation is used. Just for paraxial wave the far field is the Fourier Transform of the waist of the wave. In general it is the Fourier Transform plus a coordinate transformation. If a propagation between two far field points is performs it is assumed that the SphericalPhaseRadius information is equal to the distance from the waist.

Parameters
hfsHarmonicFieldsSet to propagate.
distancePropagation distance.
accuracyFactorThe accuracy factor. A larger factor leads to more accurate results but to higher computational effort.
automaticOutputFieldSizeShapeIf true the output field size, shape and border width are determined by VirtualLab automatically. Otherwise the values can be specified using the outputFieldSize, outputFieldShape and outputFieldBorderWidth parameters.
outputFieldSizeFactorIn case of automaticOutputFieldSizeShape VirtualLab estimates the correct size of the propagated field. The resulting value is multiplied by this factor.
outputFieldFieldSizeThe diameter of the output field in meters. The diameter is measured before the beginning of the border decay of amplitude.
outputFieldShapeThe shape of the field.
outputFieldBorderWidthThe width of the borders of the field relative to the field diameter. The border width is measured between the begin of the amplitude decay and the zero position of the field.
automaticOutputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the output field to minimize numerical errors. Additionally the user may use the outputFieldSamplingFactor to additionally increase or reduce the number of sampling points. The array size of the output field will be calculated from the estimation of the field size multiplied by the outputFieldSizeFactor plus the outputFieldBorderWidth multiplied by the field size plus the embedFrameWidth multiplied by the sampling distance. If automaticOutputFieldSampling is false the outputFieldSamplingParameters will be used.
outputFieldSamplingFactorIf automaticOutputFieldSampling is true VirtualLab estimates the number of sampling points of the output field and multiplies the value by outputFieldSamplingFactor.
outputFieldEmbedFrameWidthIf automaticOutputFieldSampling is false additionally a frame with dark pixels (amplitude equals zero) around the field can be added. This embed frame is required since the continuous field distribution can be reconstructed using a sinc interpolation. This interpolation will introduce small sized loops that are larger than the numerical field size. To take this side loops at least partially into account during the interpolation this embed frame is required. The extension of this frame in sampling points can be specified by this parameter.
outputFieldSamplingParametersThe sampling parameters of the output field. Normally these sampling parameters should be equal to the inputFieldSamplingParameters but the use may change it to any other value.
areNumericalErrorsReturns true if the user defined settings of the numerical accuracy parameter may caused numerical errors during the propagation. This is typically the case if numericalAccuracyFactor is smaller than one.
interpolationMethodA coordinate transform is performed during the propagation. To do this an interpolation is necessary. This parameters specifies the used point wise interpolation method.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
isParaxialApproximationIf true the far field propagation will be calculated in non-paraxial approximation (Fraunhofer propagation).
usedInTODO
Returns
Result of operation.

◆ Frt() [1/4]

static ComplexAmplitude Frt ( ComplexAmplitude  ca,
double  distance,
bool  automaticInputFieldSampling,
double  accuracyFactor,
VectorD  inputFieldSamplingDistance 
)
static

Propagates given ComplexAmplitude by the specified distance by computing the Fresnel transform. The function can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The function uses the WaveParameters of the object to perform an optimal propagation. If no WaveParameters is present function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance -SphericalPhaseRadius and a Fresnel Propagation by a distance SphericalPhaseRadius + distance to reduce numerical errors.

Parameters
caComplexAmplitude to be propagated.
distancePropagation distance in meters.
automaticInputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the input field to minimize numerical errors. Additionally the user may use the accuracyFactor to additionally increase or reduce the number of sampling points and array size. If automaticInputFieldSampling is false the inputFieldSamplingParameters will be used to modify the sampling parameters of the input field before the propagation.
accuracyFactorThe accuracy factor used in case of automatic input field sampling.
inputFieldSamplingDistanceThe function modifies the sampling parameters of the input field before the propagation to the values specified here. This parameter allows to modify the input field sampling distance to user defined values. To get an estimation for input field sampling parameters please use the GetSpwSamplingParameters function.
Returns
Result of operation.

◆ Frt() [2/4]

static ComplexAmplitude Frt ( ComplexAmplitude  ca,
double  distance,
Complex  n,
bool  automaticInputFieldSampling,
double  inputFieldSamplingFactor,
VectorD  inputFieldSamplingDistance,
bool  automaticOutputFieldSizeShape,
double  outputFieldSizeFactor,
VectorD  outputFieldFieldSize,
BasicParameter.eApertureShape  outputFieldShape,
double  outputFieldBorderWidth,
bool  automaticOutputFieldSampling,
double  outputFieldSamplingFactor,
int  outputFieldEmbedFrameWidth,
SamplingParameters  outputFieldSamplingParameters,
out bool  areNumericalErrors 
)
static

[AI] Propagates the given ComplexAmplitude by the specified distance by computing the Fresnel propagation. The function modifies the sampling distance of the input field specified in the inputFieldSamplingDistance parameter before the propagation in order to reduce numerical errors. The modification can be done by user or automatically Additionally the user may specify the output field sampling parameters and the field size, shape and broder width of the output field. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance \(-SphericalPhaseRadius\) and a Fresnel Propagation by a distance \(SphericalPhaseRadius + distance\) to reduce numerical errors.

Parameters
caThe field to propagate.
distanceThe propagation distance.
nThe refractive index of the homogeneous medium in that the field propagates.
automaticInputFieldSamplingEnables automatic determination of the required number of sampling points and sampling distance of the input field to minimize numerical errors. Additionally the user may use the inputFieldSamplingFactor to additionally increase or reduce the number of sampling points per array size. If automaticInputFieldSampling is false the inputFieldSamplingDistance will be used to modify the sampling parameters of the input field before the propagation.
inputFieldSamplingFactorIn case of automaticInputFieldSampling VirtualLab estimates the required number of sampling points per array size to minimize numerical errors. The resulting estimation of the number of sampling points will be mulitplied by this factor while the array siez is kept constant.
inputFieldSamplingDistanceThe function modifies the sampling distance of the input field before the propagation to the value specified here. This parameter allows to modify the input field sampling distance to user defined values. To get an estimation for input field sampling distance please use the GetFrtSamplingParameters function.
automaticOutputFieldSizeShapeIf true the output field size, shape and border width are determined by VirtualLab automatically. Otherwise the values can be specified using the outputFieldSize, outputFieldShape and outputFieldBorderWidth parameters.
outputFieldSizeFactorIn case of automaticOutputFieldSizeShape VirtualLab estimates the correct size of the propagated field. The resulting value is multiplied by this factor.
outputFieldFieldSizeThe diameter of the output field in meters. The diameter is measured before the beginning of the border decay of amplitude.
outputFieldShapeThe shape of the field.
outputFieldBorderWidthThe width of the borders of the field relative to the field diameter. The border width is measured between the begin of the amplitude decay and the zero position of the field.
automaticOutputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the output field to minimize numerical errors. Additionally the user may use the outputFieldSamplingFactor to additionally increase or reduce the number of sampling points. The array size of the output field will be calculated from the estimation of the field size multiplied by the outputFieldSizeFactor plus the outputFieldBorderWidth multiplied by the field size plus the embedFrameWidth multiplid by the sampling distance. If automaticOutputFieldSampling is false the outputFieldSamplingParameters will be used.
outputFieldSamplingFactorIf automaticOutputFieldSampling is true VirtualLab estimates the number of sampling points of the output field and multiplies the value by outputFieldSamplingFactor.
outputFieldEmbedFrameWidthIf automaticOutputFieldSampling is false additionally a frame with dark pixels (amplitude equals zero) around the field can be added. This embed frame is required since the continuous field distribution can be reconstructed using a sinc interpolation. This interpolation will introduce small sized loops that are larger than the numerical field size. To take this side loops at least partially into account during the interpolation this embed frame is required. The extension of this frame in sampling points can be specified by this parameter.
outputFieldSamplingParametersThe sampling parameters of the output field. Normally these sampling parameters should be equal to the inputFieldSamplingParameters but the use may change it to any other value.
areNumericalErrorsTrue if the user defined settings of the input field sampling parameters may caused numerical errors during the propagation. This parameter is just set if automaticInputFieldSampling is false.
Returns
The propagated field.

◆ Frt() [3/4]

static ComplexAmplitude Frt ( ComplexAmplitude  ca,
double  distance,
Complex  n,
double  accuracyFactor,
out bool  areNumericalErrors 
)
static

Propagates given ComplexAmplitude by the specified distance by computing the Fresnel transform. The function can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The function uses the WaveParameters of the object to perform an optimal propagation. If no WaveParameters is present function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance -SphericalPhaseRadius and a Fresnel Propagation by a distance SphericalPhaseRadius + distance to reduce numerical errors. The output field size of the propagated field is estimated depending on the WaveParameters.

Parameters
caComplexAmplitude to be propagated.
distancePropagation distance in meters.
nComplex refractive index of media in which propagation is applied.
accuracyFactorVirtualLab estimates and modifies the number of sampling points of the input field before the propagation in order to reduce numerical errors. The estimated number of sampling points is multiplied by this factor to to increase or decrease numerical accuracy.
areNumericalErrorsTrue if numerical errors may appear in the propagated field. This warning appears if samplingFactor is smaller than one.
Returns
Result of operation.

◆ Frt() [4/4]

static ComplexAmplitude Frt ( ComplexAmplitude  ca,
double  distance,
Complex  n,
VectorD  outputFieldSize,
double  accuracyFactor,
out bool  areNumericalErrors 
)
static

Propagates given ComplexAmplitude by the specified distance by computing the Fresnel transform. The function can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The function uses the WaveParameters of the object to perform an optimal propagation. If no WaveParameters is present function assumes that the harmonic field component is in the waist. Is a spherical phase factor is present the function tries to perform a Fresnel Propagation to the waist by a distance -SphericalPhaseRadius and a Fresnel Propagation by a distance SphericalPhaseRadius + distance to reduce numerical errors. The desired output field size of the propagated field must be specified by the user.

Parameters
caComplexAmplitude to be propagated.
distancePropagation distance in meters.
nComplex refractive index of media in which propagation is applied.
outputFieldSizeThe diameter of the output field of the propagation. It should be large enough to contain at least 99% of the power of the output field. the output field diameter is used to control the simulation accuracy of the propagation.
accuracyFactorVirtualLab estimates and modifies the number of sampling points of the input field before the propagation in order to reduce numerical errors. The estimated number of sampling points is multiplied by this factor to to increase or decrease numerical accuracy.
areNumericalErrorsTrue if numerical errors may appear in the propagated field. This warning appears if samplingFactor is smaller than one.
Returns
Result of operation.

◆ GetFarFieldPropagationArraySize()

static VectorD GetFarFieldPropagationArraySize ( ComplexAmplitude  ca,
double  distance,
Complex  n,
FarFieldPropagationMode  farFieldPropagationMode,
bool  isParaxialApproximation 
)
static

Calculates the optimal sampling distance and number of sampling points of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20.

Parameters
caComplexAmplitude to propagate.
distancePropagation distance.
nComplex refractive index of media in which propagation is applied.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
isParaxialApproximationIf true the far field propagation will be calculated inparaxial approximation (Fraunhofer propagation).
Returns
The sampling distance and the number of sampling points of the propagated field.

◆ GetFarFieldPropagationSamplingDistance() [1/2]

static VectorD GetFarFieldPropagationSamplingDistance ( ComplexAmplitude  ca,
double  distance,
Complex  n,
FarFieldPropagationMode  farFieldPropagationMode 
)
static

Calculates the optimal sampling distance of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20.

Parameters
caComplexAmplitude to propagate.
distancePropagation distance.
nComplex refractive index of media in which propagation is applied.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
Returns
The sampling distance of the propagated field.

◆ GetFarFieldPropagationSamplingDistance() [2/2]

static VectorD GetFarFieldPropagationSamplingDistance ( ComplexAmplitude  ca,
double  distance,
Complex  n,
FarFieldPropagationMode  farFieldPropagationMode,
bool  isParaxialApproximation 
)
static

Calculates the optimal sampling distance of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20.

Parameters
caComplexAmplitude to propagate.
distancePropagation distance.
nComplex refractive index of media in which propagation is applied.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
isParaxialApproximationIf true the far field propagation will be calculated inparaxial approximation (Fraunhofer propagation).
Returns
The sampling distance of the propagated field.

◆ GetFarFieldPropagationSamplingParameters() [1/3]

static SamplingParameters GetFarFieldPropagationSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n,
FarFieldPropagationMode  farFieldPropagationMode,
bool  isParaxialApproximation 
)
static

Return the outpuf field sampling parameters of the non paraxial far field propagation.

Parameters
caThe complex amplitude to propagate.
distancePropagation distance.
nThe refractive index of the mediuk containing the wave.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
isParaxialApproximationIf true the far field propagation will be calculated inparaxial approximation (Fraunhofer propagation).
Returns
The sampling parameters of the output field.

◆ GetFarFieldPropagationSamplingParameters() [2/3]

static SamplingParameters GetFarFieldPropagationSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n,
VectorD  diameterOutputField,
FarFieldPropagationMode  farFieldPropagationMode 
)
static

Calculates the optimal sampling distance and number of sampling points of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20.

Parameters
caComplexAmplitude to propagate.
distancePropagation distance.
nComplex refractive index of media in which propagation is applied.
diameterOutputFieldThe diameter of the field in the output plane.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
Returns
The sampling distance and the number of sampling points of the propagated field.

◆ GetFarFieldPropagationSamplingParameters() [3/3]

static SamplingParameters GetFarFieldPropagationSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n,
VectorD  diameterOutputField,
FarFieldPropagationMode  farFieldPropagationMode,
bool  isParaxialApproximation 
)
static

Calculates the optimal sampling distance and number of sampling points of the propagated field. The minimum number of sampling points per output plane diameter is 20 x 20.

Parameters
caComplexAmplitude to propagate.
distancePropagation distance.
nComplex refractive index of media in which propagation is applied.
diameterOutputFieldThe diameter of the field in the output plane.
farFieldPropagationModeThe far field propagation mode tells the function if a propagation from the waist to the far field or vise versa should be performed.
isParaxialApproximationIf true the far field propagation will be calculated inparaxial approximation (Fraunhofer propagation).
Returns
The sampling distance and the number of sampling points of the propagated field.

◆ GetFrtInputFieldSamplingParametersFromOutputFieldSize() [1/2]

static SamplingParameters GetFrtInputFieldSamplingParametersFromOutputFieldSize ( ComplexAmplitude  ca,
double  distance,
Complex  n,
VectorD  outputFieldSize,
out bool  useBackToWaist 
)
static

Estimates the sampling parameters of the field to propagate so that the output field generated by the FRT will have the diameter as specified by the outputFieldSize parameter. In order to have small numerical errors of the simulation result the outputFieldSize should be so large that the most of the power (typically >99.99%) are included in this area. If a smaller output field size will be selected significant numerical errors may appear. The propagation can be done in a one step or two step process. In case of a one step propagation the propagation is directly done from the plane containing the complex amplitude into the target plane. The two step process tries to propagate back in the source plane of the spherical phase and to perform a second propagation step into the target plane. The two step process can be used if a spherical phase in present and if the required computer memory will be smaller as in case of a one step process. If the returned input field sampling parameters differ from the sampling parameters of the ComplexAmplitude to propagate an interpolation is required. The two step requires probably a further interpolation after the first interpolation step.

Parameters
caComplex Amplitude to propagate by FRT.
distancePropagation distance of the FRT.
nRefractive index of the medium containing the complex amplitude.
outputFieldSizeDesired diameter of the propagated field (output field). Please take into account that this parameter should give an good estimation of the physical field size of the propagated field.
useBackToWaistIf true a two step propagation should be used (see above)
Returns
The sampling parameters of the field to propagated. If these sampling parameters differ from the parameters of the ca an interpolation must be done before the start of the FRT propagation.

◆ GetFrtInputFieldSamplingParametersFromOutputFieldSize() [2/2]

static void GetFrtInputFieldSamplingParametersFromOutputFieldSize ( SamplingParameters  fieldSamplingParameters,
bool  hasSphericalPhase,
double  sphericalPhaseRadius,
double  wavelength,
double  distance,
Complex  n,
VectorD  outputFieldSize,
double  accuracyFactor,
out bool  perform2StepPropagation,
out SamplingParameters  samplingParametersStep1,
out SamplingParameters  samplingParametersStep2 
)
static

Estimates the sampling parameters of the field to propagate so that the output field generated by the FRT will have the diameter as specified by the outputFieldSize parameter. In order to have small numerical errors of the simulation result the outputFieldSize should be so large that the most of the power (typically >99.99%) are included in this area. If a smaller output field size will be selected significant numerical errors may appear. The propagation can be done in a one step or two step process. In case of a one step propagation the propagation is directly done from the plane containing the complex amplitude into the target plane. The two step process tries to propagate back in the source plane of the spherical phase and to perform a second propagation step into the target plane. The two step process can be used if a spherical phase in present and if the required computer memory will be smaller as in case of a one step process. If the returned input field sampling parameters differ from the sampling parameters of the ComplexAmplitude to propagate an interpolation is required. The two step requires probably a further interpolation after the first interpolation step.

Parameters
fieldSamplingParametersThe sampling parameters of the complex amplitude to propagate.
hasSphericalPhaseIndicates if the complex amplitude to propagate contains a spherical phase radius.
sphericalPhaseRadiusThe spherical phase radius of the complex amplitude to propagate.
wavelengthThe wavelength of the complex amplitude to propagate.
distanceThe propagation distance. This means the distance from the plane containing the complex amplitude to propagate to the target plane.
nThe complex refractive index of the homogeneous medium containing the complex amplitude to propagate.
outputFieldSizeThe desired diameter of the output field. The output field size should by huge enough so that it will contain more than 99% of the power of the field. Otherwise numerical errors may appear.
accuracyFactorThe accuracy factor is just used for the two step propagation (see above). For the back propagation into the source plane of the spherical phase the field size in this plane must be estimated. The estimated field size will be multiplied by this accuracy factor.
perform2StepPropagationIf true a two step propagation should be used (see above).
samplingParametersStep1The required sampling parameters of the complex amplitude of the first propagations step. The complex amplitude to propagate must be interpolated to this sampling parameters before starting the first propagation step.
samplingParametersStep2The required sampling parameters of the complex amplitude of the second propagations step. The resulting complex amplitude after the first propagation step must be interpolated to this sampling parameters before starting the second step. If perform2StepPropagation is false no second propagation step is required and null will be returned.

◆ GetFrtSamplingParameters() [1/2]

static SamplingParameters GetFrtSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n 
)
static

Calculates the samplingparameters for the Fresnel Propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points.

Parameters
caComplex amplitude to propagate.
distancePropagation distance.
nRefractive index of the homogeneous medium.
Returns
Sampling parameters.

◆ GetFrtSamplingParameters() [2/2]

static SamplingParameters GetFrtSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n,
double  samplingFactor 
)
static

Calculates the samplingparameters for the Fresnel Propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points.

Parameters
caComplex amplitude to propagate.
distancePropagation distance.
nRefractive index of the homogeneous medium.
samplingFactorVirtualLab estimates and modifies the number of sampling points and sampling distance of the input field before the propagation in order to reduce numerical errors. The estimated number of sampling points is multiplied by this factor to to increase or decrease numerical accuracy.
Returns
Sampling parameters.

◆ GetRayleighSommerfeldConvolutionSamplingParameters() [1/2]

static SamplingParameters GetRayleighSommerfeldConvolutionSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n 
)
static

Calculates the sampling parameters for the Rayleigh-Sommerfeld Convolution propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points. The function takes into account possible spherical phase factors.

Parameters
caComplex amplitude to propagate.
distancePropagation distance.
nRefractive index of the homogeneous medium.
Returns
Sampling parameters.

◆ GetRayleighSommerfeldConvolutionSamplingParameters() [2/2]

static SamplingParameters GetRayleighSommerfeldConvolutionSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n,
double  accuracyFactor 
)
static

Calculates the sampling parameters for the Rayleigh-Sommerfeld Convolution propagation to avoid numerical errors during the propagation. The function can decrease the sampling distance and increase the number of sampling points. The function takes into account possible spherical phase factors.

Parameters
caComplex amplitude to propagate.
distancePropagation distance.
nRefractive index of the homogeneous medium.
accuracyFactorVirtualLab estimates the numerical parameters of the input field to propagate in order to reduce numerical errors. The estimated number of sampling points is multiplied by this factor to to increase or decrease numerical accuracy.
Returns
Sampling parameters.

◆ GetRayleighSommerfeldSummationSamplingDistance()

static VectorD GetRayleighSommerfeldSummationSamplingDistance ( ComplexAmplitude  ca,
double  distance,
Complex  n 
)
static

Calculates the optimal sampling distance of the propagated field.

Parameters
caComplexAmplitude to propagate.
distancePropagation distance.
nComplex refractive index of media in which propagation is applied.
Returns
Result of operation.

◆ GetSpwInputFieldSamplingParameters()

static SamplingParameters GetSpwInputFieldSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n,
double  accuracyFactor 
)
static

Calculates the sampling parameters of the input field to propagate by the spectrum of plane waves propagation to avoid numerical errors during the propagation. The function can increase the number of sampling points and can decrease the sampling distance in case of a present spherical phase factor. The sampling parameters return the width (sampling points mulitplied by sampling distance divided by 2) of the wave after the SPW propagation. Is the width of the returned sampling parameters larger than the width of the ca object embed the field before the propagation. Is the width of the sampling parameters smaler than the width of the ca obect first propagate the field and then extract the necessary sampling points. The function uses the WaveParameters (if present) to approximate the changing of the wave width during the propagation. Is the HasWaveParameters property of the ComplexAmplitude object false then the function assumes the the object is in the waist and sets the WaveParameters.

Parameters
caComplex amplitude component to propagate. Has to be a harmonic field component.
distancePropagation distance.
nRefractive index of the homogeneous medium.
accuracyFactorThe accuracy factor.
Returns
Sampling parameters.

◆ GetSpwInputFieldSamplingParametersFromOutputFieldSize()

static SamplingParameters GetSpwInputFieldSamplingParametersFromOutputFieldSize ( ComplexAmplitude  ca,
double  distance,
Complex  n,
VectorD  outputFieldSize,
double  accuracyFactor 
)
static

Estimates the sampling parameters of the field to propagate so that the output field generated by the SPW will have the diameter as specified by the outputFieldSize parameter. In order to have small numerical errors of the simulation result the outputFieldSize should be so large that the most of the power (typically >99.99%) are included in this area. If a smaller output field size will be selected significant numerical errors may appear. If the returned input field sampling parameters differ from the sampling parameters Complex Amplitude to propagate an interpolation is required.

Parameters
caComplex Amplitude to propagate by SPW.
distancePropagation distance of the SPW.
nRefractive index of the medium containing the complex amplitude.
outputFieldSizeDesired diameter of the propagated field (output field). Please take into account that this parameter should give an good estimation of the physical field size of the propagated field.
accuracyFactorIncreasing this factor to values larger than one will lead to more accurate simulation results during SPW propagation on the cost of memory and computational time. This parameter has just an effect if a spherical phase radius is set.
Returns
The sampling parameters of the field to propagated. If these sampling parameters differ from the parameters of the ca an interpolation must be done before the start of the FRT propagation.

◆ GetSpwOutputFieldSamplingParameters()

static SamplingParameters GetSpwOutputFieldSamplingParameters ( ComplexAmplitude  ca,
double  distance,
Complex  n,
double  accuracyFactor 
)
static

Calculates the sampling parameters of the output field for the spectrum of plane waves propagation to avoid numerical errors during the propagation. The function can increase the number of sampling points and can decrease the sampling distance in case of a present spherical phase factor. The sampling parameters return the width (sampling points mulitplied by sampling distance divided by 2) of the wave after the SPW propagation. Is the width of the returned sampling parameters larger than the width of the ca object embed the field before the propagation. Is the width of the sampling parameters smaler than the width of the ca obect first propagate the field and then extract the necessary sampling points. The function uses the WaveParameters (if present) to approximate the changing of the wave width during the propagation. Is the HasWaveParameters property of the ComplexAmplitude object false then the function assumes the the object is in the waist and sets the WaveParameters.

Parameters
caComplex amplitude component to propagate. Has to be a harmonic field component.
distancePropagation distance.
nRefractive index of the homogeneous medium.
accuracyFactorThe accuracy factor.
Returns
Sampling parameters.

◆ RayleighSommerfeldConvolution() [1/2]

static ComplexAmplitude RayleighSommerfeldConvolution ( ComplexAmplitude  ca,
double  distance,
bool  automaticInputFieldSampling,
double  accuracyFactor,
VectorD  inputFieldSamplingDistance 
)
static

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 can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The ComplexAmplitude ca is changed during the propagation.

Parameters
caComplexAmplitude to be propagated.
distancePropagation distance in meters.
automaticInputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the input field to minimize numerical errors. Additionally the user may use the accuracyFactor to additionally increase or reduce the number of sampling points and array size. If automaticInputFieldSampling is false the inputFieldSamplingParameters will be used to modify the sampling parameters of the input field before the propagation.
accuracyFactorThe accuracy factor used in case of automatic input field sampling.
inputFieldSamplingDistanceThe function modifies the sampling parameters of the input field before the propagation to the values specified here. This parameter allows to modify the input field sampling distance to user defined values. To get an estimation for input field sampling parameters please use the GetSpwSamplingParameters function.
Returns
Result of operation.

◆ RayleighSommerfeldConvolution() [2/2]

static ComplexAmplitude RayleighSommerfeldConvolution ( ComplexAmplitude  ca,
double  distance,
Complex  n,
bool  automaticInputFieldSampling,
double  accuracyFactor,
VectorD  inputFieldSamplingDistance,
bool  automaticOutputFieldSizeShape,
double  outputFieldSizeFactor,
VectorD  outputFieldFieldSize,
BasicParameter.eApertureShape  outputFieldShape,
double  outputFieldBorderWidth,
bool  automaticOutputFieldSampling,
double  outputFieldSamplingFactor,
int  outputFieldEmbedFrameWidth,
SamplingParameters  outputFieldSamplingParameters,
out bool  areNumericalErrors 
)
static

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 can interpolate the complex amplitude by sinc-interpolation to avoid numerical errors. The ComplexAmplitude ca is changed during the propagation.

Parameters
caComplexAmplitude to be propagated.
distancePropagation distance in meters.
nComplex refractive index of media in which propagation is applied.
automaticInputFieldSamplingif set to true [automatic input field sampling].
accuracyFactorThe accuracy factor. A larger factor leads to more accurate results but to higher computational effort.
inputFieldSamplingDistanceThe input field sampling distance.
automaticOutputFieldSizeShapeIf true the output field size, shape and border width are determined by VirtualLab automatically. Otherwise the values can be specified using the outputFieldSize, outputFieldShape and outputFieldBorderWidth parameters.
outputFieldSizeFactorIn case of automaticOutputFieldSizeShape VirtualLab estimates the correct size of the propagated field. The resulting value is multiplied by this factor.
outputFieldFieldSizeThe diameter of the output field in meters. The diameter is measured before the beginning of the border decay of amplitude.
outputFieldShapeThe shape of the field.
outputFieldBorderWidthThe width of the borders of the field relative to the field diameter. The border width is measured between the begin of the amplitude decay and the zero position of the field.
automaticOutputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the output field to minimize numerical errors. Additionally the user may use the outputFieldSamplingFactor to additionally increase or reduce the number of sampling points. The array size of the output field will be calculated from the estimation of the field size multiplied by the outputFieldSizeFactor plus the outputFieldBorderWidth multiplied by the field size plus the embedFrameWidth multiplid by the sampling distance. If automaticOutputFieldSampling is false the outputFieldSamplingParameters will be used.
outputFieldSamplingFactorIf automaticOutputFieldSampling is true VirtualLab estimates the number of sampling points of the output field and multiplies the value by outputFieldSamplingFactor.
outputFieldEmbedFrameWidthIf automaticOutputFieldSampling is false additionally a frame with dark pixels (amplitude equals zero) around the field can be added. This embed frame is required since the continuous field distribution can be reconstructed using a sinc interpolation. This interpolation will introduce small sized loops that are larger than the numerical field size. To take this side loops at least partially into account during the interpolation this embed frame is required. The extension of this frame in sampling points can be specified by this parameter.
outputFieldSamplingParametersThe sampling parameters of the output field. Normally these sampling parameters should be equal to the inputFieldSamplingParameters but the use may change it to any other value.
areNumericalErrorsReturns true if the user defined settings of the numerical accuracy parameter may caused numerical errors during the propagation. This is typically the case if numericalAccuracyFactor is smaller than one.
Returns
Result of operation.

◆ RayleighSommerfeldSummation()

static ComplexAmplitude RayleighSommerfeldSummation ( ComplexAmplitude  ca,
VectorD  resultLateralOffset,
double  distance,
bool  automaticInputFieldSampling,
double  accuracyFactor,
SamplingParameters  inputFieldSamplingParameters,
bool  automaticOutputFieldSizeShape,
double  outputFieldSizeFactor,
VectorD  outputFieldFieldSize,
BasicParameter.eApertureShape  outputFieldShape,
double  outputFieldBorderWidth,
bool  automaticOutputFieldSampling,
double  outputFieldSamplingFactor,
int  outputFieldEmbedFrameWidth,
SamplingParameters  outputFieldSamplingParameters,
Complex  n,
out Boolean  areSamplingProblems 
)
static

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 ComplexAmplitude ca is changed during the propagation. The function ignores present WaveParameters. Because of this additional numerical errors may occure during the propagation. Use areSamplingProblems to check for numerical errors before propagating.

Parameters
caComplexAmplitude to propagate.
resultLateralOffsetLateral offset of propagated field.
distancePropagation distance.
automaticInputFieldSamplingif set to true [automatic input field sampling].
accuracyFactorThe accuracy factor.
inputFieldSamplingParametersThe input field sampling parameters.
automaticOutputFieldSizeShapeIf true the output field size, shape and border width are determined by VirtualLab automatically. Otherwise the values can be specified using the outputFieldSize, outputFieldShape and outputFieldBorderWidth parameters.
outputFieldSizeFactorIn case of automaticOutputFieldSizeShape VirtualLab estimates the correct size of the propagated field. The resulting value is multiplied by this factor.
outputFieldFieldSizeThe diameter of the output field in meters. The diameter is measured before the beginning of the border decay of amplitude.
outputFieldShapeThe shape of the field.
outputFieldBorderWidthThe width of the borders of the field relative to the field diameter. The border width is measured between the beginn of the amplitude decay and the zero position of the field.
automaticOutputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the output field to minimize numerical errors. Additionally the user may use the outputFieldSamplingFactor to additionally increase or reduce the number of sampling points. The array size of the output field will be calculated from the estimation of the field size multiplied by the outputFieldSizeFactor plus the outputFieldBorderWidth multiplied by the field size plus the embedFrameWidth multiplid by the sampling distance. If automaticOutputFieldSampling is false the outputFieldSamplingParameters will be used.
outputFieldSamplingFactorIf automaticOutputFieldSampling is true VirtualLab estimates the number of sampling points of the output field and mulitplies the value by outputFieldSamplingFactor.
outputFieldEmbedFrameWidthIf automaticOutputFieldSampling is false additionally a frame with dark pixels (amplitude equals zero) around the field can be added. This embed frame is required since the continuous field distribution can be reconstructed using a sinc interpolation. This interpolation will introduce small sized loops that are larger than the numerical field size. To take this side loops at least partially into account during the interpolation this embed frame is required. The extension of this frame in sampling points can be specified by this parameter.
outputFieldSamplingParametersThe sampling parameters of the output field. Normally these sampling parameters should be equal to the inputFieldSamplingParameters but the use may change it to any other value.
nComplex refractive index of media in which propagation is applied.
areSamplingProblemsOut parameter indicating if sampling problems can occur in the propagated field.
Returns
Result of operation.

◆ Spw() [1/3]

static ComplexAmplitude Spw ( ComplexAmplitude  ca,
double  distance,
bool  automaticInputFieldSampling,
double  accuracyFactor,
SamplingParameters  inputFieldSamplingParameters 
)
static

Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function can increase the number of sampling points to avoid numerical errors. The minimum embedding of the complex amplitude is determined by Globals.SamplingFactor. The function uses the WaveParameters of the object to provide a optimal propagation. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist.

Parameters
caComplexAmplitude to be propagated.
distancePropagation distance in meters.
automaticInputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the input field to minimize numerical errors. Additionally the user may use the accuracyFactor to additionally increase or reduce the number of sampling points and array size. If automaticInputFieldSampling is false the inputFieldSamplingParameters will be used to modify the sampling parameters of the input field before the propagation.
accuracyFactorThe accuracy factor used in case of automatic input field sampling.
inputFieldSamplingParametersThe function modifies the sampling parameters of the input field before the propagation to the values specified here. This parameter allows to modify the input field sampling parameters to user defined values. To get an estimation for input field sampling parameters please use the GetSpwSamplingParameters function.
Returns
Result of operation.

◆ Spw() [2/3]

static ComplexAmplitude Spw ( ComplexAmplitude  ca,
double  distance,
Complex  n,
bool  automaticInputFieldSampling,
double  accuracyFactor,
SamplingParameters  inputFieldSamplingParameters,
bool  automaticOutputFieldSizeShape,
double  outputFieldSizeFactor,
VectorD  outputFieldFieldSize,
BasicParameter.eApertureShape  outputFieldShape,
double  outputFieldBorderWidth,
bool  automaticOutputFieldSampling,
double  outputFieldSamplingFactor,
int  outputFieldEmbedFrameWidth,
SamplingParameters  outputFieldSamplingParameters,
out bool  areNumericalErrors 
)
static

[AI] Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function modifies the sampling parameters of the input field specified in the inputFieldSamplingParameters parameter before the propagation in order to reduce numerical errors. The modification can be done by user or automatically Additionally the user may specify the output field sampling parameters and the field size, shape and broder width of the output field. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist.

Parameters
caThe field to propagate.
distanceThe propagation distance.
nThe refractive index of the homogeneous medium in that the field propagates.
automaticInputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the input field to minimize numerical errors. Additionally the user may use the inputFieldSamplingFactor and inputFieldArraySizeFactor to additionally increase or reduce the number of sampling points and array size. If automaticInputFieldSampling is false the inputFieldSamplingParameters will be used to modify the sampling parameters of the input field before the propagation.
accuracyFactorThe accuracy factor.
inputFieldSamplingParametersThe function modifies the sampling parameters of the input field before the propagation to the values specified here. This parameter allows to modify the input field sampling parameters to user defined values. To get an estimation for input field sampling parameters please use the GetSpwSamplingParameters function.
automaticOutputFieldSizeShapeIf true the output field size, shape and border width are determined by VirtualLab automatically. Otherwise the values can be specified using the outputFieldSize, outputFieldShape and outputFieldBorderWidth parameters.
outputFieldSizeFactorIn case of automaticOutputFieldSizeShape VirtualLab estimates the correct size of the propagated field. The resulting value is multiplied by this factor.
outputFieldFieldSizeThe diameter of the output field in meters. The diameter is measured before the beginning of the border decay of amplitude.
outputFieldShapeThe shape of the field.
outputFieldBorderWidthThe width of the borders of the field relative to the field diameter. The border width is measured between the begin of the amplitude decay and the zero position of the field.
automaticOutputFieldSamplingEnables automatic determination of the required array size and number of sampling points of the output field to minimize numerical errors. Additionally the user may use the outputFieldSamplingFactor to additionally increase or reduce the number of sampling points. The array size of the output field will be calculated from the estimation of the field size multiplied by the outputFieldSizeFactor plus the outputFieldBorderWidth multiplied by the field size plus the embedFrameWidth multiplid by the sampling distance. If automaticOutputFieldSampling is false the outputFieldSamplingParameters will be used.
outputFieldSamplingFactorIf automaticOutputFieldSampling is true VirtualLab estimates the number of sampling points of the output field and multiplies the value by outputFieldSamplingFactor.
outputFieldEmbedFrameWidthIf automaticOutputFieldSampling is false additionally a frame with dark pixels (amplitude equals zero) around the field can be added. This embed frame is required since the continuous field distribution can be reconstructed using a sinc interpolation. This interpolation will introduce small sized loops that are larger than the numerical field size. To take this side loops at least partially into account during the interpolation this embed frame is required. The extension of this frame in sampling points can be specified by this parameter.
outputFieldSamplingParametersThe sampling parameters of the output field. Normally these sampling parameters should be equal to the inputFieldSamplingParameters but the use may change it to any other value.
areNumericalErrorsTrue if the user defined settings of the input field sampling parameters may caused numerical errors during the propagation. This parameter is just set if automaticInputFieldSampling is false.
Returns
The propagated field.

◆ Spw() [3/3]

static ComplexAmplitude Spw ( ComplexAmplitude  ca,
double  distance,
Complex  n,
double  accuracyFactor,
out bool  areNumericalErrors 
)
static

Propagates the given ComplexAmplitude by the specified distance by computing the Angular Spectrum of Plane Waves. The function can increase the number of sampling points to avoid numerical errors. The minimum embedding of the complex amplitude is determined by Globals.SamplingFactor. The function uses the WaveParameters of the object to provide a optimal propagation. Is the HasWaveParameters property false the function assumes that the harmonic field component is in the waist.

Parameters
caComplexAmplitude to be propagated.
distancePropagation distance in meters.
nComplex refractive index of media in which propagation is applied.
accuracyFactorVirtualLab estimates and modifies array size and number of sampling points of the input field before the propagation in order to reduce numerical errors. The estimated number of sampling points and the estimated array size is multiplied by this factor to increase or decrease numerical accuracy.
areNumericalErrorsTrue if numerical errors may appear in the propagated field. This warning appears if arraySizeFactor or SamplingFactor is smaller than one.
Returns
Result of operation.