Commit 445bb049 authored by Andreas Freise's avatar Andreas Freise
Browse files

Merge branch 'master' of gitmaster.atlas.aei.uni-hannover.de:pykat/pykat

parents ee9f0a8d edc41011
......@@ -24,9 +24,10 @@ kat.parseCommands(code)
kat.add(cavity('cav1', 'm1', 'n3', 'm2', 'n4'))
kat.add(photodiode('pd_cav','n4',num_demods=1, demods=[1]))
kat.add(photodiode('pd_ref','n2'))
kat.add(photodiode('pd_trs','n5'))
kat.add(photodiode('pd_cav','n4', num_demods=1, demods=[1]))
kat.add(xaxis("lin", [0, 360], kat.m2, kat.m2.phi, 100))
......@@ -41,7 +42,6 @@ out = kat.run(printout=0,printerr=0)
pl.figure()
pl.plot(out.x, out["pd_cav"])
pl.plot(out.x, out["pd_ref"])
pl.xlabel(out.xlabel)
pl.ylabel("Intensity [W]")
pl.legend(out.ylabels)
......
......@@ -74,11 +74,13 @@ class katRun(object):
print idx
if len(idx) == 1 and len(self.y.shape) == 1:
return self.y.squeeze()
return self.y
elif len(idx) > 0 and len(self.y.shape) == 1:
return self.y[idx]
elif len(idx) > 0:
return self.y[:,idx].squeeze()
elif len(idx) == 1:
return self.y[idx].squeeze()
return self.y[:,idx].squeeze()
else:
raise pkex.BasePyKatException("No output by the name {0} found".format(str(value)))
......
Supports Markdown
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