Added phase control testing for RF sources

This commit is contained in:
Markus Rosenstihl
2018-11-27 17:53:06 +01:00
parent 6f43caef49
commit 8cdd3a73ef
3 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import numpy
def result():
o=MeasurementResult("overview")
for r in results:
if r is None: continue
#print r
data["single scan"]=r
phase = r.get_description("phase")
i = int(r.get_description("i"))
r1=numpy.array(r.get_result_by_index(0).y[0], dtype="Float64")
r2=numpy.array(r.get_result_by_index(1).y[0], dtype="Float64")
#print r1
r1-=r1.mean()
r1/=r1.std()
r2-=r2.mean()
r2/=r2.std()
c = numpy.dot(r1, r2)
print c
o[phase+360*i]=AccumulatedValue(c)
data["overview"]=o