23 lines
626 B
Python
Executable File
23 lines
626 B
Python
Executable File
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 |