# doc-cache created by Octave 4.4.1
# name: cache
# type: cell
# rows: 3
# columns: 12
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
oemshll_cli


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 530

 input:
   args:         - Script arguments, should probably be 'argv()'.
   name:         - Script name.
   port_index:   - Ports numbers.
                 - Example: [4, 5]

 variable input:
   'header':            - String to print at the top of the help menu.
   'path_simulation':   - Directory to save simulation files and dumps.
                        - Default: './<name>_simulation'
   'path_result':       - Directory to save result files.
                        - Default: './<name>_results'

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74

 input:
   args:         - Script arguments, should probably be 'argv()'.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
oemshll_plotFeedImpedance


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1138

 input:
   Z:              - Feed port impedance.
                   - See example.
   port_n:         - Port number string.
   freq:           - Frequency array.
   markers:        - Frequency array. Put a marker on each frequency inside.
   abs_color:      - Color letter. See the 'fmt' argument of the Octave 'plot' function.
                   - Absolute impedance.
   im_color:       - Color letter. See the 'fmt' argument of the Octave 'plot' function.
                   - Imaginary part.
   re_color:       - Color letter. See the 'fmt' argument of the Octave 'plot' function.
                   - Real part.

 variable input:
   'legend_out':   - Put the legend boxe outside the graph.
                   - Default: false.
   'funit':        - Frequency unity factor.
                   - To use with 'funit_name'.
                   - Default: 1e6
   'funit_name':   - Frequency unity name.
                   - To use with 'funit'.
                   - Default: 'MHz'

 example:
   z1 = port{1}.uf.tot./port{1}.if.tot;
   figure;
   oemshll_plotFeedImpedance(z1, '1', freq, 'k', 'm', 'g');
   drawnow;

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50

 input:
   Z:              - Feed port impedance.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
oemshll_plotGroupDelay


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 941

 input:
   s:              - S parameters cell array, should not be a reflection coefficient (Sxy, no Sxx).
                   - See example.
   names:          - S parameters name strings cell array.
   freq:           - Frequency array.
   markers:        - Frequency array. Put a marker on each frequency inside.
   colors:         - Color letters cell array.
                   - See the 'fmt' argument of the Octave 'plot' function.

 variable input:
   'legend_out':   - Put the legend boxe outside the graph.
                   - Default: false.
   'funit':        - Frequency unity factor.
                   - To use with 'funit_name'.
                   - Default: 1e6
   'funit_name':   - Frequency unity name.
                   - To use with 'funit'.
                   - Default: 'MHz'

 example:
   figure;
   oemshll_plotGroupDelay({s21, s31}, {'s21', 's31'}, freq, markers, {'m', 'g'});
   drawnow;

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 input:
   s:              - S parameters cell array, should not be a reflectio



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
oemshll_plotPhaseDelay


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 941

 input:
   s:              - S parameters cell array, should not be a reflection coefficient (Sxy, no Sxx).
                   - See example.
   names:          - S parameters name strings cell array.
   freq:           - Frequency array.
   markers:        - Frequency array. Put a marker on each frequency inside.
   colors:         - Color letters cell array.
                   - See the 'fmt' argument of the Octave 'plot' function.

 variable input:
   'legend_out':   - Put the legend boxe outside the graph.
                   - Default: false.
   'funit':        - Frequency unity factor.
                   - To use with 'funit_name'.
                   - Default: 1e6
   'funit_name':   - Frequency unity name.
                   - To use with 'funit'.
                   - Default: 'MHz'

 example:
   figure;
   oemshll_plotPhaseDelay({s21, s31}, {'s21', 's31'}, freq, markers, {'m', 'g'});
   drawnow;

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 input:
   s:              - S parameters cell array, should not be a reflectio



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
oemshll_plotPhaseResponse


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1039

 input:
   s:              - S parameters cell array, should not be a reflection coefficient (Sxy, no Sxx).
                   - See example.
   names:          - S parameters name strings cell array.
   freq:           - Frequency array.
   markers:        - Frequency array. Put a marker on each frequency inside.
   colors:         - Color letters cell array.
                   - See the 'fmt' argument of the Octave 'plot' function.

 variable input:
   'wrap':         - Wrap phase between -180° and 180°.
                   - Default: false.
   'legend_out':   - Put the legend boxe outside the graph.
                   - Default: false.
   'funit':        - Frequency unity factor.
                   - To use with 'funit_name'.
                   - Default: 1e6
   'funit_name':   - Frequency unity name.
                   - To use with 'funit'.
                   - Default: 'MHz'

 example:
   figure;
   oemshll_plotPhaseResponse({s21, s31}, {'s21', 's31'}, freq, markers, {'m', 'g'});
   drawnow;

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 input:
   s:              - S parameters cell array, should not be a reflectio



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
oemshll_plotSParameters


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 888

 input:
   s:              - S parameters cell array.
                   - See example.
   names:          - S parameters name strings cell array.
   freq:           - Frequency array.
   markers:        - Frequency array. Put a marker on each frequency inside.
   colors:         - Color letters cell array.
                   - See the 'fmt' argument of the Octave 'plot' function.

 variable input:
   'legend_out':   - Put the legend boxe outside the graph.
                   - Default: false.
   'funit':        - Frequency unity factor.
                   - To use with 'funit_name'.
                   - Default: 1e6
   'funit_name':   - Frequency unity name.
                   - To use with 'funit'.
                   - Default: 'MHz'

 example:
   figure;
   oemshll_plotSParameters({s11, s21}, {'s11', 's21'}, freq, markers, {'m', 'g'});
   drawnow;

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54

 input:
   s:              - S parameters cell array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
oemshll_plotSmithChart


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 954

 input:
   s:              - S parameters cell array.
                   - See example.
   names:          - S parameters name strings cell array.
   freq:           - Frequency array.
   markers:        - Frequency array. Put a marker on each frequency inside.
   color_order:    - Color order array.
                   - See the 'ColorOrder' argument of the Octave 'gca' object.

 variable input:
   'legend_out':   - Put the legend boxe outside the graph.
                   - Default: false.
   'funit':        - Frequency unity factor.
                   - To use with 'funit_name'.
                   - Default: 1e6
   'funit_name':   - Frequency unity name.
                   - To use with 'funit'.
                   - Default: 'MHz'

 example:
   color_order = [ ...
   	[1, 0, 1]; ... % m
   	[0, 1, 0]];    % g
   figure;
   oemshll_plotSmithChart({s11, s21}, {'s11', 's21'}, freq, markers, color_order);
   drawnow;

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54

 input:
   s:              - S parameters cell array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
oemshll_plotVSWR


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 877

 input:
   s:              - S parameter, should be a reflection coefficient (Sxx, no Sxy).
                   - See example.
   port_n:         - Port number string.
   freq:           - Frequency array.
   markers:        - Frequency array. Put a marker on each frequency inside.
   color:          - Color letter. See the 'fmt' argument of the Octave 'plot' function.

 variable input:
   'legend_out':   - Put the legend boxe outside the graph.
                   - Default: false.
   'funit':        - Frequency unity factor.
                   - To use with 'funit_name'.
                   - Default: 1e6
   'funit_name':   - Frequency unity name.
                   - To use with 'funit'.
                   - Default: 'MHz'

 example:
   s11 = port{1}.uf.ref ./ port{1}.uf.inc;
   figure;
   oemshll_plotVSWR(s11, '1', freq, 'g');
   drawnow;

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 input:
   s:              - S parameter, should be a reflection coefficient (S



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
oemshll_postProcess


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3077

 input:
   name:            - Simulation name.
   path_simulation: - Simulation directory path.
   path_result:     - Result directory path.
   port:            - Ports data structure.
                    - See 'calcPort' function.
   port_index:      - Ports numbers.
                    - Example: [1, 2]
   active_ports:    - Active ports numbers.
                    - Example: [1]
   fstart:          - Start frequency.
   fstop:           - Stop frequency.
   points:          - Number of points on graphs.

 variable input:
   'legend_out':         - Put the legend boxe outside the graph.
                         - Default: false.
   'graphics_format':    - Format to save graphics.
                         - See 'print' function.
                         - Default: '.svg'
   'nf2ff':              - Enable NF2FF calculation.
                         - Default: false
   'nf2ff_data':         - NF2FF data structure.
                         - See 'CreateNF2FFBox' and 'CalcNF2FF' functions.
   'nf2ff_mode':         - Set 'CalcNF2FF' 'Mode' argument.
                         - 0: Read existing datas, calcul NF2FF if no existing datas.
                         - 1: Calcul NF2FF, overwrite existing datas.
                         - 2: Do not calcul NF2FF, read existing datas.
                         - Default: 0
   'nf2ff_3d':           - Enable 3D far field representation.
                         - Default: false.
   'nf2ff_3d_phistep':   - NF2FF 3D Phi angle (elevation) step.
                         - Default: 5
   'nf2ff_3d_theta':     - NF2FF 3D Theta angle (azimuth) step.
                         - Default: 5
   'nf2ff_3d_frames':    - Create an animated '.gif' of the 3D radiation pattern.
                         - 1: No '.gif', print a 3D pattern for each marked frequency.
                         - >1: Number of frames between 'fstart' and 'fstop'.
                         - Requires ImageMagick.
                         - See 'plotFF3D_frames' function.
                         - Default: 1
   'nf2ff_3d_delay':     - Delay between each '.gif' frame, in ms.
                         - See 'convert' '-delay' argument.
                         - Default: 30
   'nf2ff_3d_dump':      - Dump 3D radiation pattern to visualize with Paraview.
                         - Default: false
   'nf2ff_3d_dump_unit': - Dump size unit factor.
                         - See 'DumpFF2VTK' function.
                         - Default: 1
   'f_select':           - Place markers on selected frequencies.
                         - Without any selected frequency, a marker is placed
                           at the middle of the frequency range.
   'f_min':              - Place markers at some curve minimums.
                         - Example: ['s11', 's21']
   'f_max':              - Place markers at some curve maximums.
                         - Example: ['s11', 's21']
   'f_equal':            - Place markers at some curve nearest points to some value.
                         - Example: ['s11', 's21'] [-3.5, -20]

 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47

 input:
   name:            - Simulation name.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
plotFF3D_frames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1707
 h = plotFF3D_frames(nf2ff, varargin)

 This is an enhanced version of plotFF3D to plot 3D far field pattern for
 multiple frequencies. It will plot a frame for each frequency present in
 nf2ff. It can also produce an animated gif.
 For now, supports only V/m output.

 input:
   nf2ff:                 - Output of CalcNF2FF
   prefix:                - Frame name: '<prefix>@<f>.<format>'.
                          - Gif name: '<prefix>.<format>'.

 variable input:
   'unique_color_scale':  - Use an unique color scale for all frames.
   'unique_axis_scale':   - Use an unique axis scale for all frames.
   'unique_xyz_scale':    - Use an unique scale for x, y, z axis on each frame.
   'gif' <bool>:          - Merge all frames in an animated gif.
                          - Use ImageMagick's 'convert' command.
                          - Default: false.
   'delay' <str>:         - Delay between frames in the gif.
                          - Cf. convert '-delay' argument.
                          - Default: '30'.
   'colormap' <str>:      - Set a colormap for the plots.
                          - Default: 'jet'.
   'show_each' <bool>:    - Show each frame in its figure window.
                          - Default: false.
   'print' <bool>:        - Do not save frames/gif on disk.
                          - Default: true.
   'format' <str>:        - Frame format.
                          - You probably must not override it.
                          - Default: 'png'.

 example:
   plotFF3D_frames(nf2ff, [name, '-ff3d-vm'], 'gif', true, ...
       'unique_color_scale', 'unique_axis_scale');

 See also plotFF3D

 openEMS matlab interface
 -----------------------
 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
 h = plotFF3D_frames(nf2ff, varargin)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
plotSmith


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1219
 h = plotSmith(s, name, freq, f_ind, varargin)

 Reworked version of plotRefl to plot other S parameters than s11 and to plot
 multiple S parameters on the same graphic.

 input:
   s:         S parameter.
   name:      S parameter name to display.
   freq:      Frequency array.
   f_ind:     Index array in 'freq' of the frequencies to put a marker on.

 variable input:
   'precision':   - Number of decimal places (floating point precision)
                    for the frequency (always in MHz), default is 2
   'nogrid':      - Do not replot grid.
                  - Not to put older plots under the grid, you should use it
                    unless it is the first time you use plotSmith in a figure.

 example:
   freq = [linspace(fstart, fstop, points), f_res];
   sort(freq);
   port{1} = calcPort(port{1}, Sim_Path, freq);
   port{2} = calcPort(port{2}, Sim_Path, freq);
   s11 = port{1}.uf.ref ./ port{1}.uf.inc;
   s21 = port{2}.uf.ref ./ port{1}.uf.inc;
   f_res_ind = find(freq == f_res);
   figure;
   plotSmith(s11, 's11', freq, f_res_ind);
   plotSmith(s21, 's21', freq, f_res_ind, 'nogrid');
   drawnow;

 See also PlotRefl

 openEMS matlab interface
 -----------------------
 author: Thomas Lepoix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
 h = plotSmith(s, name, freq, f_ind, varargin)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
write_touchstone


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 526
 write_touchstone( type, freq, data, filename [,ref [,comment]] ) - write touchstone-file
 for ADS
 type      'z' for Z-Parameter touchstone-file
           'y' for Y-Parameter touchstone-file
           's' for S-Parameter touchstone-file
 freq      vector of frequencies (in Hz)
 data      (numports x numports x numfreq) matrix
 filename  filename of the file to create
 ref       (optional) reference impedance
 comment   (optional) written in the header

 (C) Sebastian Held <sebastian.held@gmx.de>
 Version 21. Feb 2006



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 write_touchstone( type, freq, data, filename [,ref [,comment]] ) - write touchs





