NearFieldMathScript
Near field math script data that can be plotted.
Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]]) -- Create a near field math script nearFieldMathScript = app.MathScripts:Add(pf.Enums.MathScriptTypeEnum.NearField) script = [[ dataSet = pf.NearField.GetDataSet("startup.StandardConfiguration1.NearFields", 51) scale = 2 constantZIndex = 1 for freqIndex = 1, #dataSet.Axes["Frequency"] do for xIndex = 1, #dataSet.Axes["X"] do for yIndex = 1, #dataSet.Axes["Y"] do indexedValue = dataSet[freqIndex][xIndex][yIndex][constantZIndex] indexedValue.EFieldComp1 = indexedValue.EFieldComp1 * scale indexedValue.EFieldComp2 = indexedValue.EFieldComp2 * scale indexedValue.EFieldComp3 = indexedValue.EFieldComp3 * scale end end end return dataSet ]] nearFieldMathScript.Script = script nearFieldMathScript:Run() -- Plot the math script nearFieldPlot = app.Views[1].Plots:Add(nearFieldMathScript)
Inheritance
The NearFieldMathScript object is derived from the MathScript object.
Property List
- ContinuousFrequencyAxis
- Continuous frequency axis exists. (Read only boolean)
- DataSetAvailable
- Valid result data exist. (Read only boolean)
- Label
- The object label. (Read/Write string)
- Script
- The script code to execute. (Read/Write string)
- Type
- The object type string. (Read only string)
Method List
- Delete ()
- Delete the math script.
- Duplicate ()
- Duplicate the math script. (Returns a MathScript object.)
- GetDataSet ()
- Returns a data set containing the math script values. (Returns a DataSet object.)
- Run ()
- Run the math script.
- StoreData ()
- Creates a local stored version of the result data. (Returns a ResultData object.)
Property Details
- ContinuousFrequencyAxis
- Continuous frequency axis exists.
- Type
- boolean
- Access
- Read only
- DataSetAvailable
- Valid result data exist.
- Type
- boolean
- Access
- Read only
- Label
- The object label.
- Type
- string
- Access
- Read/Write
- Script
- The script code to execute.
- Type
- string
- Access
- Read/Write
- Type
- The object type string.
- Type
- string
- Access
- Read only
Method Details
- Delete ()
- Delete the math script.
- Duplicate ()
- Duplicate the math script.
- Return
- MathScript
- The duplicated math script.
- GetDataSet ()
- Returns a data set containing the math script values.
- Return
- DataSet
- The data set containing the math script values.
- Run ()
- Run the math script.
- StoreData ()
- Creates a local stored version of the result data.
- Return
- ResultData
- The new stored data.