I am simulating the lumerical example of "metamaterials S parameters ".
i do not know how to plot the effective material properties
i run the script in the analysis part in S analysis group and i get this message

or is the right script to use?

1 Like

Hi @maisaad,

You don’t need to copy the script of analysis group and paste it into the script file editor to extract the results from the metamaterial example, because the s parameter(S), effective index(neff), reflection® or transmission (T) spectra can easily be displaying via “Visualizer” function in the analysis grioup. If you want to extract the scattering paramter or effective refractive index, you can plot such parameters using “Visualize” in the analysis group of s_params after simulation as follows:

For example, you can extract s parameter or effective refractive index as you can see the following snap shots.

Since the script you want to modify is working only inside the analysis group, If you want to use that script into the script file editor, you should add the name of the analysis group such as “s_params::” in front of the “R” monitor as below.

dim=getdata("**s_params::**R",“dimension”); # get dimension of simulation;

Then, you can obtain the value of the dim parameter.
I hope this would be helpful for you. :smile:

1 Like