SParameterData
S-parameter results generated by the Feko Solver.
Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/Waveguide_Divider.fek]]) -- Retrieve the 'SParameterData' called 'SParameter1' from the S-parameter configuration sParameterData = app.Models[1].Configurations["SParameterConfiguration1"].SParameters["SParameter1"] -- Manipulate the S-Parameter data. See 'DataSet' for faster and more comprehensive options dataSet = sParameterData:GetDataSet() print(dataSet) -- Describes the structure of the data inspect(dataSet) -- Gives a list of the data set contents -- Find the frequency start and end values frequencyAxis = dataSet.Axes["Frequency"] frequencyStartValue = frequencyAxis:ValueAt(1) frequencyEndValue = frequencyAxis:ValueAt(#frequencyAxis) -- Scale the s-parameter values scale = 2 for freqIndex = 1, #dataSet.Axes["Frequency"] do for portIndex = 1, #dataSet.Axes["Arbitrary"] do indexedValue = dataSet[freqIndex][portIndex] indexedValue.SParameter = indexedValue.SParameter * scale end end -- Store the manipulated data scaledSParameter = dataSet:StoreData(pf.Enums.StoredDataTypeEnum.SParameter) -- Compare the original S-Parameter to the manipulated S-Parameter graph = app.CartesianGraphs:Add() sParameterTrace1 = graph.Traces:Add(sParameterData) sParameterTrace1:SetFixedAxisValue("S-parameter", "S3,1") sParameterTrace2 = graph.Traces:Add(scaledSParameter) sParameterTrace2:SetFixedAxisValue("Arbitrary", "S3,1")
Inheritance
The SParameterData object is derived from the ResultData object.
Usage locations
The SParameterData object can be accessed from the following locations:
- Methods
- SParameterCollection collection has method Items().
- SParameterCollection collection has method Item(number).
- SParameterCollection collection has method Item(string).
Property List
- Configuration
- The result data's solution configuration in the model. (Read only SolutionConfiguration)
- ContinuousFrequencyAxis
- Continuous frequency axis exists. (Read only boolean)
- 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, frequencyunit FrequencyUnitEnum, networkparametertype NetworkParameterTypeEnum, networkparameterformat NetworkParameterFormatEnum, referenceimpedance number, samples number)
- Export the result S-parameter data to the specified Touchstone file (reference impedance specified).
- ExportData (filename string, frequencyunit FrequencyUnitEnum, networkparametertype NetworkParameterTypeEnum, networkparameterformat NetworkParameterFormatEnum, samples number)
- Export the result S-parameter data to the specified Touchstone file (reference impedance not specified).
- GetDataSet ()
- Returns a data set containing the S-parameter values. (Returns a DataSet object.)
- GetDataSet (samplePoints number)
- Returns a data set containing the S-parameter values. (Returns a DataSet object.)
- GetDataSet (startFrequency number, endFrequency number, samplePoints number)
- Returns a data set containing the S-parameter values. (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
- 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
- Type
- The object type string.
- Type
- string
- Access
- Read only
Method Details
- ExportData (filename string, frequencyunit FrequencyUnitEnum, networkparametertype NetworkParameterTypeEnum, networkparameterformat NetworkParameterFormatEnum, referenceimpedance number, samples number)
- Export the result S-parameter data to the specified Touchstone file (reference impedance specified).
- Input Parameters
- filename(string)
- The name of the exported data file without its extension.
- frequencyunit(FrequencyUnitEnum)
- The frequency unit specified by the FrequencyUnitEnum, e.g. Hz, kHz, GHz, etc.
- networkparametertype(NetworkParameterTypeEnum)
- The network parameter type specified by the NetworkParameterTypeEnum, e.g. Scattering, Admittance or Impedance.
- networkparameterformat(NetworkParameterFormatEnum)
- The network parameter format specified by the NetworkParameterFormatEnum, e.g. DB, MA or RI.
- referenceimpedance(number)
- Specify the reference impedance.
- samples(number)
- The number of samples for continuous data. This value will be ignored if the data is discrete.
- ExportData (filename string, frequencyunit FrequencyUnitEnum, networkparametertype NetworkParameterTypeEnum, networkparameterformat NetworkParameterFormatEnum, samples number)
- Export the result S-parameter data to the specified Touchstone file (reference impedance not specified).
- Input Parameters
- filename(string)
- The name of the exported data file without its extension.
- frequencyunit(FrequencyUnitEnum)
- The frequency unit specified by the FrequencyUnitEnum, e.g. Hz, kHz, GHz, etc.
- networkparametertype(NetworkParameterTypeEnum)
- The network parameter type specified by the NetworkParameterTypeEnum, e.g. Scattering, Admittance or Impedance.
- networkparameterformat(NetworkParameterFormatEnum)
- The network parameter format specified by the NetworkParameterFormatEnum, e.g. DB, MA or RI.
- samples(number)
- The number of samples for continuous data. This value will be ignored if the data is discrete.
- GetDataSet ()
- Returns a data set containing the S-parameter values.
- Return
- DataSet
- The data set containing the S-parameter values.
- GetDataSet (samplePoints number)
- Returns a data set containing the S-parameter values.
- GetDataSet (startFrequency number, endFrequency number, samplePoints number)
- Returns a data set containing the S-parameter values.
- Input Parameters
- Return
- DataSet
- The data set containing the S-parameter values.
- StoreData ()
- Creates a local stored version of the result data.
- Return
- ResultData
- The new stored data.