# question

**21**

Hello,

If I designed a metalens for the ultraviolet region from 270um to 380 um, and I would like to determine the normalized intensity distribution at different wavelengths in this region (for example at 270nm, 298 nm, 334 nm, and 380 nm). note the metalens designed at 290 nm.

so what can I do to do that? can I design the metalens at 290nm and set the plane wave source at each wavelength I would like( start wavelength =stop wavelength =270nm, 298 nm, 334 nm, and 334 nm respectively). or I have to set the plane wave source at (start wavelength=270 and stop wavelength=380nm) but in this situation how I can calculate the normalized intensity and different wavelength in this region (270 nm to 380 nm)

please see attached photo.

please give me an answer if only you make sure.

regards

## Answers

583Ansys EmployeeFDTD is a time-domain broadband technique, so you can set "start wavelength=270 and stop wavelength=380nm".

You can use monitors to record the fields at the specific wavelength, for example each DFT monitor can precisely record fields at two specific wavelengths;

if the "normalized intensity" is relative to the source amplitude, it is already done by default, see CW normalization: https://support.lumerical.com/hc/en-us/articles/360034394234-Understanding-frequency-domain-CW-normalization

It seems you just want to have max(abs(E)^2) to be 1. this is relatively easy: once you get the abs(E(x,z,f))^2, simply use the script as

E2_norm=abs(E(x,z,f))^2/max(abs(E(x,z,f))^2).# this is symbolic, in practice you use the matrix, eg

E2_norm=abs(E(:,:,:))^2/max(abs(E(:,:,:))^2)

":" means all the data in that dimension.

provided that the field E has been simplified to be 3 dimensions be pinching out y. You can follow this idea for your actual script. This will normalize the intensity with the maximum of all frequencies, so you can compare their relative intensity.

43Membercan I get the normalized intensity at any respective wavelength for example(270nm)? from that range (270nm-380nm) using DFT monitor?

583Ansys Employeeyes, you can do a loop for frequency:

define E2_norm:

E2_norm=matrix(length(f));

for(n=1:length(f){

E2_norm(n)=abs(E(:,:,n))^2/max(abs(E(:,:,n))^2);

}

43MemberCould I ask where I can set the respective wavelength in that code script?

583Ansys EmployeeIn general, E components from a DFT is 4 dimensional:

x

y

z

f

if it is perpendicular to y axis, then length(y) is one, so it will be for example Ex(1:length(x),1,1:length(z),1:length(f)). Similarly for E2=abs(Ex)^2+abs(Ey)^2+abs(Ez)^2. you can use

?size(Ex) in the "prompt" to check its dimension.

43Memberso, can I set the respective wavelenght in thre DFT monitor for example (270nm) to check the normalized intensity distribution of it without using script commands?

583Ansys EmployeeUnfortunately it cannot be normalized to be max==1 in the DFT monitor without post processing with Script. The DFT monitor automatically normalizes with respect to the source pulse only by default. Please refer this https://kb.lumerical.com/solvers_fdtd_frequency_domain_normalization.html any other processing will need to extract the data from the DFT monitor, except the power transmission.

43Memberso can I set it on the DFT monitor (270nm ) and then I have to normalize it in the script by dividing the magnitude of E^2 by the maximum value?

as the attached photo?

please also note the last comment script? is it right?

# farfield along z axis

E2_z = farfieldexact3d('field',0,0,z);

E2_z = pinch(sum(abs(E2_z)^2,4));

plot(z*1e6,E2_z,'z (um)','|E|^2 (V^2/m^2)','Farfield along z-axis','linewidth=2');

legend("");

ind = find(E2_z,max(E2_z));

zm = z(ind);

# farfield in x diirection at the focal point (x=0,y=0,z=zm)

E2_x = farfieldexact3d('field',x,0,zm);

E2_x = pinch(sum(abs(E2_x)^2,4));

plot(x*1e6,E2_x,'x (um)','Normalized Intensity','','linewidth=2'); ?>>>>>>>>>>>>>>>>>>>> divide E2_x/ (maximum value )