############################################################## # Scriptfile: construct_2d_verification_mask.lsf # # Description: This script file can be used in conjuction with # the fsp file binary_phase_mask_design_verification_2D.fsp. # It loads the target duty cycle profile from the file # target_profile.mat and constructs a 2D 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("analysis::field","x span",3*max(x_mask)); # design the structure select("substrate"); set("x span",3*max(x_mask)); select("PMMA"); delete; redrawoff; for(i=1:length(x_mask)) { addrect; set("name","PMMA"+num2str(i)); set("index",1.52); set("y min",0); set("y max",0.42e-6); set("z",0); set("z span",1e-6); set("x",x_mask(i)); set("x span",duty_cycle(i)*a); addtogroup("PMMA"); } unselectall; redrawon;