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

minor code cleanup

parent 00ac9ba9
No related branches found
No related tags found
No related merge requests found
...@@ -28,8 +28,9 @@ def gravg(f, ifo): ...@@ -28,8 +28,9 @@ def gravg(f, ifo):
L = ifo.Infrastructure.Length L = ifo.Infrastructure.Length
G = scipy.constants.G G = scipy.constants.G
rho = ifo.Seismic.Rho rho = ifo.Seismic.Rho
beta = ifo.Seismic.Beta # factor to account for correlation between masses # factor to account for correlation between masses
# and the height of the mirror above the ground # and the height of the mirror above the ground
beta = ifo.Seismic.Beta
if 'Spectrum' in ifo.Seismic: if 'Spectrum' in ifo.Seismic:
seismic = ifo.Seismic.Spectrum seismic = ifo.Seismic.Spectrum
...@@ -43,7 +44,8 @@ def gravg(f, ifo): ...@@ -43,7 +44,8 @@ def gravg(f, ifo):
n = (beta*4*pi/L*(fgg**2/f**2)*seismic)**2 n = (beta*4*pi/L*(fgg**2/f**2)*seismic)**2
# Feedforward cancellation # Feedforward cancellation
n = n / (ifo.Seismic.Omicron)**2 n /= (ifo.Seismic.Omicron)**2
return n return n
...@@ -96,5 +98,6 @@ def ground(Seismic, f): ...@@ -96,5 +98,6 @@ def ground(Seismic, f):
raise 'Unknown seismic.site' raise 'Unknown seismic.site'
# convert into displacement # convert into displacement
n = n/(2*pi*f) n /= 2*pi*f
return n return n
...@@ -40,9 +40,9 @@ def seismic(f, ifo): ...@@ -40,9 +40,9 @@ def seismic(f, ifo):
n = nv + nh n = nv + nh
# Convert into Strain PSD (4 TMs) # Convert into Strain PSD (4 TMs)
nh = 4 * nh / ifo.Infrastructure.Length**2 nh *= 4 / ifo.Infrastructure.Length**2
nv = 4 * nv / ifo.Infrastructure.Length**2 nv *= 4 / ifo.Infrastructure.Length**2
n = 4 * n / ifo.Infrastructure.Length**2 n *= 4 / ifo.Infrastructure.Length**2
return n return n
......
...@@ -63,7 +63,7 @@ def suspR(f, ifo): ...@@ -63,7 +63,7 @@ def suspR(f, ifo):
# thermal noise (m^2/Hz) for one suspension # thermal noise (m^2/Hz) for one suspension
w = 2*pi*f w = 2*pi*f
noise = noise + 4 * kB * Temp[ii] * abs(imag(dxdF[ii,:])) / w noise += 4 * kB * Temp[ii] * abs(imag(dxdF[ii,:])) / w
if ifo.Suspension.Type == 'Quad_MB': if ifo.Suspension.Type == 'Quad_MB':
raise Exception('not dealing with Quad_MB suspensions currently') raise Exception('not dealing with Quad_MB suspensions currently')
...@@ -75,7 +75,7 @@ def suspR(f, ifo): ...@@ -75,7 +75,7 @@ def suspR(f, ifo):
#noise = noise.^2; %square to make strain^2 #noise = noise.^2; %square to make strain^2
else: else:
# turn into gravitational wave strain; 4 masses # turn into gravitational wave strain; 4 masses
noise = 4 * noise / ifo.Infrastructure.Length**2 noise *= 4 / ifo.Infrastructure.Length**2
return np.squeeze(noise) return np.squeeze(noise)
......
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