Table of Contents

Class ApertureSettings

Namespace
VirtualLabAPI.Core.FieldRepresentations
Assembly
VirtualLabAPI.dll

Class describing aperture settings, i.e. its shape, size, and edge width. Sometimes also used for describing a field edge.

[Serializable]
public class ApertureSettings : ManualSerialization, IEquatable<IObjectBase>, ISerializable, IDeserializationCallback, ICloneable
Inheritance
ObjectBase
SerializableObjectBase
ManualSerialization
ApertureSettings
Implements
IEquatable<IObjectBase>
Inherited Members

Constructors

ApertureSettings(bool, double, eApertureShape, VectorD, bool, double, double, bool, ManualOrAutomatic)

Constructor to consistently set all possible parameters of an ApertureSettings object.

public ApertureSettings(bool automaticMode, double sizeFactor, BasicParameter.eApertureShape shape, VectorD size, bool useRelativeEdgeWidth, double absoluteEdgeWidth, double relativeEdgeWidth, bool apertureChangesSize, ManualOrAutomatic apertureSizeDetermination = ManualOrAutomatic.Both)

Parameters

automaticMode bool

Whether size and shape of the aperture are determined by the object containing the ApertureSettings object (TRUE) or by the user.

sizeFactor double

The aperture size factor for the AutomaticMode.

shape BasicParameter.eApertureShape

The shape of the aperture.

size VectorD

The size of the aperture.

useRelativeEdgeWidth bool

Whether the edge width shall be given relative to the field size (TRUE) or in meters (FALSE).

absoluteEdgeWidth double

The edge width in meters. Has only an effect if useRelativeEdgeWidth is FALSE.

relativeEdgeWidth double

The edge width relative to the field size. Has only an effect if useRelativeEdgeWidth is TRUE.

apertureChangesSize bool

Whether or not the soft edge of the aperture changes the overall size of the resulting data.

apertureSizeDetermination ManualOrAutomatic

Optional parameter to specify that the aperture size is either determined always automatically or always manually.

ApertureSettings(ManualOrAutomatic)

Initializes a new instance of the ApertureSettings class.

public ApertureSettings(ManualOrAutomatic apertureSizeDetermination = ManualOrAutomatic.Both)

Parameters

apertureSizeDetermination ManualOrAutomatic

Optional parameter to specify that the aperture size is either determined always automatically or always manually.

ApertureSettings(ApertureSettings)

Copy constructor

public ApertureSettings(ApertureSettings objectToCopy)

Parameters

objectToCopy ApertureSettings

The ApertureSettings object to copy.

Properties

AbsoluteEdgeWidth

Gets and sets the edge width in meters.

public double AbsoluteEdgeWidth { get; set; }

Property Value

double

ApertureChangesSize

Gets and sets whether or not the soft edge of the aperture changes the overall size of the resulting data. If set to true the soft edge is applied outside of the original data. So the resulting size of the data field must be enlarged to apply the soft edge. If set to false the soft edge is applied fully within the border of the original data which alters the original data.

public bool ApertureChangesSize { get; set; }

Property Value

bool

ApertureSizeDetermination

Gets whether the aperture size is always determined automatically, always set by the user or whether both is possible.

public ManualOrAutomatic ApertureSizeDetermination { get; }

Property Value

ManualOrAutomatic

AutomaticMode

Gets and sets whether size and shape of the aperture are determined by the object containing the ApertureSettings object (TRUE) or by the user.

public bool AutomaticMode { get; set; }

Property Value

bool

ParameterRunParameters

Gets all available parameters. For variable parameters (i.e. those double and int parameters which can be used in the Parameter Run, Parametric Optimization and so on) add a VaryParameterInfo object (derived from Parameter class) to the returned list.

public List<Parameter> ParameterRunParameters { get; }

Property Value

List<Parameter>

RelativeEdgeWidth

Gets and sets the edge width relative to the field size. Has only an effect if UseRelativeEdgeWidth is TRUE. Note that internally always the absolute edge with the minimum extension times the relative edge width is used as edge width in this case.

public double RelativeEdgeWidth { get; set; }

Property Value

double

Shape

Gets and sets the shape of the aperture.

public BasicParameter.eApertureShape Shape { get; set; }

Property Value

BasicParameter.eApertureShape

Size

Gets and sets the size of the aperture

public VectorD Size { get; set; }

Property Value

VectorD

SizeFactor

Gets and sets the aperture size factor for the AutomaticMode.

public double SizeFactor { get; set; }

Property Value

double

TotalSize

Gets the total size of the aperture, including the soft edge.

public VectorD TotalSize { get; }

Property Value

VectorD

UseRelativeEdgeWidth

Gets and sets whether the edge width shall be given relative to the field size (TRUE) or in meters (FALSE).

public bool UseRelativeEdgeWidth { get; set; }

Property Value

bool

Methods

ApplyOnComplexAmplitude(ComplexAmplitude, bool)

Applies this aperture on a ComplexAmplitude object.

public ComplexAmplitude ApplyOnComplexAmplitude(ComplexAmplitude complexAmplitude, bool resampleField)

Parameters

complexAmplitude ComplexAmplitude

The field to which this aperture is applied.

resampleField bool

If set to true the field might be resampled so that the aperture is correctly sampled. Else the original sampling of the field is maintained.

Returns

ComplexAmplitude

The adapted ComplexAmplitude object.

ApplyOnHarmonicFieldsSet(HarmonicFieldsSet, bool)

Applies this aperture on a HarmonicFieldsSet object.

public HarmonicFieldsSet ApplyOnHarmonicFieldsSet(HarmonicFieldsSet harmonicFieldsSet, bool resampleFields)

Parameters

harmonicFieldsSet HarmonicFieldsSet

The Harmonic Fields Set to which this aperture is applied.

resampleFields bool

If set to true the member fields of the Harmonic Fields Set might be resampled so that the aperture is correctly sampled. Else the original sampling of the fields is maintained.

Returns

HarmonicFieldsSet

The adapted HarmonicFieldsSet object.

Clone()

Clones this instance.

public override object Clone()

Returns

object

A deep copy of the ApertureSettings object.

Equals(object, EqualityIntent)

Determines whether the specified object is equal to this instance.

public override bool Equals(object otherObject, EqualityIntent equalityIntent)

Parameters

otherObject object

The object to compare with this instance.

equalityIntent EqualityIntent

Defines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

EvaluateApertureFunctionAtGivenPosition(VectorD)

Method to evaluate the aperture value at given position.

public double EvaluateApertureFunctionAtGivenPosition(VectorD position)

Parameters

position VectorD

Position to evaluate.

Returns

double

Aperture value to apply to the given position.