Dear Sir/Mrs,

Concerning the metalens example, I can see that the referenced paper describes a Titania metasurface based on geometric phase which is not the case in the FDTD file using PMMA with different duty cycle ?

I am not sure how can I check the results of the metalens and the S parameter analysis group if the results are not reproduced from the referenced paper?

Concerning the S parameter advanced group , analysis script commands. I have many questions.

1- In this part: Line 245: analysis group S parameters

```
# Select largest input field component (s or p) for S-parameter extraction
tempG = abs(G_input)^2; #absolute value squared of three field components
```

Question: is that for all frequencies ?

```
pol_to_select = find( tempG, max( tempG) );
Questions : why do we need Maximum input field (Er,Etheta,Ephi) in far field?
```

2- Line 262: analysis group S parameters

```
# Save dominant polarization component of all grating projections
G_input = pinch( G_input (pol_to_select) )/norm_input;
```

why do we take the maximum value and normalize it to all spherical field components?

```
G_forward = pinch( G_forward (pol_to_select) );
G_backward = pinch( G_backward(pol_to_select) );
```

I understand that we have field components (Er,Etheta,Ephi) for zero grating order at all frequencies , what is the maximum value we are pinching at?

3- line 271: if(dim == 2) { phase_correction = exp(1i*pi/4); } #2D and 3D are different

how can you get this phase correction factor?

4- line 295 and line 303: Question: what is the difference between normalization in these two lines

S21_Gn(i) = G_forward *phase_correction*exp(-1i*phase_T_to_forward)/input; #S21 from source to monitor T

S11_Gn(i) = S11_Gn(i) * sqrt(R(i));

5- The phase corrections are done twice : first part line 273:

I can not understand what you are trying to do here.

in line 331 (# ROLL PHASE FROM MONITOR/SOURCE TO METAMATERIAL SURFACE):

That is clear.

6- line 304: S21_Gn(i) = S21_Gn(i) * sqrt(T(i)) * (sqrt(refractive_index_1/refractive_index_2));

Question: can you a give a reference for this refractive index correction?

7- for the script file names " [metalens_2D_duty_cycle_sweep.lsf]"(https://kb.lumerical.com/en/metalens_2D_duty_cycle_sweep.lsf)

when you extracted the (abs S21), I found this script command

T0(i) = abs(S.S21_Gn)^2*refractive_index_2/refractive_index_1;

Questions: you have made the correction twice for the S21, one in the S_parameters advanced analysis group and the other in extraction the amplitude .

I am not sure if that is correct?

it is a lot of questions but the illustrations provided are not sufficient

Thank you in advance.