diff --git a/gwinc/ifo/A+.yaml b/gwinc/ifo/A+.yaml index 3f0ae0e2e94e55d5517bb26229ad073c2c53fd30..07555d8e91b5b436009600d09ac52a67a99330a6 100644 --- a/gwinc/ifo/A+.yaml +++ b/gwinc/ifo/A+.yaml @@ -255,6 +255,7 @@ Squeezer: AmplitudedB: 12 # SQZ amplitude [dB] InjectionLoss: 0.05 # power loss to sqz SQZAngle: 0 # SQZ phase [radians] + LOAngleRMS: 30e-3 # quadrature noise [radians] # Parameters for frequency dependent squeezing FilterCavity: diff --git a/gwinc/noise/quantum.py b/gwinc/noise/quantum.py index 8a69ad17edc7177c8472f76b5c1638963f2d0115..b43f8f87920b0c6f977f2a940e81f0b74d86873a 100644 --- a/gwinc/noise/quantum.py +++ b/gwinc/noise/quantum.py @@ -62,7 +62,7 @@ def shotrad(f, ifo): #<<<<<<<<<<<<<<<<< Modified to include frequency dependent squeezing angle (LB) # useful numbers - eta = ifo.Optics.Quadrature.dc# # Homodyne Readout phase + eta = ifo.Optics.Quadrature.dc # Homodyne Readout phase lambda_PD = 1 - ifo.Optics.PhotoDetectorEfficiency # PD losses # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -71,10 +71,7 @@ def shotrad(f, ifo): if 'Squeezer' not in ifo: sqzType = 'None' else: - if 'Type' not in ifo.Squeezer: - sqzType = 'Freq Independent' - else: - sqzType = ifo.Squeezer.Type + sqzType = ifo.Squeezer.get('Type', 'Freq Independent') # extract common parameters if sqzType == 'None': @@ -82,14 +79,13 @@ def shotrad(f, ifo): alpha = 0 # Squeeze angle lambda_in = 0 # Loss to squeezing before injection [Power] ANTISQZ_DB = 0 # Anti squeezing in db + etaRMS = 0 else: SQZ_DB = ifo.Squeezer.AmplitudedB # Squeeing in dB lambda_in = ifo.Squeezer.InjectionLoss # Loss to squeezing before injection [Power] alpha = ifo.Squeezer.SQZAngle # Freq Indep Squeeze angle - if 'AntiAmplitudedB' in ifo.Squeezer: - ANTISQZ_DB = ifo.Squeezer.AntiAmplitudedB # Anti squeezing in db - else: - ANTISQZ_DB = SQZ_DB + ANTISQZ_DB = ifo.Squeezer.get('AntiAmplitudedB', SQZ_DB) # Anti squeezing in db + etaRMS = ifo.Squeezer.get('LOAngleRMS', 0) # quadrature noise # switch on squeezing type for other input squeezing modifications if sqzType == 'None': @@ -195,12 +191,17 @@ def shotrad(f, ifo): Msig = Msig * sqrt(1 - lambda_PD) # and compute the final noise - vHD = np.array([[sin(eta), cos(eta)]]) - n = coeff * np.squeeze(sum(abs(getProdTF(vHD, Mnoise))**2, axis=1)) / \ - np.squeeze(sum(abs(getProdTF(vHD, Msig))**2, axis=1)) - - # gwinc wants n to be 1xN - #n = n.T + def HDnoise(eta): + vHD = np.array([[sin(eta), cos(eta)]]) + n = coeff * np.squeeze(sum(abs(getProdTF(vHD, Mnoise))**2, axis=1)) / \ + np.squeeze(sum(abs(getProdTF(vHD, Msig))**2, axis=1)) + return n + + if etaRMS <= 0: + n = HDnoise(eta) + else: + # include quadrature noise (average of +- the RMS) + n = (HDnoise(eta+etaRMS) + HDnoise(eta-etaRMS)) / 2 # the above is the same as # n = coeff * (vHD * Msqz * Msqz' * vHD') / (vHD * Msig * Msig' * vHD') @@ -216,7 +217,7 @@ def shotrad(f, ifo): # sum(abs((vHD * Msig(:,:,k))).^2); # end - return n + return n * ifo.gwinc.sinc_sqr def shotradSignalRecycled(f, ifo): diff --git a/gwinc/test/A+.pkl b/gwinc/test/A+.pkl index 08ce29cd6d79152047332578ea66c95999f5a4b7..c62101db71f3f4f7b296342b1f2584f0b8c227f8 100644 --- a/gwinc/test/A+.pkl +++ b/gwinc/test/A+.pkl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5594c81cf227bf8fcba4add52d9acb0b1ebc988b844402eb844adab50c11f95 -size 897493 +oid sha256:7e21d770b7514f6a9a2cf1dcc859c441c5d67e62727688a63854ebbbeef724c7 +size 897522