Skip to content
Snippets Groups Projects
Commit 8492a0d3 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

seismic code simplification

susQuad function take sus Struct instead of full ifo
parent b3adea0a
No related branches found
No related tags found
1 merge request!51simplify noise calculation functions
......@@ -120,7 +120,7 @@ def precompIFO(f, ifoin, PRfixed=True):
# Suspension
# if the suspension code supports different temps for the stages
fname = eval('suspension.susp{}'.format(ifo.Suspension.Type))
hForce, vForce, hTable, vTable = fname(f, ifo)
hForce, vForce, hTable, vTable = fname(f, ifo.Suspension)
try:
# full TF (conventional)
......
......@@ -67,14 +67,14 @@ def top_displ_to_tst_displ(k, m, f):
return X0 * k0
def suspQuad(f, ifo, material='Silica'):
def suspQuad(f, sus, material='Silica'):
"""Suspension for quadruple pendulum
`f` is frequency vector, `ifo` is IFO model. `material` specifies
material used for test mass suspension stage. steel used for all
other stages. Violin modes are included.
`f` is frequency vector, `sus` is suspension model. `material`
specifies material used for test mass suspension stage. steel
used for all other stages. Violin modes are included.
ifo.Suspension.FiberType should be: 0=round, 1=ribbons.
sus.FiberType should be: 0=round, 1=ribbons.
hForce, vForce = transfer functions from the force on the TM to TM
motion these should have the correct losses for the mechanical
......@@ -84,7 +84,7 @@ def suspQuad(f, ifo, material='Silica'):
= hForce + theta^2 * vForce
= admittance / (i * w)
where theta = ifo.Suspension.VHCoupling.theta.
where theta = sus.VHCoupling.theta.
Since this is just suspension thermal noise, the TM internal modes
and coating properties should not be included.
......@@ -101,8 +101,6 @@ def suspQuad(f, ifo, material='Silica'):
"""
g = const.g
sus = ifo.Suspension
# bottom stage fiber Type
FiberType = sus.FiberType
assert FiberType in FIBER_TYPES
......@@ -417,10 +415,10 @@ def suspQuad(f, ifo, material='Silica'):
return hForce, vForce, hTable, vTable
def suspBQuad(f, ifo):
def suspBQuad(f, sus):
"""Wrapper of suspQuad to use Silicon for final stage
FIXME: material should be specified in ifo.Suspension.Stage
FIXME: material should be specified in sus.Stage
"""
return suspQuad(f, ifo, material='Silicon')
return suspQuad(f, sus, material='Silicon')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment