Commit 7a2b6fd3 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins

remove unused precomp variables and calculations

The products of precompQuantum (primarily fSQL) are currently only
used in squeeze.py (which is itself not used anywhere).  Remove this
function from preocomp, and move relevant bits into squeeze.py

Also remove unused variables in precompPower that could confuse
memoization.
parent 2f9ca026
Pipeline #29192 passed with stages
in 53 seconds
......@@ -110,15 +110,6 @@ def precompIFO(f, ifoin, PRfixed=True):
ifo.gwinc.BeamWaistToETM = z2
ifo.Optics.PRM.Transmittance = Tpr
##############################
# calc quantum parameters
fSQL, fGammaIFO, fGammaArm = precompQuantum(ifo)
ifo.gwinc.fSQL = fSQL
ifo.gwinc.fGammaIFO = fGammaIFO
ifo.gwinc.fGammaArm = fGammaArm
##############################
# saved seismic spectrum
......@@ -161,20 +152,13 @@ def precompPower(ifo, PRfixed=True):
"""Compute power on beamsplitter, finesse, and power recycling factor.
"""
# constants
c = scipy.constants.c
pin = ifo.Laser.Power
lambda_ = ifo.Laser.Wavelength
t1 = sqrt(ifo.Optics.ITM.Transmittance)
r1 = sqrt(1 - ifo.Optics.ITM.Transmittance)
t2 = sqrt(ifo.Optics.ETM.Transmittance)
r2 = sqrt(1 - ifo.Optics.ETM.Transmittance)
t3 = sqrt(ifo.Optics.SRM.Transmittance)
t5 = sqrt(ifo.Optics.PRM.Transmittance)
r5 = sqrt(1 - ifo.Optics.PRM.Transmittance)
wl = 2*pi * c/lambda_
lrec = ifo.Optics.SRM.CavityLength
effic = ifo.Optics.PhotoDetectorEfficiency
loss = ifo.Optics.Loss # single TM loss
bsloss = ifo.Optics.BSLoss
acoat = ifo.Optics.ITM.CoatingAbsorption
......@@ -191,7 +175,6 @@ def precompPower(ifo, PRfixed=True):
if PRfixed:
Tpr = ifo.Optics.PRM.Transmittance # use given value
else:
#prfactor = 1/(2*loss * neff + bsloss); % power recycling factor
Tpr = 1-(rarm*sqrt(1-bsloss))**2 # optimal recycling mirror transmission
t5 = sqrt(Tpr)
r5 = sqrt(1 - Tpr)
......@@ -203,49 +186,12 @@ def precompPower(ifo, PRfixed=True):
asub = 1.3*2*ifo.Optics.ITM.Thickness*ifo.Optics.SubstrateAbsorption
pbsl = 2*pcrit/(asub+acoat*neff) # bs power limited by thermal lensing
#pbs = min([pbs, pbsl]);
if pbs > pbsl:
logging.warning('P_BS exceeds BS Thermal limit!')
return pbs, parm, finesse, prfactor, Tpr
def precompQuantum(ifo):
"""Compute quantum noise parameters.
"""
# physical constants
hbar = scipy.constants.hbar # J s
c = scipy.constants.c # m / s
# IFO parameters
lambda_= ifo.Laser.Wavelength
Titm = ifo.Optics.ITM.Transmittance
Tsrm = ifo.Optics.SRM.Transmittance
m = ifo.Materials.MirrorMass
L = ifo.Infrastructure.Length
Lsrc = ifo.Optics.SRM.CavityLength
# power on BS (W) computed in precompBSPower
Pbs = ifo.gwinc.pbs
Parm = ifo.gwinc.parm
# derived parameters
w0 = 2 * pi * c / lambda_ # carrier frequency (rad/s)
gammaArm = Titm * c / (4 * L) # arm cavity pole (rad/s)
fGammaArm = gammaArm / (2*pi)
rSR = sqrt(1 - Tsrm)
# fSQL as defined in D&D paper (eq 33 in P1400018 and/or PRD paper)
tSR = sqrt(Tsrm)
fSQL = (1/(2*pi))*(8/c)*sqrt((Parm*w0)/(m*Titm))*(tSR/(1+rSR))
# gammaIFO in Hz
fGammaIFO = fGammaArm * ((1 + rSR) / (1 - rSR))
return fSQL, fGammaIFO, fGammaArm
def dhdl(f, armlen):
"""Strain to length conversion for noise power spetra
......
from numpy import pi, sqrt
import scipy.constants
def sql(ifo):
"""Computer standard quantum limit (SQL) for IFO"""
c = scipy.constants.c
Parm = ifo.gwinc.parm
w0 = 2 * pi * c / ifo.Laser.Wavelength
m = ifo.Materials.MirrorMass
Titm = ifo.Optics.ITM.Transmittance
Tsrm = ifo.Optics.SRM.Transmittance
tSR = sqrt(Tsrm)
rSR = sqrt(1 - Tsrm)
fSQL = (1/(2*pi))*(8/c)*sqrt((Parm*w0)/(m*Titm))*(tSR/(1+rSR))
return fSQL
def computeFCParams(ifo, fcParams):
"""Compute ideal filter cavity Tin, detuning [Hz] and bandwidth [Hz]
......@@ -9,21 +24,23 @@ def computeFCParams(ifo, fcParams):
c = scipy.constants.c
fsrFC = c / (2 * fcParams.L)
lossFC = fcParams.Lrt + fcParams.Te
fSQL = sql(ifo)
# detuning and cavity bandwidth (D&D paper P1400018 and/or PRD)
eps = 4 / (2 + sqrt(2 + 2 * sqrt(1 + (4 * pi * ifo.gwinc.fSQL / (fsrFC * lossFC))**4)))
eps = 4 / (2 + sqrt(2 + 2 * sqrt(1 + (4 * pi * fSQL / (fsrFC * lossFC))**4)))
s1eps = sqrt(1 - eps)
# cavity bandwidth [Hz]
gammaFC = ifo.gwinc.fSQL / sqrt(s1eps + s1eps**3)
gammaFC = fSQL / sqrt(s1eps + s1eps**3)
# cavity detuning [Hz]
detuneFC = s1eps * gammaFC
# input mirror transmission
TinFC = 4 * pi * gammaFC / fsrFC - lossFC
if TinFC < lossFC:
raise RuntimeError('IFC: Losses are too high! %.1f ppm max.' % 1e6 * gammaFC / fsrFC)
# Add to fcParams structure
fcParams.Ti = TinFC
fcParams.fdetune = -detuneFC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment