############################################################## # Scriptfile: construct_3d_verification_mask.lsf # # Description: This script file can be used in conjuction with # the fsp file binary_phase_mask_design_verification_3D.fsp. # It loads the target duty cycle profile from the file # target_profile.mat and constructs a 3D, # cylindrically symmetric representation of the target # PMMA grating. # # Copyright 2014 Lumerical Solutions Inc. ############################################################## # load the target duty cycle profile matlabload("target_profile"); switchtolayout; # make sure the source and field profile monitor are wide enough setnamed("source","x span",3*max(x_mask)); setnamed("source","y span",3*max(x_mask)); setnamed("mesh","x span",3*max(x_mask)); setnamed("mesh","y span",3*max(x_mask)); setnamed("analysis::field","x span",3*max(x_mask)); setnamed("analysis::field","y span",3*max(x_mask)); # design the structure select("substrate"); set("x span",3*max(x_mask)); set("y span",3*max(x_mask)); select("PMMA"); delete; redrawoff; p1 = find(x_mask,0); for(i=p1:length(x_mask)) { addring; set("name","PMMA"+num2str(i)); set("index",1.52); set("x",0); set("y",0); set("z min",0); set("z max",0.42e-6); if(i==p1) { set("inner radius",0); set("outer radius",duty_cycle(i)*a/2); } else { set("inner radius",x_mask(i)-duty_cycle(i)*a/2); set("outer radius",x_mask(i)+duty_cycle(i)*a/2); } addtogroup("PMMA"); } unselectall; redrawon;