Commit 26c8cf79 authored by Sean Leavey's avatar Sean Leavey

Merge branch 'master' into feature/cli

parents a45a68ae 7c08fd7c
This diff is collapsed.
......@@ -193,10 +193,21 @@ class ALIGO_IFO(IFO):
This function will iterate through the main mirrors
and remove any suspension settings on them. This can be
done individuallly or for z, pitch, and yaw.
kat code for the original attr commands is returned in a
dict object separated into z, pitch and yaw.
"""
old_attr={'z':[],'pitch':[],'yaw':[]}
for mirror in ["ETMY","ETMX","ITMY","ITMX","PRM","PR2","PR3","SRM","SR2","SR3","BS"]:
mirror = self.kat.components[mirror]
if mirror.mass != None: old_attr['z'].append(mirror.mass.getFinesseText()[0])
if mirror.zmech != None: old_attr['z'].append(mirror.zmech.getFinesseText()[0])
if mirror.Iy != None: old_attr['pitch'].append(mirror.Iy.getFinesseText()[0])
if mirror.rymech != None: old_attr['pitch'].append(mirror.rymech.getFinesseText()[0])
if mirror.Ix != None: old_attr['yaw'].append(mirror.Ix.getFinesseText()[0])
if mirror.rxmech != None: old_attr['yaw'].append(mirror.rxmech.getFinesseText()[0])
if z:
mirror.mass = None
......@@ -209,6 +220,29 @@ class ALIGO_IFO(IFO):
if yaw:
mirror.Ix = None
mirror.rxmech = None
return old_attr
def restore_susp(self, old_attr, z=True, pitch=True, yaw=True):
"""
This is a pair function to fix_mirrors.
It will restore any suspension settings previously stored as kat code strings
in a dict object of format
old_attr={'z':[],'pitch':[],'yaw':[]}
This can be done individuallly or for z, pitch, and yaw.
"""
if z:
for ii in old_attr['z']:
self.kat.parse(ii)
if pitch:
for ii in old_attr['pitch']:
self.kat.parse(ii)
if yaw:
for ii in old_attr['yaw']:
self.kat.parse(ii)
def lengths_status(self):
self.compute_derived_lengths()
......@@ -256,8 +290,9 @@ class ALIGO_IFO(IFO):
spaces between the laser and HAM2 and PRC. Assumes spaces exists
with name and node:
sHAM2in and node nIMCout
sPRCin and node nHAM2out
If removing HAM2, adds a replacement dbs, `FI`, directly before the PRM,
to restore the REFL port.
This function alters the kat object directly.
"""
......@@ -272,7 +307,11 @@ class ALIGO_IFO(IFO):
if removeHAM2:
self.kat.removeBlock("HAM2")
self.kat.nodes.replaceNode(self.kat.sPRCin, 'nHAM2out', 'nLaserOut')
# self.kat.nodes.replaceNode(self.kat.sPRCin, 'nHAM2out', 'nLaserOut') #without FI restoration.
self.kat.parse("""
s sIO 0 nLaserOut nFI1
dbs FI nFI1 nFI2 nHAM2out nREFL
""",addToBlock='PRC') #dummy space needed between mod2 and FI.
def remove_FI_OMC(self, removeFI=True, removeOMC=True):
......@@ -1327,7 +1366,7 @@ def setup(_base, DC_offset_pm=20, verbose=False, debug=False):
base.removeBlock('powers', False)
base.phase = 2
base.IFO.fix_mirrors()
susp_attr = base.IFO.fix_mirrors()
kat = base.deepcopy()
kat.IFO.remove_modulators()
......@@ -1365,4 +1404,6 @@ def setup(_base, DC_offset_pm=20, verbose=False, debug=False):
#the lock block of the kat
lock_cmds = base.IFO.add_locks_block(locks, verbose=verbose)
base.IFO.restore_susp(susp_attr)
return base
This diff is collapsed.
import numpy as np
def filter_cavity_parameters(P, lambda0, m, Titm, Tsrm, L, loss=0):
"""
Compute the optimal filter cavity detuning phase and input mirror
transmissivity for frequency-dependent squeezing in a tuned, dual-recycled
interferometer.
P - Arm cavity circulating power [W]
lambda0 - main laser wavelength [m]
m - mass of test masses (mirrors) [kg]
Titm - Power transmissivity of input test mass
Tsrm - Power transmissivity of signal recycling mirror
L - Filter cavity length [m]
loss - Filter cavity round-trip power loss
See Kwee et al. `Decoherence and degradation of squeezed states in
quantum filter cavities` Physical Review D, 2014, 90, 062006
"""
c = 299792458.0
w0 = 2 * np.pi * c / lambda0
FSR = c / (2.0 * L)
# Approximate frequency at which IFO reaches SQL
# (i.e. radiation pressure noise = shot noise)
w_sql_0 = 8 / c * np.sqrt(P * w0 / (m * Titm))
w_sql = np.sqrt(Tsrm) / (1 + np.sqrt(1 - Tsrm)) * w_sql_0
if loss > 0:
epsilon = 4 / (
2 + np.sqrt(2 + 2 * np.sqrt(1 + (2 * w_sql / (FSR * loss)) ** 4))
)
else:
epsilon = 0
# Filter cavity bandwidth
gamma_f = (
np.sqrt(2 / ((2 - epsilon) * np.sqrt(1 - epsilon)))
* w_sql
/ (2 * np.pi * np.sqrt(2))
)
# Detuning
delta = np.sqrt(1 - epsilon) * gamma_f
phi = -delta / FSR * 180.0
T = 2.0 * gamma_f / FSR * 2 * np.pi
return phi, T
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