diff --git a/src/new/IFOs/FT_GW_sidebands.m b/src/new/IFOs/FT_GW_sidebands.m index 9085e282068cba69130c7cf290599a289c322f39..0ad61b1d0902f559844d6d07a22a3769ea4e98e1 100644 --- a/src/new/IFOs/FT_GW_sidebands.m +++ b/src/new/IFOs/FT_GW_sidebands.m @@ -1,5 +1,5 @@ %-------------------------------------------------------------------------- -% function [Abs] = FT_GW_sidebands(lambda,h0,fsig,L,n) +% function [Abs] = FT_GW_sidebands(lambda,h0,fsig,L,n,sb_sign) % % A function for Matlab which calculates the amplitude of the sidebands % created when a light beam travels along a path modulated by a @@ -10,6 +10,9 @@ % fsig: Frequency of the gravitational wave [Hz] % L: Length of the path [m] % n: Index refection of the medium through which the beam travels +% sb_sign: Sign of the sideband +% 1: upper sideband +% -1: lower sideband % % Asb: Amplitude of the sidebands [sqrt(W)] % @@ -18,8 +21,17 @@ %-------------------------------------------------------------------------- % -function [Asb] = FT_GW_sidebands(lambda,h0,fsig,L,n) +function [Asb] = FT_GW_sidebands(lambda,h0,fsig,L,n,sb_sign) + baseid = 'GW_sidebands'; + + % Error meesgaes + if sb_sign~=1 && sb_sign~=-1 + result='Invalid sideband sign: must be -1 (lower) or +1 (upper)'; + msgid=[baseid,':checkarguments'] + error(msgid,result); + end + % Carrier light parameters c = 299792458; f0 = c/lambda; @@ -30,6 +42,12 @@ function [Asb] = FT_GW_sidebands(lambda,h0,fsig,L,n) % Sideband amplitude Asb = (w0*h0./(2*wsig)) .* sin(wsig*L*n/(2*c)); + + % Phase + phi_sb = pi/2 - w0*L*n/c - sb_sign * wsig*L*n/(2*c); + + % Final sideband amplitude and phase + Asb = Asb.*exp(1i*phi_sb); end