Table of Contents

Class VL_Fields

Namespace
VirtualLab.Programming
Assembly
VirtualLab.Programming.dll

This class provides methods for manipulations, evaluations and creation of harmonic fields and fields sets.

public static class VL_Fields
Inheritance
VL_Fields
Inherited Members

Methods

ExtractComplexField(ChromaticFieldsSetBase)

Extracts a ComplexField object out of a Chromatic Fields Set. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(ChromaticFieldsSetBase inputData)

Parameters

inputData ChromaticFieldsSetBase

The Chromatic Fields Set from which the data summed over all wavelengths is extracted.

Returns

ComplexField

The summed data as ComplexField object.

ExtractComplexField(ChromaticFieldsSetBase, long)

Extracts a ComplexField object out of a Chromatic Fields Set. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(ChromaticFieldsSetBase inputData, long wavelengthIndex)

Parameters

inputData ChromaticFieldsSetBase

The Chromatic Fields Set from which the data for one wavelength is extracted.

wavelengthIndex long

Index of the wavelength to be extracted.

Returns

ComplexField

The data for one wavelength as ComplexField object.

ExtractComplexField(ComplexAmplitude, VectorialComponent)

Extracts a ComplexField object out of a harmonic field. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(ComplexAmplitude inputField, VectorialComponent vectorialComponent)

Parameters

inputField ComplexAmplitude

The harmonic field from which either the Ex-, Ey- or the Ez-component is extracted as ComplexField.

vectorialComponent VectorialComponent

The vectorial component which shall be extracted.

Returns

ComplexField

Either the Ex-, Ey- or the Ez-component as ComplexField object.

Exceptions

ArgumentException

The given vectorial component is not supported.

ExtractComplexField(FieldComponent, int)

Extracts a ComplexField object out of a Field Vector or Pulse Component. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(FieldComponent inputField, int subsetIndex)

Parameters

inputField FieldComponent

The Field Vector or Pulse Component from which one subset is extracted.

subsetIndex int

Index of the subset to be extracted.

Returns

ComplexField

The extracted subset.

ExtractComplexField(FieldComponentAtLine)

Extracts a ComplexField object out of a Field or Pulse Component At Line. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(FieldComponentAtLine inputField)

Parameters

inputField FieldComponentAtLine

The Field Vector or Pulse Component At Line from which the underlying data is extracted.

Returns

ComplexField

The underlying data as ComplexField object.

ExtractComplexField(FieldComponentAtPoint)

Extracts a ComplexField object out of a Field or Pulse Component At One Point. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(FieldComponentAtPoint inputField)

Parameters

inputField FieldComponentAtPoint

The Field Vector or Pulse Component At One Point from which the underlying data is extracted.

Returns

ComplexField

The underlying data as ComplexField object.

ExtractComplexField(HarmonicFieldsSet, int, VectorialComponent)

Extracts a ComplexField object out of a harmonic fields set. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(HarmonicFieldsSet inputField, int index, VectorialComponent vectorialComponent)

Parameters

inputField HarmonicFieldsSet

The harmonic field set from which either the Ex-, Ey- or the Ez-component of one member field is extracted as ComplexField.

index int

The zero-based index of the member field to extract.

vectorialComponent VectorialComponent

The vectorial component which shall be extracted.

Returns

ComplexField

Either the Ex-, Ey- or the Ez-component of one member field as ComplexField object.

Exceptions

ArgumentException

The given vectorial component is not supported.

ExtractComplexField(DataArrayBase, long)

Extracts a ComplexField object out of a Numerical Data Array. This ComplexField can then among others be used for various detector functions.

public static ComplexField ExtractComplexField(DataArrayBase inputData, long subsetIndex)

Parameters

inputData DataArrayBase

The Numerical Data Array from which one subset is extracted.

subsetIndex long

Index of the subset to be extracted.

Returns

ComplexField

The extracted subset.

Exceptions

ArgumentException

A ComplexField cannot be extracted for the given type of data array.

ExtractSpectrumAtPoint(HarmonicFieldsSet, VectorD, VectorialComponent)

Extracts the spectrum of a Harmonic Fields Set at the given point.

public static PulseComponentAtPoint ExtractSpectrumAtPoint(HarmonicFieldsSet harmonicFieldsSet, VectorD position, VectorialComponent vectorialComponent)

Parameters

harmonicFieldsSet HarmonicFieldsSet

The Harmonic Fields Set.

position VectorD

The position to evaluate.

vectorialComponent VectorialComponent

The vectorial component (Ex, Ey, or Ez) form which the spectrum is extracted.

Returns

PulseComponentAtPoint

A pulse document containing the spectrum.

ExtractSquaredAmplitude(ComplexAmplitude, VectorialComponents)

Extracts the squared amplitudes from the given input field.

public static DataArrayBase ExtractSquaredAmplitude(ComplexAmplitude inputField, VectorialComponents vectorialComponents)

Parameters

inputField ComplexAmplitude

The input field.

vectorialComponents VectorialComponents

The squared amplitudes for the given vectorial component(s) are extracted. If a combination of vectorial components is specified,the squared amplitudes are then summed up.

Returns

DataArrayBase

A data array containing the (summed) squared amplitudes.

ExtractSummedSquaredAmplitude(HarmonicFieldsSet, VectorialComponents)

Extracts the summed squared amplitudes from the given input field.

public static DataArrayBase ExtractSummedSquaredAmplitude(HarmonicFieldsSet inputField, VectorialComponents vectorialComponents)

Parameters

inputField HarmonicFieldsSet

The input field.

vectorialComponents VectorialComponents

The squared amplitudes for the given vectorial component(s) are extracted. If a combination of vectorial components is specified,the squared amplitudes are then summed up.

Returns

DataArrayBase

A data array containing the (summed) squared amplitudes.

FourierTransformation(ComplexAmplitude)

Applies a Fourier transform on the given field. Note that the physical scaling as described in the manual is used therefor. This ensures that if you embed the Fourier transform of a field in a zeroized frame and then perform the inverse transformation, the power and maximum amplitude of the field do not change.

public static ComplexAmplitude FourierTransformation(ComplexAmplitude inputField)

Parameters

inputField ComplexAmplitude

The field to transform.

Returns

ComplexAmplitude

The transformed field.

FourierTransformation(HarmonicFieldsSet)

Applies a Fourier transform on the given fields set. Note that the physical scaling as described in the manual is used therefor. This ensures that if you embed the Fourier transform of a fields set in a zeroized frame and then perform the inverse transformation, the power and maximum amplitude of the fields set do not change.

public static HarmonicFieldsSet FourierTransformation(HarmonicFieldsSet inputField)

Parameters

inputField HarmonicFieldsSet

The fields set to transform.

Returns

HarmonicFieldsSet

The transformed fields set.

GetDirectionVectorFromLinearPhaseFit(ComplexAmplitude)

Method that fits a linear phase to a harmonic field and returns it as direction vector. It is detected by evaluating the center of gravity in the frequency domain. For locally polarized fields, a weighted average vector is calculated.

public static Vector3D GetDirectionVectorFromLinearPhaseFit(ComplexAmplitude inputField)

Parameters

inputField ComplexAmplitude

Harmonic field to fit the linear phase to.

Returns

Vector3D

A vector which describes the fitted linear phase.

InverseFourierTransformation(ComplexAmplitude)

Applies an inverse Fourier transform on the given field. Note that the physical scaling as described in the manual is used therefor. This ensures that if you embed the Fourier transform of a field in a zeroized frame and then perform the inverse transformation, the power and maximum amplitude of the field do not change.

public static ComplexAmplitude InverseFourierTransformation(ComplexAmplitude inputField)

Parameters

inputField ComplexAmplitude

The field to transform.

Returns

ComplexAmplitude

The transformed field.

InverseFourierTransformation(HarmonicFieldsSet)

Applies an inverse Fourier transform on the given fields set. Note that the physical scaling as described in the manual is used therefor. This ensures that if you embed the Fourier transform of a fields set in a zeroized frame and then perform the inverse transformation, the power and maximum amplitude of the fields set do not change.

public static HarmonicFieldsSet InverseFourierTransformation(HarmonicFieldsSet inputField)

Parameters

inputField HarmonicFieldsSet

The fields set to transform.

Returns

HarmonicFieldsSet

The transformed fields set.

OptimizeSamplingByRemovingLinearPhase(ComplexAmplitude, InterpolationMethod)

Optimizing method handling the linear phase of a harmonic field.

  1. Determination of the overall linear phase from sampling and analytically stored central direction.
  2. Removal of the sampled linear phase.
  3. Resampling.
public static ComplexAmplitude OptimizeSamplingByRemovingLinearPhase(ComplexAmplitude inputField, InterpolationMethod interpolationMethodForLinearPhaseSampling)

Parameters

inputField ComplexAmplitude

The harmonic field to be optimized.

interpolationMethodForLinearPhaseSampling InterpolationMethod

Interpolation method used for resampling

Returns

ComplexAmplitude

The optimized field.

OptimizeSamplingByRemovingLinearPhase(HarmonicFieldsSet, InterpolationMethod)

Optimizing method handling the linear phase of a harmonic fields set, whereas each member field is treated separately.

  1. Determination of the overall linear phase from sampling and analytically stored central direction.
  2. Removal of the sampled linear phase.
  3. Resampling.
public static HarmonicFieldsSet OptimizeSamplingByRemovingLinearPhase(HarmonicFieldsSet inputField, InterpolationMethod interpolationMethodForLinearPhaseSampling)

Parameters

inputField HarmonicFieldsSet

The harmonic fields set to be optimized.

interpolationMethodForLinearPhaseSampling InterpolationMethod

Interpolation method used for resampling

Returns

HarmonicFieldsSet

The optimized field.

RemoveSampledLinearPhase(ComplexAmplitude, Vector3D)

Method that removes a linear phase from the sampled complex values of a harmonic field.

public static ComplexAmplitude RemoveSampledLinearPhase(ComplexAmplitude inputField, Vector3D centralDirectionVector)

Parameters

inputField ComplexAmplitude

Harmonic field to remove the linear phase from.

centralDirectionVector Vector3D

Direction vector that describes the linear phase.

Returns

ComplexAmplitude

Harmonic field, reduced by the given linear phase.

RemoveSampledLinearPhase(HarmonicFieldsSet, Vector3D)

Method that removes a linear phase from the sampled complex values of a harmonic fields set, whereas each member field is treated separately.

public static HarmonicFieldsSet RemoveSampledLinearPhase(HarmonicFieldsSet inputField, Vector3D centralDirectionVector)

Parameters

inputField HarmonicFieldsSet

Harmonic fields set to remove the linear phase from.

centralDirectionVector Vector3D

Direction vector that describes the linear phase.

Returns

HarmonicFieldsSet

Harmonic field, reduced by the given linear phase.

SampleLinearPhaseFromDirectionVector(ComplexAmplitude, InterpolationMethod)

Samples a linear phase from a given direction vector and multiplies it with a given harmonic field.

public static ComplexAmplitude SampleLinearPhaseFromDirectionVector(ComplexAmplitude inputField, InterpolationMethod interpolationMethod)

Parameters

inputField ComplexAmplitude

The harmonic field to sample the linear phase on.

interpolationMethod InterpolationMethod

The interpolation method to be used if resampling is necessary.

Returns

ComplexAmplitude

A harmonic field with the sampled linear phase.

SampleLinearPhaseFromDirectionVector(HarmonicFieldsSet, InterpolationMethod)

Samples a linear phase from a given direction vector and multiplies it with a given harmonic field.

public static HarmonicFieldsSet SampleLinearPhaseFromDirectionVector(HarmonicFieldsSet inputField, InterpolationMethod interpolationMethod)

Parameters

inputField HarmonicFieldsSet

The harmonic field to sample the linear phase on.

interpolationMethod InterpolationMethod

The interpolation method to be used if resampling is necessary.

Returns

HarmonicFieldsSet

A harmonic field with the sampled linear phase.

Truncate(ComplexAmplitude, double, bool)

Truncates the field, i. e. determines the minimum field size which contains the fraction powerPortion of the original power and removes all pixels outside this region. So a loss of (1 - powerPortion) may occur. Important: The center of the field will not be changed, so an original decentered field will not be optimally truncated.

public static ComplexAmplitude Truncate(ComplexAmplitude inputField, double powerPortion = NaN, bool allowAnalyticDirectionVectorInNonparaxialCase = false)

Parameters

inputField ComplexAmplitude

The field to truncate.

powerPortion double

Optional parameter to set the fraction of the original power that has to be conserved in the size optimized result. If this parameter is not specified, the “Field Size Estimation Reference” from the Global Options dialog is used.

allowAnalyticDirectionVectorInNonparaxialCase bool

Flag indicating whether the shift operation may set an analytical central direction vector if necessary.

Returns

ComplexAmplitude

Field with optimized size, where an outer region containing (1 - powerPortion) will be truncated.

Truncate(HarmonicFieldsSet, double, bool)

Truncates a fields set. This means that for each member field the minimum field size is determined which contains the fraction powerPortion of the original power. All pixels outside this region are removed. So a loss of (1 - powerPortion) may occur. Important: The center of the field will not be changed, so an original decentered field will not be optimally truncated.

public static HarmonicFieldsSet Truncate(HarmonicFieldsSet inputField, double powerPortion = NaN, bool allowAnalyticDirectionVectorInNonparaxialCase = false)

Parameters

inputField HarmonicFieldsSet

The fields set to truncate.

powerPortion double

Optional parameter to set the fraction of the original power that has to be conserved in the size optimized result. If this parameter is not specified, the “Field Size Estimation Reference” from the Global Options dialog is used.

allowAnalyticDirectionVectorInNonparaxialCase bool

Flag indicating whether the shift operation may set an analytical central direction vector if necessary.

Returns

HarmonicFieldsSet

Fields set with optimized size, where an outer region containing (1 - powerPortion) will be truncated.