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

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

Static Public Member Functions

static ComplexField ExtractComplexField (ChromaticFieldsSetBase inputData)
 Extracts a ComplexField object out of a Chromatic Fields Set. This ComplexField can then among others be used for various detector functions. More...
 
static ComplexField ExtractComplexField (ChromaticFieldsSetBase inputData, long wavelengthIndex)
 Extracts a ComplexField object out of a Chromatic Fields Set. This ComplexField can then among others be used for various detector functions. More...
 
static ComplexField ExtractComplexField (ComplexAmplitude inputField, VectorialComponent vectorialComponent)
 Extracts a ComplexField object out of a harmonic field. This ComplexField can then among others be used for various detector functions. More...
 
static ComplexField ExtractComplexField (DataArrayBase inputData, long subsetIndex)
 Extracts a ComplexField object out of a Numerical Data Array. This ComplexField can then among others be used for various detector functions. More...
 
static ComplexField ExtractComplexField (FieldComponent inputField, int subsetIndex)
 Extracts a ComplexField object out of a Field Vector or Pulse Component. This ComplexField can then among others be used for various detector functions. More...
 
static ComplexField ExtractComplexField (FieldComponentAtLine inputField)
 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. More...
 
static ComplexField ExtractComplexField (FieldComponentAtPoint inputField)
 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. More...
 
static ComplexField ExtractComplexField (HarmonicFieldsSet inputField, int index, VectorialComponent vectorialComponent)
 Extracts a ComplexField object out of a harmonic fields set. This ComplexField can then among others be used for various detector functions. More...
 
static PulseComponentAtPoint ExtractSpectrumAtPoint (HarmonicFieldsSet harmonicFieldsSet, VectorD position, VectorialComponent vectorialComponent)
 Extracts the spectrum of a Harmonic Fields Set at the given point. More...
 
static DataArrayBase ExtractSquaredAmplitude (ComplexAmplitude inputField, VectorialComponents vectorialComponents)
 Extracts the squared amplitudes from the given input field. More...
 
static DataArrayBase ExtractSummedSquaredAmplitude (HarmonicFieldsSet inputField, VectorialComponents vectorialComponents)
 Extracts the summed squared amplitudes from the given input field. More...
 
static ComplexAmplitude FourierTransformation (ComplexAmplitude inputField)
 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. More...
 
static HarmonicFieldsSet FourierTransformation (HarmonicFieldsSet inputField)
 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. More...
 
static Vector3D GetDirectionVectorFromLinearPhaseFit (ComplexAmplitude inputField)
 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. More...
 
static ComplexAmplitude InverseFourierTransformation (ComplexAmplitude inputField)
 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. More...
 
static HarmonicFieldsSet InverseFourierTransformation (HarmonicFieldsSet inputField)
 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. More...
 
static ComplexAmplitude OptimizeSamplingByRemovingLinearPhase (ComplexAmplitude inputField, InterpolationMethod interpolationMethodForLinearPhaseSampling)
 Optimizing method handling the linear phase of a harmonic field. More...
 
static HarmonicFieldsSet OptimizeSamplingByRemovingLinearPhase (HarmonicFieldsSet inputField, InterpolationMethod interpolationMethodForLinearPhaseSampling)
 Optimizing method handling the linear phase of a harmonic fields set, whereas each member field is treated separately. More...
 
static ComplexAmplitude RemoveSampledLinearPhase (ComplexAmplitude inputField, Vector3D centralDirectionVector)
 Method that removes a linear phase from the sampled complex values of a harmonic field. More...
 
static HarmonicFieldsSet RemoveSampledLinearPhase (HarmonicFieldsSet inputField, Vector3D centralDirectionVector)
 Method that removes a linear phase from the sampled complex values of a harmonic fields set, whereas each member field is treated separately. More...
 
static ComplexAmplitude SampleLinearPhaseFromDirectionVector (ComplexAmplitude inputField, InterpolationMethod interpolationMethod)
 Samples a linear phase from a given direction vector and multiplies it with a given harmonic field. More...
 
static HarmonicFieldsSet SampleLinearPhaseFromDirectionVector (HarmonicFieldsSet inputField, InterpolationMethod interpolationMethod)
 Samples a linear phase from a given direction vector and multiplies it with a given harmonic field. More...
 
static ComplexAmplitude Truncate (ComplexAmplitude inputField, double powerPortion=double.NaN, bool allowAnalyticDirectionVectorInNonparaxialCase=false)
 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. More...
 
static HarmonicFieldsSet Truncate (HarmonicFieldsSet inputField, double powerPortion=double.NaN, bool allowAnalyticDirectionVectorInNonparaxialCase=false)
 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. More...
 

Detailed Description

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

Member Function Documentation

◆ ExtractComplexField() [1/8]

static ComplexField ExtractComplexField ( ChromaticFieldsSetBase  inputData)
static

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

Parameters
inputDataThe Chromatic Fields Set from which the data summed over all wavelengths is extracted.
Returns
The summed data as ComplexField object.

◆ ExtractComplexField() [2/8]

static ComplexField ExtractComplexField ( ChromaticFieldsSetBase  inputData,
long  wavelengthIndex 
)
static

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

Parameters
inputDataThe Chromatic Fields Set from which the data for one wavelength is extracted.
wavelengthIndexIndex of the wavelength to be extracted.
Returns
The data for one wavelength as ComplexField object.

◆ ExtractComplexField() [3/8]

static ComplexField ExtractComplexField ( ComplexAmplitude  inputField,
VectorialComponent  vectorialComponent 
)
static

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

Parameters
inputFieldThe harmonic field from which either the Ex-, Ey- or the Ez-component is extracted as ComplexField.
vectorialComponentThe vectorial component which shall be extracted.
Returns
Either the Ex-, Ey- or the Ez-component as ComplexField object.
Exceptions
System.ArgumentExceptionThe given vectorial component is not supported.

◆ ExtractComplexField() [4/8]

static ComplexField ExtractComplexField ( DataArrayBase  inputData,
long  subsetIndex 
)
static

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

Parameters
inputDataThe Numerical Data Array from which one subset is extracted.
subsetIndexIndex of the subset to be extracted.
Returns
The extracted subset.
Exceptions
System.ArgumentExceptionA ComplexField cannot be extracted for the given type of data array.

◆ ExtractComplexField() [5/8]

static ComplexField ExtractComplexField ( FieldComponent  inputField,
int  subsetIndex 
)
static

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

Parameters
inputFieldThe Field Vector or Pulse Component from which one subset is extracted.
subsetIndexIndex of the subset to be extracted.
Returns
The extracted subset.

◆ ExtractComplexField() [6/8]

static ComplexField ExtractComplexField ( FieldComponentAtLine  inputField)
static

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.

Parameters
inputFieldThe Field Vector or Pulse Component At Line from which the underlying data is extracted.
Returns
The underlying data as ComplexField object.

◆ ExtractComplexField() [7/8]

static ComplexField ExtractComplexField ( FieldComponentAtPoint  inputField)
static

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.

Parameters
inputFieldThe Field Vector or Pulse Component At One Point from which the underlying data is extracted.
Returns
The underlying data as ComplexField object.

◆ ExtractComplexField() [8/8]

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

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

Parameters
inputFieldThe harmonic field set from which either the Ex-, Ey- or the Ez-component of one member field is extracted as ComplexField.
indexThe zero-based index of the member field to extract.
vectorialComponentThe vectorial component which shall be extracted.
Returns
Either the Ex-, Ey- or the Ez-component of one member field as ComplexField object.
Exceptions
System.ArgumentExceptionThe given vectorial component is not supported.

◆ ExtractSpectrumAtPoint()

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

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

Parameters
harmonicFieldsSetThe Harmonic Fields Set.
positionThe position to evaluate.
vectorialComponentThe vectorial component (Ex, Ey, or Ez) form which the spectrum is extracted.
Returns
A pulse document containing the spectrum.

◆ ExtractSquaredAmplitude()

static DataArrayBase ExtractSquaredAmplitude ( ComplexAmplitude  inputField,
VectorialComponents  vectorialComponents 
)
static

Extracts the squared amplitudes from the given input field.

Parameters
inputFieldThe input field.
vectorialComponentsThe 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
A data array containing the (summed) squared amplitudes.

◆ ExtractSummedSquaredAmplitude()

static DataArrayBase ExtractSummedSquaredAmplitude ( HarmonicFieldsSet  inputField,
VectorialComponents  vectorialComponents 
)
static

Extracts the summed squared amplitudes from the given input field.

Parameters
inputFieldThe input field.
vectorialComponentsThe 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
A data array containing the (summed) squared amplitudes.

◆ FourierTransformation() [1/2]

static ComplexAmplitude FourierTransformation ( ComplexAmplitude  inputField)
static

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.

Parameters
inputFieldThe field to transform.
Returns
The transformed field.

◆ FourierTransformation() [2/2]

static HarmonicFieldsSet FourierTransformation ( HarmonicFieldsSet  inputField)
static

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.

Parameters
inputFieldThe fields set to transform.
Returns
The transformed fields set.

◆ GetDirectionVectorFromLinearPhaseFit()

static Vector3D GetDirectionVectorFromLinearPhaseFit ( ComplexAmplitude  inputField)
static

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.

Parameters
inputFieldHarmonic field to fit the linear phase to.
Returns
A vector which describes the fitted linear phase.

◆ InverseFourierTransformation() [1/2]

static ComplexAmplitude InverseFourierTransformation ( ComplexAmplitude  inputField)
static

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.

Parameters
inputFieldThe field to transform.
Returns
The transformed field.

◆ InverseFourierTransformation() [2/2]

static HarmonicFieldsSet InverseFourierTransformation ( HarmonicFieldsSet  inputField)
static

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.

Parameters
inputFieldThe fields set to transform.
Returns
The transformed fields set.

◆ OptimizeSamplingByRemovingLinearPhase() [1/2]

static ComplexAmplitude OptimizeSamplingByRemovingLinearPhase ( ComplexAmplitude  inputField,
InterpolationMethod  interpolationMethodForLinearPhaseSampling 
)
static

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.
Parameters
inputFieldThe harmonic field to be optimized.
interpolationMethodForLinearPhaseSamplingInterpolation method used for resampling
Returns
The optimized field.

◆ OptimizeSamplingByRemovingLinearPhase() [2/2]

static HarmonicFieldsSet OptimizeSamplingByRemovingLinearPhase ( HarmonicFieldsSet  inputField,
InterpolationMethod  interpolationMethodForLinearPhaseSampling 
)
static

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.
Parameters
inputFieldThe harmonic fields set to be optimized.
interpolationMethodForLinearPhaseSamplingInterpolation method used for resampling
Returns
The optimized field.

◆ RemoveSampledLinearPhase() [1/2]

static ComplexAmplitude RemoveSampledLinearPhase ( ComplexAmplitude  inputField,
Vector3D  centralDirectionVector 
)
static

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

Parameters
inputFieldHarmonic field to remove the linear phase from.
centralDirectionVectorDirection vector that describes the linear phase.
Returns
Harmonic field, reduced by the given linear phase.

◆ RemoveSampledLinearPhase() [2/2]

static HarmonicFieldsSet RemoveSampledLinearPhase ( HarmonicFieldsSet  inputField,
Vector3D  centralDirectionVector 
)
static

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

Parameters
inputFieldHarmonic fields set to remove the linear phase from.
centralDirectionVectorDirection vector that describes the linear phase.
Returns
Harmonic field, reduced by the given linear phase.

◆ SampleLinearPhaseFromDirectionVector() [1/2]

static ComplexAmplitude SampleLinearPhaseFromDirectionVector ( ComplexAmplitude  inputField,
InterpolationMethod  interpolationMethod 
)
static

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

Parameters
inputFieldThe harmonic field to sample the linear phase on.
interpolationMethodThe interpolation method to be used if resampling is necessary.
Returns
A harmonic field with the sampled linear phase.

◆ SampleLinearPhaseFromDirectionVector() [2/2]

static HarmonicFieldsSet SampleLinearPhaseFromDirectionVector ( HarmonicFieldsSet  inputField,
InterpolationMethod  interpolationMethod 
)
static

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

Parameters
inputFieldThe harmonic field to sample the linear phase on.
interpolationMethodThe interpolation method to be used if resampling is necessary.
Returns
A harmonic field with the sampled linear phase.

◆ Truncate() [1/2]

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

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.

Parameters
inputFieldThe field to truncate.
powerPortionOptional 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.
allowAnalyticDirectionVectorInNonparaxialCaseFlag indicating whether the shift operation may set an analytical central direction vector if necessary.
Returns
Field with optimized size, where an outer region containing (1 - powerPortion) will be truncated.

◆ Truncate() [2/2]

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

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.

Parameters
inputFieldThe fields set to truncate.
powerPortionOptional 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.
allowAnalyticDirectionVectorInNonparaxialCaseFlag indicating whether the shift operation may set an analytical central direction vector if necessary.
Returns
Fields set with optimized size, where an outer region containing (1 - powerPortion) will be truncated.