While using the GUI works fine in most cases, script commands can be used to replace tediously repetitive jobs or to perform a custom analysis. Here are some of the key script commands for FDE analysis:
Command |
Syntax |
Description |
getanalysis | ?getanalysis; | Lists all the parameters in the analysis window. |
getanalysis("property"); | Returns the current value of a particular property in the analysis window. |
Example: Get the number of trial modes used in the eigensolver.
Nmodes = getanalysis(“number of trial modes”);
Command |
Description |
nummodes |
Returns number of modes found Example: |
findmodes |
Calculates the modes supported by settings. This is equivalent to pressing the "Calculate Modes" button in the modal analysis tab. |
frequencysweep |
Runs a frequency sweep. This is equivalent to pressing the "Frequency Sweep" button in the Frequency analysis tab. |
selectmode |
Selects the mode by mode number in mode list |
overlap |
Returns the overlap and power coupling between two modes |
bestoverlap |
Returns the name of the mode with highest overlap with a specified mode |
Example 1: Perform a frequency sweep on the first mode and plot the dispersion.
switchtolayout;
findmodes;
selectmode(1);
setanalysis("track selected mode",1);
setanalysis("detailed dispersion calculation",1);
frequencysweep;
D=getdata("frequencysweep","D");
f=getdata("frequencysweep","f_D");
plot(c/f*1e6,D*1e6,"Wavelength (um)", "Dispersion (ps/nm/km)");
Example 2: Find out which mode in the mode list has the best overlap with the D-Card named " test_mode." and return its effective index.
mode_name = bestoverlap("test_mode");
neff = getdata(mode_name,"neff");
To get data from particular modes, you can use getresult or getdata commands.