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
-
ObjectBaseSerializableObjectBaseManualSerializationApertureSettings
- 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
automaticModeboolWhether size and shape of the aperture are determined by the object containing the ApertureSettings object (TRUE) or by the user.
sizeFactordoubleThe aperture size factor for the AutomaticMode.
shapeBasicParameter.eApertureShapeThe shape of the aperture.
sizeVectorDThe size of the aperture.
useRelativeEdgeWidthboolWhether the edge width shall be given relative to the field size (TRUE) or in meters (FALSE).
absoluteEdgeWidthdoubleThe edge width in meters. Has only an effect if useRelativeEdgeWidth is FALSE.
relativeEdgeWidthdoubleThe edge width relative to the field size. Has only an effect if useRelativeEdgeWidth is TRUE.
apertureChangesSizeboolWhether or not the soft edge of the aperture changes the overall size of the resulting data.
apertureSizeDeterminationManualOrAutomaticOptional 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
apertureSizeDeterminationManualOrAutomaticOptional parameter to specify that the aperture size is either determined always automatically or always manually.
ApertureSettings(ApertureSettings)
Copy constructor
public ApertureSettings(ApertureSettings objectToCopy)
Parameters
objectToCopyApertureSettingsThe ApertureSettings object to copy.
Properties
AbsoluteEdgeWidth
Gets and sets the edge width in meters.
public double AbsoluteEdgeWidth { get; set; }
Property Value
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
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
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
Shape
Gets and sets the shape of the aperture.
public BasicParameter.eApertureShape Shape { get; set; }
Property Value
Size
Gets and sets the size of the aperture
public VectorD Size { get; set; }
Property Value
SizeFactor
Gets and sets the aperture size factor for the AutomaticMode.
public double SizeFactor { get; set; }
Property Value
TotalSize
Gets the total size of the aperture, including the soft edge.
public VectorD TotalSize { get; }
Property Value
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
Methods
ApplyOnComplexAmplitude(ComplexAmplitude, bool)
Applies this aperture on a ComplexAmplitude object.
public ComplexAmplitude ApplyOnComplexAmplitude(ComplexAmplitude complexAmplitude, bool resampleField)
Parameters
complexAmplitudeComplexAmplitudeThe field to which this aperture is applied.
resampleFieldboolIf set to
truethe 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
harmonicFieldsSetHarmonicFieldsSetThe Harmonic Fields Set to which this aperture is applied.
resampleFieldsboolIf set to
truethe 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
otherObjectobjectThe object to compare with this instance.
equalityIntentEqualityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.
Returns
EvaluateApertureFunctionAtGivenPosition(VectorD)
Method to evaluate the aperture value at given position.
public double EvaluateApertureFunctionAtGivenPosition(VectorD position)
Parameters
positionVectorDPosition to evaluate.
Returns
- double
Aperture value to apply to the given position.