Commit a841dfb4 authored by Daniel Brown's avatar Daniel Brown

Merge branch 'master' of git.ligo.org:finesse/test

parents c0b082fa 1c49f226
......@@ -3,10 +3,10 @@ s s1 5 nlaser nm
m m1 0.5 0.4 0 nm nfree
attr m1 mass 0.5m
ad ao+ 0 nlaser
ad ao- 0 nlaser
put ao+ f $x1
put ao- f $mx1
ad ao_p 0 nlaser
ad ao_m 0 nlaser
put ao_p f $x1
put ao_m f $mx1
fsig AmpMod l1 amp 1 0 0.1
xaxis AmpMod f log 0.1 10M 400
......
......@@ -5,10 +5,10 @@ s s2 5 nm2 nlaser2
l l2 2 0 nlaser2
attr m1 mass 0.5m
ad ao+ 0 nlaser2
ad ao- 0 nlaser2
put ao+ f $x1
put ao- f $mx1
ad ao_p 0 nlaser2
ad ao_m 0 nlaser2
put ao_p f $x1
put ao_m f $mx1
fsig AmpMod l1 amp 1 0 0.1
xaxis AmpMod f log 0.1 10M 400
......
......@@ -5,10 +5,10 @@ s s2 5 nm2 nlaser2
l l2 4 0 nlaser2
attr m1 mass 0.5m
ad ao+ 0 nlaser
ad ao- 0 nlaser
put ao+ f $x1
put ao- f $mx1
ad ao_p 0 nlaser
ad ao_m 0 nlaser
put ao_p f $x1
put ao_m f $mx1
fsig AmpMod l1 amp 1 0 0.1
fsig AmpMod2 l2 amp 1 0.5 0.1
......
......@@ -5,10 +5,10 @@ s s2 5 nm2 nlaser2
l l2 4 0 nlaser2
attr m1 mass 0.5m
ad ao+ 0 nlaser2
ad ao- 0 nlaser2
put ao+ f $x1
put ao- f $mx1
ad ao_p 0 nlaser2
ad ao_m 0 nlaser2
put ao_p f $x1
put ao_m f $mx1
fsig AmpMod l1 amp 1 0 0.1
fsig AmpMod2 l2 amp 1 0.5 0.1
......
......@@ -128,6 +128,20 @@ def runkat(katfile):
data = []
for name, el in ifo.model.elements.items():
if isinstance(el, finesse.detectors.ComplexCamera):
# The camera is a little weird, as it's really 2 beam sweeps.
# It's not guaranteed to be the only detector, but it's the way
# most (all?) of these tests are, so we just assume that it is
axes = [el.x, el.y]
outfile = [[] for ax in axes]
d = out[name]
for idx in np.ndindex(d.shape):
for ax, val in enumerate(idx):
outfile[ax].append(axes[ax][val])
for idx, ax in enumerate(outfile):
outfile[idx] = np.array(ax)
data.append(np.abs(np.ravel(d)))
break
if isinstance(el, finesse.detectors.Detector):
d = np.array(out[name]).flatten()
if (not isinstance(el, finesse.detectors.PowerDetector)
......
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