Main Content

ffsReader

Import far-field data from Far-Field Source files

Since R2026a

    Description

    mAnt = ffsReader(filename) searches the current directory for all the CST Studio Suite®® FFS files (.ffs) whose name starts with the filename specified in filename, reads far-field data from these files, and returns a measuredAntenna object with its properties set using data from the files. Each file represents one antenna port.

    You can import single-frequency as well as broadband far-field data using this function. If you are using this measuredAntenna object as an antenna source in the Antenna (RF Blockset) block, you must scale its electric and embedded electric fields using the scaleEField function beforehand.

    example

    mAnt = ffsReader(___,Name=Value) imports only a subset of data filtered using one or more name-value arguments.

    Examples

    collapse all

    This example does not provide sample data and the file names used are for illustration purpose. Use this workflow with your field data.

    Change the working directory to the directory containing your FFS and S-parameter data files. Specify the file name and import the broadband pattern data for two antenna ports using the ffsReader function.

    mAnt = ffsReader("broadband_source",PortList=[1:2],SparametersFile="sparameter_data.s8p")
    broadband_source_[1].ffs
    
    broadband_source_[2].ffs
    
    mAnt = 
      measuredAntenna with properties:
    
                           E: []
                 Directivity: []
                   Direction: [16471×3 double]
                 PhaseCenter: [0 0 0]
                    NumPorts: 2
              FieldFrequency: [7×1 double]
             FieldCoordinate: 'polar'
                     Azimuth: [0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 … ] (1×181 double)
                   Elevation: [-90 -88 -86 -84 -82 -80 -78 -76 -74 -72 -70 -68 -66 -64 -62 -60 -58 -56 -54 -52 -50 -48 -46 -44 -42 -40 -38 -36 -34 -32 -30 -28 -26 -24 -22 -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24 … ] (1×91 double)
                 Sparameters: [1×1 sparameters]
              AmplitudeTaper: 1
                  PhaseShift: 0
                   EmbeddedE: [16471×3×2×7 double]
        TerminationImpedance: 1.0000e-12
         CalculateTotalField: 1
    

    To import single-frequency source pattern data, specify the target frequencies using the FrequencyList property. Import the pattern data for 26.5 and 27 GHz.

    mAnt = ffsReader("single_freq_source",PortList=[1:2],FrequencyList=[26.5e9 27e9],SparametersFile="sparameter_data.s8p")
    single_freq_source_(f=26.5)_[1].ffs
    
    single_freq_source_(f=27)_[1].ffs
    
    single_freq_source_(f=26.5)_[2].ffs
    
    single_freq_source_(f=27)_[2].ffs
    
    mAnt = 
      measuredAntenna with properties:
    
                           E: []
                 Directivity: []
                   Direction: [16471×3 double]
                 PhaseCenter: [0 0 0]
                    NumPorts: 2
              FieldFrequency: [2×1 double]
             FieldCoordinate: 'polar'
                     Azimuth: [0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 … ] (1×181 double)
                   Elevation: [-90 -88 -86 -84 -82 -80 -78 -76 -74 -72 -70 -68 -66 -64 -62 -60 -58 -56 -54 -52 -50 -48 -46 -44 -42 -40 -38 -36 -34 -32 -30 -28 -26 -24 -22 -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24 … ] (1×91 double)
                 Sparameters: [1×1 sparameters]
              AmplitudeTaper: 1
                  PhaseShift: 0
                   EmbeddedE: [16471×3×2×2 double]
        TerminationImpedance: 1.0000e-12
         CalculateTotalField: 1
    

    Input Arguments

    collapse all

    File name, specified as a string or character vector. filename can include a path and file extension. For the antenna array data, the filenames must include a port number in square brackets at the end.

    On Microsoft® Windows® systems, you can use either forward slashes (/) or backslashes (\) as path delimiters, even within the same file name. On UNIX® and Macintosh systems, use only a / as a delimiter.

    To specify a folder name only, add a trailing delimiter to the filename.

    The filename argument does not support internet URLs.

    Example: "broadband_source"

    Example: "Broadband data/"

    Data Types: string | char

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: PortList=[1:4]

    Port numbers to import data, specified as an integer scalar or vector.

    Example: [1:4]

    Data Types: double

    Frequencies to import data, specified as a numeric scalar for a single frequency or a vector for multiple frequencies.

    Example: [26.5e9 27e9 27.5e9 28e9]

    Data Types: double

    Touchstone file storing S-parameters, specified as a string containing the filename.

    Example: "Full simulation.s8p"

    Data Types: string

    Output Arguments

    collapse all

    Imported far-field data, returned as a measuredAntenna object.

    Version History

    Introduced in R2026a

    See Also

    Objects

    Functions