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
inputDataChromaticFieldsSetBaseThe 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
inputDataChromaticFieldsSetBaseThe Chromatic Fields Set from which the data for one wavelength is extracted.
wavelengthIndexlongIndex 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
inputFieldComplexAmplitudeThe harmonic field from which either the Ex-, Ey- or the Ez-component is extracted as ComplexField.
vectorialComponentVectorialComponentThe 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
inputFieldFieldComponentThe Field Vector or Pulse Component from which one subset is extracted.
subsetIndexintIndex 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
inputFieldFieldComponentAtLineThe 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
inputFieldFieldComponentAtPointThe 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
inputFieldHarmonicFieldsSetThe harmonic field set from which either the Ex-, Ey- or the Ez-component of one member field is extracted as ComplexField.
indexintThe zero-based index of the member field to extract.
vectorialComponentVectorialComponentThe 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
inputDataDataArrayBaseThe Numerical Data Array from which one subset is extracted.
subsetIndexlongIndex 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
harmonicFieldsSetHarmonicFieldsSetThe Harmonic Fields Set.
positionVectorDThe position to evaluate.
vectorialComponentVectorialComponentThe 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
inputFieldComplexAmplitudeThe input field.
vectorialComponentsVectorialComponentsThe 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
inputFieldHarmonicFieldsSetThe input field.
vectorialComponentsVectorialComponentsThe 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
inputFieldComplexAmplitudeThe 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
inputFieldHarmonicFieldsSetThe 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
inputFieldComplexAmplitudeHarmonic 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
inputFieldComplexAmplitudeThe 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
inputFieldHarmonicFieldsSetThe fields set to transform.
Returns
- HarmonicFieldsSet
The transformed fields set.
OptimizeSamplingByRemovingLinearPhase(ComplexAmplitude, InterpolationMethod)
Optimizing method handling the linear phase of a harmonic field.
- Determination of the overall linear phase from sampling and analytically stored central direction.
- Removal of the sampled linear phase.
- Resampling.
public static ComplexAmplitude OptimizeSamplingByRemovingLinearPhase(ComplexAmplitude inputField, InterpolationMethod interpolationMethodForLinearPhaseSampling)
Parameters
inputFieldComplexAmplitudeThe harmonic field to be optimized.
interpolationMethodForLinearPhaseSamplingInterpolationMethodInterpolation 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.
- Determination of the overall linear phase from sampling and analytically stored central direction.
- Removal of the sampled linear phase.
- Resampling.
public static HarmonicFieldsSet OptimizeSamplingByRemovingLinearPhase(HarmonicFieldsSet inputField, InterpolationMethod interpolationMethodForLinearPhaseSampling)
Parameters
inputFieldHarmonicFieldsSetThe harmonic fields set to be optimized.
interpolationMethodForLinearPhaseSamplingInterpolationMethodInterpolation 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
inputFieldComplexAmplitudeHarmonic field to remove the linear phase from.
centralDirectionVectorVector3DDirection 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
inputFieldHarmonicFieldsSetHarmonic fields set to remove the linear phase from.
centralDirectionVectorVector3DDirection 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
inputFieldComplexAmplitudeThe harmonic field to sample the linear phase on.
interpolationMethodInterpolationMethodThe 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
inputFieldHarmonicFieldsSetThe harmonic field to sample the linear phase on.
interpolationMethodInterpolationMethodThe 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
inputFieldComplexAmplitudeThe field to truncate.
powerPortiondoubleOptional 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.
allowAnalyticDirectionVectorInNonparaxialCaseboolFlag 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
inputFieldHarmonicFieldsSetThe fields set to truncate.
powerPortiondoubleOptional 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.
allowAnalyticDirectionVectorInNonparaxialCaseboolFlag 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.