`DataSet`

The structure used for containing math results. A DataSet contains axes that indicate where quantities are defined, as well as the values for those quantities at each point.

## Example

app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])-- Create a new DataSetmyDataSet = pf.DataSet.New()-- Build the axes and quantities:-- Frequency axis spanning from 1GHz to 2GHz with 11 values-- Add a X axis spanning from -1m to 1m with 11 values-- Add a Y axis spanning from -1m to 1m with 11 values-- Add a Z axis spanning from -1m to 1m with 11 valuesmyDataSet.Axes:Add( pf.Enums.DataSetAxisEnum.Frequency, "GHz", 1 ,2 ,11) myDataSet.Axes:Add( pf.Enums.DataSetAxisEnum.X,"m", -1, 1, 11) myDataSet.Axes:Add( pf.Enums.DataSetAxisEnum.Y,"m", -1, 1, 11) myDataSet.Axes:Add( pf.Enums.DataSetAxisEnum.Z,"m", -1, 1, 11)-- Add some quantities to the quantity collectionmyDataSet.Quantities:Add( "Threshold", pf.Enums.DataSetQuantityTypeEnum.Scalar, "") myDataSet.Quantities:Add( "TotalEField", pf.Enums.DataSetQuantityTypeEnum.Complex, "V/m")-- Iterate over all the axes and populate the data set valuesforfreqIndex = 1, #myDataSet.Axes["Frequency"]doforxIndex = 1, #myDataSet.Axes["X"]doforyIndex = 1, #myDataSet.Axes["Y"]doforzIndex = 1, #myDataSet.Axes["Z"]doindexedValue = myDataSet[freqIndex][xIndex][yIndex][zIndex] xValue = indexedValue:AxisValue(pf.Enums.DataSetAxisEnum.X) yValue = indexedValue:AxisValue(pf.Enums.DataSetAxisEnum.Y) zValue = indexedValue:AxisValue(pf.Enums.DataSetAxisEnum.Z) r = math.sqrt((xValue*xValue)+(yValue*yValue)+(zValue*zValue)) indexedValue.TotalEField = 1/r + j*(1/r) indexedValue.Threshold = 1endendendend-- An iterator function that is used by ForAllValues to populate the data set values-- This is equivalent to the above method.functioninitialise( index, myDataSet ) indexedValue = myDataSet[index] xValue = indexedValue:AxisValue(pf.Enums.DataSetAxisEnum.X) yValue = indexedValue:AxisValue(pf.Enums.DataSetAxisEnum.Y) zValue = indexedValue:AxisValue(pf.Enums.DataSetAxisEnum.Z) r = math.sqrt((xValue*xValue)+(yValue*yValue)+(zValue*zValue)) indexedValue.TotalEField = 1/r + j*(1/r) indexedValue.Threshold = 1endpf.DataSet.ForAllValues( initialise, myDataSet )-- Store the custom data set and plot it on a 3D viewstoredCustomData = myDataSet:StoreData(pf.Enums.StoredDataTypeEnum.Custom) customDataPlot = app.Views[1].Plots:Add(storedCustomData) customDataPlot.Quantity.Type = "TotalEField" app.Views[1]:ZoomToExtents()

## Usage locations

The DataSet object can be accessed from the following locations:

- Methods
- SurfaceCurrentsAndChargesStoredData object has method GetDataSet().
- SurfaceCurrentsAndChargesStoredData object has method GetDataSet(number).
- SurfaceCurrentsAndChargesStoredData object has method GetDataSet(number, number, number).
- SARStoredData object has method GetDataSet().
- SARStoredData object has method GetDataSet(number).
- SARStoredData object has method GetDataSet(number, number, number).
- WireCurrentsAndChargesStoredData object has method GetDataSet().
- WireCurrentsAndChargesStoredData object has method GetDataSet(number).
- WireCurrentsAndChargesStoredData object has method GetDataSet(number, number, number).
- FarFieldPowerIntegralStoredData object has method GetDataSet().
- ModalExcitationStoredData object has method GetDataSet().
- ModalExcitationStoredData object has method GetDataSet(number).
- ModalExcitationStoredData object has method GetDataSet(number, number, number).
- WaveguideExcitationStoredData object has method GetDataSet().
- WaveguideExcitationStoredData object has method GetDataSet(number).
- WaveguideExcitationStoredData object has method GetDataSet(number, number, number).
- ExcitationStoredData object has method GetDataSet().
- ExcitationStoredData object has method GetDataSet(number).
- ExcitationStoredData object has method GetDataSet(number, number, number).
- CustomStoredData object has method GetDataSet().
- LoadStoredData object has method GetDataSet().
- LoadStoredData object has method GetDataSet(number).
- LoadStoredData object has method GetDataSet(number, number, number).
- NetworkStoredData object has method GetDataSet().
- NetworkStoredData object has method GetDataSet(number).
- NetworkStoredData object has method GetDataSet(number, number, number).
- CharacteristicModeStoredData object has method GetDataSet().
- CharacteristicModeStoredData object has method GetDataSet(number).
- CharacteristicModeStoredData object has method GetDataSet(number, number, number).
- TRCoefficientStoredData object has method GetDataSet().
- TRCoefficientStoredData object has method GetDataSet(number).
- TRCoefficientStoredData object has method GetDataSet(number, number, number).
- PowerStoredData object has method GetDataSet().
- PowerStoredData object has method GetDataSet(number).
- PowerStoredData object has method GetDataSet(number, number, number).
- FarFieldStoredData object has method GetDataSet().
- FarFieldStoredData object has method GetDataSet(number).
- FarFieldStoredData object has method GetDataSet(number, number, number).
- SParameterStoredData object has method GetDataSet().
- SParameterStoredData object has method GetDataSet(number).
- SParameterStoredData object has method GetDataSet(number, number, number).
- NearFieldStoredData object has method GetDataSet().
- NearFieldStoredData object has method GetDataSet(number).
- NearFieldStoredData object has method GetDataSet(number, number, number).
- LoadComplex object has method GetDataSet().
- LoadComplex object has method GetDataSet(number).
- LoadComplex object has method GetDataSet(number, number, number).
- LoadVoxel object has method GetDataSet().
- LoadVoxel object has method GetDataSet(number).
- LoadVoxel object has method GetDataSet(number, number, number).
- LoadSeries object has method GetDataSet().
- LoadSeries object has method GetDataSet(number).
- LoadSeries object has method GetDataSet(number, number, number).
- LoadParallel object has method GetDataSet().
- LoadParallel object has method GetDataSet(number).
- LoadParallel object has method GetDataSet(number, number, number).
- LoadNetwork object has method GetDataSet().
- LoadNetwork object has method GetDataSet(number).
- LoadNetwork object has method GetDataSet(number, number, number).
- LoadFEM object has method GetDataSet().
- LoadFEM object has method GetDataSet(number).
- LoadFEM object has method GetDataSet(number, number, number).
- LoadEdge object has method GetDataSet().
- LoadEdge object has method GetDataSet(number).
- LoadEdge object has method GetDataSet(number, number, number).
- LoadCable object has method GetDataSet().
- LoadCable object has method GetDataSet(number).
- LoadCable object has method GetDataSet(number, number, number).
- LoadCoaxial object has method GetDataSet().
- LoadCoaxial object has method GetDataSet(number).
- LoadCoaxial object has method GetDataSet(number, number, number).
- LoadVertex object has method GetDataSet().
- LoadVertex object has method GetDataSet(number).
- LoadVertex object has method GetDataSet(number, number, number).
- SourceWaveguide object has method GetDataSet().
- SourceWaveguide object has method GetDataSet(number).
- SourceWaveguide object has method GetDataSet(number, number, number).
- SourceVoltageNetwork object has method GetDataSet().
- SourceVoltageNetwork object has method GetDataSet(number).
- SourceVoltageNetwork object has method GetDataSet(number, number, number).
- SourceVoltageCable object has method GetDataSet().
- SourceVoltageCable object has method GetDataSet(number).
- SourceVoltageCable object has method GetDataSet(number, number, number).
- SourceCurrentRegion object has method GetDataSet().
- SourceCurrentRegion object has method GetDataSet(number).
- SourceCurrentRegion object has method GetDataSet(number, number, number).
- SourceVoltageEdge object has method GetDataSet().
- SourceVoltageEdge object has method GetDataSet(number).
- SourceVoltageEdge object has method GetDataSet(number, number, number).
- SourceModal object has method GetDataSet().
- SourceModal object has method GetDataSet(number).
- SourceModal object has method GetDataSet(number, number, number).
- SourceCoaxial object has method GetDataSet().
- SourceCoaxial object has method GetDataSet(number).
- SourceCoaxial object has method GetDataSet(number, number, number).
- SourceMagneticFrill object has method GetDataSet().
- SourceMagneticFrill object has method GetDataSet(number).
- SourceMagneticFrill object has method GetDataSet(number, number, number).
- SourceVoltageVertex object has method GetDataSet().
- SourceVoltageVertex object has method GetDataSet(number).
- SourceVoltageVertex object has method GetDataSet(number, number, number).
- SourceVoltageSegment object has method GetDataSet().
- SourceVoltageSegment object has method GetDataSet(number).
- SourceVoltageSegment object has method GetDataSet(number, number, number).
- CharacteristicModeData object has method GetDataSet().
- CharacteristicModeData object has method GetDataSet(number).
- CharacteristicModeData object has method GetDataSet(number, number, number).
- WireCurrentsMathScript object has method GetDataSet().
- SurfaceCurrentsMathScript object has method GetDataSet().
- CustomMathScript object has method GetDataSet().
- TRCoefficientMathScript object has method GetDataSet().
- PowerMathScript object has method GetDataSet().
- SParameterMathScript object has method GetDataSet().
- NetworkMathScript object has method GetDataSet().
- LoadMathScript object has method GetDataSet().
- ExcitationMathScript object has method GetDataSet().
- FarFieldMathScript object has method GetDataSet().
- NearFieldMathScript object has method GetDataSet().
- FarFieldPowerIntegralData object has method GetDataSet().
- TRCoefficientData object has method GetDataSet().
- TRCoefficientData object has method GetDataSet(number).
- TRCoefficientData object has method GetDataSet(number, number, number).
- SphericalModesReceivingAntennaData object has method GetDataSet().
- SphericalModesReceivingAntennaData object has method GetDataSet(number).
- SphericalModesReceivingAntennaData object has method GetDataSet(number, number, number).
- NearFieldReceivingAntennaData object has method GetDataSet().
- NearFieldReceivingAntennaData object has method GetDataSet(number).
- NearFieldReceivingAntennaData object has method GetDataSet(number, number, number).
- FarFieldReceivingAntennaData object has method GetDataSet().
- FarFieldReceivingAntennaData object has method GetDataSet(number).
- FarFieldReceivingAntennaData object has method GetDataSet(number, number, number).
- ReceivingAntennaData object has method GetDataSet().
- ReceivingAntennaData object has method GetDataSet(number).
- ReceivingAntennaData object has method GetDataSet(number, number, number).
- TransmissionLineData object has method GetDataSet().
- TransmissionLineData object has method GetDataSet(number).
- TransmissionLineData object has method GetDataSet(number, number, number).
- NetworkData object has method GetDataSet().
- NetworkData object has method GetDataSet(number).
- NetworkData object has method GetDataSet(number, number, number).
- SARData object has method GetDataSet().
- SARData object has method GetDataSet(number).
- SARData object has method GetDataSet(number, number, number).
- WireCurrentsData object has method GetDataSet().
- WireCurrentsData object has method GetDataSet(number).
- WireCurrentsData object has method GetDataSet(number, number, number).
- SurfaceCurrentsData object has method GetDataSet().
- SurfaceCurrentsData object has method GetDataSet(number).
- SurfaceCurrentsData object has method GetDataSet(number, number, number).
- SParameterData object has method GetDataSet().
- SParameterData object has method GetDataSet(number).
- SParameterData object has method GetDataSet(number, number, number).
- PowerData object has method GetDataSet().
- PowerData object has method GetDataSet(number).
- PowerData object has method GetDataSet(number, number, number).
- FarFieldData object has method GetDataSet().
- FarFieldData object has method GetDataSet(number).
- FarFieldData object has method GetDataSet(number, number, number).
- FarFieldData object has method GetSampledDataSet(number, number).
- FarFieldData object has method GetSampledDataSet(number, number, number, number, number, number).
- FarFieldData object has method GetSampledDataSet(number, number, number).
- FarFieldData object has method GetSampledDataSet(number, number, number, number, number, number, number, number, number).
- NearFieldData object has method GetDataSet().
- NearFieldData object has method GetDataSet(number).
- NearFieldData object has method GetDataSet(number, number, number).
- NearFieldData object has method GetMediaDataSet().
- NearFieldData object has method GetMediaDataSet(number).
- NearFieldData object has method GetMediaDataSet(number, number, number).
- DataSet object has method Clone().
- DataSet object has method CloneStructure().

- Static functions

## Property List

- MetaData
- Metadata that is associated with the data set. (Read only DataSetMetaData)
- Type
- The object type string. (Read only string)

## Collection List

- Axes
- The collection of axes defining the positions in the data set where quantities are defined. (DataSetAxisCollection of DataSetAxis.)
- Quantities
- The collection of quantities that are defined at each point in the data set. (DataSetQuantityCollection of DataSetQuantity.)

## Method List

- Clone ()
- Makes a copy of this dataset and returns it. (Returns a DataSet object.)
- CloneStructure ()
- Creates a copy of the structure of the dataset but none of its values. (Returns a DataSet object.)
- ExportMatFile (
`filename`string,`varname`string) - Writes the given DataSet object to a *.mat file. (Returns a boolean object.)
- FromComplexMatrix (
`matrix`ComplexMatrix,`quantityNames`List of string) - Fills the data set from a matrix.
- FromComplexMatrix (
`matrix`ComplexMatrix,`quantityNames`List of string,`dataAxisName`string) - Fills the data set from a matrix.
- FromMatrix (
`matrix`Matrix,`quantityNames`List of string) - Fills the data set from a matrix.
- FromMatrix (
`matrix`Matrix,`quantityNames`List of string,`dataAxisName`string) - Fills the data set from a matrix.
- StoreData (
`type`StoredDataTypeEnum) - Creates a stored copy of the dataset. (Returns a ResultData object.)
- ToComplexMatrix (
`quantityNames`List of string) - Extracts data from the data set. (Returns a ComplexMatrix object.)
- ToComplexMatrix (
`quantityNames`List of string,`dataAxisName`string) - Extracts data from the data set. (Returns a ComplexMatrix object.)
- ToMatrix (
`quantityNames`List of string) - Extracts data from the data set. (Returns a Matrix object.)
- ToMatrix (
`quantityNames`List of string,`dataAxisName`string) - Extracts data from the data set. (Returns a Matrix object.)
- UpdateStoredData (
`type`StoredDataTypeEnum,`entity`ResultData) - Updates the contents of a stored data entity from the dataset.

## Constructor Function List

## Static Function List

## Index List

- [list<number>]
- Index into the values of the data set using a table of indices. (Read DataSetIndexer)
- [number]
- Index into the values of the data set. (Read DataSetIndexer)

## Property Details

- MetaData
- Metadata that is associated with the data set.
- Type
- DataSetMetaData
- Access
- Read only

- Type
- The object type string.
- Type
- string
- Access
- Read only

## Collection Details

- Axes
- The collection of axes defining the positions in the data set where quantities are defined.
- Quantities
- The collection of quantities that are defined at each point in the data set.

## Method Details

- Clone ()
- Makes a copy of this dataset and returns it.
- Return
- DataSet
- A copy of the current DataSet.

- CloneStructure ()
- Creates a copy of the structure of the dataset but none of its values.
- Return
- DataSet
- A structural copy of the current DataSet.

- ExportMatFile (
`filename`string,`varname`string) - Writes the given DataSet object to a *.mat file.
- FromComplexMatrix (
`matrix`ComplexMatrix,`quantityNames`List of string) - Fills the data set from a matrix.
- Input Parameters
`matrix`(ComplexMatrix)- Matrix to fill the dataset with.
`quantityNames`(List of string)- List of quantities the matrix represents.

- FromComplexMatrix (
`matrix`ComplexMatrix,`quantityNames`List of string,`dataAxisName`string) - Fills the data set from a matrix.
- Input Parameters
`matrix`(ComplexMatrix)- Matrix to fill the dataset with.
`quantityNames`(List of string)- List of quantities the matrix represents.
`dataAxisName`(string)- Data axis the matrix represents.

- FromMatrix (
`matrix`Matrix,`quantityNames`List of string) - Fills the data set from a matrix.
- FromMatrix (
`matrix`Matrix,`quantityNames`List of string,`dataAxisName`string) - Fills the data set from a matrix.
- StoreData (
`type`StoredDataTypeEnum) - Creates a stored copy of the dataset.
- Input Parameters
`type`(StoredDataTypeEnum)- The type of stored data entity specified by StoredDataTypeEnum, e.g. FarField, NearField, Custom, etc.

- Return
- ResultData
- The new stored data.

- ToComplexMatrix (
`quantityNames`List of string) - Extracts data from the data set.
- Input Parameters
- Return
- ComplexMatrix
- A matrix with a quantity in each column.

- ToComplexMatrix (
`quantityNames`List of string,`dataAxisName`string) - Extracts data from the data set.
- Input Parameters
- Return
- ComplexMatrix
- A matrix with the quantities as rows and the axis as columns.

- ToMatrix (
`quantityNames`List of string) - Extracts data from the data set.
- ToMatrix (
`quantityNames`List of string,`dataAxisName`string) - Extracts data from the data set.
- UpdateStoredData (
`type`StoredDataTypeEnum,`entity`ResultData) - Updates the contents of a stored data entity from the dataset.
- Input Parameters
`type`(StoredDataTypeEnum)- The type of stored data entity specified by StoredDataTypeEnum, e.g. FarField, NearField, Custom, etc.
`entity`(ResultData)- The stored data entity that must be updated.

## Static Function Details

- CombineDataSets (
`name`string,`unit`Unit,`values`List of Variant,`sets`List of DataSet) - Combines the data sets creating a new outer axis.
- ForAllValues (
`valueFunction`function,`data`DataSet, ...) - Iterates over every point on every axis of the data set.
- Input Parameters
- Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])

*-- Create a new DataSet*myDataSet = pf.DataSet.New()*-- Build the axes and quantities:**-- Frequency axis spanning from 1GHz to 2GHz with 11 values**-- Add a X axis spanning from -1m to 1m with 11 values**-- Add a Y axis spanning from -1m to 1m with 11 values**-- Add a Z axis spanning from -1m to 1m with 11 values*myDataSet.Axes:Add(pf.Enums.DataSetAxisEnum.Frequency, "GHz", 1 ,2 ,11) myDataSet.Axes:Add(pf.Enums.DataSetAxisEnum.X,"m", -1, 1, 11) myDataSet.Axes:Add(pf.Enums.DataSetAxisEnum.Y,"m", -1, 1, 11) myDataSet.Axes:Add(pf.Enums.DataSetAxisEnum.Z,"m", -1, 1, 11)*-- Add a "Threshold" scalar quantity with no unit*myDataSet.Quantities:Add( "Threshold", pf.Enums.DataSetQuantityTypeEnum.Scalar, "")*-- An iterator function that initialises all of the defined values**-- to to the value provided as an extra argument to the 'forAllValues'**-- function.***function**initialise( index, myDataSet, initialValue ) myDataSet[index].Threshold = initialValue**end**pf.DataSet.ForAllValues(initialise, myDataSet, 2)*-- Store the custom data set and plot it on a 3D view*storedCustomData = myDataSet:StoreData(pf.Enums.StoredDataTypeEnum.Custom) app.Views[1].Plots:Add(storedCustomData) app.Views[1]:ZoomToExtents()

- New ()
- Creates a new data set.
- Return
- DataSet
- The new data set.