diff --git a/gwinc/gwinc.py b/gwinc/gwinc.py index b12bc31f7c3bd7b72284e6844b3d889d88a2f641..9bf2072c5263f769e1ec981027c83451d3531460 100644 --- a/gwinc/gwinc.py +++ b/gwinc/gwinc.py @@ -13,16 +13,14 @@ def noise_calc(ifo, f): """Calculate all IFO noises and return as dict """ + ############################## + # suspension transfer functions + # + # this needs to be done here, instead of in precompIFO, because it + # requires the frequency vector - # quad cases, for backward compatability - if ifo.Suspension.Type in (0, 1, 2): - hForce, vForce, hTable, vTable = noise.suspensionthermal.suspQuad(f, ifo) - elif ifo.Suspension.Type == 'Quad': - ifo.Suspension.Type = 0 - hForce, vForce, hTable, vTable = noise.suspensionthermal.suspQuad(f, ifo) - else: - fname = noise.suspensionthermal.__dict__['susp' + str(ifo.Suspension.Type)] - hForce, vForce, hTable, vTable = fname(f, ifo) + fname = eval('noise.suspensionthermal.susp{}'.format(ifo.Suspension.Type)) + hForce, vForce, hTable, vTable = fname(f, ifo) # if the suspension code supports different temps for the stages try: diff --git a/gwinc/ifo/A+.yaml b/gwinc/ifo/A+.yaml index f99c9532eb052d74f69057e09732b963634b4895..536e47df2b5248217a3e2b29a9712df90407597d 100644 --- a/gwinc/ifo/A+.yaml +++ b/gwinc/ifo/A+.yaml @@ -70,9 +70,7 @@ Seismic: Omicron: 1 # Feedforward cancellation factor Suspension: - # 0 for cylindrical suspension - #Type: 'Quad' - Type: 2 + Type: 'Quad' # 0: round, 1: ribbons, 2: tapered FiberType: 2 BreakStress: 750e6 # Pa; ref. K. Strain diff --git a/gwinc/ifo/Voyager.yaml b/gwinc/ifo/Voyager.yaml index 11aa157425e373302e497c241c626cb663218841..6b064787f54a8c52063948c864fe6f24c6cd14bf 100644 --- a/gwinc/ifo/Voyager.yaml +++ b/gwinc/ifo/Voyager.yaml @@ -79,7 +79,7 @@ Seismic: #darmSeiSusFile: 'CryogenicLIGO/Sensitivity/GWINC/seismic.mat' Suspension: - Type: 'BQuad' # 0 for cylindrical suspension + Type: 'BQuad' # Suspension fiber temperatures [TOP UIM PUM TST] Temp: - 300.0 diff --git a/gwinc/ifo/aLIGO.yaml b/gwinc/ifo/aLIGO.yaml index 89617983dec131562f8f0a5f85e21724b9315fb2..68014c4d938dfa0833c47972930397102de4a5f7 100644 --- a/gwinc/ifo/aLIGO.yaml +++ b/gwinc/ifo/aLIGO.yaml @@ -68,9 +68,7 @@ Seismic: Omicron: 1 # Feedforward cancellation factor Suspension: - # 0 for cylindrical suspension - #Type: 'Quad' - Type: 2 + Type: 'Quad' # 0: round, 1: ribbons FiberType: 0 BreakStress: 750e6 # Pa; ref. K. Strain diff --git a/gwinc/noise/suspensionthermal.py b/gwinc/noise/suspensionthermal.py index 6e99e7596524738889e3846f87b360c355f987e7..9fcd1aa906356af6cf53be91f3d9d4048d5417af 100644 --- a/gwinc/noise/suspensionthermal.py +++ b/gwinc/noise/suspensionthermal.py @@ -6,10 +6,13 @@ from scipy.io.matlab.mio5_params import mat_struct def suspR(f, ifo): - """Thermal noise for quadruple pendulum - switches to various suspension types based on ifo.Suspension.Type - the general case calls the suspTYPE function to generate TFs""" + """Suspention thermal noise. + Assumes suspension transfer functions and V-H coupling have been + pre-calculated and populated into the relevant `ifo` struct + fields. + + """ # Assign Physical Constants kB = scipy.constants.k Temp = ifo.Suspension.Temp @@ -65,18 +68,9 @@ def suspR(f, ifo): w = 2*pi*f noise += 4 * kB * Temp[ii] * abs(imag(dxdF[ii,:])) / w - if ifo.Suspension.Type == 'Quad_MB': - raise Exception('not dealing with Quad_MB suspensions currently') - #mbquadlite2lateral_20090819TM_TN; - #tvec = sqrt(xvec.^2 + (1e-3*zvec).^2); - #tvec = tvec*2; % 4 masses - #nn.SuspThermalB = interp1(fvec, tvec, f, [], 0); - #noise = nn.SuspThermalB/ifo.Infrastructure.Length; % convert to strain - #noise = noise.^2; %square to make strain^2 - else: - # turn into gravitational wave strain; 4 masses - noise *= 4 / ifo.Infrastructure.Length**2 - return np.squeeze(noise) + # 4 masses, turn into gravitational wave strain + noise *= 4 / ifo.Infrastructure.Length**2 + return np.squeeze(noise) def suspBQuad(f, ifo):