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

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
The IFTA Optimization Document. More...

Inheritance diagram for DesignAlgorithmHandler:
IDocument

Public Member Functions

 DesignAlgorithmHandler ()
 Standard constructor
 
void DoAllSelectedSteps (IterationDataOutput iterationDataOutput, WorkerThread worker)
 Perform all selected steps More...
 
ComplexField DoForwardProp ()
 Calculate complex amplitude of output field More...
 
void DoGeometricalOpticsBeamShaping ()
 Performs a geometric optics beam shaping
 
void DoSetInitialTransmissionStep (IterationDataOutput iterationDataOutput)
 Perform step for generating the initial transmission function. More...
 
void DoSNRPhaseStep (IterationDataOutput iterationDataOutput)
 Perform SNR optimization for phase-only transmission. More...
 
void DoSNRQuantStep (IterationDataOutput iterationDataOutput)
 Perform SNR optimization for quantized transmission. More...
 
void DoSoftQuantStep (IterationDataOutput iterationDataOutput)
 Perform soft quantization More...
 
void DoSPOStep (IterationDataOutput iterationDataOutput)
 Perform step for signal phase synthesis. More...
 
double GetConversionEfficiency (ComplexField outField, SamplingParameters samplingParametersOfOutField)
 Calculate conversion efficiency More...
 
double GetDCEfficiency (ComplexField outField)
 Calculate zeroth order intensity relative to the input field power. More...
 
double GetMaxNoiseIntensity (ComplexField outField, SamplingParameters samplingParametersOfOutField)
 Calculate maximum relative intensity of stray light. More...
 
Complex GetOptimalScaleFactor (ComplexField outField, SamplingParameters samplingParametersOfOutField)
 Calculate optimal scale factor. More...
 
ConstraintDomain GetSignalDomain (DesignStep designStep)
 Construct signal domain for specified design step More...
 
double GetSNR (ComplexField outField, SamplingParameters samplingParametersOfOutField)
 Calculate signal-to-noise ratio More...
 
ConstraintDomain GetTransmissionDomain (DesignStep designStep)
 Construct transmission domain for specified design step More...
 
double GetUniformityError (ComplexField outField, SamplingParameters samplingParametersOfOutField)
 Calculate uniformity error More...
 
double GetWindowEfficiency (ComplexField outField, SamplingParameters samplingParametersOfOutField)
 Calculate window efficiency More...
 
void Save (string fileName)
 Save whole data structure More...
 
void StopOptimizationImmediately ()
 If an IFTA optimization is running in a separate thread the optimization is stopped immediately. If the optimization is not running in a separate thread nothing will happen.
 
- Public Member Functions inherited from IDocument
void Reload ()
 Reload function for the document
 

Static Public Member Functions

static DesignAlgorithmHandler Load (string fileName)
 Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VL 6.0) or with view settings. More...
 

Public Attributes

bool[] AnalysisMeritFunctionsSelection
 Stores which merit functions are selected for analysis of transmission after the design. The array index corresponds to the integer value of members of the LoggingFunctions enum.
 
ConstraintSpecification ConstraintSpecification
 Specification of the design problem
 
bool CreateOutputFieldAnimation
 Determines whether output field animation is to be created
 
bool CreateTransmissionAnimation
 Determines whether transmission animation is to be created.
 
DesignMethod DesignMethod
 Selected design method (IFTA or geometric beam shaping).
 
InitialTransmissionMethod InitialTransmissionMethod
 Type of initial transmission function
 
bool[] LoggingFunctionSelection
 Stores which merit functions are selected for logging. The array index corresponds to the integer value of the members of the LoggingFunctions enum.
 
int NumItSNRPhase
 Number of iterations during SNR optimization for phase-only transmission.
 
int NumItSNRQuant
 Number of iterations during SNR optimization for quantized transmission.
 
int NumItSoftQuant
 Number of iterations during soft quantization step.
 
int NumItSPO
 Number of iterations during signal phase synthesis step.
 
bool OmitFinalTransmissionProjection
 Determines whether final transmission projection during SNR optimization for phase-only transmission is to be omitted.
 
ComplexAmplitudeBitmapConversion OutputFieldAnimationCreator
 Settings for the output field animation to be created.
 
bool SetInitialTransmissionStepIsEnabled
 Determines whether the design step to generate an initial transmission function is enabled.
 
bool ShowCalculationTime
 Specifies whether the overall calculation time is logged.
 
bool ShowFinalTransmissionAndOutputField
 Show transmission and output field after design completed
 
bool SNRPhaseStepIsEnabled
 Determines whether SNR optimization for phase-only transmission is enabled.
 
bool SNRQuantStepIsEnabled
 Determines whether SNR optimization for quantized transmission is enabled.
 
bool SoftCodingSNRPhase
 Determines whether transmission constraint is to be introduced softly during SNR optimization for phase-only transmission.
 
bool SoftCodingSPO
 Determines whether transmission constraint is to be introduced softly during signal phase synthesis.
 
bool SoftQuantStepIsEnabled
 Determines whether soft quantization step is enabled.
 
bool SPOStepIsEnabled
 Determines whether signal phase synthesis step is enabled.
 
ComplexAmplitudeBitmapConversion TransmissionAnimationCreator
 Settings for the transmission animation to be created.
 
bool TransmissionHasSphericalPhaseRadius
 Determines whether a spherical phase radius is given for the transmission.
 
double TransmissionSphericalPhaseRadius
 Optional spherical phase radius for the transmission.
 
bool UsePolarSepability
 Determines whether separability according to polar coordinates is assumed
 

Properties

bool ImposeLinearScaleError [get, set]
 Gets and sets whether a linear scale error shall be imposed.
 
bool ImposeMaskScaleError [get, set]
 Gets and sets whether mask scale errors shall be imposed.
 
double LinearScaleFactor [get, set]
 Gets and sets the linear scale factor for tolerancing analysis.
 
bool LoggingEnabled [get, set]
 Public property to set and get whether logging is enabled or disabled.
 
double[] MaskScaleErrors [get, set]
 Gets and sets the mask scale errors for tolerancing analysis.
 
int NumberOfSteps [get, set]
 Gets and sets the number of steps for tolerancing analysis.
 
double ScaleFactorFrom [get, set]
 Gets and sets the start value of the scale factor for tolerancing analysis.
 
double ScaleFactorTo [get, set]
 Gets and sets the end value of the scale factor for tolerancing analysis.
 
int SelectedMaskIndex [get, set]
 Gets and sets the index of the mask for which tolerancing is done. 0 refers to applying a linear scale error, 1 to the mask with a phase difference of π, 2 to the mask with a phase difference of π/2, 3 to a phase difference of π/4, and 4 to a phase difference of π/8.
 
bool ShowOutputField [get, set]
 Gets and sets whether the output field shall be shown if "Recalculate" is clicked on the Analysis tab.
 
bool ShowTolerancingAnimation [get, set]
 Gets and sets whether a tolerancing animation shall be shown.
 
bool SuspendLogging [get, set]
 Gets and sets whether logging of the merit functions is currently suspended. Only has an effect when logging is enabled and a simulation is currently running. More...
 
ComplexAmplitudeBitmapConversion TolerancingAnimationSettings [get, set]
 Gets and sets the settings for the tolerancing animation.
 
ComplexField Transmission [get, set]
 Gets and sets the current transmission.
 
- Properties inherited from IDocument
VirtualLabSession Session [get, set]
 every documents need to be handled in a session ==> default is the VirtualLab Mainsession
 
NodeVLExplorer TreeStructure [get]
 every document should have a node (maybe with subnodes) in the VirtualLab Explorer
 
DocumentType TypeOfDocument [get]
 Gets an enum entry specifying the type of the document.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
The IFTA Optimization Document.

Member Function Documentation

◆ DoAllSelectedSteps()

void DoAllSelectedSteps ( IterationDataOutput  iterationDataOutput,
WorkerThread  worker 
)

Perform all selected steps

Parameters
iterationDataOutputDelegates and parameters to be used for visualizing progress during iteration, for logging merit functions, and for creating animations.
workerThe design thread.

◆ DoForwardProp()

ComplexField DoForwardProp ( )

Calculate complex amplitude of output field

Returns
The output field

◆ DoSetInitialTransmissionStep()

void DoSetInitialTransmissionStep ( IterationDataOutput  iterationDataOutput)

Perform step for generating the initial transmission function.

Parameters
iterationDataOutputDelegates and parameters to be used for visualizing progress during iteration, for logging merit functions, and for creating animations.

◆ DoSNRPhaseStep()

void DoSNRPhaseStep ( IterationDataOutput  iterationDataOutput)

Perform SNR optimization for phase-only transmission.

Parameters
iterationDataOutputDelegates and parameters to be used for visualizing progress during iteration, for logging merit functions, and for creating animations.

◆ DoSNRQuantStep()

void DoSNRQuantStep ( IterationDataOutput  iterationDataOutput)

Perform SNR optimization for quantized transmission.

Parameters
iterationDataOutputDelegates and parameters to be used for visualizing progress during iteration, for logging merit functions, and for creating animations.

◆ DoSoftQuantStep()

void DoSoftQuantStep ( IterationDataOutput  iterationDataOutput)

Perform soft quantization

Parameters
iterationDataOutputDelegates and parameters to be used for visualizing progress during iteration, for logging merit functions, and for creating animations.

◆ DoSPOStep()

void DoSPOStep ( IterationDataOutput  iterationDataOutput)

Perform step for signal phase synthesis.

Parameters
iterationDataOutputDelegates and parameters to be used for visualizing progress during iteration, for logging merit functions, and for creating animations.

◆ GetConversionEfficiency()

double GetConversionEfficiency ( ComplexField  outField,
SamplingParameters  samplingParametersOfOutField 
)

Calculate conversion efficiency

Parameters
outFieldOutput field obtained by DoForwardProp
samplingParametersOfOutFieldThe sampling parameters of the output field.
Returns
The conversion efficiency

◆ GetDCEfficiency()

double GetDCEfficiency ( ComplexField  outField)

Calculate zeroth order intensity relative to the input field power.

Parameters
outFieldOutput field obtained by DoForwardProp
Returns
zeroth order intensity relative to the input field power

◆ GetMaxNoiseIntensity()

double GetMaxNoiseIntensity ( ComplexField  outField,
SamplingParameters  samplingParametersOfOutField 
)

Calculate maximum relative intensity of stray light.

Parameters
outFieldOutput field obtained by DoForwardProp
samplingParametersOfOutFieldThe sampling parameters of the output field.
Returns
The maximum relative intensity of stray light

◆ GetOptimalScaleFactor()

Complex GetOptimalScaleFactor ( ComplexField  outField,
SamplingParameters  samplingParametersOfOutField 
)

Calculate optimal scale factor.

Parameters
outFieldOutput field obtained by DoForwardProp
samplingParametersOfOutFieldThe sampling parameters of the output field.
Returns
The optimal scale factor

◆ GetSignalDomain()

ConstraintDomain GetSignalDomain ( DesignStep  designStep)

Construct signal domain for specified design step

Parameters
designStepThe design step (e.g. soft quantization) for which the signal domain is constructed.
Returns
The signal domain.
Exceptions
ArgumentExceptionCase missing.

◆ GetSNR()

double GetSNR ( ComplexField  outField,
SamplingParameters  samplingParametersOfOutField 
)

Calculate signal-to-noise ratio

Parameters
outFieldOutput field obtained by DoForwardProp
samplingParametersOfOutFieldThe sampling parameters of the output field.
Returns
The signal-to-noise ratio

◆ GetTransmissionDomain()

ConstraintDomain GetTransmissionDomain ( DesignStep  designStep)

Construct transmission domain for specified design step

Parameters
designStepThe design step (e.g. soft quantization) for which the transmission domain is constructed.
Returns
The transmission domain.

◆ GetUniformityError()

double GetUniformityError ( ComplexField  outField,
SamplingParameters  samplingParametersOfOutField 
)

Calculate uniformity error

Parameters
outFieldOutput field obtained by DoForwardProp
samplingParametersOfOutFieldThe sampling parameters of the output field.
Returns
The uniformity error

◆ GetWindowEfficiency()

double GetWindowEfficiency ( ComplexField  outField,
SamplingParameters  samplingParametersOfOutField 
)

Calculate window efficiency

Parameters
outFieldOutput field obtained by DoForwardProp
samplingParametersOfOutFieldThe sampling parameters of the output field.
Returns
The window efficiency.

◆ Load()

static DesignAlgorithmHandler Load ( string  fileName)
static

Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VL 6.0) or with view settings.

Parameters
fileNameName of the file.
Returns
The specified document.

◆ Save()

void Save ( string  fileName)

Save whole data structure

Parameters
fileNamePath and file name.

Property Documentation

◆ SuspendLogging

bool SuspendLogging
getset

Gets and sets whether logging of the merit functions is currently suspended. Only has an effect when logging is enabled and a simulation is currently running.