Table of Contents

Class AutomaticParaxialPropagation

Namespace
VirtualLabAPI.Core.FreeSpacePropagation
Assembly
VirtualLabAPI.dll

Class containing static functions for automatic propagation of ComplexAmplitude.

public class AutomaticParaxialPropagation
Inheritance
AutomaticParaxialPropagation
Inherited Members

Methods

AutomaticSpwFrt(ComplexAmplitude, double, Complex, double, bool, double, VectorD, eApertureShape, double, bool, double, int, SamplingParameters, out bool)

Automatic propagation of a ComplexAmplitude. For short propagation distances Spw(ComplexAmplitude, double, bool, double, SamplingParameters) is used. For long propagation distances Frt(ComplexAmplitude, double, bool, double, VectorD) is used.

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

Parameters

ca ComplexAmplitude

ComplexAmplitude to propagate.

distance double

Desired propagation distance.

n Complex

Complex refractive index of media in which propagation is applied.

numericalAccuracyFactor double

The accuracy factor. A larger factor leads to more accurate results but to higher computational effort.

automaticOutputFieldSizeShape bool

If 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.

outputFieldSizeFactor double

In case of automaticOutputFieldSizeShape VirtualLab estimates the correct size of the propagated field. The resulting value is multiplied by this factor.

outputFieldFieldSize VectorD

The diameter of the output field in meters. The diameter is measured before the beginning of the border decay of amplitude.

outputFieldShape BasicParameter.eApertureShape

The shape of the field.

outputFieldBorderWidth double

The 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.

automaticOutputFieldSampling bool

Enables 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.

outputFieldSamplingFactor double

If automaticOutputFieldSampling is true VirtualLab estimates the number of sampling points of the output field and multiplies the value by outputFieldSamplingFactor.

outputFieldEmbedFrameWidth int

If 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.

outputFieldSamplingParameters SamplingParameters

The 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.

areNumericalErrors bool

Returns 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

ComplexAmplitude

The propagated field.

AutomaticSpwFrt(ComplexAmplitude, double, Complex, double, out bool)

Automatic propagation of a ComplexAmplitude. For short propagation distances Spw(ComplexAmplitude, double, bool, double, SamplingParameters) is used. For long propagation distances Frt(ComplexAmplitude, double, bool, double, VectorD) is used.

public static ComplexAmplitude AutomaticSpwFrt(ComplexAmplitude ca, double distance, Complex n, double numericalAccuracyFactor, out bool areNumericalErrors)

Parameters

ca ComplexAmplitude

ComplexAmplitude to propagate.

distance double

Desired propagation distance.

n Complex

Complex refractive index of media in which propagation is applied.

numericalAccuracyFactor double

This value allows to increase the numerical accuracy (values larger one) or decrease the numerical accuracy (values smaller than one) of the simulation result on the costs simulation time and RAM memory.

areNumericalErrors bool

Returns true if the user-defined settings of the numerical accuracy parameter may have caused numerical errors during the propagation. This is typically the case if numericalAccuracyFactor is smaller than one.

Returns

ComplexAmplitude

Result of operation.

GetAutomaticSpwFrtOutputFieldSamplingParameters(ComplexAmplitude, double, Complex, double)

Calculates the sampling parameters of the output field of AutomaticSpwFrt(ComplexAmplitude, double, Complex, double, out bool) function without performing a propagation simulation.

public static SamplingParameters GetAutomaticSpwFrtOutputFieldSamplingParameters(ComplexAmplitude ca, double distance, Complex n, double numericalAccuracyFactor)

Parameters

ca ComplexAmplitude

ComplexAmplitude to propagate.

distance double

Desired propagation distance.

n Complex

Complex refracting index of media in which propagation is applied.

numericalAccuracyFactor double

This value allows to increase the numerical accuracy (values larger one) or decrease the numerical accuracy (values smaller than one) of the simulation result on the costs simulation time and RAM memory.

Returns

SamplingParameters

The calculated sampling parameters.

Exceptions

PropagationOfHarmonicFieldsOnlyException