FarFieldData

Far field results generated by the Feko Solver.

Example

app = pf.GetApplication()
app:NewProject()
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])

    -- Retrieve the 'FarFieldData' called 'FarFields'

farFieldData = app.Models[1].Configurations[1].FarFields["FarFields"]

    -- Manipulate the far field data. See 'DataSet' for faster and more comprehensive options
    
dataSet = farFieldData:GetDataSet(51)
print(dataSet) -- Describes the structure of the data
inspect(dataSet) -- Gives a list of the data set contents

    -- Find the theta start and end values

thetaAxis = dataSet.Axes["Theta"]
thetaStartValue = thetaAxis:ValueAt(1)
thetaEndValue = thetaAxis:ValueAt(#thetaAxis)

    -- Scale the far field field values

scale = 2
for freqIndex = 1, #dataSet.Axes["Frequency"] do
    for thetaIndex = 1, #dataSet.Axes["Theta"] do
        for phiIndex = 1, #dataSet.Axes["Phi"] do
            indexedValue = dataSet[freqIndex][thetaIndex][phiIndex]
            indexedValue.EFieldTheta = indexedValue.EFieldTheta * scale
            indexedValue.EFieldPhi = indexedValue.EFieldPhi * scale            
        end
    end
end

    -- Store the manipulated data 
    
scaledFarField = dataSet:StoreData(pf.Enums.StoredDataTypeEnum.FarField)

    -- Compare the original far field to the manipulated far field
    
farFieldPlot1 = app.Views[1].Plots:Add(farFieldData)
farFieldPlot2  = app.Views[1].Plots:Add(scaledFarField)
graph = app.CartesianGraphs:Add()
farFieldTrace1 = graph.Traces:Add(farFieldData)
farFieldTrace2 = graph.Traces:Add(scaledFarField)

Inheritance

The FarFieldData object is derived from the ResultData object.

Property List

Configuration
The result data's solution configuration in the model. (Read only SolutionConfiguration)
DataSetAvailable
Valid result data exist. (Read only boolean)
Label
The object label. (Read/Write string)
Type
The object type string. (Read only string)

Method List

ExportData (filename string, quantity FarFieldsExportTypeEnum, samples number)
Export the result far field data to the specified *.ffe file.
GetDataSet ()
Returns a data set containing the far field values. (Returns a DataSet object.)
GetDataSet (samplePoints number)
Returns a data set containing the far field values. (Returns a DataSet object.)
GetDataSet (startFrequency number, endFrequency number, samplePoints number)
Returns a data set containing the far field values. (Returns a DataSet object.)
GetSampledDataSet (theta number, phi number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities. (Returns a DataSet object.)
GetSampledDataSet (thetaStart number, thetaEnd number, thetaCount number, phiStart number, phiEnd number, phiCount number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities. (Returns a DataSet object.)
GetSampledDataSet (frequency number, theta number, phi number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities. (Returns a DataSet object.)
GetSampledDataSet (freqStart number, freqEnd number, freqCount number, thetaStart number, thetaEnd number, thetaCount number, phiStart number, phiEnd number, phiCount number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities. (Returns a DataSet object.)
StoreData ()
Creates a local stored version of the result data. (Returns a ResultData object.)

Property Details

Configuration
The result data's solution configuration in the model.
Type
SolutionConfiguration
Access
Read only
DataSetAvailable
Valid result data exist.
Type
boolean
Access
Read only
Label
The object label.
Type
string
Access
Read/Write
Type
The object type string.
Type
string
Access
Read only

Method Details

ExportData (filename string, quantity FarFieldsExportTypeEnum, samples number)
Export the result far field data to the specified *.ffe file.
Input Parameters
filename(string)
The name of the exported data file without its extension.
quantity(FarFieldsExportTypeEnum)
The quantity type to export specified by the FarFieldsExportTypeEnum, e.g. Gain, Directivity, RCS, etc.
samples(number)
The number of samples for continuous data. This value will be ignored if the data is discrete.
Example
app = pf.GetApplication()
app:NewProject()    
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])

    -- Export the far field data to the current working directory

farFieldData = app.Models[1].Configurations[1].FarFields["FarFields"]
farFieldData:ExportData("temp_farFieldExport", 
                    pf.Enums.FarFieldsExportTypeEnum.Directivity, 
                    51)         
GetDataSet ()
Returns a data set containing the far field values.
Return
DataSet
The data set containing the far field values.
GetDataSet (samplePoints number)
Returns a data set containing the far field values.
Input Parameters
samplePoints(number)
The number of sample points used to sample the continuous frequency axis.
Return
DataSet
The data set containing the far field values.
GetDataSet (startFrequency number, endFrequency number, samplePoints number)
Returns a data set containing the far field values.
Input Parameters
startFrequency(number)
The start frequency used to sample the continuous frequency axis.
endFrequency(number)
The end frequency used to sample the continuous frequency axis.
samplePoints(number)
The number of sample points used to sample the continuous frequency axis.
Return
DataSet
The data set containing the far field values.
GetSampledDataSet (theta number, phi number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities.
Input Parameters
theta(number)
The theta sample density.
phi(number)
The phi sample density.
Return
DataSet
A far field data set.
GetSampledDataSet (thetaStart number, thetaEnd number, thetaCount number, phiStart number, phiEnd number, phiCount number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities.
Input Parameters
thetaStart(number)
The start of the theta range to sample.
thetaEnd(number)
The end of the theta range to sample.
thetaCount(number)
The theta sample density.
phiStart(number)
The start of the phi range to sample.
phiEnd(number)
The end of the phi range to sample.
phiCount(number)
The phi sample density.
Return
DataSet
A far field data set.
GetSampledDataSet (frequency number, theta number, phi number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities.
Input Parameters
frequency(number)
The frequency sample density.
theta(number)
The theta sample density.
phi(number)
The phi sample density.
Return
DataSet
A far field data set.
GetSampledDataSet (freqStart number, freqEnd number, freqCount number, thetaStart number, thetaEnd number, thetaCount number, phiStart number, phiEnd number, phiCount number)
Returns the data set for the continuous far field sampled using the given theta and phi sample densities.
Input Parameters
freqStart(number)
The start of the frequency range to sample.
freqEnd(number)
The end of the frequency range to sample.
freqCount(number)
The frequency sample density.
thetaStart(number)
The start of the theta range to sample.
thetaEnd(number)
The end of the theta range to sample.
thetaCount(number)
The theta sample density.
phiStart(number)
The start of the phi range to sample.
phiEnd(number)
The end of the phi range to sample.
phiCount(number)
The phi sample density.
Return
DataSet
A far field data set.
StoreData ()
Creates a local stored version of the result data.
Return
ResultData
The new stored data.