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

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Support class containing the manipulations for numerical data arrays. More...

Static Public Member Functions

static DataArrayBase AddConstant_Complex (DataArrayBase dataArray, Complex constant, int[] subsetIndices)
 Add a constant to certain subsets. The operation will be a complex addition. More...
 
static DataArrayBase AddConstant_Separately (DataArrayBase dataArray, double realPartOrAmplitude, double imaginaryPartOrPhase, bool amplitudePhaseRepresentation, int[] subsetIndices)
 Add a constant to certain subsets. The operation will consist of two independent real valued operations for the complex parts respectively. More...
 
static DataArrayBase AppendSubsetsFromAnotherDataArray (DataArrayBase targetDataArrayBase, DataArrayBase sourceDataArrayBase, int[] indicesToAppend, out string warnings)
 Method that appends the subsets of one data array to another. The data arrays have to have the same number of sampling points (for 2D: in each direction). More...
 
static DataArray1D AppendSubsetsFromAnotherDataArrayWithInterpolationToTargetCoordinates (DataArray1D targetDataArray1D, DataArray1D sourceDataArray1D, int[] indicesToAppend, out string warnings)
 Method that appends subsets from a source data array to another one (the target data array). The source will be interpolated to the coordinates of the target. More...
 
static DataArray2D AppendSubsetsFromAnotherDataArrayWithInterpolationToTargetCoordinates (DataArray2D targetDataArray2D, DataArray2D sourceDataArray2D, int[] indicesToAppend, out string warnings)
 Method that appends subsets from a source data array to another one (the target data array). The source will be interpolated to the coordinates of the target. More...
 
static DataArray1D AppendSubsetsFromAnotherDataArrayWithMerging (DataArray1D targetDataArray1D, DataArray1D sourceDataArray1D, int[] indicesToAppend, out string warnings)
 Method that appends subsets from a source data array to another one (the target data array). The result will have merged coordinates. More...
 
static DataArray2D AppendSubsetsFromAnotherDataArrayWithMerging (DataArray2D targetDataArray2D, DataArray2D sourceDataArray2D, int[] indicesToAppend, out string warnings)
 Method that appends subsets from a source data array to another one (the target data array). The result will have merged coordinates. More...
 
static DataArrayBase AppendSubsetsFromAnotherDataArrayWithMerging (DataArrayBase targetDataArrayBase, DataArrayBase sourceDataArrayBase, int[] indicesToAppend, out string warnings)
 Method that appends the subsets of one data array to another. The data arrays have to have the same number of sampling points (for 2D: in each direction). More...
 
static DataArrayBase ArrayArrayOperation (ArrayArrayOperationType operationType, DataArrayBase da1, DataArrayBase da2, List< Tuple< int, int > > indicesOfOperandSubsets, out string warnings)
 Does an array-array-operation of two data arrays. More...
 
static void ChangeInterpolationMethodEquidistant (ref DataArrayBase dataArrayBase, InterpolationMethod interpolationMethod)
 Method to change the interpolation method of a data array. More...
 
static bool CheckForIdenticalCoordinateParametersOfTwoDataArrays (DataArrayBase da1, DataArrayBase da2, bool checkNonSamplingParameters, out string warnings, out List<(string propName, string prop_1, string prop_2, bool samplingRelated)> differences, bool checkWithTolerance=true)
 Method that compares the coordinate and interpolation parameters of two given data arrays More...
 
static DataArrayBase ClipValues (DataArrayBase dataArray, double amplitudeThreshold, int[] subsetIndices)
 Clips the amplitude (or real part for real valued data) at a given threshold. More...
 
static DataArrayBase ConjugatePhase (DataArrayBase dataArray, int[] subsetIndices)
 Conjugates the phase. More...
 
static DataArray1D Convolution (DataArray1D da1, DataArray1D da2, List< Tuple< int, int > > indicesOfOperandSubsets, out string warnings)
 Does a convolution of two data arrays. More...
 
static DataArray2D Convolution (DataArray2D da1, DataArray2D da2, List< Tuple< int, int > > indicesOfOperandSubsets, out string warnings)
 Does a convolution of two data arrays. More...
 
static DataArray2D CreatePointCloudAddOn (DataArray2D dataArray2receivePointCloud, DataArrayGridLess dataArrayGridLessWithPointCloud, int[] selectedSubsetIndices, out int noOfOutlyingPoints)
 Creates a point cloud add-on from a DataArrayGridLess and adds it to a given gridded 2D data array. More...
 
static DataArray2D CreatePointCloudAddOn (DataArray2D dataArray2receivePointCloud, Propagation.RayDistribution rayDistribution, int[] selectedSubsetIndices, out int noOfOutlyingPoints)
 Creates a point cloud add-on from a RayDistribution and adds it to a given gridded 2D data array. More...
 
static DataArrayGridLess CreatePointCloudAddOn (DataArrayGridLess dataArray2receivePointCloud, DataArrayGridLess dataArrayGridLessWithPointCloud, int[] selectedSubsetIndices, out int noOfOutlyingPoints)
 Creates a point cloud add-on from a DataArrayGridLess and adds it to a given gridless 2D data array. More...
 
static DataArrayGridLess CreatePointCloudAddOn (DataArrayGridLess dataArray2receivePointCloud, Propagation.RayDistribution rayDistribution, int[] selectedSubsetIndices, out int noOfOutlyingPoints)
 Creates a point cloud add-on from a RayDistribution and adds it to a given gridless 2D data array. More...
 
static DataArray1D CreateRegionAddOn (DataArray1D dataArray2receiveRegion, Numerics.Region1D.IntervalRegion region, int[] selectedSubsetIndices, out bool notCompletelyInDomain)
 Creates a region add-on from an interval region and adds it to a given 1D data array. More...
 
static DataArray2D CreateRegionAddOn (DataArray2D dataArray2receiveRegion, Numerics.Region2D.ElementaryRegion2D region, int[] selectedSubsetIndices, out bool notCompletelyInDomain)
 Creates a region add-on from an elementary region and adds it to a given gridded 2D data array. More...
 
static DataArrayGridLess CreateRegionAddOn (DataArrayGridLess dataArray2receiveRegion, Numerics.Region2D.ElementaryRegion2D region, int[] selectedSubsetIndices, out bool notCompletelyInDomain)
 Creates a region add-on from an elementary region and adds it to a given gridless 2D data array. More...
 
static DataArrayBase DiscreteOversampling (DataArrayBase dataArray, int factor)
 Method for oversampling an equidistant data array in way that new sampling points are set to zero. More...
 
static DataArrayBase DivideByConstant_Complex (DataArrayBase dataArray, Complex constant, int[] subsetIndices)
 Divide certain subsets by a constant. The operation will be a complex division. More...
 
static DataArrayBase DivideByConstant_Separately (DataArrayBase dataArray, double realPartOrAmplitude, double imaginaryPartOrPhase, bool amplitudePhaseRepresentation, int[] subsetIndices)
 Divide certain subsets by a constant. The operation will consist of two independent real valued operations for the complex parts respectively. More...
 
static DataArrayBase DoFieldQuantityOperationOnDataArray (DataArrayBase dataArrayBase, ComplexPart operation)
 Method that does a field quantity operation on a data array More...
 
static DataArrayBase EquidistantResamplingOfDataArray (DataArrayBase dataArrayBase, Vector samplingPoints, VectorD samplingDistance, InterpolationMethod interpolationMethod, bool keepInterpolationMethodsUnchanged)
 Method to resample a data array. More...
 
static DataArray1D ExtractEquidistant1DDataArrayFrom2DDataArray (DataArray2D dataArray2D, VectorD startPoint, VectorD endPoint, bool enforceSteppedInterpolation, int noOfPointsToExtract, double newStartCoordinate, string commentOfCoordinates, PhysicalProperty physicalPropertyOfCoordinate)
 Method for extracting an equidistantly sampled 1D data array from any 2D data array. This will be done along a line which has to be specified. More...
 
static DataArray1D ExtractRangeSelection (DataArray1D inputDataArray, RectangleOfPixels rangeMarker, double rangeEndPoint)
 Extracts the given range of a one-dimensional data array. More...
 
static DataArray2D ExtractRectangularSelection (DataArray2D inputDataArray, RectangleOfPixels rectangleMarker, VectorD rectEndPoint)
 Extracts the selected rectangular region of a two-dimensional data array. More...
 
static DataArray1D ExtractSubsetDataAtOnePoint (DataArray1D dataArray1D, double extractionCoordinate, bool enforceSteppedInterpolation, string newCommentOfData, double newStartCoordinate, double newSamplingDistance, string commentOfNewCoordinate, PhysicalProperty physicalPropertyOfNewCoordinate, out PhysicalValueComplex singleValueForSingleSubset)
 Extracts the subset data at one point. More...
 
static DataArray1D ExtractSubsetDataAtOnePoint (DataArray2D dataArray2D, VectorD extractionCoordinates, bool enforceSteppedInterpolation, string newCommentOfData, double newStartCoordinate, double newSamplingDistance, string commentOfNewCoordinate, PhysicalProperty physicalPropertyOfNewCoordinate, out PhysicalValueComplex singleValueForSingleSubset)
 Extracts the subset data at one point. More...
 
static ChromaticFieldsSetBase ExtractSubsetsFromDataArray (ChromaticFieldsSetBase cfsBase, int[] indicesToBeKept)
 Method that extracts subsets from a data array More...
 
static DataArrayBase ExtractSubsetsFromDataArray (DataArrayBase dataArrayBase, int[] indicesToBeKept)
 Method that extracts subsets from a data array More...
 
static DataArrayBase FillSelection (DataArrayBase dataArray, Complex fillValue, RectangleOfPixels regionMarker, bool useInverseSelection, int[] subsetIndices)
 Fills the selected region of the data array with the specified value. More...
 
static DataArrayBase FourierTransformationOfDataArray (DataArrayBase dataArray, bool useNumericalFT, bool useInverseFT)
 Applies a FFT to a data array. More...
 
static void GetDifferentCoordinateParametersOfTwoDataArrays (DataArray1D dataArray_1, DataArray1D dataArray_2, bool checkWithTolerance, out List<(string propName, string prop_1, string prop_2, bool samplingRelated)> differences)
 Gets all data array differences related to the coordinates. More...
 
static void GetDifferentCoordinateParametersOfTwoDataArrays (DataArray2D dataArray_1, DataArray2D dataArray_2, bool checkWithTolerance, out List<(string propName, string prop_1, string prop_2, bool samplingRelated)> differences_X, out List<(string propName, string prop_1, string prop_2, bool samplingRelated)> differences_Y)
 Gets all data array differences related to the coordinates. More...
 
static void GetDifferentCoordinateParametersOfTwoDataArrays (DataArrayGridLess dataArray_1, DataArrayGridLess dataArray_2, bool checkWithTolerance, out List<(string propName, string prop_1, string prop_2, bool samplingRelated)> differences)
 Gets all data array differences related to the coordinates. More...
 
static DataArrayBase GetTemporalSamplingOfRealPart (DataArrayBase numericalDataArray, int numberOfFrames, bool treatAsElectricField)
 Get temporal sampling of real part of first data subset over one period. The real part of the given data array is multiplied with exp(i*omega*t) [=exp(i*2PI*[t/T])]. More...
 
static DataArrayBase LiftPositive (DataArrayBase dataArray, int[] subsetIndices)
 Lifts the values of a data array in a way no negative values occur in the real part anymore. More...
 
static DataArray1D MirrorDataArray1D_Horizontally (DataArray1D dataArray, int[] subsetIndices)
 Method which performs a horizontal mirror operation on a DataArray1D. More...
 
static DataArray2D MirrorDataArray2D_Horizontally (DataArray2D dataArray, int[] subsetIndices)
 Method which performs a horizontal mirror operation on a DataArray2D. More...
 
static DataArray2D MirrorDataArray2D_Vertically (DataArray2D dataArray, int[] subsetIndices)
 Method which performs a vertical mirror operation on a DataArray2D. More...
 
static DataArrayBase ModifyPhase (DataArrayBase dataArrayBase, PhaseModifyOperation operation, double wavelength, bool useQuantization, int numberOfLevels, double doubleParameter, bool hermitian, bool superimpose, int[] subsetIndices)
 Static method which modifies the phase in various ways. More...
 
static DataArrayBase MultiplyConstant_Complex (DataArrayBase dataArray, Complex constant, int[] subsetIndices)
 Multiply a constant with certain subsets. The operation will be a complex multiplication. More...
 
static DataArrayBase MultiplyConstant_Separately (DataArrayBase dataArray, double realPartOrAmplitude, double imaginaryPartOrPhase, bool amplitudePhaseRepresentation, int[] subsetIndices)
 Multiply a constant with certain subsets. The operation will consist of two independent real valued operations for the complex parts respectively. More...
 
static DataArrayBase Normalize (DataArrayBase dataArray, RectangleOfPixels regionMarker=null, int[] subsetIndices)
 Normalizes a data array, i.e. brings the amplitude into the range 0 ... +1 and the real part into the range -1 ... +1. More...
 
static DataArrayBase PeriodicReplicationOfDataArray (DataArrayBase dataArrayBase, VectorD replicationFactors, bool keepOriginalInCenter)
 Method for periodic replication of data arrays. More...
 
static DataArrayBase Quantize (DataArrayBase dataArray, QuantizationType quantizationType, int noOfAmplitudeLevels, int noOfPhaseLevels, double softQuantizationFactor)
 Does a quantization of all subsets of a data array. More...
 
static DataArrayBase RaiseToPowerOfConstant_Complex (DataArrayBase dataArray, Complex constant, int[] subsetIndices)
 Raise to the power of a constant with certain subsets. The operation will be a complex exponentiation. More...
 
static DataArrayBase RaiseToPowerOfConstant_Separately (DataArrayBase dataArray, double realPartOrAmplitude, double imaginaryPartOrPhase, bool amplitudePhaseRepresentation, int[] subsetIndices)
 Raise to the power of a constant with certain subsets. The operation will consist of two independent real valued operations for the complex parts respectively. More...
 
static DataArray2D RemovePhaseDislocationsInsideSelection (DataArray2D dataArray, RectangleOfPixels regionMarker, int[] subsetIndices)
 Static function to remove all phase dislocations within the rectangular selection. More...
 
static DataArray2D RemoveRedundantData (DataArray2D inputDataArray)
 Removes redundant data in a two-dimensional non-equidistant data array with Constant Interval interpolation and one subset. First all columns are scanned whether two consecutive columns have the same data. Then the same is done for all rows. More...
 
static ChromaticFieldsSetBase RemoveSubsetsFromDataArray (ChromaticFieldsSetBase cfsBase, int[] removeIndices)
 Method that removes subsets from a data array More...
 
static DataArrayBase RemoveSubsetsFromDataArray (DataArrayBase dataArrayBase, int[] removeIndices)
 Method that removes subsets from a data array More...
 
static DataArrayBase SavitzkyGolayFilter (DataArrayBase dataArray, int windowSize, int order)
 Applies the Savitzky-Golay-Filter on the given data array. This filter is a special low-pass filter, well adapted for data smoothing. More...
 
static DataArrayBase ScaleToValueRange (DataArrayBase dataArray, double minimum, double maximum, bool cloneDataArray, int[] subsetIndices)
 Normalizes a data array, i.e. brings the amplitude into the range 0 ... +1 and the real part into the range -1 ... +1. More...
 
static DataArrayBase SetToConstant (DataArrayBase dataArray, Complex constant, int[] subsetIndices)
 Set certain subsets to a constant. More...
 
static DataArrayBase SumOfAllSubsets (DataArrayBase dataArrayBase, bool complexAddition, ComplexPart partToSumInComplexCase)
 Method which allows a complex-valued or real-valued summation of all subsets of a data array. More...
 
static DataArray2D TransposeDataArray2D (DataArray2D dataArray)
 Method which transposes a DataArray2D, which swaps all x and y properties. More...
 
static DataArrayGridLess TransposeDataArray2D (DataArrayGridLess dataArray)
 Method which transposes a DataArrayGridLess, which swaps all x and y properties. More...
 
static DataArrayBase UnwrapPhase (DataArrayBase dataArray, int[] subsetIndices)
 Unwraps the phase, i.e. removes the 2 \(\pi\) jumps. More...
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Support class containing the manipulations for numerical data arrays.

Member Function Documentation

◆ AddConstant_Complex()

static DataArrayBase AddConstant_Complex ( DataArrayBase  dataArray,
Complex  constant,
int[]  subsetIndices 
)
static

Add a constant to certain subsets. The operation will be a complex addition.

Parameters
dataArrayThe data array to manipulate.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
constantThe complex constant to be used for the operation.
Returns
The result of the addition.

◆ AddConstant_Separately()

static DataArrayBase AddConstant_Separately ( DataArrayBase  dataArray,
double  realPartOrAmplitude,
double  imaginaryPartOrPhase,
bool  amplitudePhaseRepresentation,
int[]  subsetIndices 
)
static

Add a constant to certain subsets. The operation will consist of two independent real valued operations for the complex parts respectively.

Parameters
dataArrayThe data array to manipulate.
realPartOrAmplitudeThe value added to the real part or the amplitude.
imaginaryPartOrPhaseThe value added to the imaginary part or the phase.
amplitudePhaseRepresentationIf set to true amplitude and phase are given. Otherwise real and imaginary part are given.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The result of the addition.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ AppendSubsetsFromAnotherDataArray()

static DataArrayBase AppendSubsetsFromAnotherDataArray ( DataArrayBase  targetDataArrayBase,
DataArrayBase  sourceDataArrayBase,
int[]  indicesToAppend,
out string  warnings 
)
static

Method that appends the subsets of one data array to another. The data arrays have to have the same number of sampling points (for 2D: in each direction).

Parameters
targetDataArrayBaseData array to append the subsets to
sourceDataArrayBaseData array to get the subsets from.
indicesToAppendThe indices of the subsets to append.
warningsOut parameter containing possible warnings.
Returns
A data array with copied subsets appended.
Exceptions
System.ArgumentExceptionThe data arrays have to be of the same type. or No valid index array given. or Method works for DataArray1D and DataArray2D only.

◆ AppendSubsetsFromAnotherDataArrayWithInterpolationToTargetCoordinates() [1/2]

static DataArray1D AppendSubsetsFromAnotherDataArrayWithInterpolationToTargetCoordinates ( DataArray1D  targetDataArray1D,
DataArray1D  sourceDataArray1D,
int[]  indicesToAppend,
out string  warnings 
)
static

Method that appends subsets from a source data array to another one (the target data array). The source will be interpolated to the coordinates of the target.

Parameters
targetDataArray1DThe data array new subsets will be appended to.
sourceDataArray1DThe data array the subsets to be appended are get from.
indicesToAppendThe subset indices of the subsets from the source to be appended.
warningsWarning which occurred if some parameters are not fitting.
Returns
A new data array with merged coordinates which holds all subsets of the target (which have been interpolated of the merged coordinates) as well as the selected subsets of the source (which have been interpolated too).
Exceptions
System.ArgumentExceptionNo valid index array given.
System.IndexOutOfRangeExceptionInvalid subset index found.

◆ AppendSubsetsFromAnotherDataArrayWithInterpolationToTargetCoordinates() [2/2]

static DataArray2D AppendSubsetsFromAnotherDataArrayWithInterpolationToTargetCoordinates ( DataArray2D  targetDataArray2D,
DataArray2D  sourceDataArray2D,
int[]  indicesToAppend,
out string  warnings 
)
static

Method that appends subsets from a source data array to another one (the target data array). The source will be interpolated to the coordinates of the target.

Parameters
targetDataArray2DThe data array new subsets will be appended to.
sourceDataArray2DThe data array the subsets to be appended are get from.
indicesToAppendThe subset indices of the subsets from the source to be appended.
warningsWarning which occurred if some parameters are not fitting.
Returns
A new data array with merged coordinates which holds all subsets of the target (which have been interpolated of the merged coordinates) as well as the selected subsets of the source (which have been interpolated too).
Exceptions
System.ArgumentExceptionNo valid index array given.
System.IndexOutOfRangeExceptionInvalid subset index found.

◆ AppendSubsetsFromAnotherDataArrayWithMerging() [1/3]

static DataArray1D AppendSubsetsFromAnotherDataArrayWithMerging ( DataArray1D  targetDataArray1D,
DataArray1D  sourceDataArray1D,
int[]  indicesToAppend,
out string  warnings 
)
static

Method that appends subsets from a source data array to another one (the target data array). The result will have merged coordinates.

Parameters
targetDataArray1DThe data array new subsets will be appended to.
sourceDataArray1DThe data array the subsets to be appended are get from.
indicesToAppendThe subset indices of the subsets from the source to be appended.
warningsWarning which occurred if some parameters are not fitting.
Returns
A new data array with merged coordinates which holds all subsets of the target (which have been interpolated of the merged coordinates) as well as the selected subsets of the source (which have been interpolated too).
Exceptions
System.IndexOutOfRangeExceptionInvalid subset index found.

◆ AppendSubsetsFromAnotherDataArrayWithMerging() [2/3]

static DataArray2D AppendSubsetsFromAnotherDataArrayWithMerging ( DataArray2D  targetDataArray2D,
DataArray2D  sourceDataArray2D,
int[]  indicesToAppend,
out string  warnings 
)
static

Method that appends subsets from a source data array to another one (the target data array). The result will have merged coordinates.

Parameters
targetDataArray2DThe data array new subsets will be appended to.
sourceDataArray2DThe data array the subsets to be appended are get from.
indicesToAppendThe subset indices of the subsets from the source to be appended. If this array is null or empty, all subsets of the source array will be appended.
warningsWarning which occurred if some parameters are not fitting.
Returns
A new data array with merged coordinates which holds all subsets of the target (which have been interpolated of the merged coordinates) as well as the selected subsets of the source (which have been interpolated too).
Exceptions
System.IndexOutOfRangeExceptionInvalid subset index found.

◆ AppendSubsetsFromAnotherDataArrayWithMerging() [3/3]

static DataArrayBase AppendSubsetsFromAnotherDataArrayWithMerging ( DataArrayBase  targetDataArrayBase,
DataArrayBase  sourceDataArrayBase,
int[]  indicesToAppend,
out string  warnings 
)
static

Method that appends the subsets of one data array to another. The data arrays have to have the same number of sampling points (for 2D: in each direction).

Parameters
targetDataArrayBaseData array to append the subsets to
sourceDataArrayBaseData array to get the subsets from.
indicesToAppendThe indices of the subsets to append.
warningsOut parameter containing possible warnings.
Returns
A data array with copied subsets appended.
Exceptions
System.ArgumentExceptionThe data arrays have to be of the same type. or No valid index array given. or Method works for DataArray1D and DataArray2D only.

◆ ArrayArrayOperation()

static DataArrayBase ArrayArrayOperation ( ArrayArrayOperationType  operationType,
DataArrayBase  da1,
DataArrayBase  da2,
List< Tuple< int, int > >  indicesOfOperandSubsets,
out string  warnings 
)
static

Does an array-array-operation of two data arrays.

Parameters
operationTypeType of operation to be done.
da1First operand.
da2Second operand.
indicesOfOperandSubsetsList of those index pairs which correspond to the subsets that have to be used for the subset operations.
warningsWarnings in case the coordinate parameters don't match.
Returns
The result of the array-array-operation.
Exceptions
System.ArgumentExceptionThe data arrays have to have identical coordinate dimensionalities. or operationType not supported. or Operation supports 1D and gridded 2D data arrays only.
System.IndexOutOfRangeExceptionInvalid subset index found.

◆ ChangeInterpolationMethodEquidistant()

static void ChangeInterpolationMethodEquidistant ( ref DataArrayBase  dataArrayBase,
InterpolationMethod  interpolationMethod 
)
static

Method to change the interpolation method of a data array.

Parameters
dataArrayBaseReference to the data array whose interpolation method shall be changed.
interpolationMethodInterpolation method that shall be used for resampling in both directions
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ CheckForIdenticalCoordinateParametersOfTwoDataArrays()

static bool CheckForIdenticalCoordinateParametersOfTwoDataArrays ( DataArrayBase  da1,
DataArrayBase  da2,
bool  checkNonSamplingParameters,
out string  warnings,
out List<(string propName, string prop_1, string prop_2, bool samplingRelated)>  differences,
bool  checkWithTolerance = true 
)
static

Method that compares the coordinate and interpolation parameters of two given data arrays

Parameters
da1First data array to be compared with second.
da2Second data array to be compared with first.
checkNonSamplingParametersIf TRUE, the return value will be 'false' even if only those properties which are not directly related to sampling (e.g. interpolation, physical meaning) are not equal. Otherwise, all sampling related parameters being equal will be sufficient for the return value to be 'true'.
warningsString of warnings that result from differing parameters.
Returns
TRUE if the parameters are identical.

◆ ClipValues()

static DataArrayBase ClipValues ( DataArrayBase  dataArray,
double  amplitudeThreshold,
int[]  subsetIndices 
)
static

Clips the amplitude (or real part for real valued data) at a given threshold.

Parameters
dataArrayThe data array which shall be clipped.
amplitudeThresholdThe amplitude / real part threshold to clip at.
subsetIndicesOne or more subset indices which shall be manipulated. If none is specified, then all subsets are manipulated.
Returns
The clipped data array.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ ConjugatePhase()

static DataArrayBase ConjugatePhase ( DataArrayBase  dataArray,
int[]  subsetIndices 
)
static

Conjugates the phase.

Parameters
dataArrayThe data array whose phase shall be conjugated.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The data array with the conjugated phase.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ Convolution() [1/2]

static DataArray1D Convolution ( DataArray1D  da1,
DataArray1D  da2,
List< Tuple< int, int > >  indicesOfOperandSubsets,
out string  warnings 
)
static

Does a convolution of two data arrays.

Parameters
da1First operand.
da2Second operand.
indicesOfOperandSubsetsList of those index pairs which correspond to the subsets that have to be used for the subset operations.
warningsWarnings in case the coordinate parameters don't match.
Returns
The result of the array-array-operation.
Exceptions
System.ArgumentExceptionOperands have to be equidistant.

◆ Convolution() [2/2]

static DataArray2D Convolution ( DataArray2D  da1,
DataArray2D  da2,
List< Tuple< int, int > >  indicesOfOperandSubsets,
out string  warnings 
)
static

Does a convolution of two data arrays.

Parameters
da1First operand.
da2Second operand.
indicesOfOperandSubsetsList of those index pairs which correspond to the subsets that have to be used for the subset operations.
warningsWarnings in case the coordinate parameters don't match.
Returns
The result of the array-array-operation.
Exceptions
System.ArgumentExceptionOperands have to be completely equidistantly sampled.

◆ CreatePointCloudAddOn() [1/4]

static DataArray2D CreatePointCloudAddOn ( DataArray2D  dataArray2receivePointCloud,
DataArrayGridLess  dataArrayGridLessWithPointCloud,
int[]  selectedSubsetIndices,
out int  noOfOutlyingPoints 
)
static

Creates a point cloud add-on from a DataArrayGridLess and adds it to a given gridded 2D data array.

Parameters
dataArray2receivePointCloudData array to add the point cloud add-on.
dataArrayGridLessWithPointCloudDataArrayGridLess to create the point cloud from.
selectedSubsetIndicesArray of subset indices to apply the point cloud on.
noOfOutlyingPointsThe number of that point cloud points which lie outside the domain of the gridded 2D DA.

◆ CreatePointCloudAddOn() [2/4]

static DataArray2D CreatePointCloudAddOn ( DataArray2D  dataArray2receivePointCloud,
Propagation.RayDistribution  rayDistribution,
int[]  selectedSubsetIndices,
out int  noOfOutlyingPoints 
)
static

Creates a point cloud add-on from a RayDistribution and adds it to a given gridded 2D data array.

Parameters
dataArray2receivePointCloudData array to add the point cloud add-on.
rayDistributionRay distribution to create the point cloud from.
selectedSubsetIndicesArray of subset indices to apply the point cloud on.
noOfOutlyingPointsThe number of that point cloud points which lie outside the domain of the gridded 2D DA.

◆ CreatePointCloudAddOn() [3/4]

static DataArrayGridLess CreatePointCloudAddOn ( DataArrayGridLess  dataArray2receivePointCloud,
DataArrayGridLess  dataArrayGridLessWithPointCloud,
int[]  selectedSubsetIndices,
out int  noOfOutlyingPoints 
)
static

Creates a point cloud add-on from a DataArrayGridLess and adds it to a given gridless 2D data array.

Parameters
dataArray2receivePointCloudData array to add the point cloud add-on.
dataArrayGridLessWithPointCloudDataArrayGridLess to create the point cloud from.
selectedSubsetIndicesArray of subset indices to apply the point cloud on.
noOfOutlyingPointsThe number of that point cloud points which lie outside the domain of the gridded 2D DA.

◆ CreatePointCloudAddOn() [4/4]

static DataArrayGridLess CreatePointCloudAddOn ( DataArrayGridLess  dataArray2receivePointCloud,
Propagation.RayDistribution  rayDistribution,
int[]  selectedSubsetIndices,
out int  noOfOutlyingPoints 
)
static

Creates a point cloud add-on from a RayDistribution and adds it to a given gridless 2D data array.

Parameters
dataArray2receivePointCloudData array to add the point cloud add-on.
rayDistributionRay distribution to create the point cloud from.
selectedSubsetIndicesArray of subset indices to apply the point cloud on.
noOfOutlyingPointsThe number of that point cloud points which lie outside the domain of the gridded 2D DA.

◆ CreateRegionAddOn() [1/3]

static DataArray1D CreateRegionAddOn ( DataArray1D  dataArray2receiveRegion,
Numerics.Region1D.IntervalRegion  region,
int[]  selectedSubsetIndices,
out bool  notCompletelyInDomain 
)
static

Creates a region add-on from an interval region and adds it to a given 1D data array.

Parameters
dataArray2receiveRegionData array to add the region add-on.
regionRegion to use as add-on.
selectedSubsetIndicesArray of subset indices to apply the point cloud on.
notCompletelyInDomainIf true, the given region may not lie completely inside the data arrays domain.

◆ CreateRegionAddOn() [2/3]

static DataArray2D CreateRegionAddOn ( DataArray2D  dataArray2receiveRegion,
Numerics.Region2D.ElementaryRegion2D  region,
int[]  selectedSubsetIndices,
out bool  notCompletelyInDomain 
)
static

Creates a region add-on from an elementary region and adds it to a given gridded 2D data array.

Parameters
dataArray2receiveRegionData array to add the region add-on.
regionRegion to use as add-on.
selectedSubsetIndicesArray of subset indices to apply the point cloud on.
notCompletelyInDomainIf true, the given region may not lie completely inside the data arrays domain.

◆ CreateRegionAddOn() [3/3]

static DataArrayGridLess CreateRegionAddOn ( DataArrayGridLess  dataArray2receiveRegion,
Numerics.Region2D.ElementaryRegion2D  region,
int[]  selectedSubsetIndices,
out bool  notCompletelyInDomain 
)
static

Creates a region add-on from an elementary region and adds it to a given gridless 2D data array.

Parameters
dataArray2receiveRegionData array to add the region add-on.
regionRegion to use as add-on.
selectedSubsetIndicesArray of subset indices to apply the point cloud on.
notCompletelyInDomainIf true, the given region may not lie completely inside the data arrays domain.

◆ DiscreteOversampling()

static DataArrayBase DiscreteOversampling ( DataArrayBase  dataArray,
int  factor 
)
static

Method for oversampling an equidistant data array in way that new sampling points are set to zero.

Parameters
dataArrayData array to be oversampled.
factorOversampling factor.
Returns
The resampled data array.
Exceptions
System.ArgumentOutOfRangeExceptionThe oversampling factor has to be greater or equal 1.
System.ArgumentExceptionThe method works for equidistant arrays only. or Method works for DataArray1D and DataArray2D only.

◆ DivideByConstant_Complex()

static DataArrayBase DivideByConstant_Complex ( DataArrayBase  dataArray,
Complex  constant,
int[]  subsetIndices 
)
static

Divide certain subsets by a constant. The operation will be a complex division.

Parameters
dataArrayThe data array to manipulate.
constantThe complex constant to be used for the operation.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The result of the division.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ DivideByConstant_Separately()

static DataArrayBase DivideByConstant_Separately ( DataArrayBase  dataArray,
double  realPartOrAmplitude,
double  imaginaryPartOrPhase,
bool  amplitudePhaseRepresentation,
int[]  subsetIndices 
)
static

Divide certain subsets by a constant. The operation will consist of two independent real valued operations for the complex parts respectively.

Parameters
dataArrayThe data array to manipulate.
realPartOrAmplitudeThe value by which the real part or the amplitude is divided.
imaginaryPartOrPhaseThe value by which the imaginary part or the phase is divided.
amplitudePhaseRepresentationIf set to true amplitude and phase are given. Otherwise real and imaginary part are given.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The result of the division.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ DoFieldQuantityOperationOnDataArray()

static DataArrayBase DoFieldQuantityOperationOnDataArray ( DataArrayBase  dataArrayBase,
ComplexPart  operation 
)
static

Method that does a field quantity operation on a data array

Parameters
dataArrayBaseData array to operate on
operationField quantity operation to do.
Returns
A data array that results from the given operation.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ EquidistantResamplingOfDataArray()

static DataArrayBase EquidistantResamplingOfDataArray ( DataArrayBase  dataArrayBase,
Vector  samplingPoints,
VectorD  samplingDistance,
InterpolationMethod  interpolationMethod,
bool  keepInterpolationMethodsUnchanged 
)
static

Method to resample a data array.

Parameters
dataArrayBaseData array to be resampled.
samplingPointsNew number of sampling points.
samplingDistanceNew sampling distances.
interpolationMethodInterpolation method that shall be used for resampling in both directions
keepInterpolationMethodsUnchangedIf TRUE, the interpolation methods for the data array are kept unchanged, no matter what methods have been used for resampling. If FALSE, the methods for resampling are set as the data array's new interpolation methods.
Returns
Resampled data array.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ ExtractEquidistant1DDataArrayFrom2DDataArray()

static DataArray1D ExtractEquidistant1DDataArrayFrom2DDataArray ( DataArray2D  dataArray2D,
VectorD  startPoint,
VectorD  endPoint,
bool  enforceSteppedInterpolation,
int  noOfPointsToExtract,
double  newStartCoordinate,
string  commentOfCoordinates,
PhysicalProperty  physicalPropertyOfCoordinate 
)
static

Method for extracting an equidistantly sampled 1D data array from any 2D data array. This will be done along a line which has to be specified.

Parameters
dataArray2DDataArray2D to extract the 1D data from.
startPointStart coordinates of extraction.
endPointEnd coordinates of extraction.
enforceSteppedInterpolationIf true, the extraction will be done from stepped data instead of using the data array's own interpolation method.
noOfPointsToExtractThe number of points to be extracted.
newStartCoordinateCoordinate which will be set as new start coordinate in the resulting 1D data array.
commentOfCoordinatesThe description for the new coordinate axis.
physicalPropertyOfCoordinateThe physical property to be used for the result.
Returns
Result of an equidistant 1D extraction in a 2D data array.
Exceptions
ArgumentOutOfRangeExceptionLess than two data points to extract.
ArgumentExceptionStart point and end point of extraction must not be identical.
System.ArgumentExceptionStart point and end point of extraction must not be identical.

◆ ExtractRangeSelection()

static DataArray1D ExtractRangeSelection ( DataArray1D  inputDataArray,
RectangleOfPixels  rangeMarker,
double  rangeEndPoint 
)
static

Extracts the given range of a one-dimensional data array.

Parameters
inputDataArrayThe data array from which the selected range shall be extracted.
rangeMarkerThe range marker indicating the region to extract.
rangeEndPointThe physical coordinate of the range's end point.
Returns
The extracted data array.
Exceptions
System.ArgumentExceptionThe range selection contains only one sampling point. From this selection a one-dimensional data array cannot be extracted.

◆ ExtractRectangularSelection()

static DataArray2D ExtractRectangularSelection ( DataArray2D  inputDataArray,
RectangleOfPixels  rectangleMarker,
VectorD  rectEndPoint 
)
static

Extracts the selected rectangular region of a two-dimensional data array.

Parameters
inputDataArrayThe data array from which the selected rectangle marker shall be extracted.
rectangleMarkerThe rectangle marker indicating the selected region of the field.
rectEndPointThe physical coordinates of the rectangle's upper right point.
Returns
The extracted data array.
Exceptions
System.ArgumentExceptionThe rectangular selection contains only one sampling point in x- or y-direction. From this selection a two-dimensional data array cannot be extracted.

◆ ExtractSubsetDataAtOnePoint() [1/2]

static DataArray1D ExtractSubsetDataAtOnePoint ( DataArray1D  dataArray1D,
double  extractionCoordinate,
bool  enforceSteppedInterpolation,
string  newCommentOfData,
double  newStartCoordinate,
double  newSamplingDistance,
string  commentOfNewCoordinate,
PhysicalProperty  physicalPropertyOfNewCoordinate,
out PhysicalValueComplex  singleValueForSingleSubset 
)
static

Extracts the subset data at one point.

Parameters
dataArray1DThe data array from which the data is extracted.
extractionCoordinateThe extraction coordinate.
enforceSteppedInterpolationIf true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is.
newCommentOfDataThe new comment of data.
newStartCoordinateThe new start coordinate.
newSamplingDistanceThe new sampling distance.
commentOfNewCoordinateThe new comment of the coordinate axis.
physicalPropertyOfNewCoordinateThe new physical property of the coordinate axis.
singleValueForSingleSubsetOut parameter returning the single value in case the given data array has only one subset.
Returns
A DataArray1D with the extracted data.
Exceptions
System.ArgumentExceptionThe given coordinate lies outside the coordinate range of the Numerical Data Array. or The subsets have different physical properties.

◆ ExtractSubsetDataAtOnePoint() [2/2]

static DataArray1D ExtractSubsetDataAtOnePoint ( DataArray2D  dataArray2D,
VectorD  extractionCoordinates,
bool  enforceSteppedInterpolation,
string  newCommentOfData,
double  newStartCoordinate,
double  newSamplingDistance,
string  commentOfNewCoordinate,
PhysicalProperty  physicalPropertyOfNewCoordinate,
out PhysicalValueComplex  singleValueForSingleSubset 
)
static

Extracts the subset data at one point.

Parameters
dataArray2DThe data array from which the data is extracted.
extractionCoordinatesThe extraction coordinates.
enforceSteppedInterpolationIf true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is.
newCommentOfDataThe new comment of data.
newStartCoordinateThe new start coordinate.
newSamplingDistanceThe new sampling distance.
commentOfNewCoordinateThe new comment of the coordinate axis.
physicalPropertyOfNewCoordinateThe new physical property of the coordinate axis.
singleValueForSingleSubsetOut parameter returning the single value in case the given data array has only one subset.
Returns
A DataArray1D with the extracted data.
Exceptions
System.ArgumentExceptionThe given coordinate lies outside the coordinate range of the Numerical Data Array. or The subsets have different physical properties.

◆ ExtractSubsetsFromDataArray() [1/2]

static ChromaticFieldsSetBase ExtractSubsetsFromDataArray ( ChromaticFieldsSetBase  cfsBase,
int[]  indicesToBeKept 
)
static

Method that extracts subsets from a data array

Parameters
cfsBaseChromatic Fields Set to extract subsets from.
indicesToBeKeptThe indices of the subsets to extract.
Returns
A data array with extracted subsets.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D, DataArray2D, and DataArrayGridLess only.

◆ ExtractSubsetsFromDataArray() [2/2]

static DataArrayBase ExtractSubsetsFromDataArray ( DataArrayBase  dataArrayBase,
int[]  indicesToBeKept 
)
static

Method that extracts subsets from a data array

Parameters
dataArrayBaseData array to extract subsets from.
indicesToBeKeptThe indices of the subsets to extract.
Returns
A data array with extracted subsets.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D, DataArray2D, and DataArrayGridLess only.

◆ FillSelection()

static DataArrayBase FillSelection ( DataArrayBase  dataArray,
Complex  fillValue,
RectangleOfPixels  regionMarker,
bool  useInverseSelection,
int[]  subsetIndices 
)
static

Fills the selected region of the data array with the specified value.

Parameters
dataArrayThe data array to manipulate.
fillValueThe value with which the selected region shall be filled.
regionMarkerThe region of the field that shall be filled.
useInverseSelectionIf set to true the inverse of the selection is filled.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The manipulated data array.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ FourierTransformationOfDataArray()

static DataArrayBase FourierTransformationOfDataArray ( DataArrayBase  dataArray,
bool  useNumericalFT,
bool  useInverseFT 
)
static

Applies a FFT to a data array.

Parameters
dataArrayData array to be transformed. It has to be equidistant. The coordinates have to have one of the properties 'length', 'wave number', 'time', 'temporal frequency' or 'no unit'. The coordinates has to be centered around zero.
useNumericalFTIf TRUE, a numerical FFT instead of a physical one is done.
useInverseFTIf TRUE, an inverse FFT is done.
Returns
Fourier transform of input DA.
Exceptions
System.ArgumentExceptionOperation is allowed for equidistant arrays only. or The coordinate 0 has to be in the center of the array. or Operation is allowed for equidistant arrays only.
System.ExceptionType of data array is not supported.

◆ GetDifferentCoordinateParametersOfTwoDataArrays() [1/3]

static void GetDifferentCoordinateParametersOfTwoDataArrays ( DataArray1D  dataArray_1,
DataArray1D  dataArray_2,
bool  checkWithTolerance,
out List<(string propName, string prop_1, string prop_2, bool samplingRelated)>  differences 
)
static

Gets all data array differences related to the coordinates.

Parameters
dataArray_1First data array for comparison.
dataArray_2Second data array for comparison.
checkWithToleranceDo the comparison with some tolerance?
differencesList of all differences related to the coordinates.

◆ GetDifferentCoordinateParametersOfTwoDataArrays() [2/3]

static void GetDifferentCoordinateParametersOfTwoDataArrays ( DataArray2D  dataArray_1,
DataArray2D  dataArray_2,
bool  checkWithTolerance,
out List<(string propName, string prop_1, string prop_2, bool samplingRelated)>  differences_X,
out List<(string propName, string prop_1, string prop_2, bool samplingRelated)>  differences_Y 
)
static

Gets all data array differences related to the coordinates.

Parameters
dataArray_1First data array for comparison.
dataArray_2Second data array for comparison.
checkWithToleranceDo the comparison with some tolerance?
differences_XList of all differences related to the x-coordinates.
differences_YList of all differences related to the y-coordinates.

◆ GetDifferentCoordinateParametersOfTwoDataArrays() [3/3]

static void GetDifferentCoordinateParametersOfTwoDataArrays ( DataArrayGridLess  dataArray_1,
DataArrayGridLess  dataArray_2,
bool  checkWithTolerance,
out List<(string propName, string prop_1, string prop_2, bool samplingRelated)>  differences 
)
static

Gets all data array differences related to the coordinates.

Parameters
dataArray_1First data array for comparison.
dataArray_2Second data array for comparison.
checkWithToleranceDo the comparison with some tolerance?
differencesList of all differences.

◆ GetTemporalSamplingOfRealPart()

static DataArrayBase GetTemporalSamplingOfRealPart ( DataArrayBase  numericalDataArray,
int  numberOfFrames,
bool  treatAsElectricField 
)
static

Get temporal sampling of real part of first data subset over one period. The real part of the given data array is multiplied with exp(i*omega*t) [=exp(i*2PI*[t/T])].

Parameters
numericalDataArrayData Array to be temporally sampled.
numberOfFramesTemporal sampling count n.
treatAsElectricFieldIf true, the data re treated as being an electric field, as well as the result. Note that there is a scaling factor of 2 in case of an electric field. See the manual for more information.
Returns
Data Array with n subsets - one for each temporal frame.

◆ LiftPositive()

static DataArrayBase LiftPositive ( DataArrayBase  dataArray,
int[]  subsetIndices 
)
static

Lifts the values of a data array in a way no negative values occur in the real part anymore.

Parameters
dataArrayThe data array which shall be lifted.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The manipulated data array.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ MirrorDataArray1D_Horizontally()

static DataArray1D MirrorDataArray1D_Horizontally ( DataArray1D  dataArray,
int[]  subsetIndices 
)
static

Method which performs a horizontal mirror operation on a DataArray1D.

Parameters
dataArrayThe data array to be manipulated.
subsetIndicesOne or more subset indices which shall be manipulated. If none is specified, then all subsets are manipulated.
Returns
Data array with mirrored subset(s).

◆ MirrorDataArray2D_Horizontally()

static DataArray2D MirrorDataArray2D_Horizontally ( DataArray2D  dataArray,
int[]  subsetIndices 
)
static

Method which performs a horizontal mirror operation on a DataArray2D.

Parameters
dataArrayThe data array to be manipulated.
subsetIndicesOne or more subset indices which shall be manipulated. If none is specified, then all subsets are manipulated.
Returns
Data array with mirrored subset(s).

◆ MirrorDataArray2D_Vertically()

static DataArray2D MirrorDataArray2D_Vertically ( DataArray2D  dataArray,
int[]  subsetIndices 
)
static

Method which performs a vertical mirror operation on a DataArray2D.

Parameters
dataArrayThe data array to be manipulated.
subsetIndicesOne or more subset indices which shall be manipulated. If none is specified, then all subsets are manipulated.
Returns
Data array with mirrored subset(s).

◆ ModifyPhase()

static DataArrayBase ModifyPhase ( DataArrayBase  dataArrayBase,
PhaseModifyOperation  operation,
double  wavelength,
bool  useQuantization,
int  numberOfLevels,
double  doubleParameter,
bool  hermitian,
bool  superimpose,
int[]  subsetIndices 
)
static

Static method which modifies the phase in various ways.

Parameters
dataArrayBaseThe data array document to manipulate.
operationOperation to be applied to the phase.
wavelengthWavelength to be used in case of lens or spherical phase.
useQuantizationif set to true the random phase is quantized..
numberOfLevelsThe number of quantization levels. Only has an effect if the random phase is quantized.
doubleParameterDouble parameter whose meaning depends on the chosen operation.
hermitianHermitian option (for Random)
superimposeIf true, the old phase will be superimposed with the new one, otherwise it will be replaced.
subsetIndicesOne or more subset indices which shall be manipulated. If none is specified, then all subsets are manipulated.
Returns
Data array with manipulated phase.
Exceptions
ArgumentExceptionOperation is defined for equidistant data only. or Method works for DataArray1D and DataArray2D only.
ExceptionCase not found.

◆ MultiplyConstant_Complex()

static DataArrayBase MultiplyConstant_Complex ( DataArrayBase  dataArray,
Complex  constant,
int[]  subsetIndices 
)
static

Multiply a constant with certain subsets. The operation will be a complex multiplication.

Parameters
dataArrayThe data array to manipulate.
constantThe complex constant to be used for the operation.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The result of the multiplication.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ MultiplyConstant_Separately()

static DataArrayBase MultiplyConstant_Separately ( DataArrayBase  dataArray,
double  realPartOrAmplitude,
double  imaginaryPartOrPhase,
bool  amplitudePhaseRepresentation,
int[]  subsetIndices 
)
static

Multiply a constant with certain subsets. The operation will consist of two independent real valued operations for the complex parts respectively.

Parameters
dataArrayThe data array to manipulate.
realPartOrAmplitudeThe value multiplied to the real part or the amplitude.
imaginaryPartOrPhaseThe value multiplied to the imaginary part or the phase.
amplitudePhaseRepresentationIf set to true amplitude and phase are given. Otherwise real and imaginary part are given.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The result of the multiplication.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ Normalize()

static DataArrayBase Normalize ( DataArrayBase  dataArray,
RectangleOfPixels  regionMarker = null,
int[]  subsetIndices 
)
static

Normalizes a data array, i.e. brings the amplitude into the range 0 ... +1 and the real part into the range -1 ... +1.

Parameters
dataArrayThe data array which shall be normalized.
regionMarkerIf this parameter is set only the specified region is taken into account for the calculation of the maximum being the normalization reference. Can be omitted or set to null if the whole data shall be evaluated.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The normalized data array.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ PeriodicReplicationOfDataArray()

static DataArrayBase PeriodicReplicationOfDataArray ( DataArrayBase  dataArrayBase,
VectorD  replicationFactors,
bool  keepOriginalInCenter 
)
static

Method for periodic replication of data arrays.

Parameters
dataArrayBaseData array to be replicated periodically.
replicationFactorsReplication factor in x and y. The y-component will be ignored in case of DataArray1D.
keepOriginalInCenterIf true (and if the considered dimension is equidistant), the original array will be kept in the center.
Returns
Replicated data array.
Exceptions
System.ArgumentExceptionNon-equidistant data arrays with constant interval interpolation may not be replicated if one of the last intervals is infinite. or Method works for DataArray1D and DataArray2D only.

◆ Quantize()

static DataArrayBase Quantize ( DataArrayBase  dataArray,
QuantizationType  quantizationType,
int  noOfAmplitudeLevels,
int  noOfPhaseLevels,
double  softQuantizationFactor 
)
static

Does a quantization of all subsets of a data array.

Parameters
dataArrayData array to be quantized.
quantizationTypeType of quantization
noOfAmplitudeLevelsNumber of amplitude levels after quantization.
noOfPhaseLevelsNumber of phase levels after quantization.
softQuantizationFactorThe quantization factor for soft quantization. If a different type is desired, this value will be ignored.
Returns
Quantized data array.
Exceptions
System.ExceptionType of data array is not supported.

◆ RaiseToPowerOfConstant_Complex()

static DataArrayBase RaiseToPowerOfConstant_Complex ( DataArrayBase  dataArray,
Complex  constant,
int[]  subsetIndices 
)
static

Raise to the power of a constant with certain subsets. The operation will be a complex exponentiation.

Parameters
dataArrayThe data array to manipulate.
constantThe complex constant to be used for the operation.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The result of the exponentiation.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ RaiseToPowerOfConstant_Separately()

static DataArrayBase RaiseToPowerOfConstant_Separately ( DataArrayBase  dataArray,
double  realPartOrAmplitude,
double  imaginaryPartOrPhase,
bool  amplitudePhaseRepresentation,
int[]  subsetIndices 
)
static

Raise to the power of a constant with certain subsets. The operation will consist of two independent real valued operations for the complex parts respectively.

Parameters
dataArrayThe data array to manipulate.
realPartOrAmplitudeThe exponent applied on the real part or the amplitude.
imaginaryPartOrPhaseThe exponent applied on the imaginary part or the phase.
amplitudePhaseRepresentationIf set to true amplitude and phase are given. Otherwise real and imaginary part are given.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The result of the exponentiation.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ RemovePhaseDislocationsInsideSelection()

static DataArray2D RemovePhaseDislocationsInsideSelection ( DataArray2D  dataArray,
RectangleOfPixels  regionMarker,
int[]  subsetIndices 
)
static

Static function to remove all phase dislocations within the rectangular selection.

Parameters
dataArrayThe data array in whose rectangular selection the phase dislocations shall be removed.
regionMarkerIf this optional parameter is set only the specified region is taken into account for the calculation of the maximum being the normalization reference.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The data array with removed phase dislocations.

◆ RemoveRedundantData()

static DataArray2D RemoveRedundantData ( DataArray2D  inputDataArray)
static

Removes redundant data in a two-dimensional non-equidistant data array with Constant Interval interpolation and one subset. First all columns are scanned whether two consecutive columns have the same data. Then the same is done for all rows.

Parameters
inputDataArrayThe input data array.
Returns
New data array with removed data. The original data array if no data was removed.
Exceptions
ArgumentExceptionRemove redundant data only works for non-equidistant data arrays with Constant Interval interpolation and one subset.

◆ RemoveSubsetsFromDataArray() [1/2]

static ChromaticFieldsSetBase RemoveSubsetsFromDataArray ( ChromaticFieldsSetBase  cfsBase,
int[]  removeIndices 
)
static

Method that removes subsets from a data array

Parameters
cfsBaseChromatic fields set to remove subsets from.
removeIndicesThe indices of the subsets to remove.
Returns
A cfs with removed subsets.

◆ RemoveSubsetsFromDataArray() [2/2]

static DataArrayBase RemoveSubsetsFromDataArray ( DataArrayBase  dataArrayBase,
int[]  removeIndices 
)
static

Method that removes subsets from a data array

Parameters
dataArrayBaseData array to remove subsets from.
removeIndicesThe indices of the subsets to remove.
Returns
A data array with removed subsets.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D, DataArray2D, and DataArrayGridLess only.

◆ SavitzkyGolayFilter()

static DataArrayBase SavitzkyGolayFilter ( DataArrayBase  dataArray,
int  windowSize,
int  order 
)
static

Applies the Savitzky-Golay-Filter on the given data array. This filter is a special low-pass filter, well adapted for data smoothing.

Parameters
dataArrayThe data array.
windowSizeThe window size of the filter (in pixels).
orderThe order of the filter. The smaller the order the smoother the result. The order should be smaller than filter window size, otherwise the algorithm is not correct.
Returns
The filtered data array.
Exceptions
ArgumentExceptionSelected data array is not equidistantly sampled.

◆ ScaleToValueRange()

static DataArrayBase ScaleToValueRange ( DataArrayBase  dataArray,
double  minimum,
double  maximum,
bool  cloneDataArray,
int[]  subsetIndices 
)
static

Normalizes a data array, i.e. brings the amplitude into the range 0 ... +1 and the real part into the range -1 ... +1.

Parameters
dataArrayThe data array which shall be normalized.
minimumThe minimum data value in the resulting data array.
maximumThe maximum data value in the resulting data array.
cloneDataArrayIf set to true the data array. Otherwise the original data array is manipulated which is faster.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The scaled data array.
Exceptions
ArgumentExceptionOperation only supported for real-valued data. or Method does not work for this type of data array.

◆ SetToConstant()

static DataArrayBase SetToConstant ( DataArrayBase  dataArray,
Complex  constant,
int[]  subsetIndices 
)
static

Set certain subsets to a constant.

Parameters
dataArrayThe data array to manipulate.
constantThe complex constant to be used for the operation.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The data array with the constant value.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ SumOfAllSubsets()

static DataArrayBase SumOfAllSubsets ( DataArrayBase  dataArrayBase,
bool  complexAddition,
ComplexPart  partToSumInComplexCase 
)
static

Method which allows a complex-valued or real-valued summation of all subsets of a data array.

Parameters
dataArrayBaseData array to sum the subsets for.
complexAdditionIf false, the parameter partToSumInComplexCase determines which complex part is to be summed.
partToSumInComplexCaseComplex part to be summed.
Returns
Sum of all subsets.
Exceptions
System.ArgumentExceptionMethod works for DataArray1D and DataArray2D only.

◆ TransposeDataArray2D() [1/2]

static DataArray2D TransposeDataArray2D ( DataArray2D  dataArray)
static

Method which transposes a DataArray2D, which swaps all x and y properties.

Parameters
dataArrayData array to be transposed.
Returns
The transposed data array.

◆ TransposeDataArray2D() [2/2]

static DataArrayGridLess TransposeDataArray2D ( DataArrayGridLess  dataArray)
static

Method which transposes a DataArrayGridLess, which swaps all x and y properties.

Parameters
dataArrayData array to be transposed.
Returns
DataArrayGridLess with transposed coordinates.
Exceptions
System.ArgumentExceptionThis manipulation works for 2D data only.

◆ UnwrapPhase()

static DataArrayBase UnwrapPhase ( DataArrayBase  dataArray,
int[]  subsetIndices 
)
static

Unwraps the phase, i.e. removes the 2 \(\pi\) jumps.

Parameters
dataArrayThe data array to manipulate.
subsetIndicesOne or more subset indices which shall be evaluated. If none is specified, then all subsets are evaluated.
Returns
The data array with the unwrapped phase.
Exceptions
ArgumentExceptionOperation works for 1D and gridded 2D data arrays only.