Skip to content
Snippets Groups Projects
Commit f9d5d5b8 authored by Kevin Kuns's avatar Kevin Kuns
Browse files

Merge branch '68-mistake-in-suspension-thermal-noise-calculation' into 'master'

Resolve "Mistake in suspension thermal noise calculation"

Closes #68

See merge request gwinc/pygwinc!96
parents ce6c14a1 5fb55323
No related branches found
No related tags found
No related merge requests found
...@@ -420,10 +420,8 @@ def suspQuad(f, sus): ...@@ -420,10 +420,8 @@ def suspQuad(f, sus):
# Complex spring constants # Complex spring constants
khr = np.zeros([len(stages), len(w)]) khr = np.zeros([len(stages), len(w)])
khi = np.zeros([len(stages), 2, len(w)]) khi = np.zeros([len(stages), 2, len(w)])
kh = np.zeros([len(stages), len(w)], dtype=np.complex_)
kvr = np.zeros([len(stages), len(w)]) kvr = np.zeros([len(stages), len(w)])
kvi = np.zeros([len(stages), 2, len(w)]) kvi = np.zeros([len(stages), 2, len(w)])
kv = np.zeros([len(stages), len(w)], dtype=np.complex_)
for n, stage in enumerate(stages): for n, stage in enumerate(stages):
...@@ -570,25 +568,20 @@ def suspQuad(f, sus): ...@@ -570,25 +568,20 @@ def suspQuad(f, sus):
for m in range(2*len(stages)): for m in range(2*len(stages)):
# turn on only the loss of the current joint # turn on only the loss of the current joint
lossy_region_lower = np.zeros((len(stages), 1))
lossy_region_upper = np.zeros((len(stages), 1))
n = int(m/2) # stage number n = int(m/2) # stage number
if m % 2: isLower = m % 2
lossy_region_upper[n] = 1 stage_selection = np.zeros((len(stages), 1))
else: stage_selection[n] = 1
lossy_region_lower[n] = 1
# horizontal # horizontal
# only the imaginary part due to the specified region is used. # only the imaginary part due to the specified joint is used.
k = khr + 1j*(khi[:,0,:]*lossy_region_upper + k = khr + 1j*khi[:,isLower,:]*stage_selection
khi[:,1,:]*lossy_region_lower)
# calculate TFs # calculate TFs
hForce[m,:] = tst_force_to_tst_displ(k, masses, f) hForce[m,:] = tst_force_to_tst_displ(k, masses, f)
# vertical # vertical
# only the imaginary part due to the specified stage is used # only the imaginary part due to the specified joint is used
k = kvr + 1j*(kvi[:,0,:]*lossy_region_upper + k = kvr + 1j*kvi[:,isLower,:]*stage_selection
kvi[:,1,:]*lossy_region_lower)
# calculate TFs # calculate TFs
vForce[m,:] = tst_force_to_tst_displ(k, masses, f) vForce[m,:] = tst_force_to_tst_displ(k, masses, f)
......
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