Hi Amrita

Thank you for your reply. I totally agree with you that I need to add the result into the sweep setting. However, my problem is that I cannot find this result in the first place. 


In the official file, they define the parameter T under the model analysis, and T is defined as below:

temp = getresult("fom_exp", "expansion for fom");

T = -temp.T_backward;

And my understanding is that the result is from fom_exp : expansion for fom.

And here comes my issue: there is no expansion for fom underneath the fom_exp. Therefore I cannot add it into the sweep result because it will keep giving me error like this:

17 error

But I cannot find out where to set up the expansion for fom. As you mentioned before, there is actually no such a term in my GUI. Funny thing is that if I followed the setting in the official file, which is defined T in model analysis and used exactly the same code shown above, it worked. Lumerical will find out the expansion for fom and get T.

To conclude it, I cannot access the results from expansion for fom via normal lsf code because it will give me an error that cannot find the result expansion for fom. But if I manually define T in the model analysis, it will work. To make it clearer, my problem should be how can I obtain expansion for fom monitor in mode expansion monitor like in your screenshot? I reckon if I can see it in the GUI then I can access it via normal code.

I apologize for my poor expression and fingers cross i have expressed my problem clearly to you. 

Thank you again for the help.

Yours sincerely