Returns an interpolated s-parameter cell from a file containing a lookup table of design and extracted parameters.
Syntax |
Description |
---|---|
out = lookupreadnportsparameter ("filename","table",design,"extracted"); |
Returns an interpolated s-parameter cell from a file containing a lookup table of design and extracted parameters. Parameter table is the name of the lookup table located inside the file, design is a cell containing multiple structures that define the design parameters to search, and extracted is the name of the parameter to be extracted. S-parameter file format must be compatible with the ‘Optical N Port S-Parameter’. Notes: The s-parameter files in the lookup-table should be in exact the same format. The s-parameter files shouldn't contain any header. |
Example
Loads the s-parameters of a coupler depending on user defined design parameters:
filename = "coupler.ixml"; table = "coupler"; radius = 3e-06; gap = 3e-07; design = cell(2); #design (input parameters) design{1} = struct; design{1}.name = "radius"; design{1}.value = radius; design{2} = struct; design{2}.name = "gap"; design{2}.value = gap; ?M = lookupreadnportsparameter( filename, table, design, "out_filename" ); # set s-parameter to a S Parameter element
addelement("Optical N Port S-Parameter");
setvalue('SPAR_1','s parameters',M);
where “coupler.ixml” is a lookup table containing a map between coupler parameters and different s-parameters:
<?xml version="1.0" encoding="UTF-8"?> <lumerical_lookup_table version="1.0" name = "coupler"> <association> <design> <value name="radius" type="double">3e-06</value> <value name="gap" type="double">3e-07</value> </design> <extracted> <value name="out_filename" type="string">radius_3_gap_3.txt</value> </extracted> </association> </lumerical_lookup_table>
For example “radius_3_gap_3.txt” file contains s-parameters for the ‘Optical N Port S-Parameter’ element
("port 1","TE",1,"port 1",1,"transmission") (3,3) 2.262580000000e+014 1.034036580296e-002 -2.629253819969e+000 2.275690000000e+014 9.716591457652e-003 -2.734774978072e+000 2.288790000000e+014 6.884340821788e-003 -2.838683842048e+000 ("port 1","TE",1,"port 2",1,"transmission") (3,3) 2.262580000000e+014 9.847090174703e-001 1.376105202083e-001 2.275690000000e+014 9.959778891317e-001 1.450376288706e-001 2.288790000000e+014 1.002869828593e+000 1.483183421805e-001
See Also
List of commands , lookupopen , lookupread , lookupwrite , lookupclose , lookupreadtable , lookupreadvalue , lookupappend , insert