########################################################################### # # This file extracts the effective index from FEEM sweep data # and calculates effective index without any perturbation. # It then and calculates the phase change as a function of input power # # Copyright 2018, Lumerical Solutions, Inc. ########################################################################### clear; power = linspace(0.02,0.03,11); # total power in Watts neff = matrix(length(power)); switchtolayout; # find neff with no heating setnamed('FEEM::nk import','enabled',0); run("FEEM"); neff0 = real(pinch(getdata('FEEM','modeproperties.neff'))); neff0 = neff0(1); switchtolayout; # get neff from sweep setnamed('FEEM::nk import','enabled',1); runsweep("power"); neff = getsweepresult("power","neff"); neff = real(neff.neff); neff = pinch(neff,1,1); L = 200e-6; lambda = 1.55e-6; phase = 2*pi*(neff-neff0)*L/lambda; plot(power, phase, 'power (W)','phase');