Thank you so much for your help and prompt reply. I still have some doubts if you can clarify.
- If by default value of amplitude is 1, and suppose, power I want to input is P1 = 0.05W and P2 = 0.05W, then according to A2 = A1*sqrt(P2)/sqrt(P1), A2 will always be 1, no matter what is the power. Right?
- If I input value of amplitude as 1 for two different sources, then is there a way to check its power value other than script command? as I am not sure how to use this script command.
- In one of the examples, the amplitude entered is 1e+09, could you be able to explain why the amplitude value is this and how to check the power behind this amplitude?
I have got this script online that gives intensity in dB, could you please help me to modify this script that can give output in either dBm or watts.
retrieve Hz(t) from the simulation and use czt to get Hz vs f.
Hz = getdata("monitor2","Hz");
t = getdata("monitor2","t");
f = linspace(c/3e-6,c/0.5e-6,1000); # frequency vector
Hzf = czt(pinch(Hz),t,2*pi*f);
Hzf2 = abs(Hzf)^2;
plot(c/f*1e6,10*log10(Hzf2),"Wavelength (microns)","Intensity (dB)");