function [t P tau Pmax] = pulseModel(Plaser) PRgain = 37.5; % TDR Table 2.1 T_IM = 1.4e-2; % TDR Table 2.1 R_IM = 1-T_IM; t_IM = sqrt(T_IM); r_IM = sqrt(R_IM); Parm = Plaser*PRgain/2*(t_IM/(1-r_IM))^2; Pmax = Parm*T_IM; Finesse = pi*R_IM^0.25/(1-sqrt(R_IM)); Lcavity = 3e3; % [m] c = 3e8; % [m/s] tauStorage = 2*Lcavity*Finesse/pi/c; tauCorrection = 0.5; tau = tauStorage*tauCorrection; t = linspace(-5*tau,5*tau,3000); P = Pmax/sqrt(2*pi)/tauCorrection*exp(-t.^2/2/(tau).^2); % has same integral as the % exponential energy decay of % the cavity