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

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Evaluation functions for HarmonicFieldSet objects. More...

Public Member Functions

ComplexAmplitude ExtractFieldSummation (HarmonicFieldsSet hfs, VectorialComponents componentCombination, bool applySqrtOnSummationField)
 Calculates and returns the intensity distribution (or the square roots of it) of a given harmonic fields set and according to a given component combination. The function is parallelized. More...
 
 HarmonicFieldsSetEvaluation ()
 Standard constructor.
 

Static Public Member Functions

static SamplingParameters AdjustSamplingParameters (HarmonicFieldsSet sf, double dOversamplingFactor)
 The sampling parameters of all complex amplitude members in the HarmonicFieldsSet is made equal to the sampling parameters of smallest sampling distance and the largest field diameter. More...
 
static void CalculateDiffractiveOpticsMeritFunctions (HarmonicFieldsSet hfs, DataArray2D signalField, Region2D signalRegion, bool doAllowScaleFreedom, bool areEfficienciesRelatedToSourceField, LightSourceBaseLPE lightSource, CombinedComponent componentCombination, bool calculateWindowEfficiency, bool calculateConversionEfficiency, bool calculateSNR, bool calculateUniformityError, bool calculateZerothOrderIntensity, bool calculateZerothOrderEfficiency, bool calculateMaxRelIntensityOfStrayLight, bool calculateOptimalScaleFactor, out PhysicalValue windowEfficiency, out PhysicalValue conversionEfficiency, out PhysicalValue snr, out PhysicalValue uniformityError, out PhysicalValue zerothOrderIntensity, out PhysicalValue zerothOrderEfficiency, out PhysicalValue maxRelIntensityOfStrayLight, out PhysicalValue optimalScaleFactor)
 Calculates diffractive optics merit function values the intensity sampling of a given harmonic fields set and a given signal field (and optionally a signal region). More...
 
static void CalculateDiffractiveOpticsMeritFunctions (HarmonicFieldsSet hfs, DataArray2D signalFieldAndRegion, bool doAllowScaleFreedom, bool areEfficienciesRelatedToSourceField, LightSourceBaseLPE lightSource, CombinedComponent componentCombination, bool calculateWindowEfficiency, bool calculateConversionEfficiency, bool calculateSNR, bool calculateUniformityError, bool calculateZerothOrderIntensity, bool calculateZerothOrderEfficiency, bool calculateMaxRelIntensityOfStrayLight, bool calculateOptimalScaleFactor, out PhysicalValue windowEfficiency, out PhysicalValue conversionEfficiency, out PhysicalValue snr, out PhysicalValue uniformityError, out PhysicalValue zerothOrderIntensity, out PhysicalValue zerothOrderEfficiency, out PhysicalValue maxRelIntensityOfStrayLight, out PhysicalValue optimalScaleFactor)
 Calculates diffractive optics merit function values the intensity sampling of a given harmonic fields set and a given signal field (and optionally a signal region). More...
 
static void CreateAnimation (HarmonicFieldsSet sf, bool accessFieldY, FieldQuantity component)
 Returns the HarmonicFieldsSet as an Animation document. More...
 
static void CreateAnimationNormalized (HarmonicFieldsSet sf, bool useRainbow, bool reverseRainbow, bool accessFieldY, FieldQuantity component)
 Returns the pulse in time u(x,y,z,t)as a movie. The movie is normalized to the maximum amplitude of the pulse. More...
 
static ComplexField ExtractLineProfile (HarmonicFieldsSet inputField, VectorialComponent component, double accuracyFactor, VectorD StartPosition, VectorD EndPosition)
 returns the line profile through all CAs in the field on a line More...
 
static ComplexField ExtractProfileAtAPoint (HarmonicFieldsSet inputField, VectorialComponent component, double x, double y)
 returns the profile through all CAs in the field at one point More...
 
static ComplexFieldArray ExtractRectangle (HarmonicFieldsSet inputField, VectorialComponent component, VectorD centerPointRectangle, SamplingParameters samplingParametersRectangle)
 static support function to extract a rectangle from a given harmonic fields set with some additional parameters More...
 
static List< VectorDExtractWavelengthInformation (HarmonicFieldsSet hfs)
 Extracts all wavelengths from a Harmonic Fields Set. More...
 
static List< HarmonicFieldBaseSplitByWavelength (HarmonicFieldBase harmonicField)
 Splits the given Harmonic Field by wavelength whereas the member fields are not cloned. More...
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Evaluation functions for HarmonicFieldSet objects.

Member Function Documentation

◆ AdjustSamplingParameters()

static SamplingParameters AdjustSamplingParameters ( HarmonicFieldsSet  sf,
double  dOversamplingFactor 
)
static

The sampling parameters of all complex amplitude members in the HarmonicFieldsSet is made equal to the sampling parameters of smallest sampling distance and the largest field diameter.

Parameters
sfthe harmonic field set
dOversamplingFactoradditional oversampling factor
Returns
the sampling parameter

◆ CalculateDiffractiveOpticsMeritFunctions() [1/2]

static void CalculateDiffractiveOpticsMeritFunctions ( HarmonicFieldsSet  hfs,
DataArray2D  signalField,
Region2D  signalRegion,
bool  doAllowScaleFreedom,
bool  areEfficienciesRelatedToSourceField,
LightSourceBaseLPE  lightSource,
CombinedComponent  componentCombination,
bool  calculateWindowEfficiency,
bool  calculateConversionEfficiency,
bool  calculateSNR,
bool  calculateUniformityError,
bool  calculateZerothOrderIntensity,
bool  calculateZerothOrderEfficiency,
bool  calculateMaxRelIntensityOfStrayLight,
bool  calculateOptimalScaleFactor,
out PhysicalValue  windowEfficiency,
out PhysicalValue  conversionEfficiency,
out PhysicalValue  snr,
out PhysicalValue  uniformityError,
out PhysicalValue  zerothOrderIntensity,
out PhysicalValue  zerothOrderEfficiency,
out PhysicalValue  maxRelIntensityOfStrayLight,
out PhysicalValue  optimalScaleFactor 
)
static

Calculates diffractive optics merit function values the intensity sampling of a given harmonic fields set and a given signal field (and optionally a signal region).

Parameters
hfsHarmonic fields set for which intensities are to be calculated.
signalFieldData Array 2D which contains the signal field.
signalRegionA signal region determines which part of the signal field is considered.
doAllowScaleFreedomIff true, the scale factor is calculated for all merit functions calculations, otherwise the scale factor is set to one
areEfficienciesRelatedToSourceFieldIff true, all efficiency calculations are related to an input field power. Otherwise the input field power is assumed to be equal to the output field power.
lightSourceThe active light source object which generates the input field of the diffuser/beam splitter etc. Can be null if option areEfficienciesRelatedToSourceField is false.
componentCombinationSpecifies which field components are considered for intensity calculation.
calculateWindowEfficiencyIff true, the window efficiency will be calculated.
calculateConversionEfficiencyIff true, the conversion efficiency will be calculated.
calculateSNRIff true, the SNR will be calculated.
calculateUniformityErrorIff true, the uniformity error will be calculated.
calculateZerothOrderIntensityIff true, the zeroth order intensity will be calculated.
calculateZerothOrderEfficiencyIff true, the zeroth order efficiency will be calculated.
calculateMaxRelIntensityOfStrayLightIff true, the maximal relative intensity of stray light will be calculated.
calculateOptimalScaleFactorIff true, the optimal scale factor will be calculated.
windowEfficiencyIff true, the window efficiency will be calculated.
conversionEfficiencyIff true, the conversion efficiency will be calculated.
snrIff true, the SNR will be calculated.
uniformityErrorIff true, the uniformity error will be calculated.
zerothOrderIntensityIff true, the zeroth order intensity will be calculated.
zerothOrderEfficiencyIff true, the zeroth order efficiency will be calculated.
maxRelIntensityOfStrayLightIff true, the maximal relative intensity of stray light will be calculated.
optimalScaleFactorIff true, the optimal scale factor will be calculated.

◆ CalculateDiffractiveOpticsMeritFunctions() [2/2]

static void CalculateDiffractiveOpticsMeritFunctions ( HarmonicFieldsSet  hfs,
DataArray2D  signalFieldAndRegion,
bool  doAllowScaleFreedom,
bool  areEfficienciesRelatedToSourceField,
LightSourceBaseLPE  lightSource,
CombinedComponent  componentCombination,
bool  calculateWindowEfficiency,
bool  calculateConversionEfficiency,
bool  calculateSNR,
bool  calculateUniformityError,
bool  calculateZerothOrderIntensity,
bool  calculateZerothOrderEfficiency,
bool  calculateMaxRelIntensityOfStrayLight,
bool  calculateOptimalScaleFactor,
out PhysicalValue  windowEfficiency,
out PhysicalValue  conversionEfficiency,
out PhysicalValue  snr,
out PhysicalValue  uniformityError,
out PhysicalValue  zerothOrderIntensity,
out PhysicalValue  zerothOrderEfficiency,
out PhysicalValue  maxRelIntensityOfStrayLight,
out PhysicalValue  optimalScaleFactor 
)
static

Calculates diffractive optics merit function values the intensity sampling of a given harmonic fields set and a given signal field (and optionally a signal region).

Parameters
hfsHarmonic fields set for which intensities are to be calculated.
signalFieldAndRegionData Array 2D which contains the signal field as first subset and optionally a signal region as second subset. A signal region determines which part of the signal field is considered.
doAllowScaleFreedomIff true, the scale factor is calculated for all merit functions calculations, otherwise the scale factor is set to one
areEfficienciesRelatedToSourceFieldIff true, all efficiency calculations are related to an input field power. Otherwise the input field power is assumed to be equal to the output field power.
lightSourceThe active light source object which generates the input field of the diffuser/beam splitter etc. Can be null if option areEfficienciesRelatedToSourceField is false.
componentCombinationSpecifies which field components are considered for intensity calculation.
calculateWindowEfficiencyIff true, the window efficiency will be calculated.
calculateConversionEfficiencyIff true, the conversion efficiency will be calculated.
calculateSNRIff true, the SNR will be calculated.
calculateUniformityErrorIff true, the uniformity error will be calculated.
calculateZerothOrderIntensityIff true, the zeroth order intensity will be calculated.
calculateZerothOrderEfficiencyIff true, the zeroth order efficiency will be calculated.
calculateMaxRelIntensityOfStrayLightIff true, the maximal relative intensity of stray light will be calculated.
calculateOptimalScaleFactorIff true, the optimal scale factor will be calculated.
windowEfficiencyIff true, the window efficiency will be calculated.
conversionEfficiencyIff true, the conversion efficiency will be calculated.
snrIff true, the SNR will be calculated.
uniformityErrorIff true, the uniformity error will be calculated.
zerothOrderIntensityIff true, the zeroth order intensity will be calculated.
zerothOrderEfficiencyIff true, the zeroth order efficiency will be calculated.
maxRelIntensityOfStrayLightIff true, the maximal relative intensity of stray light will be calculated.
optimalScaleFactorIff true, the optimal scale factor will be calculated.

◆ CreateAnimation()

static void CreateAnimation ( HarmonicFieldsSet  sf,
bool  accessFieldY,
FieldQuantity  component 
)
static

Returns the HarmonicFieldsSet as an Animation document.

Parameters
accessFieldYuse y-field component?
sfsf is the input HarmonicFieldsSet
componentfield quantity to export as bitmap

◆ CreateAnimationNormalized()

static void CreateAnimationNormalized ( HarmonicFieldsSet  sf,
bool  useRainbow,
bool  reverseRainbow,
bool  accessFieldY,
FieldQuantity  component 
)
static

Returns the pulse in time u(x,y,z,t)as a movie. The movie is normalized to the maximum amplitude of the pulse.

Parameters
accessFieldYuse y-field component?
useRainbowuse rainbow-LUT?
reverseRainbowuse reverseRainbow-LUT
sfsf is the HarmonicFieldsSet of u(x,y,z,t) at t instants(samples in time)
componentfield quantity to export as bitmap

◆ ExtractFieldSummation()

ComplexAmplitude ExtractFieldSummation ( HarmonicFieldsSet  hfs,
VectorialComponents  componentCombination,
bool  applySqrtOnSummationField 
)

Calculates and returns the intensity distribution (or the square roots of it) of a given harmonic fields set and according to a given component combination. The function is parallelized.

Parameters
hfsHarmonicFieldsSet from that intensities or square root of intensities are to be calculated
componentCombinationSpecifies which of the field components Ex, Ey and Ez shall be considered.
applySqrtOnSummationFieldIf true, the square root will be applied on the returned array after summation. If false, the returned summation array is equivalent to the intensity distribution of the entire harmonic fields set.
Returns
A ComplexAmplitude object with appropriate sampling containing the field summations.

◆ ExtractLineProfile()

static ComplexField ExtractLineProfile ( HarmonicFieldsSet  inputField,
VectorialComponent  component,
double  accuracyFactor,
VectorD  StartPosition,
VectorD  EndPosition 
)
static

returns the line profile through all CAs in the field on a line

Parameters
inputFieldfield to get the profile from
componentthe vectorial component which shall be analyzed
accuracyFactorthe accuracy factor with which the profile line shall be evaluated
StartPositionthe start point of the profile line
EndPositionthe end point of the profile line
Returns
the two dimensional

◆ ExtractProfileAtAPoint()

static ComplexField ExtractProfileAtAPoint ( HarmonicFieldsSet  inputField,
VectorialComponent  component,
double  x,
double  y 
)
static

returns the profile through all CAs in the field at one point

Parameters
inputFieldfield to get the profile from
componentthe vectorial component which shall be analyzed
xx-coordinate of the point
yy-coordinate of the point
Returns
A one-dimensional complex field containing per member field the value at the given position.

◆ ExtractRectangle()

static ComplexFieldArray ExtractRectangle ( HarmonicFieldsSet  inputField,
VectorialComponent  component,
VectorD  centerPointRectangle,
SamplingParameters  samplingParametersRectangle 
)
static

static support function to extract a rectangle from a given harmonic fields set with some additional parameters

Parameters
inputFieldthe input field that should be used for the extraction
componentthe vectorial component which shall be extracted
centerPointRectanglethe center point of the rectangle which should be extracted
samplingParametersRectanglethe sampling parameters used for the extraction
Returns
a ComplexFieldArray which represents the extracted rectangle

◆ ExtractWavelengthInformation()

static List< VectorD > ExtractWavelengthInformation ( HarmonicFieldsSet  hfs)
static

Extracts all wavelengths from a Harmonic Fields Set.

Parameters
hfsThe Harmonic Fields Set.
Returns
List of all wavelengths in the Harmonic Fields Set.

◆ SplitByWavelength()

static List< HarmonicFieldBase > SplitByWavelength ( HarmonicFieldBase  harmonicField)
static

Splits the given Harmonic Field by wavelength whereas the member fields are not cloned.

Parameters
harmonicFieldThe Harmonic Fields Set to split.
Returns
A list of harmonic fields, one per wavelength. If there is only one mode for a certain wavelength, a ComplexAmplitude is stored, else a HarmonicFieldsSet. The resulting list is sorted ascending by wavelength.