Class DataArray2D
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
Class for objects that store gridded data in C^N which are equidistant or non equidistant distributed in R^2.
[Serializable]
public class DataArray2D : DataArrayGridded, ISerializable, IDeserializationCallback, IDocument, IEquatable<IObjectBase>, ICloneable, IDisposable
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationDocumentBaseDataArray2D
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
- Extension Methods
Constructors
DataArray2D(double[,], PhysicalProperty, string, double, double, PhysicalProperty, string, double, double, PhysicalProperty, string, ExtrapolationInfo, InterpolationMethod, InterpolationMethod)
Special constructor for data, equidistant in x and y which gets a double[,] array. Only one subset is used, i.e. N = 1.
public DataArray2D(double[,] data, PhysicalProperty physicalPropertyOfData, string commentOfData, double samplingDistanceX, double coordinateOfFirstDataPointX, PhysicalProperty physicalPropertyOfCoordinatesX, string commentOfCoordinatesX, double samplingDistanceY, double coordinateOfFirstDataPointY, PhysicalProperty physicalPropertyOfCoordinatesY, string commentOfCoordinatesY, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolationX = InterpolationMethod.Nearest, InterpolationMethod interpolationY = InterpolationMethod.Nearest)
Parameters
datadouble[,]The data in C^1. The double values will be filled into one real valued subset.
physicalPropertyOfDataPhysicalPropertyPhysical properties of each data subset.
commentOfDatastringComments for each data subset.
samplingDistanceXdoubleSampling distance in X
coordinateOfFirstDataPointXdoubleCoordinate of the first data point Data[0, y] for (and only for) equidistantly sampled data.
physicalPropertyOfCoordinatesXPhysicalPropertyPhysical property for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
samplingDistanceYdoubleSampling distance in y.
coordinateOfFirstDataPointYdoubleCoordinate of the first data point Data[x, 0] for (and only for) equidistantly sampled data.
physicalPropertyOfCoordinatesYPhysicalPropertyPhysical property for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodThe interpolation method to be used in y-direction.
DataArray2D(ComplexFieldArray, MeasuredQuantity[], string[], double, double, MeasuredQuantity, string, double, double, MeasuredQuantity, string, ExtrapolationInfo, InterpolationMethod, InterpolationMethod)
Constructor for data, equidistant in x and y.
public DataArray2D(ComplexFieldArray data, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, double samplingDistanceX, double coordinateOfFirstDataPointX, MeasuredQuantity measuredQuantityOfCoordinatesX, string commentOfCoordinatesX, double samplingDistanceY, double coordinateOfFirstDataPointY, MeasuredQuantity measuredQuantityOfCoordinatesY, string commentOfCoordinatesY, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolationX = InterpolationMethod.Nearest, InterpolationMethod interpolationY = InterpolationMethod.Nearest)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
measuredQuantitiesOfDataMeasuredQuantity[]Measured quantities of each data subset.
commentsOfDatastring[]Comments for each data subset.
samplingDistanceXdoubleSampling distance in x.
coordinateOfFirstDataPointXdoubleCoordinate of the first data point Data[0, y] for (and only for) equidistantly sampled data.
measuredQuantityOfCoordinatesXMeasuredQuantityMeasured quantity for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
samplingDistanceYdoubleSampling distance in y.
coordinateOfFirstDataPointYdoubleCoordinate of the first data point Data[x, 0] for (and only for) equidistantly sampled data.
measuredQuantityOfCoordinatesYMeasuredQuantityMeasured quantity for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodThe interpolation method to be used in y-direction.
Exceptions
- ArgumentException
Empty ComplexFieldArray given. or Wrong number of measured quantities for the data given. or Wrong number of data comments given. or Sampling Distances have to be greater than zero.
DataArray2D(ComplexFieldArray, MeasuredQuantity[], string[], double, double, MeasuredQuantity, string, CFieldDerivative1DReal, MeasuredQuantity, string, double, ExtrapolationInfo, InterpolationMethod, InterpolationMethodForNonequidistantData)
Constructor for data, equidistant in x and non-equidistant in y.
public DataArray2D(ComplexFieldArray data, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, double samplingDistanceX, double coordinateOfFirstDataPointX, MeasuredQuantity measuredQuantityOfCoordinatesX, string commentOfCoordinatesX, CFieldDerivative1DReal coordinatesY, MeasuredQuantity measuredQuantityOfCoordinatesY, string commentOfCoordinatesY, double coordinateOfLastYIntervalsUpperLimit, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolationX = InterpolationMethod.Nearest, InterpolationMethodForNonequidistantData interpolationY = InterpolationMethodForNonequidistantData.ConstantInterval)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
measuredQuantitiesOfDataMeasuredQuantity[]Measured quantities of each data subset.
commentsOfDatastring[]Comments for each data subset.
samplingDistanceXdoubleSampling distance in x.
coordinateOfFirstDataPointXdoubleCoordinate of the first data point Data[0, y] for (and only for) equidistantly sampled data.
measuredQuantityOfCoordinatesXMeasuredQuantityMeasured quantity for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
coordinatesYCFieldDerivative1DRealNon-equidistant coordinates for the data in y-dimension.
measuredQuantityOfCoordinatesYMeasuredQuantityMeasured quantity for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
coordinateOfLastYIntervalsUpperLimitdoubleCoordinate of the last y interval's upper limit.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodForNonequidistantDataThe interpolation method to be used in y-direction.
DataArray2D(ComplexFieldArray, MeasuredQuantity[], string[], CFieldDerivative1DReal, MeasuredQuantity, string, double, double, double, MeasuredQuantity, string, ExtrapolationInfo, InterpolationMethodForNonequidistantData, InterpolationMethod)
Constructor for data, non-equidistant in x and equidistant in y.
public DataArray2D(ComplexFieldArray data, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, CFieldDerivative1DReal coordinatesX, MeasuredQuantity measuredQuantityOfCoordinatesX, string commentOfCoordinatesX, double coordinateOfLastXIntervalsUpperLimit, double samplingDistanceY, double coordinateOfFirstDataPointY, MeasuredQuantity measuredQuantityOfCoordinatesY, string commentOfCoordinatesY, ExtrapolationInfo extrapolation = null, InterpolationMethodForNonequidistantData interpolationX = InterpolationMethodForNonequidistantData.ConstantInterval, InterpolationMethod interpolationY = InterpolationMethod.Nearest)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
measuredQuantitiesOfDataMeasuredQuantity[]Measured quantities of each data subset.
commentsOfDatastring[]Comments for each data subset.
coordinatesXCFieldDerivative1DRealNon-equidistant coordinates for the data in x-dimension.
measuredQuantityOfCoordinatesXMeasuredQuantityMeasured quantity for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
coordinateOfLastXIntervalsUpperLimitdoubleCoordinate of the last x interval's upper limit.
samplingDistanceYdoubleSampling distance in y.
coordinateOfFirstDataPointYdoubleCoordinate of the first data point Data[x, 0] for (and only for) equidistantly sampled data.
measuredQuantityOfCoordinatesYMeasuredQuantityMeasured quantity for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodForNonequidistantDataThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodThe interpolation method to be used in y-direction.
DataArray2D(ComplexFieldArray, MeasuredQuantity[], string[], CFieldDerivative1DReal, MeasuredQuantity, string, double, CFieldDerivative1DReal, MeasuredQuantity, string, double, ExtrapolationInfo, InterpolationMethodForNonequidistantData, InterpolationMethodForNonequidistantData)
Constructor for data, non-equidistant in x and y, and with a coordinate for the last interval's upper limit for x and y, respectively.
public DataArray2D(ComplexFieldArray data, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, CFieldDerivative1DReal coordinatesX, MeasuredQuantity measuredQuantityOfCoordinatesX, string commentOfCoordinatesX, double coordinateOfLastXIntervalsUpperLimit, CFieldDerivative1DReal coordinatesY, MeasuredQuantity measuredQuantityOfCoordinatesY, string commentOfCoordinatesY, double coordinateOfLastYIntervalsUpperLimit, ExtrapolationInfo extrapolation = null, InterpolationMethodForNonequidistantData interpolationX = InterpolationMethodForNonequidistantData.ConstantInterval, InterpolationMethodForNonequidistantData interpolationY = InterpolationMethodForNonequidistantData.ConstantInterval)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
measuredQuantitiesOfDataMeasuredQuantity[]Measured quantities of each data subset.
commentsOfDatastring[]Comments for each data subset.
coordinatesXCFieldDerivative1DRealNon-equidistant coordinates for the data in x-dimension.
measuredQuantityOfCoordinatesXMeasuredQuantityMeasured quantity for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
coordinateOfLastXIntervalsUpperLimitdoubleCoordinate of the last x interval's upper limit.
coordinatesYCFieldDerivative1DRealNon-equidistant coordinates for the data in y-dimension.
measuredQuantityOfCoordinatesYMeasuredQuantityMeasured quantity for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
coordinateOfLastYIntervalsUpperLimitdoubleCoordinate of the last y interval's upper limit.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodForNonequidistantDataThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodForNonequidistantDataThe interpolation method to be used in y-direction.
DataArray2D(ComplexFieldArray, PhysicalProperty[], string[], double, double, PhysicalProperty, string, double, double, PhysicalProperty, string, ExtrapolationInfo, InterpolationMethod, InterpolationMethod)
Constructor for data, equidistant in x and y.
public DataArray2D(ComplexFieldArray data, PhysicalProperty[] physicalPropertiesOfData, string[] commentsOfData, double samplingDistanceX, double coordinateOfFirstDataPointX, PhysicalProperty physicalPropertyOfCoordinatesX, string commentOfCoordinatesX, double samplingDistanceY, double coordinateOfFirstDataPointY, PhysicalProperty physicalPropertyOfCoordinatesY, string commentOfCoordinatesY, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolationX = InterpolationMethod.Nearest, InterpolationMethod interpolationY = InterpolationMethod.Nearest)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
physicalPropertiesOfDataPhysicalProperty[]Physical properties of each data subset.
commentsOfDatastring[]Comments for each data subset.
samplingDistanceXdoubleSampling distance in x.
coordinateOfFirstDataPointXdoubleCoordinate of the first data point Data[0, y] for (and only for) equidistantly sampled data.
physicalPropertyOfCoordinatesXPhysicalPropertyPhysical property for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
samplingDistanceYdoubleSampling distance in y.
coordinateOfFirstDataPointYdoubleCoordinate of the first data point Data[x, 0] for (and only for) equidistantly sampled data.
physicalPropertyOfCoordinatesYPhysicalPropertyPhysical property for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodThe interpolation method to be used in y-direction.
Exceptions
- ArgumentException
Empty ComplexFieldArray given. or Wrong number of physical properties for the data given. or Wrong number of data comments given. or Sampling Distances have to be greater than zero.
DataArray2D(ComplexFieldArray, PhysicalProperty[], string[], double, double, PhysicalProperty, string, CFieldDerivative1DReal, PhysicalProperty, string, double, ExtrapolationInfo, InterpolationMethod, InterpolationMethodForNonequidistantData)
Constructor for data, equidistant in x and non-equidistant in y.
public DataArray2D(ComplexFieldArray data, PhysicalProperty[] physicalPropertiesOfData, string[] commentsOfData, double samplingDistanceX, double coordinateOfFirstDataPointX, PhysicalProperty physicalPropertyOfCoordinatesX, string commentOfCoordinatesX, CFieldDerivative1DReal coordinatesY, PhysicalProperty physicalPropertyOfCoordinatesY, string commentOfCoordinatesY, double coordinateOfLastYIntervalsUpperLimit, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolationX = InterpolationMethod.Nearest, InterpolationMethodForNonequidistantData interpolationY = InterpolationMethodForNonequidistantData.ConstantInterval)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
physicalPropertiesOfDataPhysicalProperty[]Physical properties of each data subset.
commentsOfDatastring[]Comments for each data subset.
samplingDistanceXdoubleSampling distance in x.
coordinateOfFirstDataPointXdoubleCoordinate of the first data point Data[0, y] for (and only for) equidistantly sampled data.
physicalPropertyOfCoordinatesXPhysicalPropertyPhysical property for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
coordinatesYCFieldDerivative1DRealNon-equidistant coordinates for the data in y-dimension.
physicalPropertyOfCoordinatesYPhysicalPropertyPhysical property for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
coordinateOfLastYIntervalsUpperLimitdoubleCoordinate of the last y interval's upper limit.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodForNonequidistantDataThe interpolation method to be used in y-direction.
DataArray2D(ComplexFieldArray, PhysicalProperty[], string[], CFieldDerivative1DReal, PhysicalProperty, string, double, double, double, PhysicalProperty, string, ExtrapolationInfo, InterpolationMethodForNonequidistantData, InterpolationMethod)
Constructor for data, non-equidistant in x and equidistant in y.
public DataArray2D(ComplexFieldArray data, PhysicalProperty[] physicalPropertiesOfData, string[] commentsOfData, CFieldDerivative1DReal coordinatesX, PhysicalProperty physicalPropertyOfCoordinatesX, string commentOfCoordinatesX, double coordinateOfLastXIntervalsUpperLimit, double samplingDistanceY, double coordinateOfFirstDataPointY, PhysicalProperty physicalPropertyOfCoordinatesY, string commentOfCoordinatesY, ExtrapolationInfo extrapolation = null, InterpolationMethodForNonequidistantData interpolationX = InterpolationMethodForNonequidistantData.ConstantInterval, InterpolationMethod interpolationY = InterpolationMethod.Nearest)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
physicalPropertiesOfDataPhysicalProperty[]Physical properties of each data subset.
commentsOfDatastring[]Comments for each data subset.
coordinatesXCFieldDerivative1DRealNon-equidistant coordinates for the data in X dimension.
physicalPropertyOfCoordinatesXPhysicalPropertyPhysical property for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
coordinateOfLastXIntervalsUpperLimitdoubleCoordinate of the last x interval's upper limit.
samplingDistanceYdoubleSampling distance in y.
coordinateOfFirstDataPointYdoubleCoordinate of the first data point Data[x, 0] for (and only for) equidistantly sampled data.
physicalPropertyOfCoordinatesYPhysicalPropertyPhysical property for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodForNonequidistantDataThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodThe interpolation method to be used in y-direction.
DataArray2D(ComplexFieldArray, PhysicalProperty[], string[], CFieldDerivative1DReal, PhysicalProperty, string, double, CFieldDerivative1DReal, PhysicalProperty, string, double, ExtrapolationInfo, InterpolationMethodForNonequidistantData, InterpolationMethodForNonequidistantData)
Constructor for data, non-equidistant in x and y, and with a coordinate for the last interval's upper limit for x and y, respectively.
public DataArray2D(ComplexFieldArray data, PhysicalProperty[] physicalPropertiesOfData, string[] commentsOfData, CFieldDerivative1DReal coordinatesX, PhysicalProperty physicalPropertyOfCoordinatesX, string commentOfCoordinatesX, double coordinateOfLastXIntervalsUpperLimit, CFieldDerivative1DReal coordinatesY, PhysicalProperty physicalPropertyOfCoordinatesY, string commentOfCoordinatesY, double coordinateOfLastYIntervalsUpperLimit, ExtrapolationInfo extrapolation = null, InterpolationMethodForNonequidistantData interpolationX = InterpolationMethodForNonequidistantData.ConstantInterval, InterpolationMethodForNonequidistantData interpolationY = InterpolationMethodForNonequidistantData.ConstantInterval)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
physicalPropertiesOfDataPhysicalProperty[]Physical properties of each data subset.
commentsOfDatastring[]Comments for each data subset.
coordinatesXCFieldDerivative1DRealNon-equidistant coordinates for the data in x-dimension.
physicalPropertyOfCoordinatesXPhysicalPropertyPhysical property for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
coordinateOfLastXIntervalsUpperLimitdoubleCoordinate of the last x interval's upper limit.
coordinatesYCFieldDerivative1DRealNon-equidistant coordinates for the data in y-dimension.
physicalPropertyOfCoordinatesYPhysicalPropertyPhysical property for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
coordinateOfLastYIntervalsUpperLimitdoubleCoordinate of the last y interval's upper limit.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
interpolationXInterpolationMethodForNonequidistantDataThe interpolation method to be used in x-direction.
interpolationYInterpolationMethodForNonequidistantDataThe interpolation method to be used in y-direction.
DataArray2D(DataArray2D)
Copy constructor.
public DataArray2D(DataArray2D dataArray)
Parameters
dataArrayDataArray2DData array to copy.
Properties
BiggestCoordinateStep_X
Gets the biggest occurring distance between two neighbored x-coordinates. (So in the equidistant case, this is identical to SamplingDistance_X.)
public double BiggestCoordinateStep_X { get; }
Property Value
BiggestCoordinateStep_Y
Gets the biggest occurring distance between two neighbored y-coordinates. (So in the equidistant case, this is identical to SamplingDistance_Y.)
public double BiggestCoordinateStep_Y { get; }
Property Value
BothAxesHaveSameMeasuredQuantity
Gets whether both axes have the same measured quantity.
public bool BothAxesHaveSameMeasuredQuantity { get; }
Property Value
CommentOfCoordinates_X
Gets and sets the comment for the x-coordinates.
public string CommentOfCoordinates_X { get; set; }
Property Value
CommentOfCoordinates_Y
Gets and sets the comment for the y-coordinates.
public string CommentOfCoordinates_Y { get; set; }
Property Value
CommentsOfDataEntries
Gets and sets the comment for each dimension in C^N.
public override string[] CommentsOfDataEntries { get; set; }
Property Value
- string[]
CoordinateOfFirstDataPoint_X
Gets and sets the x-coordinate of the data point Data[0,0].
public double CoordinateOfFirstDataPoint_X { get; set; }
Property Value
CoordinateOfFirstDataPoint_Y
Gets and sets the y-coordinate of the data point Data[0,0].
public double CoordinateOfFirstDataPoint_Y { get; set; }
Property Value
CoordinateOfLastDataPoint_X
Gets the x-coordinate of the data point Data[NoOfDataPoints_X - 1, NoOfDataPoints_Y - 1].
public double CoordinateOfLastDataPoint_X { get; }
Property Value
CoordinateOfLastDataPoint_Y
Gets the y-coordinate of the data point Data[NoOfDataPoints_X - 1, NoOfDataPoints_Y - 1].
public double CoordinateOfLastDataPoint_Y { get; }
Property Value
CoordinateOfLast_X_IntervalsUpperLimit
Gets and sets the coordinate of the last interval's upper limit for the x-dimension. This is needed if non equidistantly sampled data shall be interpolated in x with the method 'ConstantInterval'. For this method the data are assumed to be constant in each interval which is given by [coordinate(i), coordinate(i+1)[, where i is the data point index. So the width of the last interval has to be defined separately by [coordinate(NoOfDataPoints_X-1), CoordinateOfLast_X_IntervalsUpperLimit[.
public double CoordinateOfLast_X_IntervalsUpperLimit { get; set; }
Property Value
CoordinateOfLast_Y_IntervalsUpperLimit
Gets and sets the coordinate of the last interval's upper limit for the y-dimension. This is needed if non equidistantly sampled data shall be interpolated in y with the method 'ConstantInterval'. For this method the data are assumed to be constant in each interval which is given by [coordinate(i), coordinate(i+1)[, where i is the data point index. So the width of the last interval has to be defined separately by [coordinate(NoOfDataPoints_Y-1), CoordinateOfLast_Y_IntervalsUpperLimit[.
public double CoordinateOfLast_Y_IntervalsUpperLimit { get; set; }
Property Value
Data
Gets and sets the data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
public ComplexFieldArray Data { get; set; }
Property Value
DataArrayType
public property to get the data array type of the current data array
public override DataArrayType DataArrayType { get; }
Property Value
- DataArrayType
DimensionalityOfCoordinates
Dimensionality M of the space of independent variables R^M.
public override int DimensionalityOfCoordinates { get; }
Property Value
DimensionalityOfData
Dimensionality N of the space of data values C^N.
public override int DimensionalityOfData { get; }
Property Value
Equidistant_X
Gets and sets whether the data are sampled equidistantly in x.
public bool Equidistant_X { get; set; }
Property Value
Equidistant_Y
Gets and sets whether the data are sampled equidistantly in y.
public bool Equidistant_Y { get; set; }
Property Value
ExtrapolationHandling
The extrapolation handling.
public override ExtrapolationInfo ExtrapolationHandling { get; set; }
Property Value
InterpolationMethodForEquidistantSampling_X
Gets and sets the method used for interpolation in case of equidistant sampling in x-direction.
public InterpolationMethod InterpolationMethodForEquidistantSampling_X { get; set; }
Property Value
InterpolationMethodForEquidistantSampling_Y
Gets and sets the method used for interpolation in case of equidistant sampling in y-direction.
public InterpolationMethod InterpolationMethodForEquidistantSampling_Y { get; set; }
Property Value
InterpolationMethodForNonequidistantSampling_X
Gets and sets the method used for interpolation in case of non-equidistant sampling in x-direction. For the method 'ConstantInterval' the data are assumed to be constant in each interval which is given by [coordinate(i), coordinate(i+1)[, where i is the data point index. So the width of the last interval has to be defined separately by [coordinate(NoOfDataPoints_X - 1), CoordinateOfLast_X_IntervalsUpperLimit[.
public InterpolationMethodForNonequidistantData InterpolationMethodForNonequidistantSampling_X { get; set; }
Property Value
InterpolationMethodForNonequidistantSampling_Y
Gets and sets the method used for interpolation in case of non-equidistant sampling in y-direction. For the method 'ConstantInterval' the data are assumed to be constant in each interval which is given by [coordinate(i), coordinate(i+1)[, where i is the data point index. So the width of the last interval has to be defined separately by [coordinate(NoOfDataPoints_Y - 1), CoordinateOfLast_Y_IntervalsUpperLimit[.
public InterpolationMethodForNonequidistantData InterpolationMethodForNonequidistantSampling_Y { get; set; }
Property Value
IsComplex
Are the values defined in C^N (true) or in the subset of real numbers R^N (false)? Returns true if any of the data entries is complex.
public override bool IsComplex { get; }
Property Value
MeasuredQuantityOf_X_Coordinates
Gets and sets the measured quantity of the x-coordinates.
public MeasuredQuantity MeasuredQuantityOf_X_Coordinates { get; set; }
Property Value
- MeasuredQuantity
MeasuredQuantityOf_Y_Coordinates
Gets and sets the measured quantity of the y-coordinates.
public MeasuredQuantity MeasuredQuantityOf_Y_Coordinates { get; set; }
Property Value
- MeasuredQuantity
NoOfDataPoints_X
Gets the number of data values stored in x-direction.
public int NoOfDataPoints_X { get; }
Property Value
NoOfDataPoints_Y
Gets the number of data values stored in y-direction.
public int NoOfDataPoints_Y { get; }
Property Value
NoSmoothingInterpolationMethod
Gets a flag indicating whether or not none of the interpolation methods is smoothing (like nearest neighbor or constant interval; true). But if one of the methods does (like all other methods), the flag is set to false.
public override bool NoSmoothingInterpolationMethod { get; }
Property Value
NonequidistantCoordinates_X
Gets and sets the x-coordinates for the data in R^2. IMPORTANT: This property applies for non-equidistant data only! If you need to get the coordinates for one index for equidistant as well as for non equidistant data, use the method CoordinateOfDataPointIndex_X(long index) instead! For setting pay attention to the following restrictions: value must not be complex and value.SamplingPointsOneD has to be equal to NoOfDataPoints_X.
public CFieldDerivative1DReal NonequidistantCoordinates_X { get; set; }
Property Value
NonequidistantCoordinates_Y
Gets and sets the y-coordinates for the data in R^2. IMPORTANT: This property applies for non-equidistant data only! If you need to get the coordinates for one index for equidistant as well as for non equidistant data, use the method CoordinateOfDataPointIndex_Y(long index) instead! For setting pay attention to the following restrictions: value must not be complex and value.SamplingPointsOneD has to be equal to NoOfDataPoints_Y.
public CFieldDerivative1DReal NonequidistantCoordinates_Y { get; set; }
Property Value
PhysicalPropertyOf_X_Coordinates
Gets the physical property for the x-coordinates.
public PhysicalProperty PhysicalPropertyOf_X_Coordinates { get; set; }
Property Value
PhysicalPropertyOf_Y_Coordinates
Gets the physical property for the y-coordinates.
public PhysicalProperty PhysicalPropertyOf_Y_Coordinates { get; set; }
Property Value
SamplingDistance_X
Gets and sets the sampling distance for (and only for) data sampled equidistantly in x.
public double SamplingDistance_X { get; set; }
Property Value
SamplingDistance_Y
Gets and sets the sampling distance for (and only for) data sampled equidistantly in y.
public double SamplingDistance_Y { get; set; }
Property Value
SmallestCoordinateStep_X
Gets the smallest occurring distance between two neighbored x-coordinates. (So in the equidistant case, this is identical to SamplingDistance_X.)
public double SmallestCoordinateStep_X { get; }
Property Value
SmallestCoordinateStep_Y
Gets the smallest occurring distance between two neighbored y-coordinates. (So in the equidistant case, this is identical to SamplingDistance_Y.)
public double SmallestCoordinateStep_Y { get; }
Property Value
Methods
Clone()
Deep copy
public override object Clone()
Returns
- object
Copy of data array
CoordinateOfDataPointIndex_X(long)
Gives the x-coordinate of a certain data point as double.
public double CoordinateOfDataPointIndex_X(long indexX)
Parameters
indexXlongx-index of the data point to get the coordinate for.
Returns
- double
x-coordinate of the data point as double.
CoordinateOfDataPointIndex_X_asPValue(long)
Gives the x-coordinate of a certain data point as PhysicalValue.
public PhysicalValue CoordinateOfDataPointIndex_X_asPValue(long indexX)
Parameters
indexXlongx-index of the data point to get the coordinate for.
Returns
- PhysicalValue
x-coordinate of the data point as PhysicalValue.
CoordinateOfDataPointIndex_Y(long)
Gives the y-coordinates of a certain data point as double.
public double CoordinateOfDataPointIndex_Y(long indexY)
Parameters
indexYlongy-index of the data point to get the coordinate for.
Returns
- double
y-coordinate of the data point as double.
CoordinateOfDataPointIndex_Y_asPValue(long)
Gives the y-coordinates of a certain data point as PhysicalValue.
public PhysicalValue CoordinateOfDataPointIndex_Y_asPValue(long indexY)
Parameters
indexYlongy-index of the data point to get the coordinate for.
Returns
- PhysicalValue
y-coordinate of the data point as PhysicalValue.
CreateDataArray2DEquidistantOrNonEquidistant(List<(double x, double y, Complex[] data)>, MeasuredQuantity[], string[], MeasuredQuantity, string, MeasuredQuantity, string, InterpolationMethod, InterpolationMethodForNonequidistantData, ExtrapolationInfo)
Static 'constructor' for data points that can be either equidistant or non-equidistant.
public static DataArray2D CreateDataArray2DEquidistantOrNonEquidistant(List<(double x, double y, Complex[] data)> dataPoints, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, MeasuredQuantity measuredQuantityOfCoordinatesX, string commentOfCoordinatesX, MeasuredQuantity measuredQuantityOfCoordinatesY, string commentOfCoordinatesY, InterpolationMethod interpolationMethodEquidistant, InterpolationMethodForNonequidistantData interpolationMethodNonEquidistant, ExtrapolationInfo extrapolation = null)
Parameters
dataPointsList<(double x, double y, Complex[] data)>The data points as list of tuples (x, y, and array with complex data values for each subset).
measuredQuantitiesOfDataMeasuredQuantity[]Physical properties of each data subset.
commentsOfDatastring[]Comments for each data subset.
measuredQuantityOfCoordinatesXMeasuredQuantityPhysical property for the coordinates in x.
commentOfCoordinatesXstringComment for the coordinates in x.
measuredQuantityOfCoordinatesYMeasuredQuantityPhysical property for the coordinates in y.
commentOfCoordinatesYstringComment for the coordinates in y.
interpolationMethodEquidistantInterpolationMethodThe interpolation method used for equidistant axes.
interpolationMethodNonEquidistantInterpolationMethodForNonequidistantDataThe interpolation method used for non-equidistant axes.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
Returns
- DataArray2D
The complex-valued two-dimensional gridded data array. Points with no data are indicated by NaN.
CreateDataArray2DEquidistantOrNonEquidistant(ComplexFieldArray, MeasuredQuantity[], string[], List<PhysicalValue>, List<PhysicalValue>, InterpolationMethod, InterpolationMethodForNonequidistantData, ExtrapolationInfo)
Static 'constructor' for data that can be either equidistant or non-equidistant.
public static DataArray2D CreateDataArray2DEquidistantOrNonEquidistant(ComplexFieldArray data, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, List<PhysicalValue> coordinatesX, List<PhysicalValue> coordinatesY, InterpolationMethod interpolationMethodEquidistant, InterpolationMethodForNonequidistantData interpolationMethodNonEquidistant, ExtrapolationInfo extrapolation = null)
Parameters
dataComplexFieldArrayThe data in C^N. Each single 2D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).
measuredQuantitiesOfDataMeasuredQuantity[]Measured quantity of each data subset.
commentsOfDatastring[]Comments for each data subset.
coordinatesXList<PhysicalValue>The coordinates in x-direction (sorted ascending). If they are equidistant, sampling distance and minimum value are calculated from this array. Otherwise the given coordinates are used directly and the last interval's upper limit is the last coordinate plus the absolute distance to the last but one coordinate. Comment and physical property of the x-axis are taken from the corresponding properties of the first coordinate.
coordinatesYList<PhysicalValue>The coordinates in y-direction (sorted ascending). If they are equidistant, sampling distance and minimum value are calculated from this array. Otherwise the given coordinates are used directly and the last interval's upper limit is the last coordinate plus the absolute distance to the last but one coordinate. Comment and physical property of the y-axis are taken from the corresponding properties of the first coordinate.
interpolationMethodEquidistantInterpolationMethodThe interpolation method used for equidistant axes.
interpolationMethodNonEquidistantInterpolationMethodForNonequidistantDataThe interpolation method used for non-equidistant axes.
extrapolationExtrapolationInfoOptional information about how extrapolation of the data shall be done. By default border value continuation is done.
Returns
- DataArray2D
The two-dimensional gridded data array.
CreateDataArray2D_fromComplexArray(Complex[,], bool, MeasuredQuantity, string, MeasuredQuantity, string, MeasuredQuantity, string, ExtrapolationInfo, ref (double sDistX, double startCoordX, InterpolationMethod interpX, double sDistY, double startCoordY, InterpolationMethod interpY)?, (double coordOfLastIntUpperLimitX, InterpolationMethodForNonequidistantData nonEquidistantInterpolationX, double coordOfLastIntUpperLimitY, InterpolationMethodForNonequidistantData nonEquidistantInterpolationY)?)
Method which converts complex data (double precision, usually read from a text file) into a 2D data array.
public static DataArray2D CreateDataArray2D_fromComplexArray(Complex[,] dataMatrix, bool createRealValuedResult, MeasuredQuantity quantityOfData, string commentOfData, MeasuredQuantity quantityOfXCoordinates, string commentOfXCoordinates, MeasuredQuantity quantityOfYCoordinates, string commentOfYCoordinates, ExtrapolationInfo extrapolation, ref (double sDistX, double startCoordX, InterpolationMethod interpX, double sDistY, double startCoordY, InterpolationMethod interpY)? sampling_equidist, (double coordOfLastIntUpperLimitX, InterpolationMethodForNonequidistantData nonEquidistantInterpolationX, double coordOfLastIntUpperLimitY, InterpolationMethodForNonequidistantData nonEquidistantInterpolationY)? sampling_nonEquidist)
Parameters
dataMatrixComplex[,]An array of data which holds the raw values, usually read from a text file.
createRealValuedResultboolIf
true, the result will be real-valued, no matter if there are imaginary parts given or not.quantityOfDataMeasuredQuantityThe measured quantity to be set to the subset which is read from the file.
commentOfDatastringThe comment to be set to the subset which is read from the file.
quantityOfXCoordinatesMeasuredQuantityThe measured quantity to be set to the x-coordinates.
commentOfXCoordinatesstringThe comment to be set to the x-coordinates.
quantityOfYCoordinatesMeasuredQuantityThe measured quantity to be set to the y-coordinates.
commentOfYCoordinatesstringThe comment to be set to the y-coordinates.
extrapolationExtrapolationInfoThe extrapolation info.
sampling_equidist(double sDistX, double startCoordX, InterpolationMethod interpX, double sDistY, double startCoordY, InterpolationMethod interpY)?If not null, an equidistantly sampled (both coordinate directions!) data array will be created with the given sampling distances and start coordinates. If
null, a non-equidistantly sampled (both coordinate directions!) data array will be created. The coordinates will be read from first row and column, then. DataArrays which have one equidistant and one non-equidistant dimension are not supported.sampling_nonEquidist(double coordOfLastIntUpperLimitX, InterpolationMethodForNonequidistantData nonEquidistantInterpolationX, double coordOfLastIntUpperLimitY, InterpolationMethodForNonequidistantData nonEquidistantInterpolationY)?In case no sampling_equidist parameter is given, this parameter is needed for specific settings of a non-equidistant data array.
Returns
- DataArray2D
A gridded 2D data array, , created from an array of double values.
EmbedExtract(Vector)
Method to perform an embed/extract operation on the data array.
public void EmbedExtract(Vector numberOfDataPoints)
Parameters
numberOfDataPointsVectorThe numbers of the data points to be used for the embed/extract operation in each dimension X and Y. If, for one dimension x or y, it is greater than this.NoOfDataPoints_X/Y, the data array will be embedded, otherwise the given number of data points will be extracted.
EmbedExtract(Vector, Size)
Method to extract a given data point range from this.
public DataArray2D EmbedExtract(Vector startPoint, Size extractSize)
Parameters
startPointVectorData point indices to start the extraction with (zero based!).
extractSizeSizeNumber of data point to be extracted in X and Y.
Returns
- DataArray2D
A data array with the extracted data.
Exceptions
- Exception
Embed Extract is only available for equidistant data arrays.
- ArgumentException
The extraction size has to be larger than zero.
Equals(object, EqualityIntent)
Checks whether two DataArray2D objects are equal.
public override bool Equals(object obj, EqualityIntent equalityIntent)
Parameters
objobjectThe object to compare with this instance.
equalityIntentEqualityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or physical equality.
Returns
EquidistantToNonEquidistant(bool)
If this data array is equidistant, this conversion method makes it non equidistant for both dimensions X and Y. This is done by calculating the member NonequidistantCoordinates_X/Y from CoordinateOfFirstDataPoint_X/Y, SamplingDistance_X/Y and the respective index.
public void EquidistantToNonEquidistant(bool forNN_convertCenterCoordinateInsteadOfIntervalBorder)
Parameters
forNN_convertCenterCoordinateInsteadOfIntervalBorderboolIn case an equidistant data array is given, it is to be converted into a non-equidistant one. This will take the interpolation method into account, which means that for Nearest-Neighbor interpolation the interval boundaries are converted instead of the original coordinates. This flag will prevent this if set to
trueand will ensure that the original coordinates are converted. This is usually needed for subsequent coordinate transformations only.
EquidistantToNonEquidistant(AxisDirection, bool)
If this data array is equidistant, this conversion method makes it non equidistant for the given dimension X or Y. This is done by calculating the member NonequidistantCoordinates_X/Y from CoordinateOfFirstDataPoint_X/Y, SamplingDistance_X/Y and the respective index.
public void EquidistantToNonEquidistant(AxisDirection directionToConvert, bool forNN_convertCenterCoordinateInsteadOfIntervalBorder)
Parameters
directionToConvertAxisDirectionDimension to convert (X and/or Y).
forNN_convertCenterCoordinateInsteadOfIntervalBorderboolIn case an equidistant data array is given, it is to be converted into a non-equidistant one. This will take the interpolation method into account, which means that for Nearest-Neighbor interpolation the interval boundaries are converted instead of the original coordinates. This flag will prevent this if set to
trueand will ensure that the original coordinates are converted. This is usually needed for subsequent coordinate transformations only.
FieldInterpolation_PureEquidistantSampling(SamplingParameters, InterpolationMethod?)
Interpolates this DataArray2D completely and gives a new resampled data array if both dimensions x and y are sampled equidistantly. Each DataSubSet is interpolated to the user defined sampling parameters
public DataArray2D FieldInterpolation_PureEquidistantSampling(SamplingParameters sParaInterpolation, InterpolationMethod? interpolationMethod = null)
Parameters
sParaInterpolationSamplingParametersThe sampling parameters which shall be used for interpolation.
interpolationMethodInterpolationMethod?Optional parameter to specify the used interpolation method. If this optional parameter is not set, the interpolation stored in the data array for the x-direction is used.
Returns
- DataArray2D
The interpolated data array.
Exceptions
- ArgumentException
Interpolation of DataArray2D is not supported for non-equidistant coordinates. or Interpolation of DataArray2D is not supported for different interpolation methods in x- and y-direction.
Fill(Complex[])
Method to fill the data array subsets, each with a constant value.
public void Fill(Complex[] values)
Parameters
valuesComplex[]The values to be used for filling the DataArray2D
GetArraySize_X()
Method which calculates the array size in x-direction. Definition: "Coordinate Extent" is the range within which interpolation is possible. It may be different from "Array Size" which is the name of the distance between first and last data point.
public double GetArraySize_X()
Returns
- double
The array size, i.e. the distance between last and first coordinate.
GetArraySize_Y()
Method which calculates the array size in y-direction. Definition: "Coordinate Extent" is the range within which interpolation is possible. It may be different from "Array Size" which is the name of the distance between first and last data point.
public double GetArraySize_Y()
Returns
- double
The array size, i.e. the distance between last and first coordinate.
GetCoordinateExtent_X()
Method which calculates the coordinate extent in x-direction. Definition: "Coordinate Extent" is the range within which interpolation is possible. It may be different from "Array Size" which is the name of the distance between first and last data point.
public double GetCoordinateExtent_X()
Returns
- double
The Coordinate Extent in x-direction which is the range within which interpolation is possible.
GetCoordinateExtent_Y()
Method which calculates the coordinate extent in y-direction. Definition: "Coordinate Extent" is the range within which interpolation is possible. It may be different from "Array Size" which is the name of the distance between first and last data point.
public double GetCoordinateExtent_Y()
Returns
- double
The Coordinate Extent in y-direction which is the range within which interpolation is possible.
GetCoordinateRange_X(bool)
Gets the whole range of coordinates, either coordinate extent or array size. Definition: "Coordinate Extent" is the range within which interpolation is possible. It is different from "Array Size" which is the range between first and last data point.
public PhysicalValueRange GetCoordinateRange_X(bool extentInsteadOfArraySize)
Parameters
extentInsteadOfArraySizeboolIf set, the method returns the coordinate extent instead of the array size.
Returns
- PhysicalValueRange
The whole range of x-coordinates.
GetCoordinateRange_Y(bool)
Gets the whole range of coordinates, either coordinate extent or array size. Definition: "Coordinate Extent" is the range within which interpolation is possible. It is different from "Array Size" which is the range between first and last data point.
public PhysicalValueRange GetCoordinateRange_Y(bool extentInsteadOfArraySize)
Parameters
extentInsteadOfArraySizeboolIf set, the method returns the coordinate extent instead of the array size.
Returns
- PhysicalValueRange
The whole range of y-coordinates.
GetDataForSubset(int)
Gets the data for the given subset index.
public override ComplexField GetDataForSubset(int subsetIndex)
Parameters
subsetIndexintThe index of the subset.
Returns
- ComplexField
The ComplexField with the data for the given subset.
HeaderInformation(int, TextExportImportSettings, FieldQuantity?)
Public method to get the export header (data meaning and sampling parameters) for a specific data array.
public override string HeaderInformation(int subSetID, TextExportImportSettings exportSettings, FieldQuantity? quantityForInformation = null)
Parameters
subSetIDintThe ID of the subset for which the header information shall be extracted.
exportSettingsTextExportImportSettingsThe text export settings (header indicator, decimal separator and so on).
quantityForInformationFieldQuantity?Optional FieldQuantity for which the header information shall be generated.
Returns
- string
The export header string for the subset within the DataArray which has the subSetID.
IndexOfDataPointAtCoordinate_X(double, bool, out bool)
Method to get the x-index of that data point which corresponds to a given x-coordinate.
public long IndexOfDataPointAtCoordinate_X(double xCoord, bool enforceSteppedInterpolation, out bool coordinatesOutsideGivenIndexRange)
Parameters
xCoorddoubleCoordinate to get the corresponding data point's index for.
enforceSteppedInterpolationboolIf
true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is. This flag affects the border handling only, i.e. how restrictive the flag coordinatesOutsideGivenIndexRange will be set.coordinatesOutsideGivenIndexRangeboolFlag indicating whether the given coordinate lies outside the valid range (defined by the number of data points in x direction). The 'outside' detection considers the flag enforceSteppedInterpolation.
Returns
- long
The x-index of that data point which corresponds to the given x-coordinate.
IndexOfDataPointAtCoordinate_X(double, long, long, bool, out bool)
Method to get the x-index of that data point which corresponds to a given x-coordinate.
public long IndexOfDataPointAtCoordinate_X(double xCoord, long startIndex, long endIndex, bool enforceSteppedInterpolation, out bool coordinatesOutsideGivenIndexRange)
Parameters
xCoorddoubleCoordinate to get the corresponding data point's index for.
startIndexlongIndex to begin the search at.
endIndexlongIndex to stop the search at.
enforceSteppedInterpolationboolIf
true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is. This flag affects the border handling only, i.e. how restrictive the flag coordinatesOutsideGivenIndexRange will be set.coordinatesOutsideGivenIndexRangeboolFlag indicating whether the given coordinate lies outside the valid range (defined by startIndex and endIndex). The 'outside' detection considers the flag enforceSteppedInterpolation.
Returns
- long
The x-index of that data point which corresponds to the given x-coordinate.
IndexOfDataPointAtCoordinate_Y(double, bool, out bool)
Method to get the y-index of that data point which corresponds to a given y-coordinate.
public long IndexOfDataPointAtCoordinate_Y(double yCoord, bool enforceSteppedInterpolation, out bool coordinatesOutsideGivenIndexRange)
Parameters
yCoorddoubleCoordinate to get the corresponding data point's index for.
enforceSteppedInterpolationboolIf
true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is. This flag affects the border handling only, i.e. how restrictive the flag coordinatesOutsideGivenIndexRange will be set.coordinatesOutsideGivenIndexRangeboolFlag indicating whether the given coordinate lies outside the valid range (defined by the number of data points in y direction). The 'outside' detection considers the flag enforceSteppedInterpolation.
Returns
- long
The y-index of that data point which corresponds to the given y-coordinate.
IndexOfDataPointAtCoordinate_Y(double, long, long, bool, out bool)
Method to get the y-index of that data point which corresponds to a given y-coordinate.
public long IndexOfDataPointAtCoordinate_Y(double yCoord, long startIndex, long endIndex, bool enforceSteppedInterpolation, out bool coordinatesOutsideGivenIndexRange)
Parameters
yCoorddoubleCoordinate to get the corresponding data point's index for.
startIndexlongIndex to begin the search at.
endIndexlongIndex to stop the search at.
enforceSteppedInterpolationboolIf
true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is. This flag affects the border handling only, i.e. how restrictive the flag coordinatesOutsideGivenIndexRange will be set.coordinatesOutsideGivenIndexRangeboolFlag indicating whether the given coordinate lies outside the valid range (defined by startIndex and endIndex). The 'outside' detection considers the flag enforceSteppedInterpolation.
Returns
- long
The y-index of that data point which corresponds to the given y-coordinate.
InsertDataArray2D(DataArray2D)
Inserts another DataArray2D into this. Data inside the coordinate range of the array to insert will be overwritten.
public void InsertDataArray2D(DataArray2D arrayToInsert)
Parameters
arrayToInsertDataArray2DDataArray2D to be inserted into this.
Load(string)
Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VirtualLab 6.0) or with view settings.
public static DataArray2D Load(string fileName)
Parameters
fileNamestringName of the file.
Returns
- DataArray2D
The specified document.
Mirror(AxisDirection)
Mirrors the dataArray2D either in x or y direction. The position of the mirror axis is defined as the center of the array (with reference to the coordinate to invert).
public void Mirror(AxisDirection mirrorAxis)
Parameters
mirrorAxisAxisDirectionMirror axis. If it is x, the array is inverted in y-coordinates; if it is y, the array is inverted in x-coordinates. z is not allowed.
Mirror(AxisDirection, double)
Mirrors the dataArray2D either in x- or y-direction. The position of the mirror axis can be arbitrary.
public void Mirror(AxisDirection mirrorAxis, double mirrorAxisPosition)
Parameters
mirrorAxisAxisDirectionMirror axis. If it is x, the array is inverted in y-coordinates; if it is y, the array is inverted in x-coordinates. z is not allowed.
mirrorAxisPositiondoubleCoordinate of the mirror axis.
PointInterpolation(VectorD, bool, out Vector, out bool)
Gives the interpolated complex value for given coordinates.
Search intervals [startIndices.X, endIndices.X] and [startIndices.Y, endIndices.Y] can be set.
Note on interpolation: In case both directions (x and y) are equidistantly sampled and the interpolation method is identical for both directions, any method (stored at the DataArray2D) can be used. But if only one direction is equidistantly sampled or if different interpolation methods are needed, then only nearest neighbor (for equidistant data), constant interval interpolation (for non equidistant data), and linear interpolation (for both sampling types) are supported.
public Complex[] PointInterpolation(VectorD coords, bool enforceSteppedInterpolation, out Vector relatedDataPointIndices, out bool coordinatesOutsideGivenIndexRange)
Parameters
coordsVectorDCoordinates to interpolate the value for.
enforceSteppedInterpolationboolIf
true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is.relatedDataPointIndicesVectorGives the indices of the next smaller (non equidistant) or the nearest neighbor (equidistant) coordinates.
coordinatesOutsideGivenIndexRangeboolFlag, indicating whether the given coordinates lie outside the given index range
Returns
- Complex[]
interpolated complex value for the given coordinates
PointInterpolation(VectorD, Vector, Vector, bool, out Vector, out bool)
Gives the interpolated complex value for given coordinates.
Search intervals [startIndices.X, endIndices.X] and [startIndices.Y, endIndices.Y] can be set.
Note on interpolation: In case both directions (x and y) are equidistantly sampled and the interpolation method is identical for both directions, any method (stored at the DataArray2D) can be used. But if only one direction is equidistantly sampled or if different interpolation methods are needed, then only nearest neighbor (for equidistant data), constant interval interpolation (for non equidistant data), and linear interpolation (for both sampling types) are supported.
public Complex[] PointInterpolation(VectorD coords, Vector startIndices, Vector endIndices, bool enforceSteppedInterpolation, out Vector relatedDataPointIndices, out bool coordinatesOutsideGivenIndexRange)
Parameters
coordsVectorDcoordinates to interpolate the value for
startIndicesVectorStart indices for faster search. Important: If coords lie outside the range [startIndices...endIndices], the result most probably will be unexpected.
endIndicesVectorEnd indices for faster search. Important: If coords lie outside the range [startIndices...endIndices], the result most probably will be unexpected.
enforceSteppedInterpolationboolIf
true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is.relatedDataPointIndicesVectorGives the indices of the next smaller (non equidistant) or the nearest neighbor (equidistant) coordinates.
coordinatesOutsideGivenIndexRangeboolFlag, indicating whether the given coordinates lie outside the given index range
Returns
- Complex[]
interpolated complex value for the given coordinates
SetDataWithPropertiesAndCommentsAtOnce(ComplexFieldArray, MeasuredQuantity[], string[])
Sets the members Data, MeasuredQuantitiesOfDataEntries and CommentsOfDataEntries at once to ensure consistency.
public void SetDataWithPropertiesAndCommentsAtOnce(ComplexFieldArray data, MeasuredQuantity[] measuredQuantities, string[] comments)
Parameters
dataComplexFieldArrayData to set.
measuredQuantitiesMeasuredQuantity[]MeasuredQuantitiesOfDataEntries to set.
commentsstring[]CommentsOfDataEntries to set.
SetDataWithPropertiesAndCommentsAtOnce(ComplexField[], MeasuredQuantity[], string[])
Sets the members Data, MeasuredQuantitiesOfDataEntries and CommentsOfDataEntries at once to ensure consistency.
public override void SetDataWithPropertiesAndCommentsAtOnce(ComplexField[] data, MeasuredQuantity[] measuredQuantitiesOfDataEntries, string[] commentsOfDataEntries)
Parameters
dataComplexField[]Data to set.
measuredQuantitiesOfDataEntriesMeasuredQuantity[]MeasuredQuantitiesOfDataEntries to set.
commentsOfDataEntriesstring[]CommentsOfDataEntries to set.
Operators
operator +(DataArray2D, DataArray2D)
Implements the operator + for addition of two two-dimensional data arrays.
public static DataArray2D operator +(DataArray2D dataArray1, DataArray2D dataArray2)
Parameters
dataArray1DataArray2DThe first summand.
dataArray2DataArray2DThe second summand.
Returns
- DataArray2D
The result of the addition.
operator /(DataArray2D, DataArray2D)
Implements the operator / for division of two two-dimensional data arrays.
public static DataArray2D operator /(DataArray2D dataArray1, DataArray2D dataArray2)
Parameters
dataArray1DataArray2DThe dividend.
dataArray2DataArray2DThe divisor.
Returns
- DataArray2D
The result of the division.
operator ==(DataArray2D, DataArray2D)
Checks whether two DataArray2D objects are equal.
public static bool operator ==(DataArray2D da1, DataArray2D da2)
Parameters
da1DataArray2DThe first data array.
da2DataArray2DThe second data array.
Returns
- bool
Trueif the two data arrays represent exactly the same data.
operator !=(DataArray2D, DataArray2D)
Checks whether two DataArray2D objects are unequal.
public static bool operator !=(DataArray2D da1, DataArray2D da2)
Parameters
da1DataArray2DThe first data array.
da2DataArray2DThe second data array.
Returns
- bool
Trueif the two data arrays differ in at least one property or variable.
operator *(DataArray2D, DataArray2D)
Implements the operator * for multiplication of two two-dimensional data arrays.
public static DataArray2D operator *(DataArray2D dataArray1, DataArray2D dataArray2)
Parameters
dataArray1DataArray2DThe first factor.
dataArray2DataArray2DThe second factor.
Returns
- DataArray2D
The result of the multiplication.
operator -(DataArray2D, DataArray2D)
Implements the operator - for subtraction of two two-dimensional data arrays.
public static DataArray2D operator -(DataArray2D dataArray1, DataArray2D dataArray2)
Parameters
dataArray1DataArray2DThe minuend.
dataArray2DataArray2DThe subtrahend.
Returns
- DataArray2D
The result of the subtraction.